fso_mtv2.asp
来自「全站生成htm静态页面」· ASP 代码 · 共 117 行
ASP
117 行
<!--#include file="function.asp"-->
<%CheckAdmin3%>
<!--#include file=Conn.asp-->
<!--#include file="config.asp"-->
<%dim fso,tmp,rs,sql,mtvlistid,name,mtvurl
if request("page")<>"" then
if cint(request("page"))<1 then
currentPage=1
application("load_album")=""
else
currentPage=cint(request("page"))
end if
else
currentPage=1
application("load_album")=""
end if
response.write "开始生成所有MTV观看页"
Set fso = CreateObject("Scripting.FileSystemObject")
if application("load_album")<>"ok" then
tmp = Server.MapPath("play.htm")
Set tmp = fso.OpenTextFile(tmp)
DO While not tmp.AtEndOfStream
album=tmp.ReadAll
Loop
tmp.close
set tmp=nothing
application("t_album")=top&album&bottom
application("load_album")="ok"
end if
set rs = Server.CreateObject("ADODB.Recordset")
MaxPerPage=1
if request("all")="page"then
sql="select * FROM Mtvlist where mtvlistid= " & request("mtvlistid")
else
sql="select * FROM Mtvlist order by mtvlistid desc"
end if
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
mpage=rs.pagecount '得到总页数
rs.move (currentPage-1)*MaxPerPage
if NOT rs.EOF then
mtvlistid=rs("mtvlistid")
Yuyan=rs("Yuyan")
fuwuqi=rs("fuwuqi")
pic=rs("pic")
NClassID=rs("NClassID")
NClass=rs("NClass")
name=rs("name")
mtvurl=rs("mtvurl")
end if
rs.close
response.write "<br>已生成/要生成页数:<font color=#FF0000>"¤tPage-1&"</font>/<font color=#FF0000><b>"&mpage&"</b></font>个,"
if mpage<currentPage then
response.write "操作完成!"
if request("all")="page" then %>
<script LANGUAGE="JavaScript">
<!--
setTimeout('window.close();', 500);
// -->
</script>
<%end if
response.end
else
pagename=name
'###########################################################################
'///////////////////////////////////////////////////////////////////////////
if mtvlistid<>"" then
set rs=conn.execute("SELECT * FROM Mtvlist where Sclassid="&mtvlistid&"")
if not rs.eof then
i=0
do while not rs.eof
i=i+1
geshou_2=geshou_2&"<tr bgcolor=#f0f0f0 onmouseover=this.bgColor='#F5F5F5' this.style cursor='hand' onmouseout=this.bgColor='#f0f0f0'></b></td> </tr><tr>"
geshou_2=geshou_2&"<td width=25% height=22> </td>"
'end if
if (i mod 4)=0 and i>=4 then
geshou_2=geshou_2&"</tr><tr>"
end if
rs.movenext
loop
else
end if
'###########################################################################
'///////////////////////////////////////////////////////////////////////////
rs.close
set rs=nothing
conn.close
set conn=nothing
pencat=application("t_album")
pencat=replace(pencat,"{webname}",webname)
pencat=replace(pencat,"{weburl}",weburl)
pencat=replace(pencat,"{master}",master)
pencat=replace(pencat,"{masterQQ}",masterQQ)
pencat=replace(pencat,"webname",webname)
pencat=replace(pencat,"{pagename}",pagename)
pencat=replace(pencat,"{Sclass}",sclass)
pencat=replace(pencat,"Geshou_2",geshou_2)
pencat=replace(pencat,"{name}",name)
pencat=replace(pencat,"{Yuyan}",Yuyan)
pencat=replace(pencat,"{fuwuqi}",fuwuqi)
pencat=replace(pencat,"{NClassID}",NClassID)
pencat=replace(pencat,"{mtvlistid}",mtvlistid)
pencat=replace(pencat,"{pic}",pic)
pencat=replace(pencat,"{mtvurl}",mtvurl)
pencat=replace(pencat,"{NClass}",NClass)
setf = Server.MapPath("../html/"&mtvlistid&".htm")
Set setf = fso.OpenTextFile(setf,2,True)
Setf.WriteLine pencat
response.write "<meta http-equiv=Refresh content='0; URL=fso_mtv2.asp?all="&request("all")&"&mtvlistid="&mtvlistid&"&page="¤tPage+1&"'>"
response.end
end if
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?