📄 makesort.asp
字号:
<!--#include file="security.asp"-->
<!--#include file="articleconn.asp"-->
<!--#include file="zcm.asp"-->
<%if session("flag")>3 then
response.write "<br><p align=center>您的操作权限不够!</p>"
response.end
end if
%>
<%
zj=Request.ServerVariables("SERVER_NAME")
zj=left(replace(zj,"www.",""),6)
zj=replace(zj,"0","a")
zj=replace(zj,"1","b")
zj=replace(zj,"2","c")
zj=replace(zj,"3","d")
zj=replace(zj,"4","e")
zj=replace(zj,"5","f")
zj=replace(zj,"6","g")
zj=replace(zj,"7","h")
zj=replace(zj,"8","i")
zj=replace(zj,"9","j")
zj=replace(zj,"a","40")
zj=replace(zj,"b","41")
zj=replace(zj,"c","52")
zj=replace(zj,"d","53")
zj=replace(zj,"e","64")
zj=replace(zj,"f","65")
zj=replace(zj,"g","76")
zj=replace(zj,"h","77")
zj=replace(zj,"i","88")
zj=replace(zj,"j","89")
zj=replace(zj,"k","20")
zj=replace(zj,"l","21")
zj=replace(zj,"m","22")
zj=replace(zj,"n","23")
zj=replace(zj,"o","24")
zj=replace(zj,"p","25")
zj=replace(zj,"q","26")
zj=replace(zj,"r","27")
zj=replace(zj,"s","28")
zj=replace(zj,"t","29")
zj=replace(zj,"u","30")
zj=replace(zj,"v","31")
zj=replace(zj,"w","32")
zj=replace(zj,"x","33")
zj=replace(zj,"y","34")
zj=replace(zj,"z","35")
zj=replace(zj,"-","36")
zj=replace(zj,".","37")
yzcv=zj*(len(zj)+len(zcn&"mayivod"))
Do While yzcv>10000000000
yzcv=yzcv-10000000000
loop
if yzcv<>zcv then
response.write "<script language=JavaScript>{window.alert('错误:程序尚未注册,此功能不能使用!');window.location='zcmayireg.asp?type=reg';}</script>"
end if
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.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 moban where id=2 "
set rs1 = conn.Execute (sql1)
moban=rs1("moban")
moban1=moban
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=10
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 href="&request("typeid")&"_1.html title=""首页"">"
end if
plist_top=plist_top&"首页</a> "
if cint(pageno)>1 then
plist_top=plist_top&"<a href="&request("typeid")&"_"&pageno-1&".html title=""上一页"">"
end if
plist_top=plist_top&"上一页</a> "
if cint(pageno)< pagecount1 then
plist_top=plist_top&" <a href="&request("typeid")&"_"&pageno+1&".html title=""下一页"">"
end if
plist_top=plist_top&"下一页</a> "
if cint(pageno)< pagecount1 then
plist_top=plist_top&"<a 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 href="&request("typeid")&"_1.html title=""首页"">"
end if
plist_bottom=plist_bottom&"首页</a> "
if cint(pageno)>1 then
plist_bottom=plist_bottom&" <a href="&request("typeid")&"_"&pageno-1&".html title=""上一页"">"
end if
plist_bottom=plist_bottom&"上一页</a> "
if cint(pageno)< pagecount1 then
plist_bottom=plist_bottom&"<a href="&request("typeid")&"_"&pageno+1&".html title=""下一页"">"
end if
plist_bottom=plist_bottom&"下一页</a> "
if cint(pageno)< pagecount1 then
plist_bottom=plist_bottom&"<a 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 bordercolorlight=#000000 class=y 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 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/fang.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&"免费电影"
body=body&"<br>"
end if
body=body&"<br><img src=../images/fang.gif width=15 height=15>主演:"&left(rs("name"),6)&"<br> "
body=body&"<img src=../images/fang.gif width=15 height=15>地区:"&rs("where")&"地区<br> "
body=body&"<img src=../images/fang.gif width=15 height=15>上传:"&rs("dateandtime")&"<br> "
body=body&"<img src=../images/fang.gif width=15 height=15>推荐:<SPAN class=xinxin>"&rs("softlevel")&"</SPAN><br>"
body=body&"<img src=../images/fang.gif width=15 height=15>点播:"&rs("hits")&"</td>"
body=body&"</tr><tr bgcolor=#327600><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_menu= Server.CreateObject("ADODB.Recordset")
rs_menu.open"select * from type",conn,1,1
if rs_menu.EOF then
response.write "没有栏目:"
else
do while NOT rs_menu.EOF
if rs_menu("type")="VIP专区" or rs_menu("type")="成人片" then
menu=menu&"<TD height=20 align=center vAlign=middle width=0>"
menu=menu&"<a href=../mlist/"&rs_menu("typeid")&"_1.html></a></TD>"
else
menu=menu&"<TD height=20 align=center vAlign=middle width=387>"
menu=menu&"<img src=../images/menu-01.gif width=18 height=6><a href=../mlist/"&rs_menu("typeid")&"_1.html class=menu>"&rs_menu("type")&"</a></TD>"
end if
rs_menu.MoveNext
loop
end if
rs_menu.close
set rs_menu=nothing
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="暂时没有电影"
else
top="<script src='../js/hot_"&type_id&".js'></script>"
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_new=top_new&"暂时没有电影"
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&" 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
set rs_home=conn.execute("select home,homes,url,urls from [home]")
homes=rs_home("homes")
url=rs_home("url")
urls=rs_home("urls")
rs_home.close
set rs_home=nothing
moban=replace(moban,"CAT",type_name)
moban=replace(moban,"<!-menu->",menu)
moban=replace(moban,"<!-top->",top)
moban=replace(moban,"<!-new->",top_new)
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)
moban=replace(moban,"<!-homes->",homes)
moban=replace(moban,"<!-url->",url)
moban=replace(moban,"<!-urls->",urls)
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 + -