% 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 %>
<% 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="置顶帖子成功,请选择你要进行的操作。