📄 syscode_soft.asp
字号:
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
do while not rsClass.eof
if rsClass(7)<>"" then
Sub_MenuTitle=replace(replace(replace(replace(rsClass(7),"'",""),"""",""),CHR(10),""),CHR(13),"")
end if
if rsClass(5)<>"" then
if rsClass(6)>0 then
response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(5) & "','_blank','" & rsClass(5) & "','" & Sub_MenuTitle & "','','',6,0,0,'images/arrow_r.gif','images/arrow_w.gif',7,7,0,0,1,'#ffffff',0,'#cccccc',0,'','',3,3,0,0,'#fffff7','#000000','#000000','#ffffff','9pt 宋体']);" & vbcrlf
pNum=pNum+1
pNum2=pNum2+1
call GetClassMenu(rsClass(0),1)
else
response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(5) & "','_blank','" & rsClass(5) & "','" & Sub_MenuTitle & "','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',0,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt 宋体']);" & vbcrlf
end if
else
if rsClass(6)>0 then
response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(3) & "?ClassID=" & rsClass(0) & "','_self','" & rsClass(3) & "?ClassID=" & rsClass(0) & "','" & Sub_MenuTitle & "','','',6,0,0,'images/arrow_r.gif','images/arrow_w.gif',7,7,0,0,1,'#ffffff',0,'#cccccc',0,'','',3,3,0,0,'#fffff7','#000000','#000000','#ffffff','9pt 宋体']);" & vbcrlf
pNum=pNum+1
pNum2=pNum2+1
call GetClassMenu(rsClass(0),1)
else
response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(3) & "?ClassID=" & rsClass(0) & "','_self','" & rsClass(3) & "?ClassID=" & rsClass(0) & "','" & Sub_MenuTitle & "','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',0,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt 宋体']);" & vbcrlf
end if
end if
k=k+1
rsClass.movenext
loop
rsClass.close
set rsClass=nothing
response.write "stm_ep();" & vbcrlf
end sub
'=================================================
'过程名:ShowJumpClass
'作 用:显示“跳转栏目到…”下拉列表框
'参 数:无
'=================================================
sub ShowJumpClass()
response.write "<div z-index:1><select name='ClassID' onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">"
response.write "<option value='' selected>跳转栏目至…</option>"
dim arrShowLine(20)
for i=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
dim rsClass,sqlClass,strTemp,tmpDepth,i
sqlClass="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.NextID,C.LinkUrl From SoftClass C"
sqlClass= sqlClass & " inner join Layout L on C.LayoutID=L.LayoutID order by C.RootID,C.OrderID"
set rsClass=server.CreateObject("adodb.recordset")
rsClass.open sqlClass,conn,1,1
if rsClass.bof and rsClass.bof then
response.write "<option value=''>请先添加栏目</option>"
else
do while not rsClass.eof
tmpDepth=rsClass(2)
if rsClass(4)>0 then
arrShowLine(tmpDepth)=True
else
arrShowLine(tmpDepth)=False
end if
if rsClass(5)="" then
strTemp="<option value='" & rsClass(3) & "?ClassID=" & rsClass(0) & "'>"
else
strTemp="<option value='" & rsClass(5) & "'>"
end if
if tmpDepth>0 then
for i=1 to tmpDepth
strTemp=strTemp & " "
if i=tmpDepth then
if rsClass(4)>0 then
strTemp=strTemp & "├ "
else
strTemp=strTemp & "└ "
end if
else
if arrShowLine(i)=True then
strTemp=strTemp & "│"
else
strTemp=strTemp & " "
end if
end if
next
end if
strTemp=strTemp & rsClass(1)
if rsClass(5)<>"" then
strTemp=strTemp & "(外)"
end if
strTemp=strTemp & "</option>"
response.write strTemp
rsClass.movenext
loop
end if
rsClass.close
set rsClass=nothing
response.write "</select></div>"
end sub
'=================================================
'过程名:ShowClass_Tree
'作 用:显示所有栏目(树形目录效果)
'参 数:无
'=================================================
sub ShowClass_Tree()
dim arrShowLine(20)
for i=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
dim rsClass,sqlClass,tmpDepth,i
sqlClass="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.NextID,C.LinkUrl,C.Child From SoftClass C"
sqlClass= sqlClass & " inner join Layout L on C.LayoutID=L.LayoutID order by C.RootID,C.OrderID"
set rsClass=server.CreateObject("adodb.recordset")
rsClass.open sqlClass,conn,1,1
if rsClass.bof and rsClass.bof then
strClassTree="没有任何栏目"
else
strClassTree=""
do while not rsClass.eof
tmpDepth=rsClass(2)
if rsClass(4)>0 then
arrShowLine(tmpDepth)=True
else
arrShowLine(tmpDepth)=False
end if
if tmpDepth>0 then
for i=1 to tmpDepth
if i=tmpDepth then
if rsClass(4)>0 then
strClassTree=strClassTree & "<img src='images/tree_line1.gif' width='17' height='16' valign='abvmiddle'>"
else
strClassTree=strClassTree & "<img src='images/tree_line2.gif' width='17' height='16' valign='abvmiddle'>"
end if
else
if arrShowLine(i)=True then
strClassTree=strClassTree & "<img src='images/tree_line3.gif' width='17' height='16' valign='abvmiddle'>"
else
strClassTree=strClassTree & "<img src='images/tree_line4.gif' width='17' height='16' valign='abvmiddle'>"
end if
end if
next
end if
if rsClass(6)>0 then
strClassTree=strClassTree & "<img src='Images/tree_folder4.gif' width='15' height='15' valign='abvmiddle'>"
else
strClassTree=strClassTree & "<img src='Images/tree_folder3.gif' width='15' height='15' valign='abvmiddle'>"
end if
if rsClass(5)="" then
strClassTree=strClassTree & "<a href='" & rsClass(3) & "?ClassID=" & rsClass(0) & "'>"
else
strClassTree=strClassTree & "<a href='" & rsClass(5) & "' target='_blank'>"
end if
if rsClass(2)=0 then
strClassTree=strClassTree & "<b>" & rsClass(1) & "</b>"
else
strClassTree=strClassTree & rsClass(1)
end if
'if rsClass(5)<>"" then
' strClassTree=strClassTree & "(外)"
'end if
strClassTree=strClassTree & "</a>"
if rsClass(6)>0 then
strClassTree=strClassTree & "(" & rsClass(6) & ")"
end if
strClassTree=strClassTree & "<br>"
rsClass.movenext
loop
end if
rsClass.close
set rsClass=nothing
response.write strClassTree
end sub
'=================================================
'过程名:ShowChildClass
'作 用:显示当前栏目的下一级子栏目
'参 数:ShowType--------显示方式,1为竖向列表,2为横向列表
'=================================================
sub ShowChildClass(ShowType)
dim sqlChild,rsChild,i
sqlChild="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.NextID,C.LinkUrl,C.Child From SoftClass C"
sqlChild= sqlChild & " inner join Layout L on C.LayoutID=L.LayoutID where C.ParentID=" & ClassID & " order by C.OrderID"
Set rsChild= Server.CreateObject("ADODB.Recordset")
rsChild.open sqlChild,conn,1,1
if rsChild.bof and rsChild.eof then
response.write "没有任何子栏目"
else
if ShowType=1 then
do while not rsChild.eof
if rsChild(5)<>"" then
response.write "<li><a href='" & rsChild(5) & "'>" & rsChild(1) & "</a></li>"
else
response.Write "<li><a href='" & rsChild(3) & "?ClassID=" & rsChild(0) & "'>" & rsChild(1) & "</a></li>"
end if
if rsChild(6)>0 then
response.write "(" & rsChild(6) & ")"
end if
response.write "<br>"
rsChild.movenext
loop
else
i=0
do while not rsChild.eof
if rsChild(5)<>"" then
response.write " <a href='" & rsChild(5) & "'>" & rsChild(1) & "</a>"
else
response.Write " <a href='" & rsChild(3) & "?ClassID=" & rsChild(0) & "'>" & rsChild(1) & "</a>"
end if
if rsChild(6)>0 then
response.write "(" & rsChild(6) & ")"
end if
rsChild.movenext
i=i+1
if i mod 5=0 then
response.write "<br>"
end if
loop
end if
end if
rsChild.close
set rsChild=nothing
end sub
'=================================================
'过程名:ShowClassNavigation
'作 用:显示栏目导航
'参 数:无
'=================================================
sub ShowClassNavigation()
dim rsNavigation,sqlNavigation,strNavigation,PrevRootID,i
sqlNavigation="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.RootID,C.LinkUrl,C.Child,C.Readme From SoftClass C"
sqlNavigation= sqlNavigation & " inner join Layout L on C.LayoutID=L.LayoutID where C.Depth<=1 order by C.RootID,C.OrderID"
Set rsNavigation= Server.CreateObject("ADODB.Recordset")
rsNavigation.open sqlNavigation,conn,1,1
if rsNavigation.bof and rsNavigation.eof then
response.write "没有任何栏目"
else
strNavigation="<table border='0' cellpadding='0' cellspacing='2'><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "' title='" & rsNavigation(7) & "'>" & rsNavigation(1) & "</a>】</td><td>"
PrevRootID=rsNavigation(4)
rsNavigation.movenext
i=1
do while not rsNavigation.eof
if PrevRootID=rsNavigation(4) then
if i mod 6=0 then
strNavigation=strNavigation & "<br>"
end if
strNavigation=strNavigation & "<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "' title='" & rsNavigation(7) & "'>" & rsNavigation(1) & "</a> "
i=i+1
else
strNavigation=strNavigation & "</td></tr><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "' title='" & rsNavigation(7) & "'>" & rsNavigation(1) & "</a>】</td><td>"
i=1
end if
PrevRootID=rsNavigation(4)
rsNavigation.movenext
loop
strNavigation=strNavigation & "</td></tr></table>"
response.write strNavigation
end if
rsNavigation.close
set rsNavigation=nothing
end sub
'=================================================
'过程名:ShowSiteCount
'作 用:显示站点统计信息
'参 数:无
'=================================================
sub ShowSiteCount()
dim sqlCount,rsCount
Set rsCount= Server.CreateObject("ADODB.Recordset")
sqlCount="select count(SoftID) from Soft where Deleted=0"
rsCount.open sqlCount,conn,1,1
response.write "下载总数:" & rsCount(0) & "个<br>"
rsCount.close
sqlCount="select count(SoftID) from Soft where Passed=0 and Deleted=0"
rsCount.open sqlCount,conn,1,1
response.write "待审下载:" & rsCount(0) & "个<br>"
rsCount.close
sqlCount="select count(CommentID) from SoftComment"
rsCount.open sqlCount,conn,1,1
response.write "下载评论:" & rsCount(0) & "条<br>"
rsCount.close
'sqlCount="select count(SpecialID) from Special"
'rsCount.open sqlCount,conn,1,1
'response.write "下载专题:" & rsCount(0) & "个<br>"
'rsCount.close
sqlCount="select sum(Hits) from Soft"
rsCount.open sqlCount,conn,1,1
response.write "文件下载:" & rsCount(0) & "人次<br>"
rsCount.close
sqlCount="select count(" & db_User_ID & ") from " & db_User_Table & ""
rsCount.open sqlCount,Conn_User,1,1
response.write "注册用户:" & rsCount(0) & "名<br>"
rsCount.close
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -