📄 syscode_article.asp
字号:
response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(5) & "','_blank','" & rsClass(5) & "','" & rsClass(7) & "','','',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) & "','" & rsClass(7) & "','','',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) & "','" & rsClass(7) & "','','',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 ArticleClass 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 ArticleClass 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 ArticleClass 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 ArticleClass 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
'=================================================
'过程名:ShowSpecial
'作 用:以竖向列表方式显示专题名称
'参 数:SpecialNum ------最多显示多少个专题名称
'=================================================
sub ShowSpecial(SpecialNum)
dim i
i=1
if SpecialNum<=0 or SpecialNum>100 then
SpecialNum=10
end if
sqlSpecial="select S.SpecialID,S.SpecialName,L.LayoutFileName from Special S inner join Layout L on L.LayoutID=S.LayoutID where S.BrowsePurview>=" & UserLevel & " order by S.OrderID"
Set rsSpecial= Server.CreateObject("ADODB.Recordset")
rsSpecial.open sqlSpecial,conn,1,1
totalPut=rsSpecial.recordcount
if rsSpecial.bof and rsSpecial.eof then
response.Write " 没有任何专题栏目"
else
rsSpecial.movefirst
do while not rsSpecial.eof
response.Write("<li><a href='" & rsSpecial(2) & "?SpecialID=" & rsSpecial(0) & "'>" & rsSpecial(1) & "</a></li><br>")
rsSpecial.movenext
i=i+1
if i>SpecialNum then exit do
loop
end if
if not rsSpecial.eof then
response.write "<p align='right'><a href='Article_SpecialList.asp'>更多专题</a></p>"
end if
end sub
'=================================================
'过程名:ShowAllSpecial
'作 用:分页显示所有专题
'参 数:无
'=================================================
sub ShowAllSpecial()
sqlSpecial="select S.SpecialID,S.SpecialName,L.LayoutFileName from Special S inner join Layout L on L.LayoutID=S.LayoutID where S.BrowsePurview>=" & UserLevel & " order by S.OrderID"
Set rsSpecial= Server.CreateObject("ADODB.Recordset")
rsSpecial.open sqlSpecial,conn,1,1
totalPut=rsSpecial.recordcount
if rsSpecial.bof and rsSpecial.eof then
response.Write " 没有任何专题栏目"
else
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
call SpecialContent()
else
if (currentPage-1)*MaxPerPage<totalPut then
rsSpecial.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsSpecial.bookmark
call SpecialContent()
else
currentPage=1
call SpecialContent()
end if
end if
end if
end sub
sub SpecialContent()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -