📄 admin_postings.asp
字号:
response.write " │ │ │ │ │ │ ├"
case 8
response.write " │ │ │ │ │ │ │ ├"
case 9
response.write " │ │ │ │ │ │ │ │ ├"
end select
response.write rs(1)
if Cint(reBoard_Setting(43))=1 then
response.write "(不许转移)"
end if
response.write "</option>"
rs.MoveNext
loop
set rs=nothing
%>
</select> 注意:不能在相同论坛内进行移动操作,注明不能移动的论坛为分类论坛
</td>
</tr>
<tr>
<td class=tablebody2 valign=middle colspan=2 align=center><input type=submit name="submit" value="提 交"></td></tr></form></table>
</table>
</td></tr>
</table>
<%
end if
end sub
sub copy()
Dim reBoard_Setting
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
'判断用户是否有移动帖子权限
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 not canmovetopic then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
exit sub
end if
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
if request("checked")="yes" then
Dim newboardid
Dim todaynum,postnum
sql="select count(*) from "&TotalUseTable&" where rootid="&id
set rs=conn.execute(sql)
postNum=rs(0)
sql="select count(*) from "&TotalUseTable&" where rootid="&id&" and dateandtime>#"&date()&"#"
set rs=conn.execute(sql)
todayNum=rs(0)
if request("boardid")=request("newboardid") then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>不能在相同版面内进行转移操作。"
exit sub
elseif not isInteger(request("newboardid")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的版面参数。"
exit sub
else
newboardid=request("newboardid")
end if
'目标论坛和其上级论坛ID
set rs=conn.execute("select ParentStr,Board_Setting from board where boardid="&newboardid)
UpdateBoardID=rs(0) & "," & newboardid
reBoard_Setting=split(rs(1),",")
if Cint(reBoard_Setting(43))=1 then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>本论坛作为分类论坛不允许转移。"
exit sub
end if
sql="select boardid from "&TotalUseTable&" where announceid="&replyid&" and boardid="&cstr(boardid)
set rs=conn.execute(sql)
if rs.eof and rs.bof then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>您选择的贴子并不存在。"
exit sub
end if
Dim newtopic,trs
set rs=server.createobject("adodb.recordset")
sql="select * from "&TotalUseTable&" where announceid="&replyid
rs.open sql,conn,1,1
if request.form("isdispmove")="yes" then
newtopic=CheckStr(request.form("topic")) & "-->" & membername & "添加"
else
newtopic=CheckStr(request.form("topic"))
end if
sql="insert into topic (Title,Boardid,PostUsername,PostUserid,DateAndTime,Expression,LastPost,LastPostTime,child,hits,isvote,isbest,votetotal,PostTable) values ('"&newtopic&"',"&newboardid&",'"&rs("username")&"',"&rs("postuserid")&",Now(),'"&rs("Expression")&"','$$$$$$',Now(),0,0,0,0,0,'"&NowUseBBS&"')"
conn.execute(sql)
set trs=conn.execute("select top 1 topicid from topic order by topicid desc")
Sql="insert into "&NowUseBBS&"(Boardid,ParentID,username,topic,body,DateAndTime,length,rootid,layer,orders,ip,Expression,locktopic,signflag,emailflag,isbest,postuserid) values "&_
"("&_
newboardid&",0,'"&_
rs("username")&"','"&_
newtopic&"','"&_
rs("body")&"','"&_
rs("DateAndTime")&"','"&_
rs("length")&"',"&trs(0)&",1,0,'"&rs("ip")&"','"&_
rs("Expression")&"',"&rs("locktopic")&","&rs("signflag")&","&rs("emailflag")&","&rs("isbest")&","&rs("postuserid")&")"
conn.execute(sql)
rs.close
set rs=nothing
'更新论坛贴子数据
call LastCount(Newboardid)
call BoardNumAdd(newboardid,1,postNum,todayNum)
call AllboardNumAdd(todayNum,postNum,1)
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)
'更新论坛数据结束
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()
else
%>
<table cellpadding=3 cellspacing=1 align=center class=tableborder1 >
<tr>
<th valign=middle colspan=2>
<form action="admin_postings.asp" method="post">
<input type=hidden name="action" value="copy">
<input type=hidden name="checked" value="yes">
<input type=hidden name="boardid" value="<%=request("boardid")%>">
<input type=hidden name="replyid" value="<%=request("replyid")%>">
<input type=hidden name="id" value="<%=request("id")%>">
<input type=hidden value="<%=CheckStr(htmlencode(request.form("title")))%>" name="title">
<input type=hidden value="<%=CheckStr(htmlencode(request.form("content")))%>" name="content">
<input type=hidden value="<%=doWealth%>" name="doWealth">
<input type=hidden value="<%=dousercp%>" name="dousercp">
<input type=hidden value="<%=douserep%>" name="douserep">
<input type=hidden value="<%=request.form("msg")%>" name="msg">
<input type=hidden value="<%=request.form("ismsg")%>" name="ismsg">
复制帖子</th></tr>
<tr>
<td class=tablebody1 valign=middle>
<b>操作说明</td>
<td class=tablebody1 valign=middle>
该帖子将复制到别的论坛,成为新的帖子,所以如该帖子无主题请指定该帖子的主题,原帖子将保留在原来论坛
</td>
</tr>
<tr>
<td class=tablebody1 valign=middle>
<b>帖子主题</td>
<td class=tablebody1 valign=middle>
<input name="topic" value="<%=topic%>" size=50> <input name="isdispmove" type="checkbox" value="yes"> 移动后的主题是否显示操作者名称
</td>
</tr>
<tr>
<td class=tablebody1 valign=top><b>移动到:</b></td>
<td class=tablebody1 valign=top>
<%
response.write "<select name=newboardid size=1><option selected>移动帖子请选择</option>"
set rs=conn.execute("select boardid,boardtype,depth,Board_Setting from board order by rootid,orders")
do while not rs.EOF
reBoard_Setting=split(rs(3),",")
response.write "<option value="""&rs(0)&""" "
response.write ">"
select case rs(2)
case 0
response.write "╋"
case 1
response.write " ├"
case 2
response.write " │ ├"
case 3
response.write " │ │ ├"
case 4
response.write " │ │ │ ├"
case 5
response.write " │ │ │ │ ├"
case 6
response.write " │ │ │ │ │ ├"
case 7
response.write " │ │ │ │ │ │ ├"
case 8
response.write " │ │ │ │ │ │ │ ├"
case 9
response.write " │ │ │ │ │ │ │ │ ├"
end select
response.write rs(1)
if Cint(reBoard_Setting(43))=1 then
response.write "(不许转移)"
end if
response.write "</option>"
rs.MoveNext
loop
set rs=nothing
%>
</select> 注意:相同论坛间不能进行复制操作,注明不能移动的论坛为分类论坛
</td>
</tr>
<tr>
<td class=tablebody2 valign=middle colspan=2 align=center><input type=submit name="submit" value="提 交"></td></tr></form></table></td></tr></table>
</table>
</td></tr>
</table>
<%
end if
end sub
'更新指定论坛信息
function LastCount(boardid)
Dim LastTopic,body,LastRootid,LastPostTime,LastPostUser
Dim LastPost,uploadpic_n,Lastpostuserid,Lastid
set rs=conn.execute("select top 1 T.title,b.Announceid,b.dateandtime,b.username,b.postuserid,b.rootid from "&NowUseBBS&" b inner join Topic T on b.rootid=T.TopicID where b.boardid="&boardid&" and b.locktopic<2 order by b.announceid desc")
if not(rs.eof and rs.bof) then
Lasttopic=replace(left(rs(0),15),"$","")
LastRootid=rs(1)
LastPostTime=rs(2)
LastPostUser=rs(3)
LastPostUserid=rs(4)
Lastid=rs(5)
else
LastTopic="无"
LastRootid=0
LastPostTime=now()
LastPostUser="无"
LastPostUserid=0
Lastid=0
end if
set rs=nothing
LastPost=LastPostUser & "$" & LastRootid & "$" & LastPostTime & "$" & LastTopic & "$" & uploadpic_n & "$" & LastPostUserID & "$" & LastID & "$" & BoardID
Dim SplitUpBoardID,SplitLastPost
SplitUpBoardID=split(UpdateBoardID,",")
For i=0 to ubound(SplitUpBoardID)
set rs=conn.execute("select LastPost from board where boardid="&SplitUpBoardID(i))
if not (rs.eof and rs.bof) then
SplitLastPost=split(rs(0),"$")
if isnumeric(LastRootID) and isnumeric(SplitLastPost(1)) then
if ubound(SplitLastPost)=7 and clng(LastRootID)<>clng(SplitLastPost(1)) then
conn.execute("update board set LastPost='"&LastPost&"' where boardid="&SplitUpBoardID(i))
end if
end if
end if
Next
set rs=nothing
'sql="update board set LastPost='"&LastPost&"' where boardid in ("&UpdateBoardID&")"
'conn.execute(sql)
end function
'版面发帖数增加
sub BoardNumAdd(boardid,topicNum,postNum,todayNum)
sql="update board set lastbbsnum=lastbbsnum+"&postNum&",lasttopicNum=lasttopicNum+"&topicNum&",todayNum=todayNum+"&todayNum&" where boardid in ("&UpdateBoardID&")"
conn.execute(sql)
end sub
'版面发帖数减少
sub BoardNumSub(boardid,topicNum,postNum,todayNum)
sql="update board set lastbbsnum=lastbbsnum-"&postNum&",lasttopicNum=lasttopicNum-"&topicNum&",todayNum=todayNum-"&todayNum&" where boardid in ("&UpdateBoardID&")"
conn.execute(sql)
end sub
'所有论坛发帖数增加
function AllboardNumAdd(todayNum,postNum,topicNum)
sql="update config set TodayNum=todayNum+"&todaynum&",BbsNum=bbsNum+"&postNum&",TopicNum=topicNum+"&TopicNum
conn.execute(sql)
end function
'所有论坛发帖数减少
function AllboardNumSub(todayNum,postNum,topicNum)
sql="update config set TodayNum=todayNum-"&todaynum&",BbsNum=bbsNum-"&postNum&",TopicNum=topicNum-"&TopicNum
conn.execute(sql)
end function
'判断是否为帖子最后回复
function isLastPost()
Dim LastTopic,body,LastRootid,LastPostTime,LastPostUser
Dim LastPost,uploadpic_n,LastPostUserID,LastID
isLastPost=false
'取得当前主题最后回复id
sql="select LastPost from topic where topicid="&id
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
if not isnull(rs(0)) and rs(0)<>"" then
if Clng(split(rs(0),"$")(1))=Clng(replyid) then isLastPost=true
end if
end if
if isLastPost then
sql="select top 1 topic,body,Announceid,dateandtime,username,PostUserid,rootid,boardid from "&TotalUseTable&" where rootid="&id&" and locktopic<2 order by Announceid desc"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
body=rs(1)
LastRootid=rs(2)
LastPostTime=rs(3)
LastPostUser=replace(rs(4),"$","")
LastTopic=left(replace(body,"$",""),20)
LastPostUserID=rs(5)
LastID=rs(6)
BoardID=rs(7)
else
LastTopic="无"
LastRootid=0
LastPostTime=now()
LastPostUser="无"
LastPostUserID=0
LastID=0
BoardID=0
end if
set
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -