<% if usertype<3 or (usertype=3 and instr("|"&adminbd&"|","|"&bd&"|")=0) then tl=" 操 作 失 败" mes="对不起!权限不够。" call sendinfo(tl,mes) call down response.end end if function gettop() idtop=conn.execute("select top 1 top from topic where id="&id&" and bd="&bd&"")(0) end function %>
发布公告 | 公告管理<%if bdtype=3 then%> | 认证用户<%end if%> | 回 收 站
<% dim action,content,content2,contentok,ggtitle,ggok,bad,b,paper,sql,markn,umarkuserid,rs1 function umark(markn) umarkuserid=conn.execute("select top 1 userid from topic where id="&id&"")(0) set rs1=server.createobject("adodb.recordset") sql="Select top 1 mark,del from [user] where userid="&umarkuserid&"" rs1.open sql,conn,1,3 rs1("mark")=rs1("mark")+int(markn) if rs1("mark")<0 then rs1("del")=true application(prefix&"deluser")=application(prefix&"deluser")&"|"&umarkuserid&"|" end if rs1.Update rs1.close set rs1=nothing end function function umark2(markn) umarkuserid=conn.execute("select top 1 userid from bbs"&totable&" where bbsid="&bbsid&"")(0) set rs1=server.createobject("adodb.recordset") sql="Select top 1 mark,del from [user] where userid="&umarkuserid&"" rs1.open sql,conn,1,3 rs1("mark")=rs1("mark")+int(markn) if rs1("mark")<0 then rs1("del")=true end if rs1.Update rs1.close set rs1=nothing end function function checkbad(str) if isnull(str) then exit function bad=split(application(prefix&"badcontent"), "|") for b=0 to ubound(bad) str=Replace(str,bad(b),string(len(bad(b)),"*")) next checkbad=str end function action=request.querystring("action") select case action %> <%case"gonggao"%>
发布公告

公告标题:

帖子内容:
使用Html编辑器
使用UBB编辑器

          [ 按 Alt+Enter 直接发送 ]
<%case"savegg" ggtitle=Replace(Request.Form("ggtitle"),"'","") ggtitle=replace(ggtitle,"|","│") ggok=Replace(ggtitle," ","") content=checkbad(Request.Form("content")) content=replace(content,"|","│") content=replace(content,"'","''") contentok=Replace(content," ","") if ggok="" or contentok="" then tl=" 发 送 失 败" mes="对不起!公告发送失败,可能存在以下问题。
·请填写完整公告标题和公告内容。
· 返回重新填写" else content2=ggtitle&"|"&lgname&"|"&now()+timeset/24&"|"&content conn.execute("insert into paper(paper,bd) values('"&content2&"',"&bd&")") tl=" 发 送 成 功" mes="·公告发送成功。" end if call sendinfo(tl,mes) %> <%case"passuser" %>
认证用户
<%if bdtype=3 then%> <%end if%>

版面认证用户:
该版面为认证版面,
请输入能够进入该版面的用户名。
各个用户名用 | 隔开,
输入过程中不能按 Enter

<%set rs=nothing%> <%case"editpassuser" passuser=Replace(Request.Form("passuser"),"'","''") conn.execute("update bdinfo set passuser='"&passuser&"' where id="&bd&" and followid<>0") tl=" 编 辑 成 功" mes="版面认证用户编辑成功。" call sendinfo(tl,mes) %> <%case"gonggaogl" set rs=conn.execute("select * from paper where bd="&bd&" order by id desc") %>
版面现有公告
<%do while not rs.eof paper=rs("paper") paper=split(paper,"|") %><%rs.movenext loop%>
 公告标题:  发表者: 发表时间:  公告操作:

 ')><%=lefttrue(checktitle(paper(0)),25)%>

 <%=checktitle(paper(1))%> <%=paper(2)%>  &bd=<%=bd%>">删除 | &bd=<%=bd%>">编辑
<%set rs=nothing%> <%case"delgg" conn.execute("delete*from paper where id="&id&" and bd="&bd&"") tl=" 删 除 成 功" mes="删除公告成功。" call sendinfo(tl,mes)%> <%case"editggok" ggtitle=Replace(Request.Form("ggtitle"),"'","") ggok=Replace(ggtitle," ","") content=checkbad(Request.Form("content")) content=replace(content,"|","│") content=replace(content,"'","''") contentok=Replace(content," ","") if ggok="" or contentok="" then tl=" 修 改 失 败" mes="对不起!公告修改失败,可能存在以下问题。
·请填写完整公告标题和公告内容。
· 返回重新填写" else content2=ggtitle&"|"&lgname&"|"&now()+timeset/24&"|"&content conn.execute("update [paper] set paper='"&content2&"' where id="&id&" and bd="&bd&"") tl=" 修 改 成 功" mes="·公告修改成功。" end if call sendinfo(tl,mes) case"top" gettop() if idtop=2 then tl=" 操 作 失 败" mes="操作失败,可能存在以下问题。
·该帖子已经被总置顶,不能够被版主置顶。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" else set rs=server.createobject("adodb.recordset") sql="Select top 1 top from [topic] where bd="&bd&" and id="&id&"" rs.open sql,conn,1,3 rs("top")=1 rs.Update rs.close set rs=nothing tl=" 置 顶 成 功" mes="置顶帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" end if umark(30) call sendinfo(tl,mes) case"good" conn.execute("update topic set type=1 where bd="&bd&" and id="&id&"") tl=" 设 定 成 功" mes="设定为精华帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" umark(50) call sendinfo(tl,mes) case"lock" conn.execute("update topic set type=2 where bd="&bd&" and id="&id&"") tl=" 锁 定 成 功" mes="锁定帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) case"delbbs" conn.execute("update topic set type=3 where bd="&bd&" and id="&id&"") conn.execute("update bbs"&totable&" set type=3 where bd="&bd&" and id="&id&"") tl=" 删 除 成 功" mes="删除帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"。" umark(-30) call sendinfo(tl,mes) case"update" conn.execute("update topic set edittime=now()+"×et&"/24 where bd="&bd&" and id="&id&"") tl=" 提 升 成 功" mes="提升帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) case"deltop" gettop() if idtop=2 then tl=" 操 作 失 败" mes="操作失败,可能存在以下问题。
·该帖子已经被总置顶,不能够被版主取消置顶。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" else set rs=server.createobject("adodb.recordset") sql="Select top 1 top from [topic] where bd="&bd&" and id="&id&"" rs.open sql,conn,1,3 rs("top")=0 rs.Update rs.close set rs=nothing tl=" 操 作 成 功" mes="取消置顶成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" end if call sendinfo(tl,mes) case"delgood" conn.execute("update topic set type=0 where bd="&bd&" and id="&id&"") tl=" 设 定 成 功" mes="设取消精华帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) case"dellock" conn.execute("update topic set type=0 where bd="&bd&" and id="&id&"") tl=" 解 锁 成 功" mes="解锁帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) case"move" %>
移动帖子

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

<%case"moveok" dim thisbbs thisbbs=checknum(request.form("bd")) if thisbbs=0 then tl=" 移 动 失 败" mes="移动帖子失败,你没有选择版面。
·回到"&bdinfo(0)&"
·回到浏览的帖子
·返回重新选择" else conn.execute("update topic set bd="&thisbbs&" where bd="&bd&" and id="&id&"") conn.execute("update bbs"&totable&" set bd="&thisbbs&" where bd="&bd&" and id="&id&"") conn.execute("update bbs"&totable&" set bd="&thisbbs&" where bd="&bd&" and bid="&id&"") tl=" 移 动 成 功" mes="移动帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" end if call sendinfo(tl,mes) case"delrebbs" dim bbsid bbsid=checknum(request.querystring("bbsid")) conn.execute("update bbs"&totable&" set type=3 where bd="&bd&" and bbsid="&bbsid&"") umark2(-20) tl=" 删 除 成 功" mes="删除回帖成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) %><% case"alltop" if usertype<4 then tl=" 操 作 失 败" mes="对不起!权限不够。" call sendinfo(tl,mes) call down response.end end if set rs=server.createobject("adodb.recordset") sql="Select top 1 top from [topic] where id="&id&"" rs.open sql,conn,1,3 rs("top")=2 rs.Update rs.close set rs=nothing umark(50) tl=" 操 作 成 功" mes="总置顶帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) %><%case"delalltop" if usertype<4 then tl=" 操 作 失 败" mes="对不起!权限不够。" call sendinfo(tl,mes) call down response.end end if set rs=server.createobject("adodb.recordset") sql="Select top 1 top from [topic] where id="&id&"" rs.open sql,conn,1,3 rs("top")=0 rs.Update rs.close set rs=nothing tl=" 操 作 成 功" mes="取消总置顶帖子成功,请选择你要进行的操作。
·回到"&bdinfo(0)&"
·回到浏览的帖子。" call sendinfo(tl,mes) %><%end select call down%>