📄 indivgroup_postmanage.asp
字号:
Set Rs=Dvbbs.Execute("Select Title From Dv_Group_Topic Where GroupID="&Dv_IndivGroup_MainClass.ID&" And BoardID="&BoardID&" And TopicID="&LastRootid)
Lasttopic=Replace(Left(Rs(0),15),"$","")
Else
LastTopic="无"
LastRootID=0
LastPostTime=now()
LastPostUser="无"
LastPostUserID=0
LastID=0
End If
Rs.Close:Set Rs=Nothing
LastPost=LastPostUser & "$" & LastRootID & "$" & LastPostTime & "$" & LastTopic & "$" & uploadpic_n & "$" & LastPostUserID & "$" & LastID & "$" & BoardID
Dvbbs.Execute("update Dv_Group_board set LastPost='"&LastPost&"' where RootID="&Dv_IndivGroup_MainClass.ID&" And ID="&Dv_IndivGroup_MainClass.BoardID)
End Function
'版面发帖数增加
Public Sub BoardNumAdd(boardID,topicNum,postNum,todayNum)
Dvbbs.Execute("update Dv_Group_board set postnum=postnum+"&postNum&",topicNum=topicNum+"&topicNum&",todayNum=todayNum+"&todayNum&" where RootID="&Dv_IndivGroup_MainClass.ID&" And ID="&Dv_IndivGroup_MainClass.BoardID)
End Sub
'版面发帖数减少
Public Sub BoardNumSub(boardID,topicNum,postNum,todayNum)
Dvbbs.Execute("update Dv_Group_board set postnum=postnum-"&postNum&",topicNum=topicNum-"&topicNum&",todayNum=todayNum-"&todayNum&" where RootID="&Dv_IndivGroup_MainClass.ID&" And ID="&Dv_IndivGroup_MainClass.BoardID)
End Sub
'所有论坛发帖数增加
Public Function AllboardNumAdd(todayNum,postNum,topicNum)
Dvbbs.Execute("Update dv_GroupName Set TodayNum=todayNum+"&todaynum&",PostNum=PostNum+"&postNum&",TopicNum=topicNum+"&TopicNum&" where ID="&Dv_IndivGroup_MainClass.ID)
End Function
'所有论坛发帖数减少
Public Function AllboardNumSub(todayNum,postNum,topicNum)
Dvbbs.Execute("Update dv_GroupName Set TodayNum=todayNum-"&todaynum&",PostNum=PostNum-"&postNum&",TopicNum=topicNum-"&TopicNum&" where ID="&Dv_IndivGroup_MainClass.ID)
End Function
Private Function SucMsgInfo(GetMsg)
SucMsgInfo="<li>"+GetMsg
SucMsgInfo=SucMsgInfo+"<li>"+"<a href=IndivGroup_index.asp?GroupID="&Dv_IndivGroup_MainClass.ID&"&groupboardid="&Dv_IndivGroup_MainClass.BoardID&">返回评论列表</a>"
If LCase(Request("action"))<>"deletetopic" Then
SucMsgInfo=SucMsgInfo+"<li>"+"<a href=IndivGroup_Dispbbs.asp?GroupID="&Dv_IndivGroup_MainClass.ID&"&groupboardid="&Dv_IndivGroup_MainClass.BoardID&"&id="&TopicID&" >返回评论:《"&server.htmlencode(Topic)&"》</a>"
End If
End Function
'锁定帖子
Public Sub lock()
Dvbbs.Execute("Update Dv_Group_topic Set locktopic=1 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" And topicID="&TopicID)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'解除锁定帖子
Public Sub unchainlock()
Dvbbs.Execute("Update Dv_Group_topic Set locktopic=0 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" And topicID="&TopicID)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'固顶帖子
Public Sub SetTop()
Dvbbs.Execute("update Dv_Group_topic set istop=1 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and topicID="&TopicID)
BoardNumSub Dv_IndivGroup_MainClass.BoardID,1,0,0
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'解除固顶
Public Sub UnchainTop()
Dvbbs.Execute("update Dv_Group_topic set istop=0 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and topicID="&TopicID)
BoardNumAdd Dv_IndivGroup_MainClass.BoardID,1,0,0
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'单帖屏蔽帖子
Public Sub lockpage()
Dvbbs.Execute("Update Dv_Group_BBS Set LockTopic=2 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and announceID="&replyID)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'解除单帖屏蔽帖子
Public Sub unchainlockpage()
Dvbbs.Execute("Update Dv_Group_BBS set LockTopic=0 Where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and announceID="&replyID)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
Public Sub fixtopic()
Dim UseTools
Set Rs=dvbbs.Execute("select UseTools from Dv_Group_topic where BoardID="&Dv_IndivGroup_MainClass.BoardID&" And topicid="&TopicID)
UseTools=Rs(0)
Set Rs = Dvbbs.Execute("SELECT COUNT(*), MAX(DateAndTime) FROM Dv_Group_BBS WHERE GroupID="&Dv_IndivGroup_MainClass.ID&" And BoardID = " & Dv_IndivGroup_MainClass.BoardID & " AND RootID = " & TopicID)
If Not IsNull(rs(0)) And Not IsNull(rs(1)) Then
If InStr("," & UseTools & ",",",13,")>0 Or InStr("," & UseTools & ",",",14,")>0 Then
Dvbbs.Execute("update Dv_Group_topic set child="&Rs(0)-1&" where GroupID="&Dv_IndivGroup_MainClass.ID&" And topicID="&TopicID)
Else
Dvbbs.Execute("update Dv_Group_topic set child="&Rs(0)-1&",LastPostTime='"&rs(1)&"' where GroupID="&Dv_IndivGroup_MainClass.ID&" And topicID="&TopicID)
End If
Set Rs=Nothing
End If
FixLastPost
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'精华帖子
Public Sub setbest()
Dvbbs.Execute("Update Dv_Group_BBS Set isbest=1 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and announceID="&replyID)
Dvbbs.Execute("Update Dv_Group_topic Set isbest=1 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and topicID="&TopicID)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'解除精华帖子
Public Sub unchainbest()
Dvbbs.Execute("Update Dv_Group_BBS set isbest=0 Where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and announceID="&replyID)
Dvbbs.Execute("Update Dv_Group_topic set isbest=0 Where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardID="&Dv_IndivGroup_MainClass.BoardID&" and topicID="&TopicID)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
'删除跟贴
Public Sub DeletePost(md)
Dim todaynum
Dim isbest,IsUpload
todaynum=0
Set Rs=Dvbbs.Execute("select topic,username,postuserID,DateAndTime,isbest,IsUpload from Dv_Group_BBS where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardid="&Dv_IndivGroup_MainClass.BoardID&" and AnnounceID="&replyID)
If Not Rs.Eof Then
Topic=Dvbbs.CheckStr(Rs(0))
topicusername=rs(1)
topicuserID=rs(2)
isbest=rs(4)
If topic="" Then topic="本帖子为回复帖子"
If datediff("d",rs(3),now())=0 Then
todaynum=1
Else
todaynum=0
End If
Else
If md=1 Then
Dvbbs.AddErrCode(32)
Exit Sub
End If
End If
Set Rs=Nothing
Dim LastPostime,istop
'删除时自动删除精华回复帖
If IsBest=1 Then Dvbbs.Execute("update Dv_Group_topic set isbest=0 where GroupID="&Dv_IndivGroup_MainClass.ID&" And boardid="&Dv_IndivGroup_MainClass.BoardID&" and topicid="&TopicID)
Dvbbs.Execute("Update Dv_Group_BBS Set BoardID=-1,locktopic="&Dv_IndivGroup_MainClass.BoardID&" Where GroupID="&Dv_IndivGroup_MainClass.ID&" And BoardID="&Dv_IndivGroup_MainClass.BoardID&" And AnnounceID="&replyID)
Set Rs=Dvbbs.Execute("select Max(dateandtime) from Dv_Group_BBS where boardID="&Dv_IndivGroup_MainClass.BoardID&" and rootID="&TopicID)
LastPostime=rs(0)
Rs.Close:Set Rs=Nothing
isLastPost
call LastCount(Dv_IndivGroup_MainClass.BoardID)
call BoardNumSub(Dv_IndivGroup_MainClass.BoardID,0,1,todaynum)
call AllboardNumSub(todaynum,1,0)
Dvbbs.ReloadBoardInfo(UpdateBoardID)
sql="update Dv_Group_topic set child=child-1,LastPostTime='"&LastPostime&"' where boardID="&Dv_IndivGroup_MainClass.BoardID&" and topicID="&TopicID
'Response.Write sql
Dvbbs.Execute(sql)
If md=1 Then
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End If
End Sub
'删除主贴
Public Sub DeleteTopic()
Dim todaynum,postnum
Set Rs=Dvbbs.Execute("select count(*) from Dv_Group_BBS where GroupID="&Dv_IndivGroup_MainClass.ID&" And rootID="&TopicID)
postNum=Rs(0)
If IsSqlDataBase=1 Then
sql="select count(*) from Dv_Group_BBS where GroupID="&Dv_IndivGroup_MainClass.ID&" And rootID="&TopicID&" and dateandtime>'"&date()&"'"
else
sql="select count(*) from Dv_Group_BBS where GroupID="&Dv_IndivGroup_MainClass.ID&" And rootID="&TopicID&" and dateandtime>#"&date()&"#"
end if
Set Rs=Dvbbs.Execute(sql)
todayNum=rs(0)
'放入回收站,回收站boardid为-1,locktopic为原版面ID
Dvbbs.Execute("update Dv_Group_BBS set BoardID=-1,locktopic="&Dv_IndivGroup_MainClass.BoardID&" where GroupID="&Dv_IndivGroup_MainClass.ID&" And RootID="&TopicID)
Dvbbs.Execute("update Dv_Group_topic set BoardID=-1,locktopic="&Dv_IndivGroup_MainClass.BoardID&",isbest=0,istop=0 where GroupID="&Dv_IndivGroup_MainClass.ID&" And topicid="&TopicID)
call LastCount(Dv_IndivGroup_MainClass.BoardID)
call BoardNumSub(Dv_IndivGroup_MainClass.BoardID,1,postNum,todayNum)
call AllboardNumSub(todayNum,postNum,1)
sucmsg=ActionInfo&"《"&Server.htmlencode(topic)&"》"
Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -