📄 admin_htmldeldo.asp
字号:
<!-- #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"><%
Server.ScriptTimeOut=48000 '设定操作超时的时间(因为程序运行速度慢啊)
if htmlphem=1 then
htmlphe="htm"
elseif htmlphem=2 then
htmlphe="html"
elseif htmlphem=3 then
htmlphe="shtml"
elseif htmlphem=4 then
htmlphe="asp"
else
htmlphe="html"
end if
Select Case request.querystring("info")
Case "webindex"
Call webindex()
Case "booklist"
Call booklist()
Case "booklook"
Call booklook()
Case "bookindex"
Call bookindex()
Case "bookall"
Call bookall()
Case "bookzhang"
Call bookzhang()
Case "bookpage"
Call bookpage()
end select
Sub webindex()
file1=server.mappath("../index.html")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判断文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
end if
Set tfo = nothing
Response.Write (" 完成:<font color=red>网站首页</font>HTML删除 <br>【<a href='javascript:onclick=history.go(-1)'>返 回</a>】")
Response.end
end sub%>
<%Sub booklist()
end sub
Sub booklook()
getstartid=request("start")
getendid=request("end")
if getstartid="" or getendid="" or not (IsNumeric(getstartid) and IsNumeric(getendid)) then
response.write "<script language=javascript>alert('未指定有效的作品编号!');history.back(-1);</script>"
response.End
end if
set rs2=server.CreateObject("ADODB.recordset")
if IsSqlDataBase = 2 then
sql2="select id,list_name from list_book where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
else
sql2="select id,list_name from [list_book] where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
end if
rs2.open sql2,conn,1,3
if rs2.bof and rs2.eof then
response.write "<script language=javascript>alert('错误! \n\n 指定范围内没有作品存在!');history.back(-1);</script>"
response.end
else
do while not rs2.eof
viewFolder = SiteSystemPath&"HTML/"
file1=server.mappath( viewFolder&""&rs2("id")&"."&htmlphe&"")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判断文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
end if
Set tfo = nothing
Response.Write (" 完成:<font color=red>"&rs2("list_name")&"资料页</font>HTML删除 <br>")
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
response.write "<p align='center'>全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
end sub
Sub bookindex()
getstartid=request("start")
getendid=request("end")
if getstartid="" or getendid="" or not (IsNumeric(getstartid) and IsNumeric(getendid)) then
response.write "<script language=javascript>alert('未指定有效的作品编号!');history.back(-1);</script>"
response.End
end if
set rs2=server.CreateObject("ADODB.recordset")
if IsSqlDataBase = 2 then
sql2="select id,list_name from list_book where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
else
sql2="select id,list_name from [list_book] where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
end if
rs2.open sql2,conn,1,3
if rs2.bof and rs2.eof then
response.write "<script language=javascript>alert('错误! \n\n 指定范围内没有作品存在!');history.back(-1);</script>"
response.end
else
do while not rs2.eof
viewFolder = SiteSystemPath&"HTML/"&rs2("id")&"/"
file1=server.mappath( viewFolder&"index."&htmlphe&"")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判断文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
end if
Set tfo = nothing
Response.Write (" 完成:<font color=red>"&rs2("list_name")&"目录页</font>HTML删除 <br>")
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
response.write "<p align='center'>全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
end sub
Sub bookall()
getstartid=request("start")
getendid=request("end")
if getstartid="" or getendid="" or not (IsNumeric(getstartid) and IsNumeric(getendid)) then
response.write "<script language=javascript>alert('未指定有效的作品编号!');history.back(-1);</script>"
response.End
end if
set rs2=server.CreateObject("ADODB.recordset")
if IsSqlDataBase = 2 then
sql2="select id,list_name from list_book where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
else
sql2="select id,list_name from [list_book] where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
end if
rs2.open sql2,conn,1,1
if rs2.eof and rs2.bof then
response.write "<script language=javascript>alert('错误! \n\n 指定范围内没有作品存在!');history.back(-1);</script>"
response.end
else
do while not rs2.eof
viewFolder = SiteSystemPath&"HTML/"&rs2("id")&"/"
file1=server.mappath( viewFolder&"ALLbook"&rs2("id")&"."&htmlphe&"")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判断文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
end if
Set tfo = nothing
Response.Write (" 完成:<font color=red>"&rs2("list_name")&" 全文页</font>HTML删除<br>")
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
response.write "<p align='center'>全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
end sub
Sub bookzhang()
getstartid=request("start")
getendid=request("end")
if getstartid="" or getendid="" or not (IsNumeric(getstartid) and IsNumeric(getendid)) then
response.write "<script language=javascript>alert('未指定有效的作品编号!');history.back(-1);</script>"
response.End
end if
set rs2=server.CreateObject("ADODB.recordset")
if IsSqlDataBase = 2 then
sql2="select id,list_name from list_book where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
else
sql2="select id,list_name from [list_book] where Lock_book = 0 and id>="&getstartid&" and id<="&getendid&" ORDER BY id"
end if
rs2.open sql2,conn,1,3
if rs2.bof and rs2.eof then
response.write "<script language=javascript>alert('错误! \n\n 指定范围内没有作品存在!');history.back(-1);</script>"
response.end
else
do while not rs2.eof
b_id=rs2("id")
list_name=rs2("list_name")
set rs1=server.CreateObject("ADODB.recordset")
if IsSqlDataBase = 2 then
sql1="select list_cookid,list_cookname from list_cook where list_bookid="&b_id
else
sql1="select list_cookid,list_cookname from [list_cook] where list_bookid="&b_id
end if
rs1.open sql1,conn,1,1
if not(rs1.bof and rs1.eof) then
do while not rs1.eof
c_id=rs1("list_cookid")
list_cookname=rs1("list_cookname")
viewFolder=""&SiteSystemPath&"HTML/"&b_id&"/" 'HTML存放目录
file1=server.mappath( viewFolder&"Z"&c_id&"."&htmlphe&"")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判断文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
end if
Set tfo = nothing
Response.Write (" 完成:<font color=red>"&list_name&" - "&list_cookname&" 分卷页</font>HTML删除 <br>")
rs1.movenext
loop
end if
rs1.close
set rs1=nothing
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
response.write "<p align='center'>全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
end sub
Sub bookpage()
getstartid=request("start")
getendid=request("end")
if getstartid="" or getendid="" or not (IsNumeric(getstartid) and IsNumeric(getendid)) then
response.write "<script language=javascript>alert('未指定有效的作品编号!');history.back(-1);</script>"
response.End
end if
set rs=server.createobject("ADODB.recordset")
if IsSqlDataBase = 2 then
rs.open "select id,view_type,view_id from list_view where view_lock = 0 and view_isvip=0 and view_id>="&getstartid&" and view_id<="&getendid&" ORDER BY id",conn,1,1
else
rs.open "select id,view_type,view_id from [list_view] where view_lock = 0 and view_isvip=0 and view_id>="&getstartid&" and view_id<="&getendid&" ORDER BY id",conn,1,1
end if
if rs.eof and rs.bof then
response.write "<script language=javascript>alert('错误! \n\n 没有章节,请先添加章节!');history.back(-1);</script>"
response.end
else
do while not rs.eof
id1=rs("id")
bookid=rs("view_id")
view_type=rs("view_type")
set rsbo=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sql="select list_name from list_book where id="&bookid&""
else
sql="select list_name from [list_book] where id="&bookid&""
end if
rsbo.open sql,conn,1,1
list_name=rsbo("list_name")
rsbo.close
set rsbo=nothing
viewFolder=""&SiteSystemPath&"HTML/"&bookid&"/" 'HTML存放目录
file1=server.mappath( ""&viewFolder&""&id1&"."&htmlphe&"")
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判断文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
end if
Set tfo = nothing
Response.Write " 完成:<font color=red>"&list_name&" - "&view_type&"</font> 的HTML删除<br>"
rs.movenext
loop
end if
rs.close
set rs=Nothing
response.write "<p align='center'>全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -