?? 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 + -