📄 productadd.asp
字号:
<!--#include file="../include/bkconn.asp"-->
<!--#include file="checkUser.asp"-->
<%
function selectTreeList(i,deep)
dim sql
dim rs
dim tempi
dim rsID
set rs=server.createObject("adodb.recordset")
sql="select * from productSort where fatherID="&i
rs.open sql,conn,1,1
if rs.eof then
exit function
else
do while not rs.eof
rsID=rs("id")
rsName=rs("name")
if deep=0 then
response.write "<option value='"&rsID&"'"
else
response.write "<option value='"&rsID&"'"
end if
if rsID=productSort then response.write " selected"
response.write ">"
for tempi=1 to deep
response.write " "
next
response.write rsName&"</option>"
call selectTreeList(rsID,deep+1)
rs.movenext
loop
end if
end function
dim productSort
if Request("productSort")<>"" then
productSort=cint(Request("productSort"))
else
productSort=0
end if
%>
<html>
<head>
<title>商品添加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../main.css" type="text/css">
<script language=Javascript>
<!--
function checkForm(){
//if (form1.productSort.value=='0'){
// alert("请选择商品具体小类");
// return false;
// }
return true;
}
//-->
</script>
</head>
<body bgcolor="#9CC7EF" text="#000000">
<br>
<form method="post" action="saveProductAdd.asp" name="form1" onClick="return checkForm();" enctype="multipart/form-data" >
<table width="70%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
<tr>
<td colspan="2" bgcolor="#4296E7"> <div align="center"><font color="#FFFFFF">添加商品</font></div></td>
</tr>
<tr>
<td nowrap> <div align="right">商品编号</div></td>
<td> <input type="text" name="itemno" size="18"> <input name="recommendDate" type="hidden" value="<%=now()%>">
</td>
</tr>
<tr>
<td width="20%" nowrap> <div align="right">商品类别</div></td>
<td width="80%"> <select name="productSort">
<%call selectTreeList(0,0)%>
</select> </td>
</tr>
<tr>
<td nowrap><div align="right">商品品牌</div></td>
<td>
<%sql="select top 100 * from pinpai order by id desc"
set rs=conn.execute (sql)
%>
<select name="pinpai">
<%while not rs.eof %>
<option value="<%=rs("id")%>"><%=rs("name")%></option>
<%rs.movenext
wend%>
</select></td>
</tr>
<tr>
<td width="20%" nowrap> <div align="right">商品名称</div></td>
<td width="80%"> <input type="text" name="name" size="60"> </td>
</tr>
<tr>
<td width="20%" nowrap> <div align="right">市场价格</div></td>
<td width="80%"> <input type="text" name="memberPrice" size="12">
¥</td>
</tr>
<tr>
<td nowrap><div align="right">会员价格</div></td>
<td><input type="text" name="costPrice" size="12">
¥</td>
</tr>
<tr>
<td nowrap><div align="right">Vip会员价格</div></td>
<td><input name="vip" type="text" id="vip" size="12">
¥</td>
</tr>
<tr>
<td nowrap><div align="right">特价产品</div></td>
<td><select name="tejia" id="tejia">
<option value="1">是</option>
<option value="0" selected>否</option>
</select>
特价价格:
<input name="tejia1" type="text" size="12">
¥</td>
</tr>
<tr>
<td nowrap><div align="right">推荐</div></td>
<td><select name="recommend" id="recommend">
<option value="1">是</option>
<option value="0" selected>否</option>
</select></td>
</tr>
<tr>
<td nowrap> <div align="right">产 地</div></td>
<td> <input type="text" name="outer"> </td>
</tr>
<tr>
<td nowrap> <div align="right">规 格</div></td>
<td><input type="text" name="spec"> </td>
</tr>
<tr>
<td nowrap> <div align="right">商品小图</div></td>
<td> <input type="file" name="smallImg"> </td>
</tr>
<tr>
<td nowrap> <div align="right">商品大图</div></td>
<td> <input type="file" name="bigImg"> </td>
</tr>
<tr>
<td nowrap><div align="right">大图宽</div></td>
<td><input name="width" type="text"size="10"> </td>
</tr>
<tr>
<td nowrap><div align="right">大图高</div></td>
<td><input name="height" type="text"size="10"></td>
</tr>
<tr>
<td width="20%" nowrap> <div align="right">商品说明</div></td>
<td width="80%"> <textarea name="explain" cols="65" rows="15"></textarea>
</td>
</tr>
<tr>
<td colspan="2" nowrap> <div align="center">
<input type="submit" name="Submit" value="添加" >
<input type="button" name="button" value="清空">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -