?? admin_rewrite.asp
字號(hào):
<!--#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("數(shù)據(jù)庫(kù)中沒(méi)有文章啊!返回上一頁(yè)")
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>正在重寫(xiě)數(shù)據(jù)中,可能需要很長(zhǎng)的時(shí)間!請(qǐng)稍候.........<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"
'************** 文章內(nèi)容模版開(kāi)始 ***************
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")&" 加入時(shí)間:"&rs("date")&"</div><br><strong>內(nèi)容: </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>馳志網(wǎng)絡(luò)版權(quán)所有 2003-2005 | 法律聲明 | 服務(wù)條款 | 隱私聲明 | 聯(lián)系我們 | 廣告服務(wù)</td></tr><tr><td height=25></td></tr></table></TD></TR></TABLE></body></html>"
'************** 文章內(nèi)容模版結(jié)束 ***************
w file,main
rs.movenext
next
conn.close
response.write "重寫(xiě)HTML靜態(tài)頁(yè)面成功!謝謝你的使用!</table>"
response.end
end if
%>
<table width=90% align=center cellpadding=3 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF>
<br>
 說(shuō)明:如果你出現(xiàn)以下情況,請(qǐng)重寫(xiě)數(shù)據(jù)<br>
  1.剛修改廣告代碼,要把所有的文章<br>
  2.剛剛恢復(fù)數(shù)據(jù),沒(méi)有生成靜態(tài)頁(yè)面<br>
  3.出現(xiàn)數(shù)據(jù)庫(kù)和靜態(tài)頁(yè)面不一致的時(shí)候!(一般這個(gè)情況不會(huì)出現(xiàn))
<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('你確定要重寫(xiě)靜態(tài)數(shù)據(jù)嗎?如果重寫(xiě)失敗,你可能丟失數(shù)據(jù)'))location.href=this.href;else return false">重寫(xiě)數(shù)據(jù)</a>
</table>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -