📄 admin_postings.asp
字号:
sub award()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if TopicUserName=membername then
Errmsg=Errmsg+"<br><li>版主和管理员不能对自己的帖子实行奖励操作。"
founderr=true
exit sub
end if
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','奖励用户《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="奖励用户《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"得到"&replace(allmsg,"用户操作:","")&"的奖励"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub punish()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','惩罚用户《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="惩罚用户《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"得到"&replace(allmsg,"用户操作:","")&"的惩罚"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub lock()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set locktopic=1 where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','锁定帖子《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="锁定帖子《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而锁定,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub unlock()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set locktopic=0 where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','解除锁定《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="解除锁定《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而解除锁定,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub uptopic()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set LastPostTime=Now() where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','提升主题《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="提升主题《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而被提升,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub istop()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set istop=1 where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','固顶帖子《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="固顶帖子《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而固顶,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub notop()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set istop=0 where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&topicusername&"','"&membername&"','解除固顶《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&topicuserid)
end if
sucmsg="解除固顶《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而解除固顶,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
end sub
sub istop_a()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set istop=2 where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&TopicUsername&"','"&membername&"','总固顶帖子《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&TopicUserID)
end if
sucmsg="总固顶帖子《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而总固顶,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
'将更新信息保存入cache
call cache_top()
call dvbbs_suc()
end sub
sub notop_a()
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update topic set istop=0 where boardid="&boardid&" and topicid="&id
conn.Execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&topicusername&"','"&membername&"','解除总固顶《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
if allmsg<>"" then
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&" where userid="&topicuserid)
end if
sucmsg="解除总固顶《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而解除总固顶,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
'将更新信息保存入cache
call cache_top()
call dvbbs_suc()
end sub
sub isbest()
Dim datetimestr
set rs=conn.execute("select * from "&TotalUseTable&" where Announceid="&replyid)
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br><li>没有找到相关帖子!"
founderr=true
exit sub
end if
topic=rs("topic")
topicusername=rs("username")
topicuserid=rs("postuserid")
if topic="" then
topic=left(replace(replace(rs("body"),"'",""),chr(10),","),26)
else
topic=replace(topic,"'","")
end if
datetimestr=replace(replace(rs("dateandtime"),"上午",""),"下午","")
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update "&TotalUseTable&" set isbest=1 where boardid="&boardid&" and announceid="&cstr(replyid)
conn.Execute(sql)
conn.execute("update topic set isbest=1 where boardid="&boardid&" and topicid="&id)
sql="insert into bestTopic (title,boardid,Announceid,rootid,postusername,postuserid,dateandtime,expression) values ('"&topic&"',"&rs("boardid")&","&rs("Announceid")&","&rs("rootid")&",'"&topicusername&"',"&rs("postuserid")&",'"&datetimestr&"','"&rs("expression")&"')"
conn.execute(sql)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&topicusername&"','"&membername&"','加入精华《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&",userIsBest=userisBest+1 where userid="&topicuserid)
sucmsg="加入精华《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"&replyID="&replyID&"&skin=1]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而加入精华,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
end if
call dvbbs_suc()
set rs=nothing
end sub
sub nobest()
set rs=conn.execute("select topic,username,postuserid from "&TotalUseTable&" where Announceid="&replyid)
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br><li>没有找到相关帖子!"
founderr=true
exit sub
else
topic=rs(0)
topicusername=rs(1)
topicuserid=rs(2)
if topic="" then
topic="本帖子为回复帖子"
end if
end if
set rs=nothing
title=CheckStr(htmlencode(request.form("title")))
content=CheckStr(htmlencode(request.form("content")))
content="原因:" & title & content
if htmlencode(request.form("title"))="" and htmlencode(request.form("content"))="" then
Errmsg=Errmsg+"<br><li>请写明操作原因。"
founderr=true
exit sub
end if
sql="update "&TotalUseTable&" set isbest=0 where boardid="&boardid&" and announceid="&replyid
conn.Execute(sql)
conn.execute("update topic set isbest=0 where boardid="&boardid&" and topicid="&id)
conn.execute("delete from besttopic where Announceid="&replyID)
sql="insert into log (l_announceid,l_boardid,l_touser,l_username,l_content,l_ip) values ("&id&","&boardid&",'"&topicusername&"','"&membername&"','解除精华《"&topic&"》,"&content& ","&allmsg&"','"&ip&"')"
conn.execute(sql)
conn.execute("update [user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&",userIsBest=userisBest-1 where userid="&topicuserid)
sucmsg="解除精华《"&topic&"》,"&content& ","&allmsg&""
if request("ismsg")="1" then
msgcontent="您发表的帖子《[url=dispbbs.asp?boardid="&boardid&"&ID="&ID&"&replyID="&replyID&"&skin=1]"&topic&"[/url]》因"&replace(Content,"原因:","")&"而解除精华,且进行了"&replace(allmsg,"用户操作:","")&"的操作"
if request("msg")<>"" then
msgContent=msgContent & chr(10) & "以下为操作者给您的附言:" & request("msg")
end if
conn.Execute("insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&TopicUsername&"','"&membername&"','系统消息','"&checkSTR(msgContent)&"',Now(),0,1)")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -