⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_booklist.asp

📁 小说站源代码文件
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<!--#include file="../conn.asp" --><%Response.buffer=False %>
<!--#include file="session.asp"-->
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/GetFunction.asp"-->
<!--#include file="../inc/upfile.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<title><%=Sitename%> - 长篇作品批量操作管理模块 -  Powered By CnEnd Novelsmanagement</title>
</head>

<body>



<%
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
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")
	inf=request.querystring("inf")
	clid=request.querystring("clid")
	if inf="tjlist" then
		if cndb="" then
			cndb="jingpin"
		end if
	else
		if cndb="" then
			cndb="all"
		end if
	end if	
	responseurl="admin_bookjian.asp?info="&inf&"&cndb="&cndb&"&clid="&clid&"&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 listloads()
	Case "审核"
		Call listlock()
	Case "静态生成"
		Call listhtml()
	Case "通过 VIP"
		Call listvip()
	Case "生成全文TXT"
		Call listtxt()
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
	if request("action")="save" then
		viewArray=Split(ID, ",")
		For i=0 To UBound(viewArray)
			set rsfile=server.createobject("adodb.recordset")
			strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=3 and fileurl_fileID ="&viewArray(i)&""
			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
			conn.execute"delete from filetest where ID ="&viewArray(i)&""
			
			viewFolder = SiteSystemPath&"HTML/"&viewArray(i)&"/"
			
			set rsco=server.createobject("adodb.recordset")
			sql="select id,list_cookid from list_view where view_id="&viewArray(i)&""
			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") 
				strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=1 and fileurl_fileID ="&id1&""
				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
				conn.execute"delete from filetest where ID ="&id1&""
				
				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
		
			file4=viewFolder&"Allbook"&viewArray(i)&"."&htmlphe&""
			file5=SiteSystemPath&viewArray(i)&"."&htmlphe&""
			file6=viewFolder&"index."&htmlphe&""
			FSOFiledel(file4)
			FSOFiledel(file5)
			FSOFiledel(file6)
			
			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)&""
			
		Next
		if makeJS=1 then
			temzxgx(zxgxNum)
		end if
		call connclose() 
		Call ShowAdminSuccessMsg(Success &"<li><br>共 <b>"&UBound(viewArray)+1&"</b> 部作品删除成功!</li><br>",responseurl)
else%>

<div id="topmomo">长篇作品管理&nbsp; |&nbsp;
	<a href="admin_book.asp?info=booklist&cndb=vip">查看VIP</a>&nbsp; |&nbsp;
	<a href="admin_book.asp?info=bookadd">添加作品</a> |&nbsp;
	<a href="admin_book.asp?info=booklist&cndb=all">查看所有</a>&nbsp; |&nbsp;
	<a href="admin_book.asp?info=booklist&cndb=lock">查看未审核</a></div><br>
<form method="post" name="formm" action="admin_booklist.asp?info=<%=info%>&action=save&urltype=<%=urltype%>&inf=<%=inf%>&cndb=<%=cndb%>&clid=<%=clid%>&key_type=<%=key_type%>&key_keyword=<%=key_keyword%>&page=<%=Page%>">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
	<tr>
		<td class="thead" align="center" height="25" colspan="9"><b>批量删除长篇作品</b></td>
	</tr>
	<tr height="22" align="center">
		<td width="30%" class="tcat"></td>
		<td width="70%" class="tcat"><b>操作</b></td>
	</tr>
		<tr align="center" height="22">
			<td class="alt2" valign="center">
			将所选作品 ==&gt;</td>
			<td class="alt1">删除,并清除其所有附件</td>
		</tr>
		<tr height="22">
			<td class="alt3" colspan="2" align="middle" valign="middle">
			<input class="button" type="submit" value="执行" name="Submit" style="width: 45; height: 20"></td>
		</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
	<tr align="center" height="22">
		<td width="6%" class="tcat">ID</td>
		<td width="4%" class="tcat">选择</td>
		<td width="25%" class="tcat"><b>作品名称</b></td>
		<td width="15%" class="tcat"><b>作者</b></td>
		<td width="10%" class="tcat"><b>审核状态</b></td>
		<td width="10%" class="tcat"><b>性质</b></td>
		<td width="10%" class="tcat"><b>点击</b></td>
		<td width="10%" class="tcat"><b>推荐</b></td>
		<td width="10%" class="tcat"><b>收藏</b></td>
	</tr>
<%
bookArray=Split(ID, ",")
set rs=server.CreateObject("ADODB.RecordSet")
For i=0 To UBound(bookArray)
	sql="select id,list_name,Lock_book,list_user,list_hit,list_jian,list_cang,IsVip from list_book where id="&bookArray(i)
	rs.open sql,conn,1,1%>
<tr align=center height=22>
<td class=alt2><%=rs("id")%></td>
<td class=alt1><input type=checkbox name=checked value='<%=rs("id")%>' class=form checked></td>
<td class=alt2 align=left>&nbsp; <a href=<%=SiteSystemPath%>look_book.asp?id=<%=rs("id")%> target=_blank><%=rs("list_name")%></a></td>
<td class=alt1><%=rs("list_user")%></td>
<td class=alt2>
<%if rs("Lock_book")=0 then
	response.write("已审核")
else
	response.write("未审核")
end if%></td>
<td class=alt1>
<%if rs("IsVip")=1 then
	response.write("VIP作品")
else
	response.write("公众作品")
end if%></td>
<td class=alt2><%=rs("list_hit")%></td>
<td class=alt1><%=rs("list_jian")%></td>
<td class=alt2><%=rs("list_cang")%></td>
</tr>
<%rs.close
Next
set rs=nothing%>
</table>
</form>
<%	end if
	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, ",")
			For i=0 To UBound(viewArray)
				set rs=server.CreateObject("ADODB.RecordSet")
				if Ntype="feng" then
					sql="select Isweb_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set Isweb_good=1 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="classfeng" then
					sql="select Isweb_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set Isweb_good=2 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="jing" then
					sql="select IsGood from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set IsGood=1 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="classjing" then
					sql="select IsGood from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set IsGood=2 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="qiang" then
					sql="select listvv_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set listvv_good=1 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="classqiang" then
					sql="select listvv_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set listvv_good=2 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="lian" then
					sql="select Islist_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set Islist_good=1 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="classlian" then
					sql="select Islist_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set Islist_good=2 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="ufeng" then
					sql="select Isweb_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set Isweb_good=9 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="uclassfeng" then
					sql="select Isweb_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set Isweb_good=9 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="ujing" then
					sql="select IsGood from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set IsGood=9 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="uclassjing" then
					sql="select IsGood from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set IsGood=9 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="uqiang" then
					sql="select listvv_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set listvv_good=9 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="uclassqiang" then
					sql="select listvv_good from list_book where id="&viewArray(i)
					rs.open sql,conn,1,1
					if not rs.eof then
						conn.execute ("update list_book set listvv_good=9 where id="&viewArray(i))
					end if
					rs.close
				elseif Ntype="ulian" then
					sql="select Islist_good from list_book where id="&viewArray(i)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -