📄 makesort.asp
字号:
<!--#include file="articleconn.asp" -->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<%
if session("flag")>1 then
response.write "<br><p align=center>您没有操作的权限</p>"
response.end
end if
%>
<%
dim rs
dim sql
dim rs1
dim sql1
dim moban
if request("page")<>"" then
if cint(request("page"))<1 then
currentpage=1
else
currentpage=cint(request("page"))
end if
end if
set rs1 = server.CreateObject("ADODB.RecordSet")
sql1 = "select moban from moban1 where id=2 "
set rs1 = conn.Execute (sql1)
moban=rs1("moban")
moban1=moban
set rs=conn.execute("select * from [home]")
homes=rs("homes")
set rs=server.CreateObject("ADODB.RecordSet")
if request("typeid")="" then
response.write "请先选择类别"
else
set rs_sort=server.createobject("adodb.recordset")
sql="select typeid,type from type where typeid="&request("typeid")&""
rs_sort.open sql,conn,1,1
type_name=rs_sort("type")
type_id=rs_sort("typeid")
rs_sort.close
set rs_sort=nothing
rs.open("select * from learning where typeid='"&type_name&"' order by articleid desc"),conn,1,1
if rs.eof and rs.bof then
body=body&"<tr><td width='100%'><p align=center>没有或没有找到任何电影</td></tr>"
pagecount1=1
totalnumber=0
else
maxperpage=12
rs.pagesize=maxperpage
pagecount1=rs.pagecount
rs.move (currentpage-1)*maxperpage
totalnumber=rs.recordcount
n=0
'分页程序
plist_top=plist_top&"<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0""><tr><td width=""50%"" nowrap colspan=5><p align=list> 本类<b><font color=#FF0000>"&totalnumber&"</font></b>个 "
plist_top=plist_top&"页次:<b><font color=#FF0000>"¤tpage&"</font></b>/<b>"&pagecount1&"</b> <b>"&maxperpage&"</b>个/页</p></td><td width=""50%"" nowrap><p align=right>"
pageno=currentpage
if cint(pageno)>1 then
plist_top=plist_top&"<a class=mName href="&request("typeid")&"_1.html title=""首页"">"
end if
plist_top=plist_top&"首页</a> "
if cint(pageno)>1 then
plist_top=plist_top&"<a class=mName href="&request("typeid")&"_"&pageno-1&".html title=""上一页"">"
end if
plist_top=plist_top&"上一页</a> "
if cint(pageno)< pagecount1 then
plist_top=plist_top&" <a class=mName href="&request("typeid")&"_"&pageno+1&".html title=""下一页"">"
end if
plist_top=plist_top&"下一页</a> "
if cint(pageno)< pagecount1 then
plist_top=plist_top&"<a class=mName href="&request("typeid")&"_"&pagecount1&".html title=""尾页"">"
end if
plist_top=plist_top&"尾页</a>"
plist_top=plist_top&"</p></td></tr></table>"
plist_bottom=plist_bottom&"<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0""><tr><td width=""82%"" nowrap colspan=5><p align=left> 本类<b> <font color=#FF0000>"&totalnumber&"</font></b>个 | "
pageno=currentpage
if cint(pageno)>1 then
plist_bottom=plist_bottom&"<a class=mName href="&request("typeid")&"_1.html title=""首页"">"
end if
plist_bottom=plist_bottom&"首页</a> "
if cint(pageno)>1 then
plist_bottom=plist_bottom&" <a class=mName href="&request("typeid")&"_"&pageno-1&".html title=""上一页"">"
end if
plist_bottom=plist_bottom&"上一页</a> "
if cint(pageno)< pagecount1 then
plist_bottom=plist_bottom&"<a class=mName href="&request("typeid")&"_"&pageno+1&".html title=""下一页"">"
end if
plist_bottom=plist_bottom&"下一页</a> "
if cint(pageno)< pagecount1 then
plist_bottom=plist_bottom&"<a class=mName href="&request("typeid")&"_"&pagecount1&".html title=""尾页"">"
end if
plist_bottom=plist_bottom&"尾页</a> 页次:<b><font color=#FF0000>"¤tpage&"</font></b>/<b>"&pagecount1&"</b> <b>"&maxperpage&"</b>个/页"
plist_bottom=plist_bottom&"</p></td><td width=""18%"" nowrap>转到:<select name=""select"" size='1' style=""font-size: 9pt"" onchange=""javascript:window.location.href=this.options[this.selectedIndex].value"">"
for i=1 to pagecount1
selected=""
if currentpage=i then
selected=" selected"
end if
plist_bottom=plist_bottom&"<option value="&request("typeid")&"_"&i&".html"&selected&">第"&i&"页</option>"
next
plist_bottom=plist_bottom&"</select></td></tr></table>"
'主页面
body=body&"<tr>"
row_count=1
do while not rs.eof
n=n+1
name=rs("typeid")
total=rs.recordcount
arter=rs("name")
if rs("movietype")="rm" then
format="<img src=../img/real.gif border=0 width=30 height=16>"
elseif rs("movietype")="md" then
format="<img src=../img/media.gif border=0 width=30 height=16>"
elseif rs("movietype")="mov" then
format="<img src=../img/lookmov.gif border=0 width=30 height=16>"
end if
if len(arter)>9 then arter=left(arter,9)&"..."
marter=""&arter&""
body=body&"<td valign=top><table width=100% border=0 bgColor=#303430 bordercolorlight=#000000 STYLE=border:#000000 3px Solid cellpadding=0>"
body=body&"<tr><td width=121 rowspan=2 valign=top>"
body=body&"<TABLE width=115 height=144 border=0 cellPadding=0 cellSpacing=0 background=../images/image_bg.gif>"
body=body&"<TR><TD height=16 align=middle vAlign=center><img src=../images/spacer.gif width=1 height=1></TD></TR>"
body=body&"<TR><TD align=center><a target=_blank href=../html/"&rs("articleid")&".html>"
if rs("domurl")="" then
body=body&"<img border=0 height=119 src=../images/nopic.gif width=100></a></td>"
else
body=body&"<img border=0 height=119 src="&rs("domurl")&" width=100></a></td>"
end if
body=body&"<TR><TD height=9><img src=../images/spacer.gif width=1 height=1></TD></TR></TABLE></td><td>"
body=body&"<span class=3dfont2><a target=_blank class=mayi href=../html/"&rs("articleid")&".html><strong>"&left(rs("title"),10)&"</strong></a></td></tr><tr><td>"
body=body&"<img src=../images/dot.gif width=15 height=15>类别:"
if rs("canlook")=1 then
body=body&"普通电影"
elseif rs("canlook")=3 then
body=body&"黄金电影"
elseif rs("canlook")=0 then
body=body&"免费电影"
end if
body=body&"<br><img src=../images/dot.gif width=15 height=15>主演:"&left(rs("name"),6)&"<br> "
body=body&"<img src=../images/dot.gif width=15 height=15>地区:"&rs("where")&"地区<br> "
body=body&"<img src=../images/dot.gif width=15 height=15>上传:"&rs("dateandtime")&"<br> "
body=body&"<img src=../images/dot.gif width=15 height=15>推荐:<SPAN class=xinxin>"&rs("softlevel")&"</SPAN><br>"
body=body&"<img src=../images/dot.gif width=15 height=15>点播:"&rs("hits")&"</td>"
body=body&"</tr><tr bgcolor=#ffffff><td colspan=2></td></tr></table></td>"
if row_count mod 2 =0 then
body=body&"</tr>"
end if
row_count=row_count+1
if n>=MaxPerPage then exit do
rs.movenext
loop
rs.close
end if
set rs_top=server.createobject("adodb.recordset")
sql="select top 10 * from learning where typeid='"&name&"' order by hits desc"
rs_top.open sql,conn,1,1
if rs_top.eof and rs_top.bof then
top=top&"暂时没有电影"
else
top=top&"<table width=100% border=0 cellpadding=0 cellspacing=0>"
do while not rs_top.eof
top_n=top_n+1
top=top&"<tr><td width=80% height=4> <A href=../html/"&rs_top("articleid")&".html class=left"
top=top&" target=_blank >"&left(rs_top("title"),10)&"</A></td><td width=20% height=4 valign=top><font class=eng_S color=#3B591B1>"&rs_top("hits")&"</font></td></tr>"
rs_top.movenext
if top_n>9 then exit do
loop
top=top&"</table>"
end if
rs_top.close
set rs_top=nothing
set rs_new=server.createobject("adodb.recordset")
sql="select top 10 * from learning order by dateandtime desc"
rs_new.open sql,conn,1,1
if rs_new.eof and rs_new.bof then
top=top&"暂时没有电影"
else
top_new=top_new&"<table width=100% border=0 cellpadding=0 cellspacing=0>"
do while not rs_new.eof
new_n=new_n+1
top_new=top_new&"<tr><td width=80% height=4>"&new_n&".<A href=../html/"&rs_new("articleid")&".html "
top_new=top_new&" target=_blank class=xhx>"&left(rs_new("title"),10)&"</A></td><td width=20% height=4><font color=#999999>"&rs_new("hits")&"</font></td></tr>"
rs_new.movenext
if new_n>9 then exit do
loop
top_new=top_new&"</table>"
end if
rs_new.close
set rs_new=nothing
moban=replace(moban,"CAT",type_name)
moban=replace(moban,"<!-top->",top)
moban=replace(moban,"<!-new->",top_new)
moban=replace(moban,"<!-homes->",homes)
moban=replace(moban,"<!-sortid->",type_id)
moban=replace(moban,"<!-plist_bottom->",plist_bottom)
moban=replace(moban,"<!-plist_top->",plist_top)
moban=replace(moban,"<!-total->",total)
moban=replace(moban,"<!-body->",body)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("../mlist/"&type_id&"_"&request("page")&".html"))
fout.Write moban
fout.close
if currentpage<pagecount1 then
response.write "生成第: <font color=#FF0000> "¤tpage&" </font>页<br>共有<font color=#FF0000><b>"&pagecount1&"</b></font>页"
response.write "<meta http-equiv=Refresh content='0; URL=makesort.asp?typeid="&request("typeid")&"&page="&cint(currentpage+1)&"'>"
end if
if currentpage=pagecount1 then%>
<body>
<p><br>
生成<font color="#FF0000"><%=currentpage%></font>页<br>
此类共有<font color="#ff0000"><%=pagecount1%></font>页,自动关闭窗口.
<script LANGUAGE="JavaScript">
<!--
setTimeout('window.close();', 700);
// -->
</script>
</p>
</body>
<%end if
rs1.close
set rs1=nothing
set rs=nothing
end if
conn.close
set conn=nothing
%></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -