📄 category.asp
字号:
<%
if isarray(cindex) then
for i=0 to ubound(cindex,1)
if nindex="" then
nindex=cindex(0)
else
nindex=nindex&"."&cindex(i)
end if
sql="select top 1 categoryid,categoryname,categorypath,categorysort,categoryindex from category where categoryindex like '"&nindex&"'"
rs.open sql,conn,1,1
if not rs.eof then
if i=0 then
newsdir=rs(2)
end if
if i=1 then
categorydir=rs(2)
end if
newfilepath=newfilepath&rs(2)&"\"
toppath=toppath&"<a href="""&url&"/"&replace(newfilepath,"\","/")&""" class=""toplink"">"&rs(1)&"</a> >> "
if i=0 then
tophtml=tophtml&"<a href=""javascript:openwin('../category/chg.asp?categoryid="&categoryid&"','edit',350,400);"" style=""color:orange"" title=""进行该栏目模版修改"">"&rs(1)&"</a>"
else
tophtml=tophtml&"<a href=""../"&rs(3)&"/default.asp?categoryid="&rs(0)&""" style=""color:FFFFFF"">"&rs(1)&"</a>"
end if
tophtml=tophtml&" <a href=""../category/class.asp?category="&cindex(0)&"&categoryindex="&rs(4)&""" style=""color:FFFFFF"">>></a> "
if ubound(cindex,1)=1 and i=1 then
newfilepath=newfilepath&datepath&"\"
end if
else
rs.close
call msgbox("该分类上级不存在!",1)
end if
rs.close
next
if filepath="" then filepath=newfilepath
Session("filepath") =filepath
sql="select categoryid,categoryname from category where categoryindex like '"&nindex&".%' order by categoryid ASC"
rs.open sql,conn,1,1
if not rs.eof then
categoryselectitem=rs.getrows
end if
rs.close
categoryselectitemnum=0
if isarray(categoryselectitem) then
for i=0 to ubound(categoryselectitem,2)
if categoryselectitem(0,i)><categoryid then
categoryselect=categoryselect&"<option value="""&categoryselectitem(0,i)&""">"&categoryselectitem(1,i)
categoryselectitemnum=categoryselectitemnum+1
end if
next
Set categoryselectitem = nothing
end if
sql="select categoryname,categorypath,categoryindex from category where categoryindex like '"&cindex(0)&".%'"
rs.open sql,conn,1,1
if not rs.eof then
categoryselectitem=rs.getrows
end if
rs.close
if isarray(categoryselectitem) then
for i=0 to ubound(categoryselectitem,2)
cselect=split(categoryselectitem(2,i),".")
if ubound(cselect,1)=1 then
categoryitem=categoryitem&"<option value="""&categoryselectitem(1,i)&""">"&categoryselectitem(0,i)
end if
next
Set categoryselectitem=nothing
end if
end if
sql=""
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -