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

📄 admin.asp

📁 网页源码,是最好的网店代码。可以支持批量上传产品等功能。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Inc/SysConfig.Asp"-->
<%
Dim Caption,Content,Rs,ID,Url,Action,SetUserName,GoToUrl,BoardID
YxBBs.Fun.CheckMake()
ID=YxBBs.Checknum(Request.QueryString("ID"))
Action=lcase(Request.QueryString("Action"))
YxBBs.CheckBoard()
URl="Show.Asp?ID="&ID
GoToUrl=True
Call YxBBs.Head("论坛管理")
Select Case Action
Case"精华"
Call cheak()
	If Cint(YxBBs.ClassSetting(19))=0 Then YxBBs.Error("您没有操作精华帖子权限!")
	Set Rs=YxBBs.Execute("Select IsGood,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除!")
	Else
		IF Rs(0) Then
			YxBBs.Error("该主题帖子已经是精华帖子了!")
		ELse
			YxBBs.Execute("update [YX_Topic] set IsGood=True where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.Execute("update [YX_User] set Coin=Coin+"&YxBBs.BBSSetting(39)&",Mark=Mark+"&YxBBs.BBSSetting(40)&",GoodNum=GoodNum+1 where name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》设为精华,主题ID:"&ID,Rs(1),0
		End If
	End If
	Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">设定为精华帖子成功!3秒后返回主题!"
	Rs.Close
	Call Show()
Case"取消精华"
Call cheak()
	If Cint(YxBBs.ClassSetting(19))=0 Then YxBBs.Error("您没有操作精华帖子权限!")
	Set Rs=YxBBs.Execute("Select IsGood,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	If Rs.Eof Then
		YxBBs.Error("该帖子不存在或已经删除!")
	Else
		IF Not Rs(0) Then
			YxBBs.Error("该主题帖子不是精华帖子!")
		ELse
			YxBBs.Execute("update [YX_Topic] set IsGood=False where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.execute("update [YX_User] set Coin=Coin-"&YxBBs.BBSSetting(41)&",Mark=Mark-"&YxBBs.BBSSetting(42)&",GoodNum=GoodNum-1 where name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》取消精华,主题ID:"&ID,Rs(1),0
		End If
	End If
	Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">取消帖子精华成功!3秒后返回主题!"
	Rs.Close
	Call Show()
Case"置顶"
Call cheak()
	If Cint(YxBBs.ClassSetting(16))=0 Then YxBBs.Error("您没有置顶主题的权限!")
	Set Rs=YxBBs.execute("Select TopType,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除!")
	Else
		IF Rs(0)=5 Then
			YxBBs.Error("该帖子已经是总置顶帖!")
		ElseIf Rs(0)=4 Then
			YxBBs.Error("该帖子已经是区置顶帖!")
		ElseIF Rs(0)=3 Then
			YxBBs.Error("该主题帖子已经被置顶了!")	
		Else
			YxBBs.Execute("update [YX_Topic] Set TopType=3 where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.execute("update [YX_User] set Coin=Coin+"&YxBBs.BBSSetting(43)&",Mark=Mark+"&YxBBs.BBSSetting(44)&" Where name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》设为置顶,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">成功将主题设为置顶帖子!3秒后返回主题!"
	End If
	Rs.Close
	Call Show()
Case"取消置顶"
Call cheak()
	If Cint(YxBBs.ClassSetting(16))=0 Then YxBBs.Error("您没有操作置顶主题的权限!")
	Set Rs=YxBBs.execute("Select TopType,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除!")
	Else
		IF Rs(0)=5 Then
			YxBBs.Error("该帖子已经是总置顶帖!")
		ElseIf Rs(0)=4 Then
			YxBBs.Error("该帖子已经是区置顶帖!")
		ElseIF Rs(0)<>3 Then
			YxBBs.Error("该主题已经不是置顶帖!")
		Else
			YxBBs.Execute("update [YX_Topic] Set TopType=0 where TopicId="&ID&" ")
			YxBBs.execute("update [YX_User] set Coin=Coin-"&YxBBs.BBSSetting(45)&",Mark=Mark-"&YxBBs.BBSSetting(46)&" Where Name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》取消置顶,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">成功的取消帖子的置顶!3秒后返回主题!"
	End If
	Set Rs=Nothing
	Call Show()
Case"总置顶"
Call cheak()
	If Cint(YxBBs.ClassSetting(17))=0 Then YxBBs.Error("您没有管理总置顶帖子的权限!")
	Set Rs=YxBBs.execute("Select TopType,Name,Caption From[YX_Topic] where TopicID="&ID&" And (BoardID="&YxBBs.BoardID&" or TopType=5)")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Rs(0)=5 Then
			YxBBs.Error("该帖子已经是总置顶主题!")
		Else
			YxBBs.execute("update [YX_Topic] Set TopType=5 where TopicID="&id&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.execute("update [YX_user] Set Coin=Coin+"&YxBBs.BBSSetting(51)&",Mark=Mark+"&YxBBs.BBSSetting(52)&" where Name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》设为总置顶,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">成功将帖子设置为总置顶!3秒后返回主题!"
	End If
	Rs.Close
	Call Show()
Case"取消总置顶"
Call cheak()
	If Cint(YxBBs.ClassSetting(17))=0 Then YxBBs.Error("您没有管理总置顶帖子的权限!")
	Set Rs=YxBBs.execute("Select TopType,Name,Caption From[YX_Topic] where TopicID="&ID&" And (BoardID="&YxBBs.BoardID&" or TopType=5)")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Rs(0)<>5 Then
			YxBBs.Error("该帖子不是总置顶主题!")
		Else
		YxBBs.execute("update [YX_Topic] set TopType=0 where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
		YxBBs.execute("update [YX_user] set Coin=Coin-"&YxBBs.BBSSetting(53)&",Mark=Mark-"&YxBBs.BBSSetting(54)&" where name='"&SetUserName&"'")
		YxBBs.InLog "将主题《"&Rs(2)&"》取消总置顶,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">成功的取消帖子的总置顶!3秒后返回主题!"
	End If
	Rs.Close
	Call Show()
Case"区置顶"
Call cheak()
	If Cint(YxBBs.ClassSetting(17))=0 Then YxBBs.Error("您没有管理区置顶帖子的权限!")
	Set Rs=YxBBs.execute("Select TopType,Name,Caption From[YX_Topic] where TopicID="&ID&" And (BoardID="&YxBBs.BoardID&" or TopType=4)")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Rs(0)=5 Then
			YxBBs.Error("该帖子已经是总置顶主题!")
		ElseIf Rs(0)=4 Then
			YxBBs.Error("该帖子已经是区置顶主题!")
		Else
			YxBBs.execute("update [YX_Topic] Set TopType=4 where TopicID="&id&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.execute("update [YX_user] Set Coin=Coin+"&YxBBs.BBSSetting(47)&",Mark=Mark+"&YxBBs.BBSSetting(48)&" where Name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》设为区置顶,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">成功将帖子设置为区置顶!3秒后返回主题!"
	End If
	Rs.Close	
	Call Show()
Case"取消区置顶"
Call cheak()
	If Cint(YxBBs.ClassSetting(17))=0 Then YxBBs.Error("对不起,您没有管理权限!")
	IF YxBBs.ClassID>2 Then YxBBs.Error("对不起,您没有管理权限!")
	Set Rs=YxBBs.execute("Select TopType,Name,Caption From[YX_Topic] where TopicID="&ID&" And (BoardID="&YxBBs.BoardID&" or TopType=4)")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Rs(0)<>4 Then
			YxBBs.Error("该帖子不是区置顶主题!")
		Else
			YxBBs.execute("update [YX_Topic] set TopType=0 where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.execute("update [YX_user] set Coin=Coin-"&YxBBs.BBSSetting(49)&",Mark=Mark-"&YxBBs.BBSSetting(50)&" where name='"&SetUserName&"'")
			YxBBs.InLog "将主题《"&Rs(2)&"》取消区置顶,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">成功的取消帖子的区置顶!3秒后返回主题!"
	End If
	Rs.Close
	Call Show()
Case"锁定"
Call cheak()
	If Cint(YxBBs.ClassSetting(20))=0 Then YxBBs.Error("您没有锁定主题的权限!")
	Set Rs=YxBBs.execute("Select IsLock,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Rs(0) Then
			YxBBs.Error("该主题帖子已经被锁定!")
		Else
			YxBBs.execute("update [YX_Topic] set IsLock=True where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.InLog "将主题《"&Rs(2)&"》锁定,主题ID:"&ID,Rs(1),0
		End If
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">主题已经锁定成功!3秒后返回主题!"
	End If
	Rs.Close			
	Call Show()
Case"解锁"
Call cheak()
	If Cint(YxBBs.ClassSetting(20))=0 Then YxBBs.Error("您没有解除锁定的权限!")
	Set Rs=YxBBs.execute("Select Islock,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	If Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Not Rs(0) Then
			YxBBs.Error("该帖子没有被锁定!")
		Else
			YxBBs.execute("update [YX_Topic] set IsLock=False where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
			YxBBs.InLog "将主题《"&Rs(2)&"》解除锁定,主题ID:"&ID,Rs(1),0
		End IF
		Caption="<meta http-equiv=refresh content=3;url=Show.Asp?ID="&ID&">解除主题锁定成功!3秒后返回主题!"
	End if
	Rs.Close	
	Call Show()

Case"删除主题"
Call cheak()
	If Cint(YxBBs.ClassSetting(14))=0 Then YxBBs.Error("您没有删除主题的权限!")
Set Rs=YxBBs.execute("Select IsDel,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	IF Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
End If
	Caption="删除主题"
	Content="<form method=POST name='move' action='?BoardID="&YxBBs.BoardID&"&ID="&ID&"&TB="&YxBBs.TB&"&Action=删除主题1'> <input type=submit value=' 确定删除 '> <br><br>是否用留言通知帖子的作者:<input name='issms' onclick='if(sms.disabled==true){sms.disabled=false;sms.value=""通知:您的帖子《"&Rs(2)&"》被管理员("&YxBBs.MyName&")删除,原因是:""}else{sms.disabled=true;sms.value="""";}' type='checkbox' value='yes'> <input name='sms' size='50' type='text' value='' disabled='true'></p></form>"
	YxBBs.ShowTable Caption,"<tr><td height=""100"">"&Content&"</td></tr>"
Case"删除主题1"
Call cheak()
        IsSms=YxBBs.Fun.GetStr("issms")
	Sms=YxBBs.Fun.GetStr("sms")
	If Cint(YxBBs.ClassSetting(14))=0 Then YxBBs.Error("您没有删除主题的权限!")
	Set Rs=YxBBs.execute("Select IsDel,Name,Caption From[YX_Topic] where TopicID="&ID&" And BoardID="&YxBBs.BoardID&"")
	IF Rs.eof Then
		YxBBs.Error("该帖子不存在或已经删除")
	Else
		IF Not Rs(0) Then
			GoToUrl=False
			'得出要删除的帖数
			Temp=YxBBs.Execute("Select Count(BbsID) From[YX_bbs"&YxBBs.TB&"] where (TopicID="&ID&" Or  ReplyTopicID="&ID&") And BoardID="&YxBBs.BoardID)(0)
			YxBBs.Execute("update [YX_Topic] set IsDel=True,ReplyNum=0 where TopicID="&ID&" And BoardID="&YxBBs.BoardID)
			YxBBs.Execute("update [YX_Bbs"&YxBBs.TB&"] set IsDel=True where (TopicID="&ID&" Or  ReplyTopicID="&ID&") And BoardID="&YxBBs.BoardID) 
			YxBBs.Execute("update [YX_Config] set AllEssayNum=AllEssayNum-"&Temp&",TopicNum=TopicNum-1")
                        YxBBs.Execute("update [YX_User] set Coin=Coin-"&YxBBs.BBSSetting(59)&",Mark=Mark-"&YxBBs.BBSSetting(60)&" Where Name='"&SetUserName&"'")			
                        YxBBs.Execute("update [YX_Board] set EssayNum=EssayNum-"&Temp&",TopicNum=TopicNum-1 where BoardID="&YxBBs.BoardID&"")
                   If IsSms="yes" Then
                YxBBs.Execute("insert into [YX_Sms](name,MyName,Title,Content) values('系统消息','"&SetUserName&"','您的主题被删除通知','"&Sms&"')")
		YxBBs.Execute("update [YX_User] set NewSmsNum=NewSmsNum+1,SmsSize=SmsSize+"&Len(Sms)&" Where Name='"&SetUserName&"'")
                End if
			If YxBBs.BoardDepth>1 Then
				YxBBs.Execute("Update [YX_Board] set TopicNum=TopicNum-1,EssayNum=EssayNum-"&Temp&" where BoardID In ("&YxBBs.BoardParentStr&") And Depth>0")
			End If
			BoardLastRaply()

⌨️ 快捷键说明

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