?? admin_pagesavetodata.asp
字號(hào):
<!-- #include file="../conn.asp" -->
<%Response.buffer=False %>
<!-- #include file="session.asp" -->
<!--#include file="../inc/config.asp"-->
<link href="css.css" rel="stylesheet" type="text/css">
<%
act = Request("act")
if act = "makebook" then
getstartid=request("start")
getendid=request("end")
Server.ScriptTimeOut=12000000 '設(shè)定操作超時(shí)的時(shí)間
set rs=server.createobject("ADODB.recordset")
if IsSqlDataBase = 2 then
rs.open "select id,view_id,view_ok,view_ok2,view_SaveToTXT,view_get from list_view where view_id>="&getstartid&" and view_id<="&getendid&" and view_SaveToTXT=1 ORDER BY id",conn,1,3
else
rs.open "select id,view_id,view_ok,view_ok2,view_SaveToTXT,view_get from [list_view] where view_id>="&getstartid&" and view_id<="&getendid&" and view_SaveToTXT=1 ORDER BY id",conn,1,3
end if
if rs.eof and rs.bof then
response.write "<script language=javascript>alert('錯(cuò)誤! \n\n 指定范圍內(nèi)沒有作品存在\n\n或指定范圍內(nèi)的作品章節(jié)內(nèi)容已經(jīng)在數(shù)據(jù)庫(kù)中存儲(chǔ)!');history.back(-1);</script>"
response.end
else
do while not rs.eof
if rs("view_get")=1 and rs("view_SaveToTXT")=1 then
BookViewPath="HTML/"&rs("view_id")&"/"
file1=server.mappath( SiteSystemPath & BookViewPath&rs("id")&".TXT")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判斷文件是否存在
filename=""&SiteSystemPath & BookViewPath&rs("id")&".TXT"
conent=replace(replace(FSOFileRead(filename),"document.write('",""),"');","")
rs("view_ok2")=conent
rs("view_SaveToTXT")=0
rs.update
set nf=tfo.GetFile(file1)
nf.delete
response.write "<br> ID為<font color=#FF0000> "&rs("id")&" </font>轉(zhuǎn)存成功"
Else
response.write "<br> ID為<font color=#FF0000> "&rs("id")&" </font>的TXT文件丟失<font color=#FF0000>轉(zhuǎn)存失敗</font>"
end if
Set tfo = nothing
else
response.write "<br> ID為<font color=#FF0000> "&rs("id")&" </font>的作品章節(jié)內(nèi)容尚未采集完成或?yàn)榭?quot;
end if
rs.movenext
loop
end if
rs.close
set rs=Nothing
response.write "<p align='center'>TXT作品章節(jié)內(nèi)容轉(zhuǎn)存到數(shù)據(jù)庫(kù)操作全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
else
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#1f3566" bordercolordark="#FFFFFF">
<tr>
<td height="34" align="center" valign="middle" bgcolor="#1C3566"><b><font color="#FFFFFF">TXT作品章節(jié)內(nèi)容轉(zhuǎn)存到數(shù)據(jù)庫(kù)<br>(請(qǐng)慎重操作,此操作大量占用系統(tǒng)資源每次填寫范圍請(qǐng)不要過大.)</font></b></td>
</tr>
</table>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#1f3566" bordercolordark="#FFFFFF">
<form method="get" action="">
<tr height="26">
<td width="50%">
<p align="right">轉(zhuǎn)存作品起始ID:</td>
<td width="50%"> <input class='form' type="Number" name="start" id="start" size="20"></td>
</tr>
<tr height="26">
<td width="50%">
<p align="right">轉(zhuǎn)存作品結(jié)束ID:</td>
<td width="50%"> <input class='form' type="text" name="end" Id="end" size="20"></td>
</tr>
<tr>
<td height="30" align="center" colspan="2">
<input type="hidden" name="act" value="makebook" id="act" size="20">
<input class="button" type="submit" value="開始轉(zhuǎn)存" name="B1"> <input class="button" type="reset" value="重置設(shè)定" name="B2">
</td>
</tr>
</form>
</table>
</body>
</html>
<%end if%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -