📄 add_sp1.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="check_user.asp"-->
<html>
<head>
<title>商品添加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY { FONT-SIZE: 9pt }
a:link { color: #000000; text-decoration: none}
a:visited { color:#000000; text-decoration: none}
a:hover { color: #CC0000; text-decoration: underline}
td {font-size:9pt;line-height:12pt;}
-->
</style>
</head>
<body background="../pic/user/bg.jpg" leftmargin="0" topmargin="0">
<%
sp_name=request.cookies("sp_name")
set Product_rs=server.createobject("adodb.recordset") '取得此商家所有商品资料
sql="select Class_2 from Product where p_shop='" & sp_name & "'"
Product_rs.open sql,conn,1,1
Product_sum=Product_rs.recordcount
Product_rs.close:set Product_rs=nothing
set rs=server.createobject("adodb.recordset") '取得商家资料
sql="select * from shop where shop_name1='" & request.cookies("sp_name") & "'"
rs.open sql,conn,1,1
if rs("p_count")<Product_sum then
response.Write "<div align=center><br><br><br><strong>对不起!你已上传的商品数量已经超出了最大数,如需要继续上传,请联系管理员升级你的权限!</strong></div>"
response.end()
end if
rs.close:set rs=nothing
sql="select * from SoftDown_Catalog where sp_name='"&sp_name&"' order by rootid,orders"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.Write "<div align=center><br><strong>请先设置好栏目分类后再添加商品</strong></div>"
response.end()
end if
%>
<div align="center"><br><strong>商品添加——选择分类</strong></div>
<form name="form1" method="post" action="add_sp2.asp">
<table width="96%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#666666" bordercolordark="#FFFFFF">
<tr>
<td width="30%">请选择该商品在你的<font color="#0000FF"><strong>网店</strong></font>里的分类</td>
<td width="70%">请选择该商品在<font color="#0000FF"><strong>商城</strong></font>的的分类</td>
</tr>
<tr>
<td valign="top"> <table width="100%" cellspacing="1" cellpadding="2" align=center>
<%
do while not rs.eof
%>
<tr>
<td >
<%
if rs("depth") =1 then Response.Write " ├"
if rs("depth") >1 then
for i=2 to rs("depth")
Response.Write " │"
next
Response.Write " ├ "
end if
if rs("parentid")=0 then Response.Write("<b>")
%>
<%if rs("child")=0 then%>
<%=rs("CatalogName")%> <input type="radio" name="Classification" value="<%=rs("CatalogID")%>,<%=rs("ParentStr")%>">
<%else%>
<%=rs("CatalogName")%>
<%end if%>
</td>
</tr>
<%
rs.movenext
loop
rs.close:set rs=nothing
%>
</table></td>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" >
<%
set rs_class_1=server.createobject("adodb.recordset")
sqltext2="select * from Class_1 "
rs_class_1.open sqltext2,conn,1,1
While Not rs_class_1.EOF
%>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td>
<%
set rs_p2=server.createobject("adodb.recordset")
sqltext3="select * from Class_2 where Class_1_Name='" & rs_class_1("Class_1_Name") & "'"
rs_p2.open sqltext3,conn,1,1
response.write "<b>"&rs_class_1("Class_1_Name")&"</b><br>"
While Not rs_p2.EOF
%>
<%= rs_p2("Class_2_Name")%><input type="radio" name="Class_id" value="<%=rs_p2("id")%>">
<%
rs_p2.MoveNext
j=j+1
Wend
rs_p2.close
%>
<table width="60%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="3"></td>
</tr>
<tr>
<td height="1" bgcolor="#EAAF00"></td>
</tr>
<tr>
<td height="3"></td>
</tr>
</table></td>
</tr>
</table>
<%
rs_class_1.MoveNext
Wend
rs_class_1.close
%>
</td>
</tr>
</table></td>
</tr>
</table>
<br>
<div align="center">
<input type="submit" name="Submit" value="下一步">
</div>
</form>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -