⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_postings.asp

📁 公司企业网站管理系统全站源码,用于企业内部对网站的管理
💻 ASP
📖 第 1 页 / 共 5 页
字号:
				Next
				BoardJump = BoardJump & "  ├"
			End If
			BoardJump = BoardJump & rs(1)
			BoardJump = BoardJump & "</option>"
			Rs.MoveNext
			Loop
			Set Rs=Nothing
			TempStr = Replace(TempStr,"{$boardselected}",BoardJump)
			If Not CanTopTopic_a Then TempStr = Replace(TempStr,"{$checkbox1}","disabled")
			If IsTop = 3 Then TempStr = Replace(TempStr,"{$checkbox1}","checked")
			TempStr = Replace(TempStr,"{$checkbox1}","")
			TempStr = Replace(TempStr,"{$title}",Dvbbs.htmlencode(Request.form("title")))
			TempStr = Replace(TempStr,"{$msgcontent}",Dvbbs.htmlencode(Request.form("content")))
			TempStr = Replace(TempStr,"{$doWealth}",doWealth)
			TempStr = Replace(TempStr,"{$dousercp}",dousercp)
			TempStr = Replace(TempStr,"{$douserep}",douserep)
			TempStr = Replace(TempStr,"{$msg}",Request.form("msg"))
			TempStr = Replace(TempStr,"{$ismsg}",Request.form("ismsg"))
			If Dvbbs.GroupSetting(21)="1" Then TempStr = Replace(TempStr,"{$boardtop}","√")
			TempStr = Replace(TempStr,"{$boardtop}","<font color=red>×</font>")
			If Dvbbs.GroupSetting(54)="1" Then TempStr = Replace(TempStr,"{$areatop}","√")
			TempStr = Replace(TempStr,"{$areatop}","<font color=red>×</font>")
			If Dvbbs.GroupSetting(38)="1" Then TempStr = Replace(TempStr,"{$alltop}","√")
			TempStr = Replace(TempStr,"{$alltop}","<font color=red>×</font>")
			Response.Write TempStr
		End If
	End Sub

	'单帖屏蔽帖子
	Public Sub islockpage()
		LogType=5
		Get_RequestInfo
		Dvbbs.Execute("Update "&TotalUseTable&" Set LockTopic=2 where boardID="&Dvbbs.BoardID&" and announceID="&replyID)
		GetUserID
		Insert_Forum_Log()
		Update_User_Point("")
		Topic_Manage_Sms()
		Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
	End Sub
	Sub GetUserID()
		Dim Rs
		Set Rs=Dvbbs.Execute("Select PostUserid,UserName From "&TotalUseTable&" Where Boardid="&Dvbbs.boardid&" and announceID="&replyID&"")
		If Not Rs.EOF Then
			TopicUserID=Rs(0)
			TopicUsername=Rs(1)
		End If 
		Set Rs=Nothing	
	End Sub 
	'解除单帖屏蔽帖子
	Public Sub nolockpage()
		LogType=3
		Get_RequestInfo
		Dvbbs.Execute("Update "&TotalUseTable&" set LockTopic=0 Where boardID="&Dvbbs.BoardID&" and announceID="&replyID)
		GetUserID
		Insert_Forum_Log()
		Update_User_Point("")
		Topic_Manage_Sms()
		Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
	End Sub

	Public Sub fixtopic()
		Dim UseTools
		Set Rs=dvbbs.Execute("select UseTools from Dv_topic where BoardID="&Dvbbs.BoardID&" And topicid="&ID)
		UseTools=Rs(0)
		LogType=3
		'Get_RequestInfo
		sucmsg="修复帖子"
		Set Rs = Dvbbs.Execute("SELECT COUNT(*), MAX(DateAndTime) FROM " & TotalUseTable & " WHERE BoardID = " & Dvbbs.BoardID & " AND RootID = " & ID)
		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_topic set child="&Rs(0)-1&" where topicID="&ID)
			Else
				Dvbbs.Execute("update dv_topic set child="&Rs(0)-1&",LastPostTime='"&rs(1)&"' where topicID="&ID)
			End If
			Set Rs=Nothing
		End If
		FixLastPost
		Insert_Forum_Log()
		Update_User_Point("")
		Topic_Manage_Sms()
		Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
	End Sub
	'精华帖子
	Public Sub isbest()
		LogType=3
		Dim datetimestr
		Get_RequestInfo
		Set Rs = Dvbbs.Execute("Select * From Dv_BestTopic Where boardid="&dvbbs.boardid&" and AnnounceID="&replyID)
		If Not (Rs.Eof or Rs.Bof) Then
			Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
			Exit Sub
		End If

		Set rs=Dvbbs.Execute("Select * From "&TotalUseTable&" Where boardid="&dvbbs.boardid&" and AnnounceID="&replyID)
		If rs.eof and rs.bof Then
			Dvbbs.AddErrCode(32)
			Exit Sub
		End If

		topic=rs("topic")
		topicusername=rs("username")
		topicuserID=rs("postuserID")
		If topic="" Then topic=left(replace(rs("body"),chr(10),","),26)
		datetimestr=replace(replace(rs("dateandtime"),"上午",""),"下午","")

		Dvbbs.Execute("Update "&TotalUseTable&" Set isbest=1 where boardID="&Dvbbs.BoardID&" and announceID="&replyID)
		Dvbbs.Execute("Update Dv_topic Set isbest=1 where boardID="&Dvbbs.BoardID&" and topicID="&ID)
		Dvbbs.Execute("Insert Into Dv_bestTopic (title,boardID,AnnounceID,rootID,postusername,postuserID,dateandtime,expression) values ('"&Dvbbs.CheckStr(topic)&"',"&rs("boardID")&","&rs("AnnounceID")&","&rs("rootID")&",'"&Dvbbs.CheckStr(topicusername)&"',"&rs("postuserID")&",'"&datetimestr&"','"&rs("expression")&"')")
		
		Set Rs=Nothing

		Insert_Forum_Log()
		Update_User_Point(",userIsBest=userisBest+1")
		Topic_Manage_Sms()
		Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
	End Sub
	'解除精华帖子
	Public Sub nobest()
		LogType=3
		Dim datetimestr
		Get_RequestInfo
		Set Rs = Dvbbs.Execute("Select * From Dv_BestTopic Where boardid="&dvbbs.boardid&" and AnnounceID="&replyID)
		If Rs.Eof or Rs.Bof Then
			Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
			Exit Sub
		End If
		Set rs=Dvbbs.Execute("Select * From "&TotalUseTable&" Where boardid="&dvbbs.boardid&" and AnnounceID="&replyID)
		If rs.eof and rs.bof Then
			Dvbbs.AddErrCode(32)
			Exit Sub
		End If
		topic=rs("topic")
		topicusername=rs("username")
		topicuserID=rs("postuserID")
		If topic="" Then topic="本帖子为回复帖子"
		Set Rs=Nothing

		Dvbbs.Execute("Update "&TotalUseTable&" set isbest=0 Where boardID="&Dvbbs.BoardID&" and announceID="&replyID)
		Dvbbs.Execute("Update Dv_topic set isbest=0 Where boardID="&Dvbbs.BoardID&" and topicID="&ID)
		Dvbbs.Execute("Delete from Dv_besttopic Where AnnounceID="&replyID)

		Insert_Forum_Log()
		Update_User_Point(",userIsBest=userisBest-1")
		Topic_Manage_Sms()
		Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
	End Sub

	'删除跟贴
	Public Sub dele(md)
		Dim todaynum
		Dim isbest,IsUpload
		todaynum=0
		Set rs=Dvbbs.Execute("select topic,username,postuserID,DateAndTime,isbest,IsUpload from "&TotalUseTable&" where boardid="&dvbbs.boardid&" and AnnounceID="&replyID)
		If Not rs.eof Then
			Topic=Dvbbs.CheckStr(rs(0))
			topicusername=rs(1)
			topicuserID=rs(2)
			isbest=rs(4)
			IsUpload=rs(5)
			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
		
		'判断用户是否有删除帖子权限
		If Not CanDelTopic Then
			Dvbbs.AddErrCode(28)
			Exit Sub
		End If
		LogType=3
		Get_RequestInfo
		Dim LastPostime,istop
		'删除时自动删除精华回复帖
		If IsBest=1 Then
			Dvbbs.Execute("update dv_topic set isbest=0 where boardid="&Dvbbs.BoardID&" and topicid="&ID)
			Dvbbs.Execute("delete from dv_besttopic where Announceid="&replyID)
		End If
		Set Rs=Dvbbs.Execute("select istop from dv_topic where boardID="&Dvbbs.BoardID&" and topicID="&ID)
		istop=Rs(0)
		Rs.close
		Dvbbs.Execute("Update "&TotalUseTable&" Set BoardID=444,locktopic="&Dvbbs.BoardID&" Where BoardID="&Dvbbs.BoardID&" And AnnounceID="&replyID)
		Set Rs=Dvbbs.Execute("select Max(dateandtime) from "&TotalUseTable&" where boardID="&Dvbbs.BoardID&" and rootID="&ID)
		LastPostime=rs(0)
		Set Rs=Nothing
		isLastPost
		call LastCount(dvbbs.boardID)
		call BoardNumSub(dvbbs.boardID,0,1,todaynum)
		call AllboardNumSub(todaynum,1,0)
		Dvbbs.ReloadBoardInfo(UpdateBoardID)
		If IsUpload=1 Then
			If Request.form("delupfile")<>"" and Request.form("delupfile")=1 Then
				Call Delupfiles(Dvbbs.BoardID,ID&"|"&replyID)
			Else
			'更新上传附件数据
			Dvbbs.Execute("update Dv_Upfile Set F_flag=4 Where F_BoardID="&Dvbbs.BoardID&" And F_AnnounceID LIKE  '"&ID&"|"&replyID&"' ")
			End If
		End IF

		If istop>0 Then
			sql="update dv_topic set child=child-1 where boardID="&Dvbbs.BoardID&" and topicID="&ID
		Else
			sql="update dv_topic set child=child-1,LastPostTime='"&LastPostime&"' where boardID="&Dvbbs.BoardID&" and topicID="&ID
		End If
		'Response.Write sql
		Dvbbs.Execute(sql)
		Insert_Forum_Log()
		Update_User_Point(",UserPost=UserPost-1,userDel=userDel-1")
		Topic_Manage_Sms()
		If md=1 Then
			Dvbbs.Dvbbs_Suc(SucMsgInfo(sucmsg))
		End If 
	End Sub
	'删除主贴
	Public Sub delete()
		Dim voteID,isvote,isbest,istop
		Dim UpBoardID
		set rs=Dvbbs.Execute("select title,postusername,postuserID,PollID,isvote,isbest,istop from dv_topic where boardid="&Dvbbs.boardid&" and topicID="&ID)
		If rs.eof and rs.bof Then
			Dvbbs.AddErrCode(32)
			Exit Sub
		Else
			Topic=rs(0)
			topicusername=rs(1)
			topicuserID=rs(2)
			voteID=rs(3)
			isvote=rs(4)
			isbest=rs(5)
			istop=rs(6)
			If topic="" Then topic="本帖子为回复帖子"
		End If
		Set Rs=Nothing
		LogType=3
		Get_RequestInfo

		Dim todaynum,postnum
		set rs=Dvbbs.Execute("select count(*) from "&TotalUseTable&" where rootID="&ID)
		postNum=rs(0)
		If IsSqlDataBase=1 Then
			sql="select count(*) from "&TotalUseTable&" where rootID="&ID&" and dateandtime>'"&date()&"'"
		else
			sql="select count(*) from "&TotalUseTable&" where rootID="&ID&" and dateandtime>#"&date()&"#"
		end if
		Set Rs=Dvbbs.Execute(sql)
		todayNum=rs(0)
	
		'放入回收站,回收站boardid为444,locktopic为原版面ID
		Dvbbs.Execute("update "&TotalUseTable&" set BoardID=444,locktopic="&Dvbbs.BoardID&" where rootID="&ID)
		If isvote=1 Then
			Dvbbs.Execute("update dv_topic set BoardID=444,locktopic="&Dvbbs.BoardID&",isvote=0,VoteTotal=0 where topicID="&ID)
			Dvbbs.Execute("delete from dv_vote where voteID="&voteID)
			Dvbbs.Execute("delete from dv_voteuser where voteID="&voteID)
		'删帖时自动解除精华帖子
		ElseIf isbest=1 Then
			Dvbbs.Execute("update dv_topic set BoardID=444,locktopic="&Dvbbs.BoardID&",isbest=0 where topicid="&id)
			Dvbbs.Execute("delete from dv_besttopic where rootid="&id)
		Else
			Dvbbs.Execute("update dv_topic set BoardID=444,locktopic="&Dvbbs.BoardID&" where topicID="&ID)
		End If
		If istop>0 Then
			Dvbbs.Execute("update dv_topic set istop=0,LastPostTime="&SqlNowString&" where topicid="&ID)
			If istop=3 Then
				'将总固顶ID从总设置表去除
				Set Rs=Dvbbs.Execute("Select Forum_AllTopNum From Dv_Setup")
				Dim iForum_AllTopNum,mForum_AllTopNum
				iForum_AllTopNum = "," & Rs(0) & ","
				If Instr(iForum_AllTopNum,"," & ID & ",")>0 Then
					iForum_AllTopNum = Split(iForum_AllTopNum,",")
					For i=1 To Ubound(iForum_AllTopNum)-1
						If Cstr(Trim(iForum_AllTopNum(i)))<>Cstr(ID) Then
							If mForum_AllTopNum="" Then
								mForum_AllTopNum = iForum_AllTopNum(i)
							Else
								mForum_AllTopNum = mForum_AllTopNum & "," & iForum_AllTopNum(i)
							End If
						End If
					Next
					Dvbbs.Execute("Update Dv_Setup Set Forum_AllTopNum='"&mForum_AllTopNum&"'")
					Dvbbs.ReloadSetupCache mForum_AllTopNum,28
				End If
				Set Rs=Nothing
			Else
				'将固顶贴ID从版面表中去除
				'查询得出原来该贴所固顶的版面
				Dim BoardTopStr,iBoardTopStr
				Set Rs=Dvbbs.Execute("Select BoardID,BoardTopStr From Dv_Board Where BoardTopStr Like '%"&ID&"%'")
				Do While Not Rs.Eof
					UpBoardID = UpBoardID & Rs(0) &","
					If Rs(1)="" Or IsNull(Rs(1)) Then
						iBoardTopStr = ""
					Else
						If InStr(","&Rs(1)&",",","&ID&",")>0 Then
							BoardTopStr = "," & Rs(1) & ","
							BoardTopStr = Split(BoardTopStr,",")
							For i = 1 To Ubound(BoardTopStr)-1
								If Cstr(Trim(BoardTopStr(i)))<>Cstr(ID) Then
									If iBoardTopStr="" Then
										iBoardTopStr = BoardTopStr(i)
									Else
										iBoardTopStr = iBoardTopStr & "," & BoardTopStr(i)
									End If
								End If								
							Next
						Else
							iBoardTopStr = Rs(1)
						End If
					End If
					Dvbbs.Execute("Update Dv_Board Set BoardTopStr='"&iBoardTopStr&"' Where BoardID="&Rs(0))
					BoardTopStr = ""
					iBoardTopStr = ""
				Rs.Movenext
				Loop
				Set Rs=Nothing
				Dvbbs.ReloadBoardInfo(UpBoardID&Dvbbs.Boardid)
			End If
		End If
		If  Request.form("delupfile")="1" Then
			Call Delupfiles(Dvbbs.BoardID,ID&"|")
		Else
			'上传文件数据更新
			Dvbbs.Execute("update Dv_Upfile Set F_flag=4 Where F_BoardID="&Dvbbs.BoardID&" And F_AnnounceID LIKE  '"&ID&"|"&"%' ")
		End IF
		call LastCount(dvbbs.boardID)
		call BoardNumSub(dvbbs.boardID,1,postNum,todayNum)
		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -