📄 syscode_soft.asp
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="ubbcode.asp"-->
<!--#include file="function.asp"-->
<!--#include file="admin_code_soft.asp"-->
<%
dim strChannel,sqlChannel,rsChannel,ChannelUrl,ChannelName
dim SoftID,SoftTitle
dim FileName,strFileName,MaxPerPage,ShowSmallClassType
dim totalPut,CurrentPage,TotalPages
dim BeginTime,EndTime
dim founderr, errmsg
dim ClassID,SpecialID,keyword,strField,SpecialName
dim rs,sql,sqlSoft,rsSoft,sqlSearch,rsSearch,rsPic,sqlSpecial,rsSpecial,sqlUser,rsUser
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,SkinID,LayoutID,LayoutFileName,ChildID,tID,tChild
dim tSpecial
dim strPic,AnnounceCount
dim PageTitle,strPath,strPageTitle
dim strClassTree
BeginTime=Timer
SoftID=trim(request("SoftID"))
ClassID=trim(request("ClassID"))
SpecialID=trim(request("SpecialID"))
strField=trim(request("Field"))
keyword=trim(request("keyword"))
UserLogined=CheckUserLogined()
if SoftId="" then
SoftID=0
else
SoftID=Clng(SoftID)
end if
if ClassID<>"" then
ClassID=CLng(ClassID)
else
ClassID=0
end if
if SpecialID="" then
SpecialID=0
else
SpecialID=CLng(SpecialID)
end if
if UserLevel="" then
UserLevel=5000
else
UserLevel=Cint(UserLevel)
end if
strPath= " <a href='" & SiteUrl & "'>" & SiteName & "</a>"
strPageTitle= SiteTitle
if ShowSiteChannel="Yes" then
strChannel= "<font color='#FFFFFF'>|</font> "
sqlChannel="select * from Channel order by OrderID"
set rsChannel=server.CreateObject("adodb.recordset")
rsChannel.open sqlChannel,conn,1,1
do while not rsChannel.eof
if rsChannel("ChannelID")=ChannelID then
ChannelUrl=rsChannel("LinkUrl")
ChannelName=rsChannel("ChannelName")
strChannel=strChannel & "<a href='" & ChannelUrl & "' style='text-decoration:none;'><font color='#FFFFFF'>" & ChannelName & "</font></a> <font color='#FFFFFF'>|</font> "
else
strChannel=strChannel & "<a href='" & rsChannel("LinkUrl") & "' style='text-decoration:none;'><font color='#FFFFFF'>" & rsChannel("ChannelName") & "</font></a> <font color='#FFFFFF'>|</font> "
end if
rsChannel.movenext
loop
rsChannel.close
set rsChannel=nothing
strPath=strPath & " >> <a href='" & ChannelUrl & "'>" & ChannelName & "</a>"
strPageTitle=strPageTitle & " >> " & ChannelName
end if
if SoftID>0 then
sql="select * from Soft where SoftID=" & SoftID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的文件不存在,或者已经被管理员删除!</li>"
else
ClassID=rs("ClassID")
'SpecialID=rs("SpecialID")
'SkinID=rs("SkinID")
'LayoutID=rs("LayoutID")
SoftTitle=rs("SoftName") & " " & rs("SoftVersion")
end if
end if
if ClassID>0 then
sql="select C.ClassName,C.RootID,C.ParentID,C.Depth,C.ParentPath,C.Child,C.SkinID,L.LayoutID,L.LayoutFileName,C.BrowsePurview From SoftClass C"
sql=sql & " inner join Layout L on C.LayoutID=L.LayoutID where C.ClassID=" & ClassID
set tClass=conn.execute(sql)
if tClass.bof and tClass.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
Call WriteErrMsg()
response.end
else
if tClass(9)<UserLevel then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>对不起,你没有浏览本栏目的权限!</li>"
ErrMsg=ErrMsg & "你不是" & CheckLevel(tClass(9)) & "!"
Call WriteErrMsg()
response.end
else
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
if SoftID<=0 then
SkinID=tClass(6)
LayoutID=tClass(7)
end if
LayoutFileName=tClass(8)
strPath=strPath & " >> "
strPageTitle=strPageTitle & " >> "
if ParentID>0 then
dim sqlPath,rsPath
sqlPath="select SoftClass.ClassID,SoftClass.ClassName,Layout.LayoutFileName,Layout.LayoutID From SoftClass"
sqlPath= sqlPath & " inner join Layout on SoftClass.LayoutID=Layout.LayoutID where SoftClass.ClassID in (" & ParentPath & ") order by SoftClass.Depth"
set rsPath=server.createobject("adodb.recordset")
rsPath.open sqlPath,conn,1,1
do while not rsPath.eof
strPath=strPath & "<a href='" & rsPath(2) & "?ClassID=" & rsPath(0) & "&LayoutID=" & rsPath(3) & "'>" & rsPath(1) & "</a> >> "
strPageTitle=strPageTitle & rsPath(1) & " >> "
rsPath.movenext
loop
rsPath.close
set rsPath=nothing
end if
strPath=strPath & "<a href='" & LayoutFileName & "?ClassID=" & ClassID & "'>" & ClassName & "</a>"
strPageTitle=strPageTitle & ClassName
end if
end if
end if
if SpecialID>0 then
sql="select S.SpecialID,S.SpecialName,S.SkinID,S.LayoutID,L.LayoutFileName,S.BrowsePurview from Special S inner join Layout L on L.LayoutID=S.LayoutID where S.SpecialID=" & SpecialID
set tSpecial=conn.execute(sql)
if tSpecial.bof and tSpecial.eof then
founderr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
Call WriteErrMsg()
response.end
else
if tSpecial(5)<UserLevel then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>对不起,你没有浏览本专题的权限!</li>"
ErrMsg=ErrMsg & "你不是" & CheckLevel(tSpecial(5)) & "!"
Call WriteErrMsg()
response.end
else
SpecialName=tSpecial(1)
if SoftID<=0 then
SkinID=tSpecial(2)
LayoutID=tSpecial(3)
end if
LayoutFilename=tSpecial(4)
strPath=strPath & " >> <font color=blue>[专题]</font><a href='" & tSpecial(4) & "?SpecialID=" & tSpecial(0) & "'>" & SpecialName & "</a>"
strPageTitle=strPageTitle & " >> [专题]" & SpecialName
end if
end if
end if
if keyword<>"" then
keyword=ReplaceBadChar(keyword)
end if
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
'=================================================
'过程名:ShowRootClass
'作 用:显示一级栏目(无特殊效果)
'参 数:无
'=================================================
sub ShowRootClass()
dim sqlRoot,rsRoot
sqlRoot="select C.ClassID,C.ClassName,C.RootID,L.LayoutFileName,C.LinkUrl From SoftClass C"
sqlRoot= sqlRoot & " inner join Layout L on C.LayoutID=L.LayoutID where C.ParentID=0 and C.ShowOnTop=1 order by C.RootID"
Set rsRoot= Server.CreateObject("ADODB.Recordset")
rsRoot.open sqlRoot,conn,1,1
if rsRoot.bof and rsRoot.eof then
response.Write("还没有任何栏目,请首先添加栏目。")
else
if ClassID>0 then
response.write "|<a href='" & ChannelUrl & "'> "&ChannelName&"首页 </a>|"
else
response.write "|<a href='" & ChannelUrl & "'><font color=red> "&ChannelName&"首页 </font></a>|"
end if
do while not rsRoot.eof
if rsRoot(4)<>"" then
response.write "<a href='" & rsRoot(4) & "' target='_blank'> " & rsRoot(1) & " </a>|"
else
if rsRoot(2)=RootID then
response.Write "<a href='" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "'><font color=red> " & rsRoot(1) & "</font> </a>|"
else
response.Write "<a href='" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "'> " & rsRoot(1) & " </a>|"
end if
end if
rsRoot.movenext
loop
end if
rsRoot.close
set rsRoot=nothing
if ShowMyStyle="Yes" then
response.write "<a href='#' onMouseOver='ShowMenu(menu_skin,100)'> 自选风格 </a>|"
end if
end sub
dim pNum,pNum2
pNum=1
pNum2=0
'=================================================
'过程名:ShowRootClass_Menu
'作 用:显示一级栏目(下拉菜单效果)
'参 数:无
'=================================================
sub ShowRootClass_Menu()
dim maxlinemenu,Class_MenuTitle
maxlinemenu=10 '一行最多显示菜单数
response.write "<script type='text/javascript' language='JavaScript1.2'>" & vbcrlf & "<!--" & vbcrlf
response.write "stm_bm(['uueoehr',400,'','images/blank.gif',0,'','',0,0,0,0,0,1,0,0]);" & vbcrlf
response.write "stm_bp('p0',[0,4,0,0,2,2,0,0,100,'',-2,'',-2,90,0,0,'#000000','transparent','',3,0,0,'#000000']);" & vbcrlf
response.write "stm_ai('p0i0',[0,'|','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#000000','#000000','#000000','9pt 宋体','9pt 宋体',0,0]);" & vbcrlf
response.write "stm_aix('p0i1','p0i0',[0,'"&ChannelName&"首页','','',-1,-1,0,'" & ChannelUrl & "','_self','" & ChannelUrl & "','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt 宋体','9pt 宋体']);" & vbcrlf
response.write "stm_aix('p0i2','p0i0',[0,'|','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#000000','#000000','#000000','9pt 宋体','9pt 宋体',0,0]);" & vbcrlf
dim sqlRoot,rsRoot,j
sqlRoot="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.NextID,C.LinkUrl,C.Child,C.Readme From SoftClass C"
sqlRoot= sqlRoot & " inner join Layout L on C.LayoutID=L.LayoutID where C.Depth=0 and C.ShowOnTop=1 order by C.RootID"
Set rsRoot= Server.CreateObject("ADODB.Recordset")
rsRoot.open sqlRoot,conn,1,1
if not(rsRoot.bof and rsRoot.eof) then
j=3
do while not rsRoot.eof
if rsRoot(7)<>"" then
Class_MenuTitle=replace(replace(replace(replace(rsRoot(7),"'",""),"""",""),CHR(10),""),CHR(13),"")
end if
if rsRoot(5)<>"" then
response.write "stm_aix('p0i"&j&"','p0i0',[0,'" & rsRoot(1) & "','','',-1,-1,0,'" & rsRoot(5) & "','_blank','" & rsRoot(5) & "','" & Class_MenuTitle & "','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt 宋体','9pt 宋体']);" & vbcrlf
else
response.write "stm_aix('p0i"&j&"','p0i0',[0,'" & rsRoot(1) & "','','',-1,-1,0,'" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "','_self','" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "','" & Class_MenuTitle & "','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt 宋体','9pt 宋体']);" & vbcrlf
end if
if rsRoot(6)>0 then
call GetClassMenu(rsRoot(0),0)
end if
response.write "stm_aix('p0i2','p0i0',[0,'|','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#000000','#000000','#000000','9pt 宋体','9pt 宋体',0,0]);" & vbcrlf
j=j+1
if (j-2) mod maxlinemenu =0 then
response.write "stm_em();" & vbcrlf
response.write "//-->" & vbcrlf & "</script>" & vbcrlf
response.write "<script type='text/javascript' language='JavaScript1.2'>" & vbcrlf & "<!--" & vbcrlf
response.write "stm_bm(['uueoehr',400,'','images/blank.gif',0,'','',0,0,0,0,0,1,0,0]);" & vbcrlf
response.write "stm_bp('p0',[0,4,0,0,2,2,0,0,100,'',-2,'',-2,90,0,0,'#000000','transparent','',3,0,0,'#000000']);" & vbcrlf
response.write "stm_ai('p0i0',[0,'|','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#000000','#000000','#000000','9pt 宋体','9pt 宋体',0,0]);" & vbcrlf
end if
rsRoot.movenext
loop
end if
rsRoot.close
set rsRoot=nothing
response.write "stm_em();" & vbcrlf
response.write "//-->" & vbcrlf & "</script>" & vbcrlf
end sub
sub GetClassMenu(ID,ShowType)
dim sqlClass,rsClass,Sub_MenuTitle,k
if pNum=1 then
response.write "stm_bp('p" & pNum & "',[1,4,0,0,2,3,6,7,100,'progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.43)',-2,'',-2,67,2,3,'#999999','#ffffff','',3,1,1,'#aca899']);" & vbcrlf
else
if ShowType=0 then
response.write "stm_bpx('p" & pNum & "','p" & pNum2 & "',[1,4,0,0,2,3,6]);" & vbcrlf
else
response.write "stm_bpx('p" & pNum & "','p" & pNum2 & "',[1,2,-2,-3,2,3,0]);" & vbcrlf
end if
end if
k=0
sqlClass="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.NextID,C.LinkUrl,C.Child,C.Readme From SoftClass C"
sqlClass= sqlClass & " inner join Layout L on C.LayoutID=L.LayoutID where C.ParentID=" & ID & " order by C.OrderID asc"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -