📄 creathtm.asp
字号:
<%
if Session("isAdmin")<>true Then
Response.Write "非法闯入!"
Response.End
End if
%>
<!--#include file="conn.asp"-->
<%
if request("gx")=1 then
min=request("min")
max=request("max")
if min="" and max="" then mysql=" order by id desc"
if min<>"" and max="" then mysql=" where id>="&min&" order by id desc"
if min="" and max<>"" then mysql=" where id<="&max&" order by id desc"
if min<>"" and max<>"" then mysql=" where id>="&min&" and id<="&max&" order by id desc"
'生成网址HTML页面
set fso = Server.CreateObject("Scripting.FileSystemObject")
set rs=server.createobject("adodb.recordset")
sql="SELECT id,url,title FROM detail"&mysql
rs.open sql,conn,1,1
i=0
while not rs.eof
set fw = fso.CreateTextFile(Server.MapPath("../html/"&rs(0)&".htm"),TRUE) '若有则覆盖
fw.writeline("<html><head><title>"&rs("title")&"</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head><frameset framespacing='0' frameborder='0' rows='19,*'><frame name='header' scrolling='no' noresize target='main' src='../top2.htm?"&rs("title")&"'><frame name='main' src='"&rs("url")&"' scrolling='auto'><noframes><script>top.location.href='http://www.abcwz.com/?noframe';</script></noframes></frameset></html>")
fw.close
rs.movenext
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%><p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="1" width="350" bgcolor="#FF0000" height="150">
<tr>
<td bgcolor="#F1E3F2">
<p align="center">自动更新网址页文件完成!</p>
</td>
</tr>
</table>
</center>
</div>
<%else%>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="1" width="450" bgcolor="#FF0000">
<tr>
<td bgcolor="#F1E3F2">
<p align="center" style="margin-top: 16">自动更新网址页文件</p>
<FORM name=form1 action=creathtm.asp?gx=1 method=post>
<p align="center" style="margin-top: 16">从ID:<input type="text" name="min" size="20"></p>
<p align="center" style="margin-top: 16">自ID:<input type="text" name="max" size="20"></p>
<p align="center" style="margin-top: 16"><input type="submit" value="提 交" name="B1">
<input type="reset" value="重写" name="B2"></p>
</form>
<p align="center"> </td>
</tr>
</table>
</center>
</div>
<%
conn.close
set conn=nothing
end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -