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

📄 admin_booklist.asp

📁 功能介绍: 一、会员功能模块 1、站内短信发布(设计中) 2、书架收藏夹 3、发表评论(功能不完善) 4、申请作家(与添书员整合) 5、申请添书员(与作家整合) 6、申请更新员
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#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") 
			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
			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>"

			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)&") "
		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
					sql="select Isweb_good from [list_book] where id="&viewArray(i)
					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
					sql="select Isweb_good from [list_book] where id="&viewArray(i)
					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
					sql="select IsGood from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("IsGood")=1
						rs.update
					end if
					rs.close
				elseif Ntype="classjing" then
					sql="select IsGood from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("IsGood")=2
						rs.update
					end if
					rs.close
				elseif Ntype="qiang" then
					sql="select listvv_good from [list_book] where id="&viewArray(i)
					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
					sql="select listvv_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("listvv_good")=2
						rs.update
					end if
					rs.close
				elseif Ntype="lian" then
					sql="select Islist_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("Islist_good")=1
						rs.update
					end if
					rs.close
				elseif Ntype="classlian" then
					sql="select Islist_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("Islist_good")=2
						rs.update
					end if
					rs.close
				elseif Ntype="ufeng" then
					sql="select Isweb_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("Isweb_good")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uclassfeng" then
					sql="select Isweb_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("Isweb_good")=9
						rs.update
					end if
					rs.close
				elseif Ntype="ujing" then
					sql="select IsGood from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("IsGood")=9
					end if
					rs.close
				elseif Ntype="uclassjing" then
					sql="select IsGood from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("IsGood")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uqiang" then
					sql="select listvv_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("listvv_good")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uclassqiang" then
					sql="select listvv_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("listvv_good")=9
						rs.update
					end if
					rs.close
				elseif Ntype="ulian" then
					sql="select Islist_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("Islist_good")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uclasslian" then
					sql="select Islist_good from [list_book] where id="&viewArray(i)
					rs.open sql,conn,1,3
					if not rs.eof then
						rs("Islist_good")=9
						rs.update
					end if
					rs.close
				end if
				set rs=nothing
			Next
			call connclose() 
			Call ShowAdminSuccessMsg(Success &"<li>作品批量推荐操作成功!</li><br>",responseurl)
		end if
	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>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
	<tr>
		<td class="thead" align="center" colspan="2" height="25"><b>批量推荐作品</b></td>
	</tr>
	<tr height="22" align="center">
		<td width="30%" class="tcat"></td>
		<td width="70%" class="tcat"><b>推荐类型</b></td>
	</tr>
	<form method="post" name="form" action="admin_booklist.asp?info=<%=info%>&action=save&urltype=<%=urltype%>&cndb=<%=cndb%>&clid=<%=clid%>&key_type=<%=key_type%>&key_keyword=<%=key_keyword%>&page=<%=Page%>">
	<tr height="25" align="center">
		<td width="30%" class="alt2">将所选作品设置为 ==&gt;</td>
		<td width="70%" class="alt1"><div class="select"><div><select name="Ntype" class="form" size="8">
		<option value="feng">首页封面推荐</option>
		<option value="jing">首页精品推荐</option>
		<option value="qiang">首页强力推荐</option>
		<option value="lian">首页连载推荐</option>
		<option value="classfeng">分类页封面推荐</option>
		<option value="classjing">分类页精品推荐</option>
		<option value="classqiang">分类页强力推荐</option>
		<option value="classlian">分类页连载推荐</option>
		<option value="ufeng">取消首页封面推荐</option>
		<option value="ujing">取消首页精品推荐</option>
		<option value="uqiang">取消首页强力推荐</option>
		<option value="ulian">取消首页连载推荐</option>
		<option value="uclassfeng">取消分类页封面推荐</option>
		<option value="uclassjing">取消分类页精品推荐</option>
		<option value="uclassqiang">取消分类页强力推荐</option>
		<option value="uclasslian">取消分类页连载推荐</option>
		</select></div></div></td>
	</tr>
	<tr><input type="hidden" name="checked" value="<%=id%>">
		<td height="20" align="center" colspan="2" class="alt3">
		<input class="button" type="submit" value="执行" name="info" style="width: 45; height: 20"></td>
	</tr>
	</form>
</table>
<%end if
end if

⌨️ 快捷键说明

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