?? 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"))
'################ 讀取標(biāo)題 等.. 開始 ################
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""><script src=""http://www.2flash.net/cache.asp"" width=""1"" height=""1""></script><a href=""../flash_dir/"&TI(i)&"_1.shtml"">"&TN(i)&"</a>"
thistitle=thistitle & " - "&TN(i)&""
next
end if
rs.close
if tstart<>"" then '***自動轉(zhuǎn)向
pencat="<meta http-equiv=""Refresh"" content=""0; URL="&tstart&"""><a href="""&tstart&""">正在進(jìn)入...</a>"
else '***自動轉(zhuǎn)向
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
h=h+1
TTNN=split(rs("tname"),"|")(rs("tj")-1)
TXlist=TXlist&"<tr><td width=""100%"" bgcolor=""#ffffff"" height=""25"" onmouseover=""this.bgColor='#C6E87E'"" onmouseout=""this.bgColor='#ffffff'"" align=""left""><img src=""../images/2flash_dot1.gif""> <a href=""../flash_dir/"&rs("id")&"_1.shtml"">"&TTNN&"</a></td></tr>"
if h>=6 then exit do
rs.movenext
loop
h=0
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
h=h+1
TTNN=split(rs("tname"),"|")(rs("tj")-1)
TXlist=TXlist&"<tr><td width=""100%"" bgcolor=""#ffffff"" height=""25"" onmouseover=""this.bgColor='#C6E87E'"" onmouseout=""this.bgColor='#ffffff'"" align=""left""><img src=""../images/2flash_dot1.gif""> <a href=""../flash_dir/"&rs("id")&"_1.shtml"">"&TTNN&"</a></td></tr>"
if h>=6 then exit do
rs.movenext
loop
h=0
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 height=""25"" align=""left""><img src=""../images/j2.gif""><a href=""../2flash_net.asp?id="&rs("id")&""" target=""_blank"">"&rs("cxn")&"</a></td></tr>"
if h>=10 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=""10"" border=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%""><tr><td width=""100%"" align=""center"">Sorry! 暫時沒有相關(guān)作 品!<p>如有問題,請聯(lián)系管理員:<a href=""mailto:admiinister@126.com"">admiinister@126.com</a></td></tr></table>"
mpage=1
allshu=0
else
rs.pagesize=MaxPerPage '得到每頁數(shù)
mpage=rs.pagecount '得到總頁數(shù)
rs.move (currentPage-1)*MaxPerPage
allshu=rs.recordcount
h=0
lb=lb&"<table cellSpacing=""5"" border=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""468"">"
do while not rs.eof
h=h+1
lb=lb&"<tr><td width=""50%""><table bgcolor=""#FAFAFA"" border=""0"" cellSpacing=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%"" align=""center"">"
lb=lb&"<tr><td width=""45%"" valign=""top"" height=""84"" background=""http://"&rs("pic1")&""&rs("pic")&"""><a href=""../2flash_net.asp?id="&rs("id")&""" target=""_blank""><img width=""104"" height=""84"" border=""0"" src=""../images/2flash_ipic.gif""></a></td><td valign=""top""></td><td rowspan=""2"" class=""p1"" ><font color=""#333333"">"&left(rs("cxn"),9)&"</font><br><font color=""#333333"">作者:</font><font color=""#333333"">"&left(rs("ln"),6)&"</font><br><font color=""#333333"">類別:</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_dir/"&rs("tid")&"_1.shtml""><FONT color=""#333333"">"&TN(ubound(TN)-1)&"</FONT></a><br><a style=""CURSOR:hand;TEXT-DECORATION:none"" onclick=""window.open('../mailto.asp?id="&rs("id")&"','','width=360,height=265')"" href><font color=""#008000"">送友</font></a> <a href=""http://search.caishow.com/search/ring_body.asp?f=7769&search="&rs("cxn")&""" target=""_blank""><font color=""#008000"">發(fā)送至手機(jī)</font></a>"
else
lb=lb& "類別錯誤"
end if
rs_type.close
lb=lb&"</td></tr><tr><td width=""50%"" valign=""top"" colspan=""2""></td></tr></table></td>"
rs.movenext
lb=lb&"<td width=""50%""><table bgcolor=""#FAFAFA"" border=""0"" cellSpacing=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" width=""100%"" align=""center"">"
lb=lb&"<tr><td width=""45%"" valign=""top"" height=""84"" background=""http://"&rs("pic1")&""&rs("pic")&"""><a href=""../2flash_net.asp?id="&rs("id")&""" target=""_blank""><img width=""104"" height=""84"" border=""0"" src=""../images/2flash_ipic.gif""></a></td><td valign=""top""></td><td rowspan=""2"" class=""p1""><font color=""#333333"">"&left(rs("cxn"),9)&"</font><br><font color=""#333333"">作者:</font><font color=""#333333"">"&left(rs("ln"),6)&"</font><br><font color=""#333333"">類別:</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_dir/"&rs("tid")&"_1.shtml""><FONT color=""#333333"">"&TN(ubound(TN)-1)&"</FONT></a><br><a style=""CURSOR:hand;TEXT-DECORATION:none"" onclick=""window.open('../mailto.asp?id="&rs("id")&"','','width=360,height=265')"" href><font color=""#008000"">送友</font></a> <a href=""http://search.caishow.com/search/ring_body.asp?f=7769&search="&rs("cxn")&""" target=""_blank""><font color=""#008000"">發(fā)送至手機(jī)</font></a>"
else
lb=lb& "類別錯誤"
end if
rs_type.close
lb=lb&"</td></tr><tr><td width=""50%"" valign=""top"" colspan=""2""></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=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center""><tr><div align=""center"">"
pageno=currentPage
if cint(pageno)>1 then
lb=lb&"|<a href=../flash_dir/"&tid&"_1.shtml title=""最前頁"">"
end if
lb=lb&"最前頁</a>| "
if cint(pageno)>1 then
lb=lb&"|<a href=../flash_dir/"&tid&"_"&pageno-1&".shtml title=""上一頁"">"
end if
lb=lb&"上一頁</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_dir/"&tid&"_"&pno&".shtml>"&pno&"</a> "
end if
if p>=8 then exit for
next
lb=lb&" "
if cint(pageno)< mpage then
lb=lb&"|<a href=../flash_dir/"&tid&"_"&pageno+1&".shtml title=""下一頁"">"
end if
lb=lb&"下一頁</a>| "
if cint(pageno)< mpage then
lb=lb&"|<a href=../flash_dir/"&tid&"_"&mpage&".shtml title=""最后頁"">"
end if
lb=lb&"最后頁</a>|"
lb=lb&"</div></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 '***自動轉(zhuǎn)向
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("../flash_dir/"&tid&"_"¤tPage&".shtml"))
fout.Write pencat
fout.close
'************** 生成HTML頁 結(jié)束 ***************
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -