📄 prod0.asp
字号:
old=rs("LarCode")
rs.movenext
if rs.eof then exit do
Loop
end if
set rs=nothing
buyok_class.close
set fso=nothing
conn.close
response.write "<script language='javascript'>"
response.write "alert('操作成功,商品类别由“"&request("old")&"”更新为“"&request(text)&"”');"
response.write "location.href='prod0.asp';"
response.write "</script>"
response.end
else
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if text="MidCode" then
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr>
<td colspan=2 class=td height=18>
<div align="center"><b><font color="#FF0000"> <font color="#FFFFFF">抱歉,您使用的是未注册版本,未提供本功能.
</font></font></b></div>
</td>
</tr>
<tr>
<td width=13% height=25 align=center> </td>
<td width="87%"><b><font color="#FF0000">客户服务及反馈中心 抱歉,您使用的是未注册版本,未提供本功能.</font></b></td>
</tr>
<tr>
<td width=13% height=25 align=center valign=top"><font color="#FF0000">联系方式</font></td>
<td width="87%"><b><font color="#FF0000">Phone:010-88684912 13366690044 MSN:asp3721@msn.com
QQ:88353022 </font></b></td>
</tr>
<form action='prod0.asp?action=addMidclass' method=post name=addmidclass>
<tr>
<td width=13% height=25 align=center><font color="#FF0000">备 注</font></td>
<td width="87%"><b><font color="#FF0000">非在线支付购买的用户,汇完款 请QQ或电话联系管理员</font></b></td>
</tr>
<tr>
<td colspan=2>
<div align="center"><b><font color="#FF0000"><a href="http://www.asp3721.cn/"><font color="#990000">asp3721软件中心
我们将为你提供优质服务,谢谢!http://www.asp3721.cn/</font></a></font></b> </div>
</td>
</tr>
</form>
</table>
<%
end if
if text="LarCode" then
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr>
<td colspan=2 class=td height=18>
<div align="center"><b><font color="#FF0000"> <font color="#FFFFFF">抱歉,您使用的是未注册版本,未提供本功能.
</font></font></b></div>
</td>
</tr>
<tr>
<td width=13% height=25 align=center> </td>
<td width="87%"><b><font color="#FF0000">客户服务及反馈中心 抱歉,您使用的是未注册版本,未提供本功能.</font></b></td>
</tr>
<tr>
<td width=13% height=25 align=center valign=top"><font color="#FF0000">联系方式</font></td>
<td width="87%"><b><font color="#FF0000">Phone:010-88684912 13366690044 MSN:asp3721@msn.com
QQ:88353022 </font></b></td>
</tr>
<form action='prod0.asp?action=addMidclass' method=post name=addmidclass>
<tr>
<td width=13% height=25 align=center><font color="#FF0000">备 注</font></td>
<td width="87%"><b><font color="#FF0000">非在线支付购买的用户,汇完款 请QQ或电话联系管理员</font></b></td>
</tr>
<tr>
<td colspan=2>
<div align="center"><b><font color="#FF0000"><a href="http://www.asp3721.cn/"><font color="#990000">asp3721软件中心
我们将为你提供优质服务,谢谢!http://www.asp3721.cn/</font></a></font></b> </div>
</td>
</tr>
</form>
</table>
<%
end if
rs.close
set rs=nothing
end if
end sub
sub showclass()
'分类管理首页
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr><td colspan=2 class=td height=18>商品分类管理</td></tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from buyok_class order by LarSeq asc, MidSeq asc"
rs.open sql,conn,1,3
dim old
if rs.eof and rs.bof then
response.Redirect "prod0.asp?action=addLarclass"
else
Do While Not rs.eof
if rs("LarCode")<>old then '判断另一个一级分类,old的值在二级分类列表后赋值
%>
<tr><td width=50% height=30> <img border=0 src=../images/admin/small_left.gif> <font color=red><b><%=rs("LarCode")%></b></font>
<a alt="在<font color=red> <%=rs("LarCode")%> </font>下添加二级分类" href='prod0.asp?action=addMidclass&LarCode=<%=rs("LarCode")%>'>(添加二级分类)</a></td>
<td> <u alt="编辑 <font color=red><%=rs("LarCode")%></font> 的名称" style="cursor:hand" onclick="{location.href='prod0.asp?action=editclass&LarCode=<%=rs("LarCode")%>';}">编辑</u> <a href='prod0.asp?action=larup&larcode=<%=rs("LarCode")%>'><img border=0 src=../images/admin/small_up1.gif alt='一级向上移动'></a> <a href='prod0.asp?action=lardown&larcode=<%=rs("LarCode")%>'><img border=0 src=../images/admin/small_down1.gif alt='一级分类向下移动'></a> <u
<%if tree_del_yesorno="1" then%>
alt="删除 <font color=red><%=rs("LarCode")%></font> 分类<br>注意:此操作将同时删除该分类下的全部商品<br>提示:您可到 <font color=red>参数设置</font> 中去看看……"
<%else%>
alt="删除 <font color=red><%=rs("LarCode")%></font> 分类<br>注意:删除分类后,所属商品将转为未归类商品<br>提示:您可到 <font color=red>参数设置</font> 去看看……"
<%end if%>
style="cursor:hand" value="删除" onclick="{if(confirm('注意:该操作不可恢复!\n\n确实删除所选一级分类吗?')){location.href='prod0.asp?action=delLarclass&LarCode=<%=rs("LarCode")%>';}}"></u>
<a href='prod0.asp?action=view&larcode=<%=rs("LarCode")%>' alt="浏览<font color=red> <%=rs("LarCode")%> </font>分类下的全部商品">浏览</a>
<%if addlar<>"no" then response.write " <a href=prod0.asp?action=addLarclass><font color=blue><b>添加一级分类</b></font></a>"%>
</td>
</tr>
<%
addlar="no"
end if
%>
<tr><td width=50% height=25> <font color=#0066cc>
<b><%=rs("MidCode")%></b></font></td>
<td><u alt="修改 <font color=red><%=rs("MidCode")%></font> 的名称" style="cursor:hand" onclick="{location.href='prod0.asp?action=editclass&MidCode=<%=rs("MidCode")%>&larcode=<%=rs("LarCode")%>';}">修改</u> <a href='prod0.asp?action=midup&MidCode=<%=rs("MidCode")%>&larcode=<%=rs("LarCode")%>'><img border=0 src=../images/admin/small_up2.gif alt='二级分类向上移动'></a> <a href='prod0.asp?action=middown&MidCode=<%=rs("MidCode")%>&larcode=<%=rs("LarCode")%>'><img border=0 src=../images/admin/small_down2.gif alt='二级分类向下移动'></a> <u
<%if tree_del_yesorno="1" then%>
alt="删除 <font color=red><%=rs("MidCode")%></font> 分类<br>注意:此操作将同时删除该分类下的全部商品<br>提示:您可到 <font color=red>参数设置</font> 中去看看……"
<%else%>
alt="删除 <font color=red><%=rs("MidCode")%></font> 分类<br>注意:删除分类后,所属商品将转为未归类商品<br>提示:您可到 <font color=red>参数设置</font> 去看看……"
<%end if%>
style="cursor:hand" onclick="{if(confirm('注意:该操作不可恢复!\n\n确实删除所选二级分类吗?')){location.href='prod0.asp?action=delMidclass&MidCode=<%=rs("MidCode")%>&larcode=<%=rs("LarCode")%>';}}"></u>
<a href='prod0.asp?action=view&MidCode=<%=rs("MidCode")%>&larcode=<%=rs("LarCode")%>' alt="浏览<font color=red> <%=rs("MidCode")%> </font>分类下的全部商品">浏览</a>
</td>
</tr>
<%
old=rs("LarCode")
rs.movenext
if rs.eof then exit do
Loop
end if
response.write "<tr><td colspan=2><input type='button' onClick=""javascript:location.href='prod0.asp?action=output';"" value='更新分类' alt='修改分类后,请更新分类'></td></tr>"
rs.close
set rs=nothing
end sub
'二级分类向上提升
if action="midup" then
LarCode=request("LarCode")
MidCode=request("MidCode")
dim i,mid(100)
i=0
set rs=server.createobject("adodb.recordset")
sql="select * from buyok_class where larcode='"&larcode&"' order by MidSeq asc"
rs.open sql,conn,1,3
do while not rs.eof
i=i+1
if rs("midcode")=midcode then G=i
if rs.eof then exit do
rs.movenext
loop
rs.movefirst
i=0
do while not rs.eof
i=i+1
if i=g-1 then
rs("midseq")=i+1
elseif i>1 and i=g then
rs("midseq")=i-1
else
rs("midseq")=i
end if
rs.update
if rs.eof then exit do
rs.movenext
loop
Set Fso = CreateObject("Scripting.FileSystemObject")
set buyok_class=Fso.CreateTextFile(Server.MapPath("../include/buyok_class.asp"),true)
set rs=conn.execute("select * from buyok_class order by LarSeq asc, MidSeq asc")
if rs.eof and rs.bof then
buyok_class.writeline "暂无商品分类"
else
Do While Not rs.eof
if rs("LarCode")<>old then
buyok_class.writeline "lar:"&rs("LarCode")
end if
buyok_class.writeline rs("MidCode")
old=rs("LarCode")
rs.movenext
if rs.eof then exit do
Loop
end if
set rs=nothing
buyok_class.close
set fso=nothing
response.Redirect "prod0.asp"
rs.close
set rs=nothing
end if
'二级分类向下降
if action="middown" then
LarCode=request("LarCode")
MidCode=request("MidCode")
i=0
set rs=server.createobject("adodb.recordset")
sql="select * from buyok_class where larcode='"&larcode&"' order by MidSeq asc"
rs.open sql,conn,1,3
do while not rs.eof
i=i+1
if rs("midcode")=midcode then G=i
if rs.eof then exit do
rs.movenext
loop
rs.movefirst
i=0
do while not rs.eof
i=i+1
if i=g then
rs("midseq")=i+1
elseif i=g+1 then
rs("midseq")=i-1
else
rs("midseq")=i
end if
rs.update
if rs.eof then exit do
rs.movenext
loop
rs.close
set rs=nothing
Set Fso = CreateObject("Scripting.FileSystemObject")
set buyok_class=Fso.CreateTextFile(Server.MapPath("../include/buyok_class.asp"),true)
set rs=conn.execute("select * from buyok_class order by LarSeq asc, MidSeq asc")
if rs.eof and rs.bof then
buyok_class.writeline "暂无商品分类"
else
Do While Not rs.eof
if rs("LarCode")<>old then
buyok_class.writeline "lar:"&rs("LarCode")
end if
buyok_class.writeline rs("MidCode")
old=rs("LarCode")
rs.movenext
if rs.eof then exit do
Loop
end if
set rs=nothing
buyok_class.close
set fso=nothing
response.Redirect "prod0.asp"
end if
'一级分类向上提升
if action="larup" then
LarCode=request("LarCode")
i=0
set rs=server.createobject("adodb.recordset")
sql="select * from buyok_class order by LarSeq asc, MidSeq asc"
rs.open sql,conn,1,3
old=""
do while not rs.eof
if rs("larcode")<>old then i=i+1
if rs("larcode")=larcode then
G=i
exit do
end if
if rs.eof then exit do
old=rs("larcode")
rs.movenext
loop
rs.movefirst
i=0
old=""
do while not rs.eof
if rs("larcode")<>old then i=i+1
if i=g-1 then
rs("larseq")=i+1
elseif i>1 and i=g then
rs("larseq")=i-1
else
rs("larseq")=i
end if
rs.update
if rs.eof then exit do
old=rs("larcode")
rs.movenext
loop
rs.close
set rs=nothing
Set Fso = CreateObject("Scripting.FileSystemObject")
set buyok_class=Fso.CreateTextFile(Server.MapPath("../include/buyok_class.asp"),true)
set rs=conn.execute("select * from buyok_class order by LarSeq asc, MidSeq asc")
if rs.eof and rs.bof then
buyok_class.writeline "暂无商品分类"
else
Do While Not rs.eof
if rs("LarCode")<>old then
buyok_class.writeline "lar:"&rs("LarCode")
end if
buyok_class.writeline rs("MidCode")
old=rs("LarCode")
rs.movenext
if rs.eof then exit do
Loop
end if
set rs=nothing
buyok_class.close
set fso=nothing
response.Redirect "prod0.asp"
end if
'一级分类向下降
if action="lardown" then
LarCode=request("LarCode")
i=0
set rs=server.createobject("adodb.recordset")
sql="select * from buyok_class order by LarSeq asc, MidSeq asc"
rs.open sql,conn,1,3
old=""
do while not rs.eof
if rs("larcode")<>old then i=i+1
if rs("larcode")=larcode then
G=i
exit do
end if
if rs.eof then exit do
old=rs("larcode")
rs.movenext
loop
rs.movefirst
i=0
old=""
do while not rs.eof
if rs("larcode")<>old then i=i+1
if i=g then
rs("larseq")=i+1
elseif i=g+1 then
rs("larseq")=i-1
else
rs("larseq")=i
end if
rs.update
if rs.eof then exit do
old=rs("larcode")
rs.movenext
loop
rs.close
set rs=nothing
Set Fso = CreateObject("Scripting.FileSystemObject")
set buyok_class=Fso.CreateTextFile(Server.MapPath("../include/buyok_class.asp"),true)
set rsf=conn.execute("select * from buyok_class order by LarSeq asc, MidSeq asc")
if rsf.eof and rsf.bof then
buyok_class.writeline "暂无商品分类"
else
Do While Not rsf.eof
if rsf("LarCode")<>old then
buyok_class.writeline "lar:"&rsf("LarCode")
end if
buyok_class.writeline rsf("MidCode")
old=rs("LarCode")
rsf.movenext
if rsf.eof then exit do
Loop
end if
set rsf=nothing
buyok_class.close
set fso=nothing
response.Redirect "prod0.asp"
end if
'更新分类
if action="output" then
Set Fso = CreateObject("Scripting.FileSystemObject")
set buyok_class=Fso.CreateTextFile(Server.MapPath("../include/buyok_class.asp"),true)
set rs=conn.execute("select * from buyok_class order by LarSeq asc, MidSeq asc")
if rs.eof and rs.bof then
buyok_class.writeline "暂无商品分类"
else
Do While Not rs.eof
if rs("LarCode")<>old then
buyok_class.writeline "lar:"&rs("LarCode")
end if
buyok_class.writeline rs("MidCode")
old=rs("LarCode")
rs.movenext
if rs.eof then exit do
Loop
end if
set rs=nothing
buyok_class.close
set fso=nothing
response.write "<script language='javascript'>"
response.write "alert('操作成功,商品类别已更新,首页将显示更新后的商品分类。');"
response.write "location.href='prod0.asp';"
response.write "</script>"
response.end
end if
if action="view" then
if request("midcode")<>"" then
sql="select * from buyok_produc where ProdId is not null and larcode='"&request("larcode")&"' and midcode='"&request("midcode")&"'"
else
sql="select * from buyok_produc where ProdId is not null and larcode='"&request("larcode")&"'"
end if
response.cookies("buyok")("sql")=sql
Response.Redirect("prod1.asp")
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -