📄 down_makesort.asp
字号:
<%Admin="DownMake"%>
<!--#include file="check.asp"-->
<!--#include file="mdb_path_down.asp"-->
<%
set rs=server.createobject("adodb.recordset")
rs.open ("select down_list from mb"),conn,1,1
pencat=rs("down_list")
rs.close
tid=request("tid")
currentPage=cint(request("page"))
MaxPerPage=cint(request("MaxPerPage"))
'################ 读取标题 等.. 开始 ################
rs.open "select * from downtype where id="&tid,conn,1,1
if not rs.eof then
ts=rs("ts")
tstart=rs("tstart")
TN=split(rs("tname"),"|")
TI=split(rs("ts"), ",")
for i = 0 to ubound(TN)-1
if i=ubound(TN)-2 and ubound(TN)>1 then
TTY_id=TI(i)
TTY_name=TN(i)
end if
all_type_top_id=TI(i)
all_type_name=TN(i)
thistype=thistype & "-> <a href=""../sort/"&TI(i)&"_1.htm"">"&TN(i)&"</a>"
thistitle=thistitle & " - "&TN(i)&""
next
end if
rs.close
if tstart<>"" then '***自动转向
pencat="<meta http-equiv=""Refresh"" content=""0; URL="&tstart&"""><a href="""&tstart&""">正在进入...</a>"
else '***自动转向
sqqq=sqqq&""&tid&", "
sql="select * from downtype where ts like '"&ts&"%'"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
sqqq=sqqq&""&rs("id")&", "
rs.MoveNext
loop
end if
rs.close
''########读取下级分类
rs.open "select * from downtype where tn="&tid&" order by id",conn,1,1
if NOT rs.EOF then
TTY="NO"
Tname=all_type_name
do while NOT rs.EOF
TTNN=split(rs("tname"),"|")(rs("tj")-1)
TXlist=TXlist&"<a href=""../sort/"&rs("id")&"_1.htm""><font color=""#000000"">"&TTNN&"</font></a><br>"
rs.MoveNext
loop
end if
rs.close
if TTY_id<>"" and TTY<>"NO" then
rs.open "select * from downtype where tn="&TTY_id&" order by id",conn,1,1
if NOT rs.EOF then
Tname=TTY_name
do while NOT rs.EOF
TTNN=split(rs("tname"),"|")(rs("tj")-1)
TXlist=TXlist&"<a href=""../sort/"&rs("id")&"_1.htm""><font color=""#000000"">"&TTNN&"</font></a><br>"
rs.MoveNext
loop
end if
rs.close
end if
''########读取本类top10
set rs=server.CreateObject("ADODB.RecordSet")
sql="select * from down where tid in ("&sqqq&") order by hits desc"
rs.open sql,conn,1,1
if rs.eof then
txtop="·还没有下载"
else
do while not rs.eof
h=h+1
txtop=txtop&"·<a href=""../soft/"&rs("id")&".htm"">"&rs("cxn")&" "&rs("cxv")&"</a><br>"
if h>=10 then exit do
rs.movenext
loop
h=0
end if
rs.close
'读取软件列表
sql="select * from down where tid in ("&sqqq&") order by date desc"
rs.open sql,conn,1,1
if rs.eof then
lb=lb&"<tr><td width=""100%"">对不起! 暂时没有相关软件 @_@</td></tr>"
mpage=1
allshu=0
else
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
rs.move (currentPage-1)*MaxPerPage
allshu=rs.recordcount
h=0
do while not rs.eof
h=h+1
lb=lb&"<tr><td width=""40%""><a href=""../soft/"&rs("id")&".htm""><img border=""0"" src=""../images/d_2.gif"" width=""11"" height=""11""> "&rs("cxn")&" "&rs("cxv")&"</a></td>"
lb=lb&"<td width=""11%"" align=""center"">"&rs("date")&"</td><td width=""11%"" align=""center"" nowrap>"
for i=1 to rs("hot")
lb=lb&"★"
next
lb=lb&"</td><td width=""10%"" align=""center"" nowrap>"&rs("hits")&"</td></tr><tr><td width=""100%"" colspan=""4"">·"
if rs("body")<>"" then
tempstr=replace(rs("body"),"<br>","")
tempstr=replace(tempstr,"<p>","")
tempstr=replace(tempstr,"<b>","")
tempstr=replace(tempstr,"<","")
tempstr=replace(tempstr," ","")
tempstr=replace(tempstr," ","")
tempstr=replace(tempstr," ","")
lb=lb&""&left(tempstr,44)&"..."
else
lb=lb&"-"
end if
lb=lb&"<br><FONT color=""#666666"">软件类别:"
set rs_type=server.CreateObject("ADODB.RecordSet")
rs_type.open "select * from downtype where id="&rs("tid"),conn,1,1
if not rs_type.EOF then
TN=split(rs_type("tname"),"|")
lb=lb& "<a href=""../sort/"&rs("tid")&"_1.htm""><FONT color=""#666666"">"&TN(ubound(TN)-1)&"</FONT></a>"
else
lb=lb& "类别错误"
end if
rs_type.close
if rs("system")<>"" then
lb=lb&" 运行环境:"&rs("system")&""
end if
if rs("sq")<>"" then
lb=lb&" 授权方式:"&rs("sq")&"版</FONT>"
end if
lb=lb&"</td></tr><tr><td width=""90%"" colspan=""4""><hr SIZE=""1""></td></tr>"
if h>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
h=0
'#########读取页次
lb=lb&"<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0""><tr><td width=""15%"" nowrap>页次:<b>"¤tPage&"</b>/<b>"&mpage&"</b> 每页<b>"&MaxPerPage&"</b> 软件数<b>"&allshu&"</b></td><td width=""65%"" nowrap><p align=""center"">"
pageno=currentPage
if cint(pageno)>1 then
lb=lb&"<a href=../sort/"&tid&"_1.htm title=""最前页"">"
end if
lb=lb&"<font face=""Webdings"">9</font></a> "
if cint(pageno)>1 then
lb=lb&"<a href=../sort/"&tid&"_"&pageno-1&".htm title=""上一页"">"
end if
lb=lb&"<font face=""Webdings"">7</font></a>"
pp=cint(pageno)-2
if pp<1 then
pp=1
end if
for pno=pp to mpage
p=p+1
if pno*1=cint(pageno)*1 then
lb=lb&" <font color=""#FF0000"">["&pno&"]</font>"
else
lb=lb&" <a href=../sort/"&tid&"_"&pno&".htm>["&pno&"]</a>"
end if
if p>=5 then exit for
next
lb=lb&" "
if cint(pageno)< mpage then
lb=lb&"<a href=../sort/"&tid&"_"&pageno+1&".htm title=""下一页"">"
end if
lb=lb&"<font face=""Webdings"">8</font></a> "
if cint(pageno)< mpage then
lb=lb&"<a href=../sort/"&tid&"_"&mpage&".htm title=""最后页"">"
end if
lb=lb&"<font face=""Webdings"">:</font></a></p></td><td width=""18%"" nowrap><table cellpadding=""0"" cellspacing=""0"">"
lb=lb&"<form onsubmit=""window.location=this.KKK2.options[this.KKK2.selectedIndex].value; return false;"">"
lb=lb&"<tr><td nowrap>到<select name=""select"" onchange=""javascript:window.location.href=this.options[this.selectedIndex].value"">"
for i=1 to mpage
selected=""
if currentpage=i then
selected=" selected"
end if
lb=lb&"<option value=../sort/"&tid&"_"&i&".htm"&selected&">"&i&"</option>"
next
lb=lb&"</select>页</td></td></tr></form></table></td></tr></table>"
'################ 读取完成 ################
pencat=replace(pencat,"T_TITLE",thistitle)
pencat=replace(pencat,"T_NAME",tname)
pencat=replace(pencat,"TXlist",txlist)
pencat=replace(pencat,"TXtop",txtop)
pencat=replace(pencat,"T_LB",lb)
pencat=replace(pencat,"T_TXT",typetxt)
pencat=replace(pencat,"T_TYPE",thistype)
end if '***自动转向
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("../sort/"&tid&"_"¤tPage&".htm"))
fout.Write pencat
fout.close
'************** 生成HTML页 结束 ***************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -