📄 bbsgl.asp
字号:
<!--#include file="up.asp"-->
<br>
<%action=request.querystring("action")
htt=Request.ServerVariables("HTTP_REFERER")
bd=replace(request.querystring("bd"),"'","''")
id=replace(request.querystring("id"),"'","''")
topicid=replace(request.querystring("topicid"),"'","''")
re=request.querystring("re")
t1="<div align=center><center> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='98%' height='24'><tr><td width='180' background='pic/"&sp&"3.gif'> <img border='0' src='pic/fl.gif'> <font color='#FFFFFF'><b>"
t2="</b></font></td></tr></table></center></div><div align=center><center><table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor="&c1&" width=98% >"
d1="<tr><td width=100% ><P style='MARGIN: 15px'>"
d2="</td></tr></table></center></div>"
if action="qk" and admin=3 then
myconn.execute("delete*from bbstl where type=5")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·已经清空回收站<%=d2%>
<%response.end
end if
ssql="select name,bd from bbs"&totable&" where id="&id&""
if re="yes" then ssql="select name,bd from bbs"&totable&" where bbsid="&id&""
set who=myconn.execute(ssql)
bd=who("bd")
upwho=who("name")
set who=nothing
function bdlist(sename)
response.write"<select size=1 style='font-size: 9pt' name="&sename&" >"
set bf=myconn.execute("select*from bdinfo where key<>'0'")
do while not bf.eof
response.write"<option value="&bf("bn")&">"&bf("bdname")&"</option>"
bf.movenext
loop
bf.close
set bf=nothing
response.write"</select>"
end function
set del1=myconn.execute("select*from admin where name='"&lgname&"' and password='"&lgpwd&"' and (bd='70767766' or bd='"&bd&"')")%><%if not del1.eof or not del1.bof then
dj=del1("bd")
%>
<%
select case action
case"move"
%>
<form method="POST" action="?action=moveok&totable=<%=totable%>&id=<%=id%>&bd=<%=bd%>"><%=t1%>移动帖子<%=t2&d1%>
<p style='margin: 15'>请选择帖子要移动到的论坛:<%bdlist("tobd")%> <input type="submit" value=" 移 动 " name="B1"> <input type="reset" value=" 重 置 " name="B2"></p>
<%=d2%></form>
<%case"moveok"%>
<%tobd=request.form("tobd")
set cob=myconn.execute("select id from bbstl where id="&id&" and bd="&bd&"")
if cob.eof then%>
<%=t1%>操 作 失 败 !<%=t2&d1%><p style='margin: 15'>·没有该帖子!!<%=d2%>
<%else
myconn.execute("update bbstl set bd="&tobd&" where id="&id&"")
myconn.execute("update bbs"&totable&" set bd="&tobd&" where id="&id&" or bid="&id&"")
%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·移动帖子---成功!!<%=d2%>
<%end if
set cob=nothing%>
<%case"jh"
myconn.execute("update bbstl set type=1 where id="&id&"")
myconn.execute("update bbs"&totable&" set type=1 where id="&id&"")
myconn.execute("update [user] set qian=qian+800,meili=meili+200,jingyan=jingyan+200 where name='"&upwho&"'")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·设定为精华帖子---成功!!<%=d2%>
<%case"notjh"
myconn.execute("update bbstl set type=0 where id="&id&"")
myconn.execute("update bbs"&totable&" set type=0 where id="&id&"")
myconn.execute("update [user] set qian=qian-500,meili=meili-100,jingyan=jingyan-100 where name='"&upwho&"'")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·取消帖子精华---成功!!<%=d2%>
<%
case"top"
set tiedj=myconn.execute("select top 1 gonggao from [bbstl] where id="&id&"")
if tiedj("gonggao")=5 and dj<>"70767766" then%>
<%=t1%>操 作 失 败 !<%=t2&d1%><p style='margin: 15'>·该帖子已经是总置顶帖,不能再置顶!<%=d2%>
<%else
myconn.execute("update [bbstl] set gonggao='3' where id="&id&"")
myconn.execute("update [bbs"&totable&"] set gonggao='3' where id="&id&"")
myconn.execute("update [user] set qian=qian+800,meili=meili+200,jingyan=jingyan+200 where name='"&upwho&"'")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·设定为置顶帖子---成功!!<%=d2%>
<%end if
set tiedj=nothing%>
<%
case"lock"
myconn.execute("update [bbstl] set type='4' where id="&id&"")
myconn.execute("update [bbs"&totable&"] set type='4' where id="&id&"")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·加锁帖子---成功!!<%=d2%>
<%
case"unlock"
myconn.execute("update [bbstl] set type='0' where id="&id&"")
myconn.execute("update [bbs"&totable&"] set type='0' where id="&id&"")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·解锁帖子---成功!!<%=d2%>
<%
case"nottop"
set tiedj=myconn.execute("select top 1 gonggao from [bbstl] where id="&id&"")
if tiedj("gonggao")=5 and dj<>"70767766" then%>
<%=t1%>操 作 失 败 !<%=t2&d1%><p style='margin: 15'>·你不是管理员,不能解除总置顶帖子!<%=d2%>
<%else
myconn.execute("update [bbstl] set gonggao='0' where id="&id&"")
myconn.execute("update [bbs"&totable&"] set gonggao='0' where id="&id&"")
myconn.execute("update [user] set qian=qian-500,meili=meili-100,jingyan=jingyan-100 where name='"&upwho&"'")%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·取消置顶帖子---成功!!<%=d2%>
<%end if
set tiedj=nothing
%>
<%
case"alltop"
if dj="70767766" then
myconn.execute("update [bbstl] set gonggao='5' where id="&id&"")
myconn.execute("update [bbs"&totable&"] set gonggao='5' where id="&id&"")
myconn.execute("update [user] set qian=qian+1000,meili=meili+300,jingyan=jingyan+300 where name='"&upwho&"'")
%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15'>·设定为总置顶帖子---成功!!<%=d2%>
<%else%>
<%=t1%>操 作 失 败 !<%=t2&d1%><p style='margin: 15'>·你不是管理员,不能总置顶帖子!<%=d2%>
<%end if%>
<%case"del"
sql1="update bdinfo set bbsnum=bbsnum-1 where bn="&bd&""
if re="yes" then
sql2="update bbsinfo set bbsnum=bbsnum-1"
sql3="update bbs"&totable&" set type=5 where bbsid="&id&""
sql4="update bbstl set bnum=bnum-1 where id="&topicid&""
myconn.execute("update bbs"&totable&" set bnum=bnum-1 where id="&topicid&"")
tex="·删除帖子---成功!!<br>·<a href="&htt&">回到帖子</a><meta http-equiv=refresh content='2;url="&htt&"'>"
elseif re="no" then
sql2="update [bbsinfo] set bbsnum=bbsnum-1,topicnum=topicnum-1"
sql3="update bbstl set type=5 where id="&id&""
sql4="update bbs"&totable&" set type=5 where id="&id&" or bid="&id&""
tex="·删除帖子---成功!!"
end if%>
<%
myconn.execute(sql1)
myconn.execute(sql2)
myconn.execute(sql3)
myconn.execute(sql4)
set sne1=myconn.execute("select top 1 id,name,zhuti,body,bid,face from bbs"&totable&" where bd="&bd&" and type<>5 order by bbsid desc")
if sne1.eof then
lastbbs=""
else
if sne1("bid")=0 then
nei=left(sne1("zhuti"),20)
idid=sne1("id")
else
nei=left(sne1("body"),20)
idid=sne1("bid")
end if
lastbbs=""&sne1("name")&"|?|"&nei&"|?|"&now&"|?|"&idid&"|?|"&sne1("face")&"|?|"&totable&""
end if
myconn.execute("update [bdinfo] set lastbbs='"&lastbbs&"' where bn="&bd&" and key<>'0'")
set sne=nothing
%>
<%=t1%>操 作 成 功 !<%=t2&d1%><p style='margin: 15;line-height: 150%'><%=tex%></p><%=d2%>
<%
set del1=nothing
end select
%>
<%else%>
<%=t1%>操 作 失 败 !<%=t2&d1%><p style='margin: 15'>·你不是该版面的的斑竹或总斑竹,不能操作该帖!!<%=d2%>
<meta http-equiv="refresh" content="2;url=javascript:history.go(-1)">
<%end if%><br><br><!--#include file="down.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -