?? class.asp
字號(hào):
<!--#include file="../inc/conn.asp"-->
<%
userid=Session("userid")
userlevel=Session("userlevel")
if userid="" or userlevel="" then
call msgbox("請(qǐng)重新登陸!",3)
end if
if not isnumeric(userid) or not isnumeric(userlevel) then
call msgbox("請(qǐng)重新登陸!",3)
end if
sql="select categoryid,categoryname,categoryindex,categorysort from category where not categoryindex like '%.%' order by categoryid ASC"
rs.open sql,conn,1,1
if not rs.eof then
category=rs.getrows
end if
rs.close
categoryid =request("category")
if not isnumeric(categoryid) then
call msgbox("指定分類不正確!",1)
end if
categoryindex =request("categoryindex")
if categoryindex><"" then
categoryindex =split(categoryindex,".")
end if
sort =strFilter(request("sort"),20)
dim categoryarray(0)
if isarray(categoryindex) then
for i=0 to ubound(categoryindex,1)
if categorysort="" then
categorysort=categoryindex(0)&"."
else
categorysort=categorysort&categoryindex(i)&"."
end if
sql="select categoryid,categoryname,categoryindex,categorysort from category where categoryindex like '"&categorysort&"%' order by categoryid ASC"
rs.open sql,conn,1,1
if not rs.eof then
categoryarraytree=rs.getrows
else
exit for
end if
rs.close
if isarray(categoryarraytree) then
for j=0 to ubound(categoryarraytree,2)
catesort=split(categoryarraytree(2,j),".")
if ubound(catesort,1)>i+1 then
categoryarraytree(0,j)=""
end if
next
if i=0 then
catearray=categoryarray
catearray(0)=categoryarraytree
else
redim preserve catearray(i)
catearray(i)=categoryarraytree
end if
end if
next
end if
Set rs=nothing
Set conn=nothing
%>
<!--#include file="../inc/head.asp"-->
<table border="0" align="center" width="400" cellpadding="2" cellspacing="1">
<tr class="menutitle"><th>分類ID</th><th>分類名</th><th>分類索引</th><th colspan="2">進(jìn)行操作</th></tr>
<%
formtable=false
if isarray(category) then
for i=0 to ubound(category,2)
%>
<tr bgcolor="#FFFFFF">
<th><%=category(0,i)%></th>
<td><a href="../category/class.asp?category=<%=category(2,i)%>&categoryindex=<%=category(2,i)%>&sort=<%=sort%>">[<%=category(1,i)%>]</a></td>
<td><%=category(2,i)%></td>
<th width="40"></th>
<th width="40"></th>
</tr>
<% if categoryid=category(2,i) then
if isarray(catearray) then
for j=0 to ubound(catearray,1)
categorytree=catearray(j)
for k=0 to ubound(categorytree,2)
if categorytree(0,k)><"" and (instr(request("categoryindex"),categorytree(2,k))=1 or instr(categorytree(2,k),request("categoryindex"))>0) then%>
<tr bgcolor="#FFFFFF">
<th><%=categorytree(0,k)%></th>
<td><%for l=0 to j%><%if l=j then%>┗<%else%> <%end if%><%next%><a href="../category/class.asp?category=<%=categoryid%>&categoryindex=<%=categorytree(2,k)%>&sort=<%=sort%>">[<%=categorytree(1,k)%>]</a></td>
<td><%=categorytree(2,k)%></td>
<%if (categorytree(3,k)=sort or sort="") and not isNull(categorytree(3,k)) then%>
<th width="40"><A href="../<%=categorytree(3,k)%>/add.asp?categoryid=<%=categorytree(0,k)%>">錄入</a></th>
<th width="40"><A href="../<%=categorytree(3,k)%>/default.asp?categoryid=<%=categorytree(0,k)%>">管理</a></th>
</tr>
<%else%>
<th width="40"></th>
<th width="40"></th>
</tr>
<%end if
end if
next
Set categorytree=nothing
next
Set catearray=nothing
end if
end if
next
Set category=nothing
end if
Set category=nothing%>
</table>
<!--#include file="../inc/foot.asp"-->
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -