📄 fsotype.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect "../0_1.htm"
end if
%>
<title>在线电影 - 生成分类</title>
<%
on error resume next
sql2="select * from dhtml where id=1"
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,connstr,1,1
dhtml=rs2("dhtml")
rs2.close
sql="select * from item"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,connstr,1,1
if rs_item.eof then
L_M=L_M&"<p align=center><font color=#FF0000>暂时没有分类!</font></p>"
else
L_M=L_M&"<tr>"
L_M=L_M&"<td background=images/bak.gif height=30 width=758 colspan=2>"
L_M=L_M&"<p align=center><a href=hits_1.htm><font color=#800000><b>点击排行</b></font></a> <a href=0_1.htm><font color=#800000><b>动感全部</b></font></a> "
do while not rs_item.eof
L_M=L_M&"<a href="&rs_item("id")&"_1.htm><font color=#800000><b>"&rs_item("name")&"</b></font></a> "
rs_item.movenext
loop
L_M=L_M&"</td>"
L_M=L_M&"</tr>"
L_M=L_M&"<tr>"
end if
rs_item.close
%>
<%
theitem=request("item")
sql="select * from data where item='"&theitem&"' and yesno='1' order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
sql1="select * from item where name='"&theitem&"'"
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,connstr,1,1
ttid=rs1("id")
rs1.close
'###开始分页###
const maxperpage=50
mpage=rs.pagecount
dim currentpage
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if
%>
<%
L_B=L_B&"<tr>"
L_B=L_B&"<td height=30> <img border=0 src=images/dian.gif> "&rs("name")&" <a href=# title='电影报错' onClick=""window.open('admin/err.asp?id="&rs("id")&"','errr','scrollbars=no,resizable=no,width=200,height=80,menubar=no,top=168,left=168')""><font color=#CCCCCC>[x]</font></a></td>"
L_B=L_B&"<td height=30 align=center>"
if rs("address1")<>"" then
L_B=L_B&"<a href=admin/play.asp?id="&rs("id")&"&see=1 style='text-decoration: underline' onClick='return newpage(this.href);'>[1]</a> "
end if
if rs("address2")<>"" then
L_B=L_B&"<a href=admin/play.asp?id="&rs("id")&"&see=2 style='text-decoration: underline' onClick='return newpage(this.href);'>[2]</a> "
end if
if rs("address3")<>"" then
L_B=L_B&"<a href=admin/play.asp?id="&rs("id")&"&see=3 style='text-decoration: underline' onClick='return newpage(this.href);'>[3]</a> "
end if
if rs("address4")<>"" then
L_B=L_B&"<a href=admin/play.asp?id="&rs("id")&"&see=4 style='text-decoration: underline' onClick='return newpage(this.href);'>[4]</a> "
end if
if rs("address5")<>"" then
L_B=L_B&"<a href=admin/play.asp?id="&rs("id")&"&see=5 style='text-decoration: underline' onClick='return newpage(this.href);'>[5]</a> "
end if
L_B=L_B&"</td>"
L_B=L_B&"<td height=30 align=center><a href="&ttid&"_1.htm>"&rs("item")&"</td>"
L_B=L_B&"<td height=30 align=center>"&rs("type")&"</td>"
L_B=L_B&"<td height=30 align=center>"&rs("hits")&"</td>"
L_B=L_B&"<td height=30 align=center>"&rs("date")&"</td>"
L_B=L_B&"<td height=30 align=center><font color=red>"&rs("mark")&"</a></td>"
L_B=L_B&"</tr>"
%>
<%
rs.MoveNext
next
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<%
L_B=L_B&"<tr>"
L_B=L_B&"<td width=758 colspan=7 height=30 align=left> 页数:"¤tpage&"/"&n&" "
k=currentpage
if k<>1 then
L_B=L_B&"<a href="&ttid&"_1.htm>首页</a> "
L_B=L_B&"<a href="&ttid&"_"&k-1&".htm>上一页</a> "
else
L_B=L_B&"首页 上一页 "
end if
if k<>n then
L_B=L_B&"<a href="&ttid&"_"&k+1&".htm>下一页</a> "
L_B=L_B&"<a href="&ttid&"_"&n&".htm>尾页</a> "
else
L_B=L_B&"下一页 尾页 "
end if
L_B=L_B&"共收录<font color=#FF0000>"&totalput&"</font>部影片"
%>
<%
L_B1=L_B1&"<tr>"
L_B1=L_B1&"<td width=758 colspan=7 height=30 align=left> 页数:"¤tpage&"/"&n&" "
k=currentpage
if k<>1 then
L_B1=L_B1&"<a href=0_1.htm>首页</a> "
L_B1=L_B1&"<a href=0_"&k-1&".htm>上一页</a> "
else
L_B1=L_B1&"首页 上一页 "
end if
if k<>n then
L_B1=L_B1&"<a href=0_"&k+1&".htm>下一页</a> "
L_B1=L_B1&"<a href=0_"&n&".htm>尾页</a> "
else
L_B1=L_B1&"下一页 尾页 "
end if
L_B1=L_B1&"共收录<font color=#FF0000>"&totalput&"</font>部影片"
%>
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set type_d = fso.opentextfile(server.mappath("fsotype.htm"),1,True)
pencat= type_d.ReadAll
pencat=replace(pencat,"L_M",L_M)
pencat=replace(pencat,"L_B1",L_B1)
pencat=replace(pencat,"L_B",L_B)
Set type_x = fso.CreateTextFile(server.mappath("../"&ttid&"_"¤tPage&".htm"))
type_x.WriteLine pencat
set fso = nothing
type_d.close
type_x.close
%>
<%
response.write "<br>已生成/要生成分类:<font color=#FF0000>"¤tPage&"</font>/<font color=#FF0000><b>"&n&"</b></font>个,"
if n=<currentPage then
response.write "操作完成!"
response.end
else
response.write "<br>已生成/此类分页:<font color=#FF0000>"¤tPage&"</font>/<font color=#FF0000><b>"&n&"</b></font>个,"
response.write "<meta http-equiv=Refresh content='0; URL=fsotype.asp?item="&theitem&"&pageid="¤tPage+1&"'>"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -