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

📄 admin_postings.asp

📁 品泡女人香XI8.NET文章管理系统的源码
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="Conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/dv_clsother.asp" -->
<%
Dim FA
Dvbbs.LoadTemplates("fmanage")
Dvbbs.Stats=template.Strings(0)
Dvbbs.Nav()
Dvbbs.Showerr()
If Dvbbs.BoardID=0 Then
	Dvbbs.AddErrCode(29)
	Dvbbs.showerr()
End If
'修改权限判断已经在主类核心自动完成。
Dvbbs.Head_var 1,Dvbbs.Board_Data(4,0),"",""
Set FA=New Dv_Forum_Admin
FA.main
Dvbbs.ActiveOnline()
Set Fa=Nothing
Dvbbs.Footer()

Class Dv_Forum_Admin
	Public IP,ID,replyID,ActionInfo,Topic,Content,AllMsg,TopicUserID,TopicUsername,TotalUseTable
	Public doWealth,douserCP,douserEP,UpdateBoardID,UpdateBoardID_1
	Public Rs,SQL,i
	Private LocalCanLockTopic,LocalCanDelTopic,LocalCanMoveTopic,LocalCanTopTopic,LocalCanBestTopic,LocalCanAwardTopic,LocalCanTopTopic_a,LocalCanTopTopic_m,LocalCanTopicMode
	Public title,sucmsg,LogType
	Public Lasttopic,Lastpost
	Public lastrootID,lastpostuser

	Private Sub Class_Initialize()
	Dim doWealthMsg,douserEPMsg,douserCPMsg
	IP			=	Dvbbs.UserTrueIP
	LocalCanLockTopic	=	False
	LocalCanDelTopic	=	False
	LocalCanMoveTopic	=	False
	LocalCanTopTopic	=	False
	LocalCanBestTopic	=	False
	LocalCanAwardTopic	=	False
	LocalCanTopTopic_a	=	False
	LocalCanTopTopic_m	=	False
	LocalCanTopicMode	=	False
	'本论坛和上级论坛ID
	UpdateBoardID	=	Dvbbs.Board_Data(3,0) & "," & Dvbbs.BoardID
	doWealth		=	0
	douserEP		=	0
	douserCP		=	0
	doWealthMsg		=	""
	allmsg			=	"没有对用户进行分值操作"
		If Dvbbs.UserID=0 Then Dvbbs.AddErrCode(34)
		ID=Request("ID")
		If ID="" or IsNumeric(ID)=0 Then
			Dvbbs.AddErrCode(30)
		Else
			ID=Clng(ID)
		End If
		If IsNumeric(Request("replyID")) and Request("replyID")<>"" Then replyID=Request("replyID")

		
		If IsNumeric(Request("doWealth")) And Not (Request("doWealth")="0" or Request("doWealth")="") Then
			doWealth=Request("doWealth")
			doWealthMsg="金钱" & Request("doWealth") & ","
		End If
		If IsNumeric(Request("douserEP")) And Not (Request("douserEP")="0" or Request("douserEP")="") Then
			douserEP=Request("douserEP")
			douserEPMsg="经验" & Request("douserEP") & ","
		End If
		If IsNumeric(Request("douserCP")) And Not (Request("douserCP")="0" or Request("douserCP")="") Then
			douserCP=Request("douserCP")
			douserCPMsg="魅力" & Request("douserCP")
		End If
		If Not (doWealthMsg="" And douserEPMsg="" And douserCPMsg="") Then allmsg="用户操作:" & doWealthMsg & douserEPMsg & douserCPMsg

		If Dvbbs.ErrCodes<>"" Then Dvbbs.ShowErr

		Set Rs=Dvbbs.Execute("Select Title,Postusername,PostuserID,PostTable From Dv_Topic Where boardid="&dvbbs.boardid&" and TopicID="&ID)
		If Rs.Eof And Rs.Bof Then
			Dvbbs.AddErrCode(32)
		Else
			Topic=rs(0)
			Topicusername=rs(1)
			TopicuserID=Clng(rs(2))
			TotalUseTable=rs(3)
		End If
		Set Rs=Nothing			
		If Dvbbs.ErrCodes<>"" Then Dvbbs.ShowErr		
	End Sub
	'判断用户是否有专题管理操作权限
	Public Property Get CanTopicMod()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(65))=1 Then
			CanTopicMode=True
		End If
		If Cint(Dvbbs.GroupSetting(19))=1 and Dvbbs.UserGroupID>3 Then 
			LocalCanTopicMod=True
		End If
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(65))=1 and TopicUserID=Dvbbs.Userid Then
			LocalCanTopicMod=True
		Else
			LocalCanTopicMod=False
		End If
		CanTopicMod=LocalCanTopicMod
	End Property
	'判断用户是否有锁定/解除锁定权限
	Public Property Get CanLockTopic()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(20))=1 Then LocalCanLockTopic=True
		If Cint(Dvbbs.GroupSetting(20))=1 and Dvbbs.UserGroupID>3 Then LocalCanLockTopic=True
		If (Cint(Dvbbs.GroupSetting(13))=1 and TopicUsername=Dvbbs.MemberName) Then LocalCanLockTopic=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(13))=1 and TopicUsername=Dvbbs.MemberName Then
			LocalCanLockTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(13))=0 and TopicUsername=Dvbbs.MemberName Then
			LocalCanLockTopic=False
		End If
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(20))=1 and TopicUsername<>Dvbbs.MemberName Then
			LocalCanLockTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(20))=0 and TopicUsername<>Dvbbs.MemberName Then
			LocalCanLockTopic=False
		End If		
		CanLockTopic=LocalCanLockTopic
	End Property
	'判断用户是否有移动帖子权限
	Public Property Get CanMoveTopic()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(19))=1 Then LocalCanMoveTopic=True
		If Cint(Dvbbs.GroupSetting(19))=1 and Dvbbs.UserGroupID>3 Then LocalCanMoveTopic=True
		If (Cint(Dvbbs.GroupSetting(12))=1 and TopicUsername=Dvbbs.MemberName) Then LocalCanMoveTopic=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(12))=1 and TopicUsername=Dvbbs.MemberName Then
			LocalCanMoveTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(12))=0 and TopicUsername=Dvbbs.MemberName Then
			LocalCanMoveTopic=False
		End If
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(19))=1 and TopicUsername<>Dvbbs.MemberName Then
			LocalCanMoveTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(19))=0 and TopicUsername<>Dvbbs.MemberName Then
			LocalCanMoveTopic=False
		End If		
		CanMoveTopic=LocalCanMoveTopic
	End Property	
	'判断用户是否有删除帖子权限
	Public Property Get CanDelTopic()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(18))=1 Then LocalCanDelTopic=True
		If Cint(Dvbbs.GroupSetting(18))=1 and Dvbbs.UserGroupID>3 Then LocalCanDelTopic=True
		If (Cint(Dvbbs.GroupSetting(11))=1 and TopicUsername=Dvbbs.MemberName) Then LocalCanDelTopic=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(11))=1 and TopicUsername=Dvbbs.MemberName Then
			LocalCanDelTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(11))=0 and TopicUsername=Dvbbs.MemberName Then
			LocalCanDelTopic=False
		End If
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(18))=1 and TopicUsername<>Dvbbs.MemberName Then
			LocalCanDelTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(18))=0 and TopicUsername<>Dvbbs.MemberName Then
			LocalCanDelTopic=False
		End If
		CanDelTopic=LocalCanDelTopic
	End Property
	'判断用户是否有固顶/解除固顶帖子权限
	Public Property Get CanTopTopic()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(21))=1 Then LocalCanTopTopic=True
		If Cint(Dvbbs.GroupSetting(21))=1 and Dvbbs.UserGroupID>3 Then LocalCanTopTopic=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(21))=1 Then
			LocalCanTopTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(21))=0 Then
			LocalCanTopTopic=False
		End If
		CanTopTopic=LocalCanTopTopic
	End Property	
	'判断用户是否有总固顶帖子权限
	Public Property Get CanTopTopic_a()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(38))=1 Then LocalCanTopTopic_a=True
		If Cint(Dvbbs.GroupSetting(38))=1 and Dvbbs.UserGroupID>3 Then LocalCanTopTopic_a=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(38))=1 Then
			LocalCanTopTopic_a=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(38))=0 Then
			LocalCanTopTopic_a=False
		End If
		CanTopTopic_a=LocalCanTopTopic_a
	End Property	
	'判断用户是否有区域固顶帖子权限
	Public Property Get CanTopTopic_m()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(54))=1 Then LocalCanTopTopic_m=True
		If Cint(Dvbbs.GroupSetting(54))=1 and Dvbbs.UserGroupID>3 Then LocalCanTopTopic_m=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(54))=1 Then
			LocalCanTopTopic_m=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(54))=0 Then
			LocalCanTopTopic_m=False
		End If
		CanTopTopic_m=LocalCanTopTopic_m
	End Property
	'判断用户是否有加入/解除精华帖子权限
	Public Property Get CanBestTopic()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(24))=1 Then LocalCanBestTopic=True
		If Cint(Dvbbs.GroupSetting(24))=1 and Dvbbs.UserGroupID>3 Then LocalCanBestTopic=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(24))=1 Then
			LocalCanBestTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(24))=0 Then
			LocalCanBestTopic=False
		End If
		CanBestTopic=LocalCanBestTopic
	End Property
	'判断用户是否有奖励/惩罚帖子权限
	Public Property Get CanAwardTopic()
		If (dvbbs.master or dvbbs.superboardmaster or dvbbs.boardmaster) and Cint(Dvbbs.GroupSetting(22))=1 Then LocalCanAwardTopic=True
		If Cint(Dvbbs.GroupSetting(22))=1 and Dvbbs.UserGroupID>3 Then LocalCanAwardTopic=True
		If Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(22))=1 Then
			LocalCanAwardTopic=True
		ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(22))=0 Then
			LocalCanAwardTopic=False
		End If
		CanAwardTopic=LocalCanAwardTopic
	End Property
	Public Function Main()	
		If Not Dvbbs.ChkPost() Then Dvbbs.AddErrCode(42):Dvbbs.Showerr()
		Select Case Request("action")
		Case "修复"
			If Dvbbs.userid=0 Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="修复帖子"
				fixtopic()
			End If
		Case "lock"
			If not CanLockTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="锁定帖子"
				lock()
			End If
		Case "unlock"
			If not CanLockTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="解除锁定"
				unlock()
			End If
		Case "uptopic"
			If Not CanLockTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="提升帖子"
				uptopic()
			End If
		Case "move"
			If not CanMoveTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="移动帖子"
				Tmove()
			End If
		Case "copy"
			ActionInfo="复制帖子"
			copy()
		Case "istop"
			If CanTopTopic Or CanTopTopic_a Or CanTopTopic_m Then
				ActionInfo="固顶帖子"
				Getistop()
			Else
				Dvbbs.AddErrCode(28)
			End If
		Case "delet"
			If not CanDelTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="删除帖子"
				delete()
			End If
		Case "dele"
			ActionInfo="删除帖子"
			dele(1)

		Case "islockpage"
			If not CanBestTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="单帖屏蔽"
				islockpage()
			End If
		Case "nolockpage"
			If not CanBestTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="解除屏蔽"
				nolockpage()
			End If
		Case "isbest"
			If not CanBestTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="精华帖子"
				isbest()
			End If
		Case "nobest"
			If not CanBestTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="解除精华"
				nobest()
			End If
		Case "award"
			If not CanAwardTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="奖励用户"
				award()
			End If
		Case "punish"
			If not CanAwardTopic Then
				Dvbbs.AddErrCode(28)
			Else
				ActionInfo="惩罚用户"
				punish()
			End If
		Case "TopicMode"
			ActionInfo="专题管理"
			If not CanMoveTopic Then Dvbbs.AddErrCode(28)
			TopicMode()
		Case "delre"
			ActionInfo="批量删除跟贴"
			Call delre()
		Case Else		
			main_a()
		End Select
		If Dvbbs.ErrCodes<>"" Then Dvbbs.ShowErr()
	End Function
	'批量删除跟贴
	Private Sub delre()
		Check_topicInfo()
		If Dvbbs.ErrCodes<>"" Then Exit Sub
		'判断用户是否有删除帖子权限
		If Not CanDelTopic Then Dvbbs.AddErrCode(28)
		Dim DelID,j,i
		j=0
		DelID=Request("DelID")
		If delid="" Then
			Dvbbs.AddErrCode(35)
			Exit Sub
		End If
		delid=Split(delid,",")
		For i = 0 to UBound(delid)
			If Trim(delid(i))<>"" and IsNumeric(Trim(delid(i))) Then
				j=j+1
				replyID=Ccur(Trim(delid(i)))
				dele(0)
			End If
		Next

⌨️ 快捷键说明

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