📄 sysdown.asp
字号:
<%
dim strFileName,MaxPerPage,ShowSmallClassType
dim totalPut,CurrentPage,TotalPages
dim BeginTime,EndTime
dim founderr, errmsg
dim BigClassName,SmallClassName,keyword,strField
dim bsBigClassName,bsSmallClassName,sql_DownBigClass,rs_DownBigClass,sql_Down,rs_Down
dim rs,sql,sqlArticle,rsArticle,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlSpecial,rsSpecial
dim SpecialTotal
BeginTime=Timer
bsBigClassName=Trim(request("BigClassName"))
bsSmallClassName=Trim(request("SmallClassName"))
keyword=trim(request("keyword"))
if keyword<>"" then
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
end if
strField=trim(request("Field"))
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql_DownBigClass="select * from DownBigClass order by BigClassID"
Set rs_DownBigClass= Server.CreateObject("ADODB.Recordset")
rs_DownBigClass.open sql_DownBigClass,conn,1,1
'=================================================
'过程名:Show_DownSmallClass_Tree
'作 用:树形目录方式显示栏目
'参 数:无
'=================================================
sub Show_DownSmallClass_Tree()
%>
<SCRIPT language=javascript>
function opencat(cat,img){
if(cat.style.display=="none"){
cat.style.display="";
img.src="../img/class2.gif";
} else {
cat.style.display="none";
img.src="../img/class1.gif";
}
}
</Script>
<TABLE cellSpacing=0 cellPadding=0 width="99%" border=0>
<%
dim i
if rs_DownBigClass.eof and rs_DownBigClass.bof then
Response.Write "栏目正在建设中……"
else
i=1
do while not rs_DownBigClass.eof
%>
<TR>
<TD language=javascript onmouseup="opencat(cat10<%=i%>000, img10<%=i%>000);" id=item$pval[catID]) style="CURSOR: hand" width=36 height=24 align=center><IMG id=img10<%=i%>000 src="../img/class1.gif" width=20 height=20></TD>
<TD class='ML_Tdbg'><a href='Download.asp?BigClassName=<%=rs_DownBigClass("BigClassName")%>'><%=rs_DownBigClass("BigClassName")%></a></TD>
</TR>
<TR>
<TD id=cat10<%=i%>000 style="DISPLAY: none" bgColor=#fefdf5 colspan="2">
<%
dim rss,sqls,j
set rss = server.CreateObject ("adodb.recordset")
sqls="select * from DownSmallClass where BigClassName='" & rs_DownBigClass("BigClassName") & "'order by SmallClassID"
rss.open sqls,conn,1,1
if rss.eof and rss.bof then
Response.Write "没有小分类"
else
j=1
do while not rss.eof
%>
<IMG height=20 src="../img/class3.gif" width=26 align=absMiddle border=0> <a href="Download.asp?BigClassName=<%=rss("BigClassName")%>&SmallClassName=<%=rss("SmallClassName")%>"><%=rss("SmallClassName")%></a><BR>
<%
rss.movenext
j=j+1
loop
end if
rss.close
set rss=nothing
%>
</TD>
</TR>
<%
rs_DownBigClass.movenext
i=i+1
loop
end if
%>
</TABLE>
<%
end sub
'=================================================
'过程名:ShowClass_DownGuide
'作 用:显示栏目导航位置
'参 数:无
'=================================================
sub ShowClass_DownGuide()
response.write "<a href='Download.asp'>下载中心</a> >>"
if bsBigClassName="" and bsSmallClassName="" then
response.write " 所有下载"
else
if bsBigClassName<>"" then
response.write " <a href='Download.asp?BigClassName=" & bsBigClassName & "'>" & bsBigClassName & "</a> >> "
if bsSmallClassName<>"" then
response.write "<a href='Download.asp?BigClassName=" & bsBigClassName & "&SmallClassName=" & bsSmallClassName & "'>" & bsSmallClassName & "</a>"
else
response.write "所有小类"
end if
end if
end if
end sub
'=================================================
'过程名:ShowDownTotal
'作 用:显示下载总数
'参 数:无
'=================================================
sub ShowDownTotal()
dim sqlTotal
dim rsTotal
sqlTotal="select Count(*) from Download where Passed=True "
if bsBigClassName<>"" then
sqlTotal=sqlTotal & " and BigClassName='" & bsBigClassName & "'"
if bsSmallClassName<>"" then
sqlTotal=sqlTotal & " and SmallClassName='" & bsSmallClassName & "'"
end if
end if
Set rsTotal= Server.CreateObject("ADODB.Recordset")
rsTotal.open sqlTotal,conn,1,1
if rsTotal.eof and rsTotal.bof then
totalPut=0
response.write "共有 0 个下载"
else
totalPut=rsTotal(0)
response.Write "共有 " & totalPut & " 个下载"
end if
rsTotal.close
set rsTotal=nothing
end sub
'=================================================
'过程名:ShowDown
'=================================================
sub ShowDown(TitleLen)
if TitleLen<0 or TitleLen>200 then
TitleLen=50
end if
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
sql_Down="select top " & MaxPerPage
else
sql_Down="select "
end if
sql_Down=sql_Down & " DownID,BigClassName,SmallClassName,Title,UpDateTime,FileSize,Language,LicenceType,System,Hits,DownloadUrl,Content from Download where Passed=True"
if bsBigClassName<>"" then
sql_Down=sql_Down & " and BigClassName='" & bsBigClassName & "'"
if bsSmallClassName<>"" then
sql_Down=sql_Down & " and SmallClassName='" & bsSmallClassName & "'"
end if
end if
sql_Down=sql_Down & " order by DownID desc"
Set rs_Down= Server.CreateObject("ADODB.Recordset")
rs_Down.open sql_Down,conn,1,1
if rs_Down.bof and rs_Down.eof then
response.Write("<br><li>没有任何下载</li>")
else
if currentPage=1 then
call DownContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then
rs_Down.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs_Down.bookmark
call DownContent(TitleLen)
else
currentPage=1
call DownContent(TitleLen)
end if
end if
end if
rs_Down.close
set rs_Down=nothing
end sub
sub DownContent(intTitleLen)
dim i,lb,strTemp
i=0
do while not rs_Down.eof
lb=""
lb=lb & "<table width=98% border=0 cellSpacing=1 cellpadding=3 bgColor=#b8b8b8>"
lb=lb & "<tr><td width=60% height=22 bgColor=#ddffd0>"
lb=lb & "<a href=DownloadShow.asp?DownID=" & rs_Down("DownID") & "> <b>" & rs_Down("Title") & "</b></a>"
lb=lb & "</td>"
lb=lb & "<td bgColor=#ddffd0 align=right>"
lb=lb & "<a href=Download.asp?BigClassName=" & rs_Down("BigClassName") & ">" & rs_Down("BigClassName") & "</a> | "
lb=lb & "<a href=Download.asp?BigClassName=" & rs_Down("BigClassName") & "&SmallClassName=" & rs_Down("SmallClassName") & ">"
lb=lb & rs_Down("SmallClassName") & ""
lb=lb & "</a> </td></tr>"
lb=lb & "<tr><td height=22 bgColor=#ffffff> "
lb=lb & "<FONT COLOR=#0000FF>整理日期:</FONT>" & FormatDateTime(rs_Down("UpDateTime"),2) & " "
lb=lb & "<FONT COLOR=#0000FF>文件大小:</FONT>" & rs_Down("FileSize") & "</td>"
lb=lb & "<td height=22 bgColor=#ffffff>"
lb=lb & "<table width=100% border=0 cellpadding=0 cellspacing=0 bgColor=#ffffff><tr>"
lb=lb & "<td width=40% height=22> "
lb=lb & "<a href=" & rs_Down("DownloadUrl") & " target=_blank><FONT COLOR=#0000FF>下载</FONT></a> | "
lb=lb & "<a href=DownloadShow.asp?DownID=" & rs_Down("DownID") & "><FONT COLOR=#0000FF>查看</FONT></a> "
lb=lb & "</td><td align=center>"
lb=lb & "人气:" & rs_Down("Hits") & ""
lb=lb & "</td></tr></table>"
lb=lb & "</td></tr>"
lb=lb & "<tr><td height=22 bgColor=#f5f5f5 colspan=2><FONT COLOR=#FF0000>·</FONT>"
if rs_Down("Content")<>"" then
strTemp=replace(rs_Down("Content"),"<br>","")
strTemp=replace(strTemp,"<BR>","")
strTemp=replace(strTemp,"<b>","")
strTemp=replace(strTemp,"<","")
strTemp=replace(strTemp,">","")
strTemp=replace(strTemp," ","")
strTemp=replace(strTemp," ","")
strTemp=replace(strTemp," ","")
lb=lb&""& gotTopic(strTemp,160)&""
else
lb=lb&"-"
end if
lb=lb & "</td></tr>"
lb=lb & "<tr><td width=60% height=22 bgColor=#ffffff colspan=2> "
lb=lb & "<FONT COLOR=#0000FF>软件语言:</FONT>" & rs_Down("Language") & " "
lb=lb & "<FONT COLOR=#0000FF>授权类型:</FONT>" & rs_Down("LicenceType") & " "
lb=lb & "<FONT COLOR=#0000FF>运行环境:</FONT>" & rs_Down("System") & ""
lb=lb & "</td></tr>"
lb=lb & ""
lb=lb & "<tr><td height=1 colspan=2 bgcolor=#CCCCCC></td>"
lb=lb & "</tr></table><BR>"
response.write lb
rs_Down.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -