www.gusucode.com > 深度梦想整站系统(asp) 1.14.02源码程序 > admin/product/product_Add.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
projectRootPath = "../../"	'相对当前应用程序根的位置
%>
<!-- #include file="../web.config.asp"-->


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="robots" content="noindex,nofollow" />
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>管理</title>
    
    <link href="../themes/<%=theme_Path%>/main.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
		function check(){
			if(document.form1.fproductName.value==""){
				document.form1.fproductName.focus();
				alert("产品名称不能为空!!");
				
				return false;
			}
			if(document.form1.fclass_id.value==""){
				alert("没有添加分类,请添加分类后再添加产品!!");
				document.form1.fclass_id.focus();
				return false;
			}
		}
    </script>

</head>

<body  id="bodyBg1">
<br />
&nbsp; <a href="product_Manage.asp">产品管理</a> | <a href="product_Add.asp">添加产品</a>
<hr color="#0099FF" size="1" />
<br />

<dl class="manageContent">
    <dt>产品管理</dt>
    <dd>
    	<br />
        <%
		if(Request.Form("fproductName")<>"")then
			fproductName=Request.Form("fproductName")
			fclass_id=Request.Form("fclass_id")
			fproductPic=Request.Form("fproductPic")
			fproductNum=Request.Form("fproductNum")
			fproductModel=Request.Form("fproductModel")
			funit=Request.Form("funit")
			fproductStandard=Request.Form("fproductStandard")
			fPrice=Request.Form("fPrice")
			fproductIntro=Request.Form("fproductIntro")
			fproductExplain=Request.Form("fproductExplain")
			fCreateTime=Request.Form("fCreateTime")
			fUpdateTime=Request.Form("fUpdateTime")
			fHits=Request.Form("fHits")
			fisCommend=Request.Form("fisCommend")
			fisView=Request.Form("fisView")
			fOrderID=Request.Form("fOrderID")
			fuploadFiles=Request.Form("fuploadFiles")
			sql="insert into deep_Product(fproductName,fclass_id,fproductPic,fproductNum,fproductModel,funit,fproductStandard,fPrice,fproductIntro,fproductExplain,fCreateTime,fUpdateTime,fHits,fisCommend,fisView,fOrderID,fuploadFiles)values('"&fproductName&"',"&fclass_id&",'"&fproductPic&"','"&fproductNum&"','"&fproductModel&"','"&funit&"','"&fproductStandard&"',"&fPrice&",'"&fproductIntro&"','"&fproductExplain&"','"&fCreateTime&"','"&fUpdateTime&"',"&fHits&","&fisCommend&","&fisView&","&fOrderID&",'"&fuploadFiles&"')"
			conn.execute(sql)
			Response.Write("产品["& fproductName &"]添加成功!!")
		else
		%>
        <form id="form1" name="form1" method="post" action="" onsubmit="return check()">
          <table width="99%" class="tableBoderForm">
            <tr>
              <td>产品名称:</td>
              <td><input name="fproductName" type="text" id="fproductName" size="50" /> *</td>
            </tr>
            <tr>
              <td>产品类别:</td>
              <td><select name="fclass_id" id="fclass_id">
              	<%
				set rsProductClass=conn.execute("select fclass_id,fclassName from deep_ProductClass order by fOrderID")
				if (rsProductClass.eof and rsProductClass.bof)then
					Response.Write("<option value=''>没有添加分类,请添加分类后再添加产品!!</option>")
				else
					while(not rsProductClass.eof)
				%>
                    <option value="<%=rsProductClass("fclass_id")%>"><%=rsProductClass("fclassName")%></option>
				<%
						rsProductClass.moveNext
					wend
				end if
				%>
              </select></td>
            </tr>
            <tr>
              <td>产品图片:</td>
              <td><input name="fproductPic" type="text" id="fproductPic" size="50" /><br />
              <iframe  ID="UploadFiles" src="../include/upload_form.asp?SavePath=../../upLoadFile/product/&parentBackValue=form1.fproductPic&MaxSize=500&FileType=gif/jpg/png/bmp&saveName=0" frameborder="0" scrolling="no" width="600" height="22"></iframe>
		<br />上传图片尺寸 140X170 
              </td>
            </tr>
            <tr>
              <td>商品编号:</td>
              <td><input type="text" name="fproductNum" id="fproductNum" /></td>
            </tr>
            <tr>
              <td>型号:</td>
              <td><input type="text" name="fproductModel" id="fproductModel" /></td>
            </tr>
            <tr>
              <td>单位:</td>
              <td><input type="text" name="funit" id="funit" /></td>
            </tr>
            <tr>
              <td>规格:</td>
              <td><input type="text" name="fproductStandard" id="fproductStandard" /></td>
            </tr>
            <tr>
              <td>产品价格:</td>
              <td><input name="fPrice" type="text" id="fPrice" value="0" /></td>
            </tr>
            <tr>
              <td>商品简介:</td>
              <td><textarea name="fproductIntro"  id="fproductIntro" cols="70" rows="8"></textarea>
              	  </td>
            </tr>
            <tr>
              <td>详细介绍:</td>
              <td><textarea name="fproductExplain" id="fproductExplain" style="display:none;"></textarea>
              <iframe id="eWebEditor1" src="../include/eWebEditor/eWebEditor.asp?id=fproductExplain&amp;style=deep_light_product&savefilename=fuploadFiles" frameborder="0" scrolling="no" width="650" height="400"></iframe><input type="hidden" name="fuploadFiles" id="fuploadFiles" /></td>
            </tr>
            <tr>
              <td>生成时间:</td>
              <td><input name="fCreateTime" type="text" id="fCreateTime" value="<%=now()%>" size="30" /></td>
            </tr>
            <tr>
              <td>更新时间:</td>
              <td><input name="fUpdateTime" type="text" id="fUpdateTime" value="<%=now()%>" size="30" /></td>
            </tr>
            <tr>
              <td>阅读点击数:</td>
              <td><input name="fHits" type="text" id="fHits" value="0" /></td>
            </tr>
            <tr>
              <td>是否精品推荐:</td>
              <td><input name="fisCommend" type="radio" id="radio" value="0" checked="checked" />
                默认普通
<input type="radio" name="fisCommend" id="radio2" value="1" />精品推荐首页显示</td>
            </tr>
            <tr>
              <td>是否审核:</td>
              <td><input name="fisView" type="radio" id="radio3" value="1" checked="checked" />
                审核                <input type="radio" name="fisView" id="radio4" value="0" />
              未审核</td>
            </tr>
            <tr>
              <td>排序ID:</td>
              <td><input name="fOrderID" type="text" id="fOrderID" value="0" /></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><input type="submit" name="button" id="button" value="提交" />
              <input type="reset" name="button2" id="button2" value="重置" /></td>
            </tr>
          </table>
        </form>
        <% End If %>
        <br />
    </dd>
</dl>
<br />
</body>
</html>
<%
call closeConnDB()
%>