📄 admin_rewrite.asp
字号:
<!--#include file=setup.asp-->
<!--#include file=admin_cookie.asp-->
<!--#include file=head.asp-->
<!--#include file=include.asp-->
<!--#include file=tohtml.asp-->
<%
function w(a,b)
set fso=server.createobject("scripting.filesystemobject")
set fp=fso.createtextfile(server.mappath(a))
fp.write(b)
end function
%>
<%
if request("action")="rewrite" then
set conn=server.createobject("adodb.connection")
conn.open connstr
if conn.execute("select * from wz").eof then err("数据库中没有文章啊!返回上一页")
set fso1=server.createobject("scripting.filesystemobject")
if fso1.folderexists(server.mappath("58down")) then
fso1.deletefolder(server.mappath("58down"))
fso1.createfolder(server.mappath("58down"))
set fso1=nothing
else
fso1.createfolder(server.mappath("58down"))
set fso1=nothing
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from wz",conn,1,1
count=rs.recordcount
response.write "<table width=90% align=center cellpadding=3 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF height=120 valign=middle align=center>正在重写数据中,可能需要很长的时间!请稍候.........<meta http-equiv='refresh' content='2 url="&self&"'><br>"
for i=1 to count
if rs.eof then exit for
file="58down/"&rs("num")&".htm"
'************** 文章内容模版开始 ***************
main= "<html><title>"&rs("title")&":"&webtitle&"</title><meta http-equiv=Content-Type content=text/html; charset=gb2312><link href=../Style.css rel=stylesheet type=text/css></head><table width=750 border=0 align=center cellpadding=0 cellspacing=0><tr> <td width=150><img src=../logo.gif></td><td height=80> </td></tr></table><table width=750 border=0 align=center cellpadding=0 cellspacing=0><tr> <td width=150><img src=../213cn_gif/ar.gif> <a class=SoftMeun href=../index.asp>"&webtitle&"</a><b>:</b>"&rs("class")&"</td></tr></table><table width=750 border=0 align=center cellpadding=5 cellspacing=1 bgcolor=#dddddd><tr><td height=30 align=center bgcolor=#F2F2F2><strong><font color=#000000>"&rs("title")&"</font></strong></td></tr><tr><td bgcolor=#FFFFFF><br><div align=center>作者:"&rs("user")&" 加入时间:"&rs("date")&"</div><br><strong>内容: </strong><br><br> "&to_html(rs("nr"))&"</td></tr></table><br><table width=100% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=2 align=center bgcolor=#DDDDDD></td></tr></table><TABLE cellSpacing=0 cellPadding=0 width=100% border=0><TR><TD bgColor=#f9f9f9 height=60><table width=750 height=60 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=15></td></tr><tr><td align=center height=20>驰志网络版权所有 2003-2005 | 法律声明 | 服务条款 | 隐私声明 | 联系我们 | 广告服务</td></tr><tr><td height=25></td></tr></table></TD></TR></TABLE></body></html>"
'************** 文章内容模版结束 ***************
w file,main
rs.movenext
next
conn.close
response.write "重写HTML静态页面成功!谢谢你的使用!</table>"
response.end
end if
%>
<table width=90% align=center cellpadding=3 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF>
<br>
 说明:如果你出现以下情况,请重写数据<br>
  1.刚修改广告代码,要把所有的文章<br>
  2.刚刚恢复数据,没有生成静态页面<br>
  3.出现数据库和静态页面不一致的时候!(一般这个情况不会出现)
<br>
<br>
</table>
<br>
<table width=90% align=center cellpadding=3 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF height=120 valign=middle align=center>
<a class=SoftMeun href=<%=self%>?action=rewrite onclick="if(confirm('你确定要重写静态数据吗?如果重写失败,你可能丢失数据'))location.href=this.href;else return false">重写数据</a>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -