admin_booklist.asp

来自「本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置」· ASP 代码 · 共 849 行 · 第 1/3 页

ASP
849
字号
					end if
					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
					if IsSqlDataBase = 2 then
						sql="select Islist_good from list_book where id="&viewArray(i)
					else
						sql="select Islist_good from [list_book] where id="&viewArray(i)
					end if
					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
					if IsSqlDataBase = 2 then
						sql="select Islist_good from list_book where id="&viewArray(i)
					else
						sql="select Islist_good from [list_book] where id="&viewArray(i)
					end if
					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
					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")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uclassfeng" 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")=9
						rs.update
					end if
					rs.close
				elseif Ntype="ujing" 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")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uclassjing" 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")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uqiang" 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")=9
						rs.update
					end if
					rs.close
				elseif Ntype="uclassqiang" 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")=9
						rs.update
					end if
					rs.close
				elseif Ntype="ulian" then
					if IsSqlDataBase = 2 then
						sql="select Islist_good from list_book where id="&viewArray(i)
					else
						sql="select Islist_good from [list_book] where id="&viewArray(i)
					end if
					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
					if IsSqlDataBase = 2 then
						sql="select Islist_good from list_book where id="&viewArray(i)
					else
						sql="select Islist_good from [list_book] where id="&viewArray(i)
					end if
					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
end sub
sub listmove()
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
		newclass=request("newclass")
		CheckSqlnum(newclass)
		newclass=int(newclass)
		if newclass="" or newclass=0 then
			ErrCodes = ErrCodes & "<li>您需要选择目标分类,不能选择大类!</li><br>"
			FoundErr=True
		end if
		if FoundErr=True then
			Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
		else
			set rs2=server.createobject("adodb.recordset")
			if IsSqlDataBase = 2 then
				sql2="select list_typeID from list_Class where list_classid="&newclass 
			else
				sql2="select list_typeID from [list_Class] where list_classid="&newclass
			end if
			rs2.open sql2,conn,1,1
			if rs2.eof then
				typeid=0
			else
				typeid=rs2("list_typeID")
			end if
			rs2.close
			set rs2=nothing
			viewArray=Split(ID, ",")
			Num = UBound(viewArray)
			For i=0 To Num
			if IsSqlDataBase = 2 then
				conn.execute ("update list_book set list_lei="&newclass&",list_class="&typeid&" where id="&viewArray(i))
				conn.execute ("update list_cook set classid="&newclass&" where list_bookid="&viewArray(i))
			else
				conn.execute ("update [list_book] set list_lei="&newclass&",list_class="&typeid&" where id="&viewArray(i))
				conn.execute ("update [list_cook] set classid="&newclass&" where list_bookid="&viewArray(i))
			end if
			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" 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>
	<form method="post" name="formm" 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 align="center" height="22">
			<td class="alt2" valign="center">
			将所选作品移动到 ==&gt;</td>
			<td class="alt1"><div class="select"><div><select name="newclass" class="form" size="6">
<%set rs=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
	sql="select list_tpye from list_type order by typeid"
else
	sql="select list_tpye from [list_type] order by typeid"
end if
rs.open sql,conn,1,1
if rs.eof then
else
do while not rs.eof
response.write "<option value=0>┼ "&rs("list_tpye")&"</option>"
	set rs2=server.createobject("adodb.recordset")
	if IsSqlDataBase = 2 then
		sql2="select list_Classid,list_classname from list_Class where list_typeID="&rs("typeID")&" order by list_classid"
	else
		sql2="select list_Classid,list_classname from [list_Class] where list_typeID="&rs("typeID")&" order by list_classid"
	end if
	rs2.open sql2,conn,1,1
	if rs2.eof then
		response.write "<option value=0> └ 本类无二级分类</option>"
	else
		do while not rs2.eof
			response.write "<option value="&rs2("list_Classid")&"> └ "&rs2("list_classname")&"</option>"
		rs2.movenext
	loop
	end if
	rs2.close
	set rs2=nothing
			rs.movenext
			loop
		end if
		rs.close
set rs=nothing
%></select></div></div> </td>
		</tr>
		<tr height="22"><input type="hidden" name="checked" value="<%=id%>">
			<td class="alt3" colspan="2" align="middle" valign="middle">
			<input class="button" type="submit" value="执行" name="Submit" style="width: 45; height: 20"></td>

⌨️ 快捷键说明

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