📄 delsort.asp
字号:
<%
if session("admin_name")="" then response.end
set rs=server.createobject("adodb.recordset")
%>
<!--#include file="conn.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=css.css rel=STYLESHEET type=text/css>
</head>
<%
if request("action")="del" then
sql="select * from sort where sort_id="&request("sort_id")
rs.open sql,conn,3,3
if rs.eof then
response.redirect "delsort.asp"
else
rs.delete
rs.update
end if
response.write "<br>商品类别删除成功"
response.write "<br>"
response.write "<a href=delsort.asp>返回</a>"
rs.close
else
sql="select * from sort"
rs.open sql,conn,3,3
if rs.eof then
response.write "没有商品分类"
else
do while not rs.eof%><hr>
一级分类<%=rs("sort_name")%><a href="delsort.asp?sort_id=<%=rs("sort_id")%>&action=del">删除</a> <a href="editsort.asp?sort_id=<%=rs("sort_id")%>">修改</a><br>
<% set rs2=server.createobject("adodb.recordset")
sort_id=rs("sort_id")
sql2="select * from sort2 where sort_id='"&sort_id&"'"
rs2.open sql2,conn,3,3
if rs2.eof then
else
do while not rs2.eof%>
二级分类
<%=rs2("sort2_name")%><a href="delsort2.asp?sort_id=<%=rs2("sort_id")%>&sort2_id=<%=rs2("sort2_id")%>&action=del">删除</a>
<a href="editsort2.asp?sort_id=<%=rs2("sort_id")%>&sort2_id=<%=rs2("sort2_id")%>">修改</a> <% set rs3=server.createobject("adodb.recordset")
sort2_id=rs2("sort2_id")
sql3="select * from sort3 where sort2_id='"&sort2_id&"' and sort_id='"&sort_id&"'"
rs3.open sql3,conn,3,3
if rs3.eof then
else
do while not rs3.eof%>
三级分类<%=rs3("sort3_name")%><a href="delsort3.asp?sort_id=<%=rs3("sort_id")%>&sort2_id=<%=rs3("sort2_id")%>&sort3_id=<%=rs3("sort3_id")%>&action=del">删除</a> <a href="editsort3.asp?sort_id=<%=rs3("sort_id")%>&sort2_id=<%=rs3("sort2_id")%>&sort3_id=<%=rs3("sort3_id")%>">修改</a>
<br> <%rs3.movenext
loop
end if
rs3.close%><br>
<%rs2.movenext
loop
end if
rs2.close%><br>
<%rs.movenext
loop
end if
rs.close
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -