📄 class_list.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="chkadmin.asp"-->
<%dim id
id=Trim(Request.QueryString("id"))
if id="" then id=0 end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<STYLE>
BODY {
scrollbar-face-color : #96A2AD;
scrollbar-shadow-color : #96A2AD;
scrollbar-highlight-color : #96A2AD;
scrollbar-3dlight-color : #96A2AD;
scrollbar-darkshadow-color : #96A2AD;
scrollbar-track-color : #CCCCCC;
scrollbar-arrow-color : #FFFFFF;
}
</STYLE>
<SCRIPT language=JScript>
function del(id)
{
if ( confirm("若要删除此分类,\n则此分类下的软件也会被删除!\n您确定要删除吗?"))
{
window.location.href = "class_del.asp?id=" + id
}
}
</SCRIPT>
</head>
<body>
<table width="60%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td bgcolor="#708090" class="TdBorderB"> <%dim sql,rs,ClassName,ParentStr,ParentNum,i
response.write "<a href=class_list.asp><font color=white>一级分类</font></a>"
if id<>0 then
sql="select ClassName,ParentStr from Class where ID="&CInt(id)
set rs=conn.execute(sql)
ClassName=rs(0)
ParentStr=Split(rs(1),",")
ParentNum=UBound(ParentStr)
if ParentStr(0)="0" then
response.write "<font color=white> \ "&ClassName&"</font>"
else
response.write "<font color=white> \ </font>"
for i=0 to ParentNum
sql="select ID,ClassName from Class where ID="&CInt(ParentStr(i))
set rs=conn.execute(sql)
response.write "<a href=class_list.asp?id="&rs(0)&"><font color=white>"&rs(1)&"</font></a> <font color=white>\</font> "
next
response.write "<font color=white>"&ClassName&"</font>"
end if
end if
%> </td>
<td align="right" bgcolor="#708090" class="TdBorderB"><font color="#FFFFFF">[</font><a href="javascript:history.back()"><font color="#FFFFFF">返回</font></a><font color="#FFFFFF">]</font></td>
</tr>
</table>
<table width="60%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td class="TdBorderB"> </td>
<td align="center" class="TdBorderB"> </td>
<td align="center" class="TdBorderB"> </td>
<td align="center" class="TdBorderB"> </td>
<td align="center" class="TdBorderB"> </td>
</tr>
<%
sql="select ID,ClassName,ChildID from Class where ParentID="&Cint(id)&" order by Sequence"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
response.write "<tr><td colspan=5 align=center bgcolor=#EEEEEE>没有下级分类</td></tr>"
else
do while not rs.eof%>
<tr bgcolor="#EEEEEE">
<td class="TdBorderRB"><li type="circle"><a href="class_list.asp?id=<%=rs(0)%>"><%=rs(1)%></a>
<%if rs(2)<>"" then response.write "("&UBound(Split(rs(2),","))+1&")" end if%>
</li></td>
<td width="40" align="center" class="TdBorderRB"><a href=class_move.asp?id=<%=rs(0)%>&action=up>上移</a></td>
<td width="40" align="center" class="TdBorderRB"><a href=class_move.asp?id=<%=rs(0)%>&action=down>下移</a></td>
<td width="40" align="center" class="TdBorderRB"><a href=class_edit.asp?id=<%=rs(0)%>>编辑</a></td>
<td width="40" align="center" class="TdBorderB"><a href=javascript:del(<%=rs(0)%>)>删除</a></td>
</tr>
<%rs.movenext
loop
end if
set rs=nothing%>
</table>
<br>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="TdBorderB">
<form name="form1" method="post" action="class_add_save.asp">
<input name="id" type="hidden" id="id" value="<%=id%>">
新建同级分类:
<input name="ClassName" type="text" class="input" id="ClassName" size="22">
<%if power(5)="0" then
response.write " <font color=red>您没有添加分类的权限</font>"
else
response.write "<input name='Submit' type='submit' class='button' value=' 提 交 '> "
end if
%>
</form>
</td>
</tr>
</table>
</body>
</html>
<%conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -