<% dim action,topicids,chooseaction,sql,ids,userids,rs1,comeurl dim usedtable usedtable=application(prefix&"usedtable") usedtable=split(usedtable,"|") action=request.querystring("action") comeurl=Request.ServerVariables("HTTP_REFERER") if usertype<3 or (usertype=3 and instr("|"&adminbd&"|","|"&bd&"|")=0) then tl=" 操 作 失 败" mes="对不起!权限不够。" call sendinfo(tl,mes) call down response.end end if if action="openquickgl" then Response.cookies(prefix&"2")("quickgl")=1 response.redirect comeurl elseif action="closequickgl" then Response.cookies(prefix&"2")("quickgl")=2 response.redirect comeurl end if %>
发布公告 | 公告管理<%if bdtype=3 then%> | 认证用户<%end if%> | 回 收 站
<% chooseaction=checknum(request.form("chooseaction")) topicids=request.form("topicids") ids="0" userids="0" function umark(markn) dim uid,j,k,tuserid k=0 uid=split(userids,",") set rs1=server.createobject("adodb.recordset") sql="Select userid,mark,del from [user] where userid in ("&userids&")" rs1.open sql,conn,1,3 for i=1 to rs1.recordcount tuserid=rs1("userid") for j=k to ubound(uid) if tuserid=int(uid(j)) then k=k+1 rs1("mark")=rs1("mark")+int(markn) end if next if rs1("mark")<0 then rs1("del")=true application(prefix&"deluser")=application(prefix&"deluser")&"|"&rs1("userid")&"|" end if rs1.Update rs1.movenext next rs1.close set rs1=nothing end function select case chooseaction case 0 tl=" 操 作 失 败" mes="操作失败,请返回并选择要进行的操作。" call sendinfo(tl,mes) case 1 '批量置顶 set rs=server.createobject("adodb.recordset") sql="Select id,top,userid from [topic] where bd="&bd&" and [top]=0 and id in ("&topicids&")" rs.open sql,conn,1,3 for i=1 to rs.recordcount userids=userids&","&rs("userid") '获得能够加分的用户id ids=ids&","&rs("id") '帖子ID,测试使用 rs("top")=1 rs.Update rs.movenext next rs.close set rs=nothing tl=" 置 顶 成 功" mes="置顶帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" umark(30) call sendinfo(tl,mes) case 2 '批量取消置顶 sql="update [topic] set [top]=0 where bd="&bd&" and [top]=1 and id in ("&topicids&")" conn.execute(sql) tl=" 取 消 置 顶 成 功" mes="成功取消置顶帖子,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" call sendinfo(tl,mes) case 3 '批量精华 set rs=server.createobject("adodb.recordset") sql="Select id,top,userid,type from [topic] where bd="&bd&" and [type]=0 and id in ("&topicids&")" rs.open sql,conn,1,3 for i=1 to rs.recordcount userids=userids&","&rs("userid") '获得能够加分的用户id ids=ids&","&rs("id") '帖子ID,测试使用 rs("type")=1 rs.Update rs.movenext next rs.close set rs=nothing tl=" 设 定 成 功" mes="设定为精华帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" umark(50) call sendinfo(tl,mes) case 4 '批量取消精华 sql="update [topic] set [type]=0 where bd="&bd&" and [type]=1 and id in ("&topicids&")" conn.execute(sql) tl=" 设 定 成 功" mes="成功取消精华帖子,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" call sendinfo(tl,mes) case 5 '锁定 sql="update [topic] set [type]=2 where bd="&bd&" and [type]<>2 and id in ("&topicids&")" conn.execute(sql) tl=" 锁 定 成 功" mes="锁定帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" call sendinfo(tl,mes) case 6 '解锁 sql="update [topic] set [type]=0 where bd="&bd&" and [type]=2 and id in ("&topicids&")" conn.execute(sql) tl=" 解 锁 成 功" mes="解锁帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" call sendinfo(tl,mes) case 7 '删除帖子 set rs=server.createobject("adodb.recordset") sql="Select id,top,userid,type from [topic] where bd="&bd&" and [top]<>2 and id in ("&topicids&")" rs.open sql,conn,1,3 for i=1 to rs.recordcount userids=userids&","&rs("userid") ids=ids&","&rs("id") rs("type")=3 rs.Update rs.movenext next rs.close set rs=nothing for i=1 to ubound(usedtable) sql="update bbs"&usedtable(i)&" set type=3 where id in("&ids&")" conn.execute(sql) next tl=" 删 除 成 功" mes="删除帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" umark(-30) call sendinfo(tl,mes) %> <%case 8 if action="" then %>
移动帖子

请选择帖子要移动到的版面: <% set rs=conn.execute("select * from bdinfo where followid=0 order by orders desc,id") response.write"" set rs=nothing %> 

<% elseif action="moveok" then dim thisbbs thisbbs=checknum(request.form("bd")) if thisbbs=0 then tl=" 移 动 失 败" mes="移动帖子失败,你没有选择版面。
·回到"&bdinfo(0)&"
·返回重新选择" else sql="update topic set bd="&thisbbs&" where bd="&bd&" and id in("&topicids&")" conn.execute(sql) for i=1 to ubound(usedtable) sql="update bbs"&usedtable(i)&" set bd="&thisbbs&" where bd="&bd&" and ((id in("&topicids&")) or (bid in("&topicids&")))" conn.execute(sql) next tl=" 移 动 成 功" mes="移动帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" end if call sendinfo(tl,mes) end if %> <% case 9 '提升 sql="update topic set edittime=now()+"×et&"/24 where bd="&bd&" and id in("&topicids&")" conn.execute(sql) tl=" 提 升 成 功" mes="提升帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" call sendinfo(tl,mes) %> <%end select call down%>