📄 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 & " <img src=""../images/j1.gif"" border=""0"" width=""8"" height=""11""><a href=""../flash_fl/"&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&"<tr><td width=""100%"" bgcolor=""#F7F7F7"" height=""20"" onmouseover=""this.bgColor='#F5F5DC'"" onmouseout=""this.bgColor='#F7F7F7'"" align=""right""><a href=""../flash_fl/"&rs("id")&"_1.htm"">"&TTNN&"</a><img border=""0"" src=""../images/fenleij1.gif"" width=""22"" height=""11"" align=""absMiddle""></td></tr>"
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&"<tr><td width=""100%"" bgcolor=""#F7F7F7"" height=""20"" onmouseover=""this.bgColor='#F5F5DC'"" onmouseout=""this.bgColor='#F7F7F7'"" align=""right""><a href=""../flash_fl/"&rs("id")&"_1.htm"">"&TTNN&"</a><img border=""0"" src=""../images/fenleij1.gif"" width=""22"" height=""11"" align=""absMiddle""></td></tr>"
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&"<table cellSpacing=""0"" cellPadding=""0"" width=""100%"" border=""0""><tr><td style=""line-height: 28px; font-size: 12px"" align=""middle""><a href=""../flash/"&rs("id")&".htm""><img src="""&rs("pic")&""" width=""100"" height=""75"" border=""1"" class=""border2""></a><br>"&rs("cxn")&"</td></tr>"
if h>=3 then exit do
rs.movenext
loop
h=0
end if
rs.close
txtop=TXtop&"</table>"
'读取FLASH列表
sql="select * from down where tid in ("&sqqq&") order by date desc"
rs.open sql,conn,1,1
if rs.eof then
lb=lb&"<table cellSpacing=""20"" border=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%""><tr><td width=""100%"" align=""center"">Sorry! 暂时没有相关作品!<p>如有问题,请联系管理员:<a href=""mailto:ygs@myflash.cn"">ygs@myflash.cn</a></td></tr></table>"
mpage=1
allshu=0
else
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
rs.move (currentPage-1)*MaxPerPage
allshu=rs.recordcount
h=0
lb=lb&"<table cellSpacing=""20"" border=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%"">"
do while not rs.eof
h=h+1
lb=lb&"<tr><td width=""50%""><table border=""0"" cellSpacing=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%"" align=""center"">"
lb=lb&"<tr><td width=""30%"" valign=""top""><a href=""../flash/"&rs("id")&".htm""><img width=""100"" height=""75"" border=""1"" src="&rs("pic")&" class=""border2""></a></td><td width=""15%"" valign=""top""><img border=""0"" src=""../images/view_b2.gif"" width=""10"" height=""77""></td><td width=""55%"" rowspan=""2"" class=""p1""><font color=""#FE0166"">"&rs("cxn")&"</font><br><font color=""#007ACC"">作者:</font>"&rs("ln")&"<br><font color=""#007ACC"">类别:</font>"
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=""../flash_fl/"&rs("tid")&"_1.htm""><FONT color=""#666666"">"&TN(ubound(TN)-1)&"</FONT></a><br><a style=""CURSOR:hand;TEXT-DECORATION:none"" onclick=""window.open('../recommend_flash.asp?id="&rs("id")&"','','width=400,height=470')"" href><font color=""#008000"">送给好友</font></a> <a href=""../vote_flash.asp?id="&rs("id")&""" target=""_blank""><font color=""#008000"">点评</font></a>"
else
lb=lb& "类别错误"
end if
rs_type.close
if rs("system")<>"" then
lb=lb&"<br>环境:"&rs("system")&""
end if
if rs("sq")<>"" then
lb=lb&"<br>方式:"&rs("sq")&"</FONT>"
end if
lb=lb&"</td></tr><tr><td width=""50%"" valign=""top"" colspan=""2""><img border=""0"" src=""../images/view_b1.gif"" width=""112"" height=""9""></td></tr></table></td>"
rs.movenext
lb=lb&"<td width=""50%""><table border=""0"" cellSpacing=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%"" align=""center"">"
lb=lb&"<tr><td width=""30%"" valign=""top""><a href=""../flash/"&rs("id")&".htm""><img width=""100"" height=""75"" border=""1"" src="&rs("pic")&" class=""border2""></a></td><td width=""15%"" valign=""top""><img border=""0"" src=""../images/view_b2.gif"" width=""10"" height=""77""></td><td width=""55%"" rowspan=""2"" class=""p1""><font color=""#FE0166"">"&rs("cxn")&"</font><br><font color=""#007ACC"">作者:</font>"&rs("ln")&"<br><font color=""#007ACC"">类别:</font>"
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=""../flash_fl/"&rs("tid")&"_1.htm""><FONT color=""#666666"">"&TN(ubound(TN)-1)&"</FONT></a><br><a style=""CURSOR:hand;TEXT-DECORATION:none"" onclick=""window.open('../recommend_flash.asp?id="&rs("id")&"','','width=400,height=470')"" href><font color=""#008000"">送给好友</font></a> <a href=""../vote_flash.asp?id="&rs("id")&""" target=""_blank""><font color=""#008000"">点评</font></a>"
else
lb=lb& "类别错误"
end if
rs_type.close
if rs("system")<>"" then
lb=lb&"<br>环境:"&rs("system")&""
end if
if rs("sq")<>"" then
lb=lb&"<br>方式:"&rs("sq")&"</FONT>"
end if
lb=lb&"</td></tr><tr><td width=""50%"" valign=""top"" colspan=""2""><img border=""0"" src=""../images/view_b1.gif"" width=""112"" height=""9""></td></tr></table></td></tr>"
if h>=MaxPerPage/2 then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
lb=lb&"</table>"
conn.close
set conn=nothing
h=0
'#########读取页次
lb=lb&"<table border=""0"" width=""518"" cellspacing=""0"" cellpadding=""0"" align=""center""><tr><td width=""518"" bgcolor=""#DEDFDE"" height=""1""></td></tr><tr><td width=""518"" height=""30"" background=""../images/fl_di1.gif"" valign=""middle""><p align=""center"">"
pageno=currentPage
if cint(pageno)>1 then
lb=lb&"<a href=../flash_fl/"&tid&"_1.htm title=""最前页"">"
end if
lb=lb&"<img border=""0"" src=""../images/zq.gif"" width=""48"" height=""22"" align=""absmiddle""></a> "
if cint(pageno)>1 then
lb=lb&"<a href=../flash_fl/"&tid&"_"&pageno-1&".htm title=""上一页"">"
end if
lb=lb&"<img border=""0"" src=""../images/qy.gif"" width=""48"" height=""22"" align=""absmiddle""></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=""#4D9CC8""><b>"&pno&"</b></font> |"
else
lb=lb&" <a href=../flash_fl/"&tid&"_"&pno&".htm>"&pno&"</a> |"
end if
if p>=10 then exit for
next
lb=lb&" "
if cint(pageno)< mpage then
lb=lb&"<a href=../flash_fl/"&tid&"_"&pageno+1&".htm title=""下一页"">"
end if
lb=lb&"<img border=""0"" src=""../images/xy.gif"" width=""48"" height=""22"" align=""absmiddle""></a> "
if cint(pageno)< mpage then
lb=lb&"<a href=../flash_fl/"&tid&"_"&mpage&".htm title=""最后页"">"
end if
lb=lb&"<img border=""0"" src=""../images/zh.gif"" width=""48"" height=""22"" align=""absmiddle""></a></p>"
lb=lb&"</td></tr><tr><td width=""518""><img border=""0"" src=""../images/fl_di2.gif"" width=""518"" height=""6""></td></tr><tr><td width=""518"" height=""10""></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("../flash_fl/"&tid&"_"¤tPage&".htm"))
fout.Write pencat
fout.close
'************** 生成HTML页 结束 ***************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -