ztdel.asp
来自「安全性好,适用于制作论坛和进行资源下载的个人和大型网站使用!」· ASP 代码 · 共 244 行
ASP
244 行
<!--#include file="inc/pstart.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/incpage.asp"-->
<!--#include file="inc/bbsinfo.asp"-->
<%
call checkulogin()
call checkhmd()
dim id,hx66close
id=request.querystring("id")
if not IsNumeric(id) or id="" then
call showmsg("参数非法,指定的主题并不存在")
else
id=clng(id)
end if
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_bbs where hx66_bid="&bid&" and id="&id
rs.open sqlstr,conn,1,1
if rs.eof then showmsg("没有找到指定的主题")
hx66close=rs("hx_close")
if username<>""&rs("hx66_name")&"" and checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 你没有权限操作别人的主题贴子!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if hx66close=1 and checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 本贴已被屏蔽不能进行此操作,请 返 回 !');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
rs.close
set rs=nothing
if request.querystring("action")="rewards" then'===主题贴管理
if checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 你没有权限进行此操作!');"
response.write"javascript:history.go(-1);</SCRIPT>"
response.end
end if
dim rew_title,dxyes,ttt,title,bodyMessage
rew_title=left(Trim(request.Form("rew_title")),50)
if rew_title="" then rew_title="无"
dxyes=clng(request.Form("dxyes"))
if request.Form("tt")="1" then '奖惩
dim points,hx66_rewbody
points=int(request.Form("point"))
dxyes=cint(request.Form("dxyes"))
if points=0 then
response.write"<SCRIPT language=JavaScript>alert(' 请指定奖惩积分!');javascript:history.go(-1);</SCRIPT>"
response.end
end if
hx66_rewbody=rew_title&"|||"&ckuname
sql="select * from hx66_bbs where id="&id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs("hx66_point")=0 then
rs("hx66_point")=points
rs("hx66_rewbody")=hx66_rewbody
rs.update
conn.execute("update hx66_uinfo set hx66_money=hx66_money+"& points &" where hx66_uname='"&rs("hx66_name")&"'")
if dxyes=1 then
title="论坛贴子奖惩通知"
bodyMessage="你发表的主题贴《"&rs("hx66_title")&"》被奖惩:"&points&"分。奖惩原因:"&rew_title&""
call bbs_duanx()
end if
else
response.write"<SCRIPT language=JavaScript>alert(' 此主题贴已奖惩过,不能进行此更改操作!');"
response.write"javascript:history.go(-1);</SCRIPT>"
response.end
end if
rs.close
set rs=nothing
response.write"<SCRIPT language=JavaScript>alert(' 此主题贴奖惩成功,刷新页面看到效果!');"
response.write"javascript:history.go(-1);</SCRIPT>"
elseif request.Form("tt")="2" then '移动
dim hx66_bbid:hx66_bbid=trim(request.Form("hx66_bid"))
if not IsNumeric(hx66_bbid) or hx66_bbid="" then
response.write"<SCRIPT language=JavaScript>alert(' 请指定移动到的目标版块!');"
response.write"javascript:history.go(-1);</SCRIPT>"
response.end
else
hx66_bbid=clng(hx66_bbid)
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from hx66_bbs where id="&id
rs.open sql,conn,1,3
if not rs.eof then
rs("hx66_bid")=hx66_bbid
rs.update
end if
rs.close
set rs=nothing
if dxyes=1 then
title="论坛贴子移动通知"
bodyMessage="你发表的主题贴移动到其它版块。原因:"&rew_title&""
call bbs_duanx()
end if
Response.Write("<script language=javascript>alert('此主题贴移动成功!');this.location.href='list.asp?bid="&bid&"';</script>")
elseif request.Form("tt")="3" then '总固顶
set rs=server.CreateObject("adodb.recordset")
sql="select * from hx66_bbs where id="&id
rs.open sql,conn,1,3
if not rs.eof then
if rs("hx66_top")<>3 then
rs("hx66_top")=3
conn.execute("update hx66_uinfo set hx66_money=hx66_money+"& tpos &" where hx66_uname='"&rs("hx66_name")&"'")
rs.update
ttt="设为总固顶"
else
rs("hx66_top")=0
rs.update
ttt="取消总固顶"
end if
if dxyes=1 then
title="论坛贴子"&ttt&"通知"
bodyMessage="你发表的主题贴《"&rs("hx66_title")&"》被"&ttt&"。原因:"&rew_title&""
call bbs_duanx()
end if
response.write"<SCRIPT language=JavaScript>alert(' 此主题贴"&ttt&"成功!');"
response.write"javascript:history.go(-1);</SCRIPT>"
end if
rs.close
set rs=nothing
elseif request.Form("tt")="4" then '固顶
set rs=server.CreateObject("adodb.recordset")
sql="select * from hx66_bbs where id="&id
rs.open sql,conn,1,3
if not rs.eof then
if rs("hx66_top")<>1 then
rs("hx66_top")=1
conn.execute("update hx66_uinfo set hx66_money=hx66_money+"& tpos &" where hx66_uname='"&rs("hx66_name")&"'")
rs.update
ttt="设为固顶"
else
rs("hx66_top")=0
rs.update
ttt="取消固顶"
end if
if dxyes=1 then
title="论坛贴子"&ttt&"通知"
bodyMessage="你发表的主题贴《"&rs("hx66_title")&"》被"&ttt&"。原因:"&rew_title&""
call bbs_duanx()
end if
response.write"<SCRIPT language=JavaScript>alert(' 此主题贴版块固顶成功!');"
response.write"javascript:history.go(-1);</SCRIPT>"
end if
rs.close
set rs=nothing
elseif request.Form("tt")="5" then '精华
set rs=server.CreateObject("adodb.recordset")
sql="select * from hx66_bbs where id="&id
rs.open sql,conn,1,3
if not rs.eof then
if rs("hx66_level")=0 then
rs("hx66_level")=1
conn.execute("update hx66_uinfo set hx66_money=hx66_money+"& jpos &" where hx66_uname='"&rs("hx66_name")&"'")
rs.update
ttt="设为精华"
else
rs("hx66_level")=0
rs.update
ttt="解除精华"
end if
if dxyes=1 then
title="论坛贴子"&ttt&"通知"
bodyMessage="你发表的主题贴《"&rs("hx66_title")&"》被"&ttt&"。原因:"&rew_title&""
call bbs_duanx()
end if
response.write"<SCRIPT language=JavaScript>alert(' 此主题贴"&ttt&"成功!');"
response.write"javascript:history.go(-1);</SCRIPT>"
end if
rs.close
set rs=nothing
elseif request.Form("tt")="6" then '关闭
set rs=server.CreateObject("adodb.recordset")
sql="select * from hx66_bbs where id="&id
rs.open sql,conn,1,3
if not rs.eof then
if rs("hx66_close")=0 then
rs("hx66_close")=1
rs.update
ttt="设为锁定"
else
rs("hx66_close")=0
rs.update
ttt="解除锁定"
end if
end if
response.write"<SCRIPT language=JavaScript>alert(' 此主题贴"&ttt&"成功!');"
response.write"javascript:history.go(-1);</SCRIPT>"
rs.close
set rs=nothing
else
response.write"<SCRIPT language=JavaScript>alert(' 请指定操作对象!');"
response.write"javascript:history.go(-1);</SCRIPT>"
response.end
end if
end if
if request.querystring("action")="del" then'===删除主题贴(回收站)
sql="select * from hx66_bbs where id="&id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.eof then
conn.execute("update [hx66_bbsset] set topicnum=topicnum-1,allnum=allnum-"&rs("hx66_hf")+1&"")
conn.execute("update [hx66_bbsinfo] set topicnum=topicnum-1,allnum=allnum-"&rs("hx66_hf")+1&" where id="&bid&"")
if rs("hx66_delete")=0 then
rs("hx66_delete")=1
rs.update
conn.execute("update hx66_uinfo set hx66_money=hx66_money-"& zpos &" where hx66_uname='"&rs("hx66_name")&"'")
end if
end if
rs.close
set rs=nothing
response.redirect "list.asp?bid="&bid
end if
if request.querystring("action")="close" then'===屏蔽主题贴
if checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 你没有权限进行此操作!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
sql="select * from hx66_bbs where id="&id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs("hx_close")=0 then
rs("hx_close")=1
rs.update
else
rs("hx_close")=0
rs.update
end if
rs.close
set rs=nothing
response.redirect Request.ServerVariables("http_referer")
end if
sub bbs_duanx()
sql="insert into Message(sender,incept,title,content,sendtime) values('系统短信','"&rs("hx66_name")&"','"&title&"','"&bodyMessage&"','"&now()&"')"
conn1.execute(sql)
end sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?