📄 admin_postings.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<%
stats="帖子管理"
Dim replyid
Dim id
Dim Lasttopic,Lastpost
Dim lastrootid,lastpostuser
Dim ip,url
Dim title,content
Dim TotalUseTable
Dim Topic,TopicUsername,TopicUserID
Dim canlocktopic,candeltopic,canmovetopic,cantoptopic,canbesttopic,canawardtopic
Dim Cantoptopic_a
Dim UpdateBoardID,UpdateBoardID_1
Dim MsgContent
canlocktopic=false
candeltopic=false
canmovetopic=false
cantoptopic=false
canbesttopic=false
canawardtopic=false
cantoptopic_a=false
'本论坛和上级论坛ID
UpdateBoardID=BoardParentStr & "," & BoardID
ip=Request.ServerVariables("REMOTE_ADDR")
if not founduser then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>请登陆后进行操作。"
end if
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>请指定论坛版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的版面参数。"
else
boardid=clng(boardid)
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
else
id=request("id")
end if
if isInteger(request("replyid")) then
replyid=request("replyid")
end if
Dim doWealth,douserEP,douserCP
Dim doWealthMsg,douserEPMsg,douserCPMsg,allMsg
if not isnumeric(request("doWealth")) or request("doWealth")="0" or request("doWealth")="" then
doWealth=0
doWealthMsg=""
else
doWealth=request("doWealth")
doWealthMsg="金钱" & request("doWealth") & ","
end if
if not isnumeric(request("douserEP")) or request("douserEP")="0" or request("douserEP")="" then
douserEP=0
douserEPMsg=""
else
douserEP=request("douserEP")
douserEPMsg="经验" & request("douserEP") & ","
end if
if not isnumeric(request("douserCP")) or request("douserCP")="0" or request("douserCP")="" then
douserCP=0
douserCPMsg=""
else
douserCP=request("douserCP")
douserCPMsg="魅力" & request("douserCP")
end if
if doWealthMsg="" and douserEPMsg="" and douserCPMsg="" then
allmsg="没有对用户进行分值操作"
else
allmsg="用户操作:" & doWealthMsg & douserEPMsg & douserCPMsg
end if
if not founderr then
set rs=conn.execute("select title,postusername,postuserid,PostTable from topic where topicid="&id)
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br><li>没有找到相关帖子!"
founderr=true
else
Topic=CheckStr(rs(0))
Topicusername=CheckStr(rs(1))
Topicuserid=rs(2)
TotalUseTable=rs(3)
end if
'判断用户是否有锁定/解除锁定权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(20))=1 then
canlocktopic=true
else
canlocktopic=false
end if
if Cint(GroupSetting(20))=1 and UserGroupID>3 then
canlocktopic=true
end if
if (Cint(GroupSetting(13))=1 and TopicUsername=membername) then
canlocktopic=true
end if
if FoundUserPer and Cint(GroupSetting(13))=1 and TopicUsername=membername then
canlocktopic=true
elseif FoundUserPer and Cint(GroupSetting(13))=0 and TopicUsername=membername then
canlocktopic=false
end if
if FoundUserPer and Cint(GroupSetting(20))=1 and TopicUsername<>membername then
canlocktopic=true
elseif FoundUserPer and Cint(GroupSetting(20))=0 and TopicUsername<>membername then
canlocktopic=false
end if
'判断用户是否有移动帖子权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(19))=1 then
canmovetopic=true
else
canmovetopic=false
end if
if Cint(GroupSetting(19))=1 and UserGroupID>3 then
canmovetopic=true
end if
if (Cint(GroupSetting(12))=1 and TopicUsername=membername) then
canmovetopic=true
end if
if FoundUserPer and Cint(GroupSetting(12))=1 and TopicUsername=membername then
canmovetopic=true
elseif FoundUserPer and Cint(GroupSetting(12))=0 and TopicUsername=membername then
canmovetopic=false
end if
if FoundUserPer and Cint(GroupSetting(19))=1 and TopicUsername<>membername then
canmovetopic=true
elseif FoundUserPer and Cint(GroupSetting(19))=0 and TopicUsername<>membername then
canmovetopic=false
end if
'判断用户是否有删除帖子权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(18))=1 then
candeltopic=true
else
candeltopic=false
end if
if Cint(GroupSetting(18))=1 and UserGroupID>3 then
candeltopic=true
end if
if (Cint(GroupSetting(11))=1 and TopicUsername=membername) then
candeltopic=true
end if
if FoundUserPer and Cint(GroupSetting(11))=1 and TopicUsername=membername then
candeltopic=true
elseif FoundUserPer and Cint(GroupSetting(11))=0 and TopicUsername=membername then
candeltopic=false
end if
if FoundUserPer and Cint(GroupSetting(18))=1 and TopicUsername<>membername then
candeltopic=true
elseif FoundUserPer and Cint(GroupSetting(18))=0 and TopicUsername<>membername then
candeltopic=false
end if
'判断用户是否有固顶/解除固顶帖子权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(21))=1 then
cantoptopic=true
else
cantoptopic=false
end if
if Cint(GroupSetting(21))=1 and UserGroupID>3 then
cantoptopic=true
end if
if FoundUserPer and Cint(GroupSetting(21))=1 then
cantoptopic=true
elseif FoundUserPer and Cint(GroupSetting(21))=0 then
cantoptopic=false
end if
'判断用户是否有总固顶帖子权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(38))=1 then
cantoptopic_a=true
else
cantoptopic_a=false
end if
if Cint(GroupSetting(38))=1 and UserGroupID>3 then
cantoptopic_a=true
end if
if FoundUserPer and Cint(GroupSetting(38))=1 then
cantoptopic_a=true
elseif FoundUserPer and Cint(GroupSetting(38))=0 then
cantoptopic_a=false
end if
'判断用户是否有奖励/惩罚帖子权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(22))=1 then
canawardtopic=true
else
canawardtopic=false
end if
if Cint(GroupSetting(22))=1 and UserGroupID>3 then
canawardtopic=true
end if
if FoundUserPer and Cint(GroupSetting(22))=1 then
canawardtopic=true
elseif FoundUserPer and Cint(GroupSetting(22))=0 then
canawardtopic=false
end if
'判断用户是否有加入/解除精华帖子权限
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(24))=1 then
canbesttopic=true
else
canbesttopic=false
end if
if Cint(GroupSetting(24))=1 and UserGroupID>3 then
canbesttopic=true
end if
if FoundUserPer and Cint(GroupSetting(24))=1 then
canbesttopic=true
elseif FoundUserPer and Cint(GroupSetting(24))=0 then
canbesttopic=false
end if
end if
if founderr then
call nav()
call head_var(2,0,"","")
call dvbbs_error()
else
call nav()
call head_var(1,BoardDepth,0,0)
select case request("action")
case "lock"
if not canlocktopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call lock()
end if
case "unlock"
if not canlocktopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call unlock()
end if
case "uptopic"
if not canlocktopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call uptopic()
end if
case "delet"
if not candeltopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call delete()
end if
case "move"
if not canmovetopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call Tmove()
end if
case "copy"
call copy()
case "istop"
if not cantoptopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call istop()
end if
case "notop"
if not cantoptopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call notop()
end if
case "istop_a"
if not cantoptopic_a then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call istop_a()
end if
case "notop_a"
if not cantoptopic_a then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call notop_a()
end if
case "dele"
call dele()
case "isbest"
if not canbesttopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call isbest()
end if
case "nobest"
if not canbesttopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call nobest()
end if
case "award"
if not canawardtopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call award()
end if
case "punish"
if not canawardtopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
call punish()
end if
case else
call main()
end select
if founderr then call dvbbs_error()
end if
call activeonline()
call footer()
sub main()
Dim doWealth,douserEP,douserCP
Dim seldisable,reaction
Dim postusername
select case request("action")
case "锁定"
doWealth=0
douserEP=0
douserCP=0
if canawardtopic then
seldisable=""
else
seldisable="disabled"
end if
reaction="lock"
if not canlocktopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
exit sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -