?? admin_booklist.asp
字號:
<!--#include file="../conn.asp" -->
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/GetFunction.asp"-->
<!--#include file="../inc/upfile.asp"-->
<!--#include file="session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
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
Page=request.querystring("Page")
info=request.querystring("info")
urltype=request.querystring("urltype")
if urltype="list" then
clid=request.querystring("clid")
cndb=request.querystring("cndb")
if cndb="" then
cndb="all"
end if
responseurl="admin_book.asp?info=booklist&cndb="&cndb&"&clid="&clid&"&Page="&Page&""
elseif urltype="listjian" then
cndb=request.querystring("cndb")
if cndb="" then
cndb="jingpin"
end if
responseurl="admin_bookjian.asp?info="&cndb&"&page="&page&""
elseif urltype="search" then
key_keyword=request.querystring("key_keyword")
key_type=request.querystring("key_type")
responseurl="admin_booksearch.asp?key_type="&key_type&"&key_keyword="&key_keyword&"&page="&page&""
else
responseurl="admin_book.asp?info=booklist&cndb=all"
end if
If info="" Then
Call ShowAdminErrMsg("參數傳遞錯誤!",responseurl)
End If
Select Case info
Case "刪除"
Call listdel()
Case "推薦"
Call listjian()
Case "移動"
Call listmove()
Case "采集"
Call listload()
Case "審核"
Call listlock()
Case "靜態生成"
Call listhtml()
Case "通過 VIP"
Call listvip()
end select
sub listdel()
id=trim(request("checked"))
If ID="" Then
ErrCodes = ErrCodes & "<li>您至少需要選擇一部作品!</li><br>"
FoundErr=True
End If
if FoundErr=True then
Call ShowAdminErrMsg(ErrCodes,responseurl)
else
viewArray=Split(ID, ",")
Num = UBound(viewArray)
For i=0 To Num
set rsfile=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=3 and fileurl_fileID ="&viewArray(i)&""
else
strSQL ="select fileurl_name,fileurl_path from [filetest] where fileurl_class=3 and fileurl_fileID ="&viewArray(i)&""
end if
rsfile.open strSQL,conn,1,1
if not(rsfile.eof and rsfile.bof) then
do while not rsfile.eof
file1=server.mappath( rsfile("fileurl_path")&rsfile("fileurl_name") )
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file1) = True Then '判斷文件是否存在
set nf=tfo.GetFile(file1)
nf.delete
Success = Success & "<li> "&rsfile("fileurl_path")&rsfile("fileurl_name")&" 作品封面附件刪除成功!</li><br>"
else
Success = Success & "<li> "&rsfile("fileurl_path")&rsfile("fileurl_name")&" 作品封面附件已丟失!</li><br>"
end if
Set tfo = nothing
rsfile.movenext
loop
end if
rsfile.close
set rsfile=nothing
if IsSqlDataBase = 2 then
conn.execute"delete from filetest where ID ="&viewArray(i)&""
else
conn.execute"delete from [filetest] where ID ="&viewArray(i)&""
end if
viewFolder = SiteSystemPath&"HTML/"&viewArray(i)&"/"
set rsco=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sql="select id,list_cookid from list_view where view_id="&viewArray(i)&""
else
sql="select id,list_cookid from [list_view] where view_id="&viewArray(i)&""
end if
rsco.open sql,conn,1,1
if rsco.eof and rsco.bof then
else
do while not rsco.eof
id1=rsco("id")
cook_id=rsco("list_cookid")
set rsfile=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=1 and fileurl_fileID ="&id1&""
else
strSQL ="select fileurl_name,fileurl_path from [filetest] where fileurl_class=1 and fileurl_fileID ="&id1&""
end if
rsfile.open strSQL,conn,1,1
if not(rsfile.eof and rsfile.bof) then
do while not rsfile.eof
file1=rsfile("fileurl_path")&rsfile("fileurl_name")
FSOFiledel(file1)
rsfile.movenext
loop
end if
rsfile.close
set rsfile=nothing
if IsSqlDataBase = 2 then
conn.execute"delete from filetest where ID ="&id1&""
else
conn.execute"delete from [filetest] where ID ="&id1&""
end if
file3=viewFolder&"Z"&cook_id&"."&htmlphe&""
file2=viewFolder&id1&"."&htmlphe&""
file1=viewFolder&id1&".TXT"
FSOFiledel(file1)
FSOFiledel(file2)
FSOFiledel(file3)
rsco.movenext
loop
end if
rsco.close
set rsco=nothing
Success = Success & "<li> 作品章節附件已全部清理!</li><br>"
Success = Success & "<li> 作品章節靜態頁面已全部清理!</li><br>"
Success = Success & "<li> 作品分卷靜態頁面已全部清理!</li><br>"
file4=viewFolder&"Allbook"&viewArray(i)&"."&htmlphe&""
file5=SiteSystemPath&viewArray(i)&"."&htmlphe&""
file6=viewFolder&"index."&htmlphe&""
FSOFiledel(file4)
FSOFiledel(file5)
FSOFiledel(file6)
Success = Success & "<li> 作品資料靜態頁面已清理!</li><br>"
Success = Success & "<li> 作品全文靜態頁面已清理!</li><br>"
Success = Success & "<li> 作品目錄靜態頁面已清理!</li><br>"
if IsSqlDataBase = 2 then
conn.execute "delete from list_view where view_id="&viewArray(i)&" "
conn.execute "delete from list_cook where list_bookid="&viewArray(i)&" "
conn.execute "delete from Comment where commenttype=1 and type_id="&viewArray(i)&" "
conn.execute "delete from list_book where id="&viewArray(i)&""
else
conn.execute "delete from [list_view] where view_id in ("&viewArray(i)&") "
conn.execute "delete from [list_cook] where list_bookid in ("&viewArray(i)&") "
conn.execute "delete from [Comment] where commenttype=1 and type_id in ("&viewArray(i)&") "
conn.execute "delete from [list_book] where id in ("&viewArray(i)&") "
end if
Next
if makeJS=1 then
temzxgx(zxgxNum)
end if
call connclose()
Call ShowAdminSuccessMsg(Success &"<li>作品批量刪除操作成功!</li><br>",responseurl)
end if
end sub
sub listjian()
id=trim(request("checked"))
If ID="" Then
ErrCodes = ErrCodes & "<li>您至少需要選擇一部作品!</li><br>"
FoundErr=True
End If
if FoundErr=True then
Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
if request("action")="save" then
Ntype=request("Ntype")
If Ntype="" Then
ErrCodes = ErrCodes & "<li>您需要選擇推薦類型!</li><br>"
FoundErr=True
End If
if FoundErr=True then
Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
viewArray=Split(ID, ",")
Num = UBound(viewArray)
For i=0 To Num
set rs=server.CreateObject("ADODB.RecordSet")
if Ntype="feng" then
if IsSqlDataBase = 2 then
sql="select Isweb_good from list_book where id="&viewArray(i)
else
sql="select Isweb_good from [list_book] where id="&viewArray(i)
end if
rs.open sql,conn,1,3
if not rs.eof then
rs("Isweb_good")=1
rs.update
end if
rs.close
elseif Ntype="classfeng" then
if IsSqlDataBase = 2 then
sql="select Isweb_good from list_book where id="&viewArray(i)
else
sql="select Isweb_good from [list_book] where id="&viewArray(i)
end if
rs.open sql,conn,1,3
if not rs.eof then
rs("Isweb_good")=2
rs.update
end if
rs.close
elseif Ntype="jing" then
if IsSqlDataBase = 2 then
sql="select IsGood from list_book where id="&viewArray(i)
else
sql="select IsGood from [list_book] where id="&viewArray(i)
end if
rs.open sql,conn,1,3
if not rs.eof then
rs("IsGood")=1
rs.update
end if
rs.close
elseif Ntype="classjing" then
if IsSqlDataBase = 2 then
sql="select IsGood from list_book where id="&viewArray(i)
else
sql="select IsGood from [list_book] where id="&viewArray(i)
end if
rs.open sql,conn,1,3
if not rs.eof then
rs("IsGood")=2
rs.update
end if
rs.close
elseif Ntype="qiang" then
if IsSqlDataBase = 2 then
sql="select listvv_good from list_book where id="&viewArray(i)
else
sql="select listvv_good from [list_book] where id="&viewArray(i)
end if
rs.open sql,conn,1,3
if not rs.eof then
rs("listvv_good")=1
rs.update
end if
rs.close
elseif Ntype="classqiang" then
if IsSqlDataBase = 2 then
sql="select listvv_good from list_book where id="&viewArray(i)
else
sql="select listvv_good from [list_book] where id="&viewArray(i)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -