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

📄 admin_confirm.asp

📁 BBS源码 利用ASP的一个功能齐全的BBS论坛源码
💻 ASP
📖 第 1 页 / 共 5 页
字号:
			BBS94KK.Execute("Delete From[KK_Appraise] where TopicID in (Select TopicID From [KK_Topic] where DATEDIFF('d',LastTime,'"&BBS94KK.NowBbsTime&"')>"&DateNum&")")
			BBS94KK.Execute("Delete From[KK_Topic] where  DATEDIFF('d',LastTime,'"&BBS94KK.NowBbsTime&"')>"&DateNum&"")
			Call Suc("","已经成功删除所有论坛在"&DateNum&"天前没有回复的所有主题帖(包括其回复)!<li>建议删除后对论坛做一次<a href=Admin_Action.asp?Action=UpdateBbs>整理</a>","Admin_Action.asp?Action=DelEssay")
		Else
			For i=0 To uBound(AllTable)
			BBS94KK.Execute("Delete From[KK_Bbs"&AllTable(i)&"] where TopicID in (Select TopicID From [KK_Topic] where BoardID="&BoardID&" and DATEDIFF('d',[LastTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&") or ReplyTopicID in (Select TopicID From [KK_Topic] where BoardID="&BoardID&" and DATEDIFF('d',[LastTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&")")
			Next
			BBS94KK.Execute("Delete From[KK_Appraise] where TopicID in (Select TopicID From [KK_Topic] where DATEDIFF('d',LastTime,'"&BBS94KK.NowBbsTime&"')>"&DateNum&" And BoardID="&BoardID&")")
			BBS94KK.Execute("Delete From[KK_Topic] where BoardID="&BoardID&" And DATEDIFF('d',[LastTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&"")
			Call Suc("","已经成功删除在 "&BBS94KK.Execute("Select BoardName From[KK_Board]where BoardID="&BoardID&"")(0)&" 上 "&DateNum&" 天前没回复的主题帖(包括其回复帖)!<li>删除后建议对论坛做一次<a href=Admin_Action.asp?Action=UpdateBbs>整理</a>","Admin_Action.asp?Action=DelEssay")
		End IF
	Case"User"
		If UserName="" Then Call GoBack("",""):Exit Sub
		IF BBS94KK.Execute("select name From[KK_User] where Name='"&UserName&"'").eof Then
			Call GoBack("","这个用户根本不存在!"):Exit Sub
		ElseIf BoardID=0 Then
			For i=0 To uBound(AllTable)
			BBS94KK.Execute("Delete From[KK_Bbs"&AllTable(i)&"] where Name='"&UserName&"'")
			BBS94KK.Execute("Delete From[KK_Bbs"&AllTable(i)&"] where ReplyTopicID in (Select TopicID From[KK_Topic] where Name='"&UserName&"')")	
			Next
			BBS94KK.Execute("Delete From[KK_Topic] where Name='"&UserName&"'")
			Call Suc("","已经成功删除在所有论坛 "&UserName&" 的所有帖子!<li>建议删除后对论坛做一次<a href=Admin_Action.asp?Action=UpdateBbs>整理</a>","Admin_Action.asp?Action=DelEssay")
		Else
			For i=0 to uBound(AllTable)
			BBS94KK.Execute("Delete From[KK_Bbs"&AllTable(i)&"] where  BoardID="&BoardID&" and Name='"&UserName&"'")
			BBS94KK.Execute("Delete From[KK_Bbs"&AllTable(i)&"] where ReplyTopicID in (Select TopicID From[KK_Topic] where Name='"&UserName&"' And BoardID="&BoardID&")")	
			Next
			BBS94KK.Execute("Delete From[KK_Topic] where BoardID="&BoardID&" And Name='"&UserName&"'")
			Call Suc("","已经成功删除 "&UserName&" 在 "&BBS94KK.Execute("Select BoardName From[KK_Board]where ID="&BoardID&"")(0)&" 上的帖子!<li>删除后建议对论坛做一次<a href=Admin_Action.asp?Action=UpdateBbs>整理</a>","Admin_Action.asp?Action=DelEssay")
		End IF
	Case Else
		Call GoBack("","提交的路径不正确")
	End Select
End Sub

Sub DelSms
	Dim UserName,DateNum,BoardID
	DateNum=BBS94KK.Fun.GetStr("DateNum")
	Select Case Request("Go")
	Case"Date"
		If not isnumeric(DateNum) Then 
			Call GoBack("","天数必需用数字填写!")
		Else
			BBS94KK.Execute("Delete From[KK_Sms] where DATEDIFF('d',[AddTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&"")
			Call Suc("","已经成功删除在"&DateNum&"天前的所有留言信件!","Admin_Action.asp?Action=DelSms")
		End If
	Case"User"
		UserName=BBS94KK.Fun.GetStr("Name")
		IF BBS94KK.Execute("select name From[KK_User] where Name='"&UserName&"'").eof Then
			Call GoBack("","这个用户根本不存在!")
		Else
		BBS94KK.Execute("Delete From[KK_Sms] where MyName='"&UserName&"'")
		Call Suc("","已经成功删除了 "&UserName&" 的所有留言信件!","Admin_Action.asp?Action=DelSms")
		End If
	Case"Auto"
		If not isnumeric(DateNum) Then 
			Call GoBack("","天数必需用数字填写!")
		Else
			BBS94KK.Execute("Delete From[KK_Sms] where DATEDIFF('d',[AddTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&" And Name In ('自动送信系统','论坛小信使')")
			Call Suc("","已经成功删除在"&DateNum&"天前的所有论坛自动送信的留言信件!","Admin_Action.asp?Action=DelSms")
		End If
	End Select
End Sub


Sub MoveEssay
	Dim BoardID1,BoardID2,DateNum,UserName,AllTable,I
	BoardID1=BBS94KK.Fun.GetStr("BoardID1")
	BoardID2=BBS94KK.Fun.GetStr("BoardID2")
	IF BoardID1=BoardID2 Then Call GoBack("","您还没有选择目标论坛!"):Exit Sub
	AllTable=Split(BBS94KK.BBSTable(0),",")
	DateNum=BBS94KK.Fun.GetStr("DateNum")
	UserName=BBS94KK.Fun.GetStr("Name")
Select Case Request("Go")
Case"Date"
	If not isnumeric(DateNum) Then Call GoBack("","天数必需用数字填写!"):Exit Sub
	For i=0 to uBound(AllTable)
		BBS94KK.Execute("update [KK_Bbs"&AllTable(i)&"] Set BoardID="&BoardID2&" where TopicID in (Select TopicID from[KK_Topic] Where DATEDIFF('d',[AddTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&" and BoardID="&BoardID1&") or ReplyTopicID in (Select TopicID from[KK_Topic] Where DATEDIFF('d',[AddTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&" and BoardID="&BoardID1&")")
	Next
	BBS94KK.Execute("update [KK_Topic] Set BoardID="&BoardID2&" where BoardID="&BoardID1&" And DATEDIFF('d',[AddTime],'"&BBS94KK.NowBbsTime&"')>"&DateNum&"")
	Call Suc("","已经成功的把"&DateNum&"天前的帖子从 "&BBS94KK.Execute("select BoardName From[KK_Board] where BoardID="&BoardID1&"")(0)&" 移动到 "&BBS94KK.Execute("select BoardName From[KK_Board] where BoardID="&BoardID2&"")(0)&"!","Admin_Action.asp?Action=MoveEssay")
Case"User"
	If UserName="" Then Call GoBack("",""):Exit Sub
	IF BBS94KK.Execute("select name From[KK_User] where Name='"&UserName&"'").eof Then
		Call GoBack("","这个用户根本不存在!"):Exit Sub
	Else
	For i=0 to uBound(AllTable)
		BBS94KK.Execute("update [KK_Bbs"&AllTable(i)&"] Set BoardID="&BoardID2&" where TopicID in(Select TopicID from[KK_Topic] Where BoardID="&BoardID1&" and Name='"&UserName&"') or ReplyTopicID in (Select TopicID from[KK_Topic] Where BoardID="&BoardID1&" and Name='"&UserName&"')")
	Next
		BBS94KK.Execute("update [KK_Topic] Set BoardID="&BoardID2&"  Where BoardID="&BoardID1&" and Name='"&UserName&"'")
		Call Suc("","已经成功的把"&UserName&"的帖子从 "&BBS94KK.Execute("select BoardName From[KK_Board] where BoardID="&BoardID1&"")(0)&" 移动到 "&BBS94KK.Execute("select BoardName From[KK_Board] where BoardID="&BoardID2&"")(0)&"!","Admin_Action.asp?Action=MoveEssay")
	End If
End Select
End Sub

Sub AllSms
	Dim SmsContent,UserType,Sql,Mrs,I
	SmsContent=BBS94KK.Fun.GetStr("content")
	UserType=BBS94KK.Fun.GetStr("User")
	If SmsContent="" Then Call GoBack("",""):Exit Sub
	Select case UserType
	case"0"
	Sql="select name From [KK_online] where Admin<>0"
	case"1"
	sql="select name,max(BoardID) as BoardID from [KK_admin] where BoardID<>0 group by name"
	case"2"
	sql="select name,max(BoardID) as BoardID from [KK_admin] where BoardID=0 group by name"
	case"3"
	sql="select name,max(BoardID) as boardID from [KK_admin] group by name"
	case"4"
	sql="select name from [KK_user] where not isdel"
	case"5"
	sql="select name from [KK_user] where not isdel and isvip"
	case else
	Call GoBack("","非法操作"):Exit Sub
	end select
	Set Rs=BBS94KK.Execute(Sql)
	If Not Rs.Eof Then
	MRs=Rs.GetRows(-1)
	rs.close
	For I=0 to Ubound(MRs,2)
	BBS94KK.Execute("insert into [KK_sms](name,MyName,Content) values('论坛小信使','"&MRs(0,i)&"','"&SmsContent&"')")
	BBS94KK.Execute("update [KK_user] set NewSmsNum=NewSmsNum+1,SmsSize=SmsSize+"&Len(SmsContent)&" where Name='"&MRs(0,i)&"'")
	Next
	End If
	Call Suc("","成功的群发了信件!","Admin_Action.asp?Action=AllSms")
End Sub

Sub SavePlus
	Dim PlusName,PlusUrl,Flag,ID
	PlusName=BBS94KK.Fun.GetStr("PlusName")
	PlusUrl=BBS94KK.Fun.GetStr("PlusUrl")
	Flag=BBS94KK.Fun.GetStr("Flag")
	ID=BBS94KK.Fun.GetStr("ID")
	If PlusName="" or PlusUrl="" or Flag="" Then
		Call GoBack("",""):Exit Sub
	End IF
	IF ID<>"" Then
		BBS94KK.Execute("Update [KK_Plus] Set name='"&PlusName&"',url='"&PlusUrl&"',Flag="&Flag&" where ID="&ID)
		Call Suc("","成功的修改了插件:"&PlusName&"","Admin_Action.asp?Action=Plus")	
	Else
		BBS94KK.Execute("insert into [KK_Plus](name,url,Flag) values('"&PlusName&"','"&PlusUrl&"',"&Flag&")")
		Call Suc("","成功的添加了插件:"&PlusName&"","Admin_Action.asp?Action=Plus")
	End IF
	GetPlusJs
End Sub

Sub DelPlus
	Dim ID
	ID=Request.QueryString("ID")
	BBS94KK.Execute("Delete From[KK_Plus] where ID="&ID)
	Call Suc("","成功删除了插件","Admin_Action.asp?Action=Plus")
	GetPlusJs
End Sub

Sub Table(Str1,Str2)
	Response.Write("<table width='98%' border='1' align='center' cellpadding='3' cellspacing='2' bordercolor='#999999' bordercolordark='#FFFFFF' bgcolor='#DEF0FE'><tr><td><Div style='margin:5;line-height: 150%'>"&Str1&"<br>"&Str2&"</Div></td></tr></table>")
End Sub

Sub GetPlusJs
	Dim GameMenu,PlusMenu,objFSO,objName
	Set Rs=BBS94KK.Execute("Select Name,Url,Flag From [KK_Plus]")
	Do while not Rs.eof
	If Rs(2)=1 Then
		GameMenu=GameMenu & "<div id=tab><a href="&Rs(1)&">"&Rs(0)&"</a></div>"
	Else
		PlusMenu=PlusMenu & "<div id=tab><a href="&Rs(1)&">"&Rs(0)&"</a></div>"
	End If
	Rs.movenext
	Loop
	Rs.Close
	Set objFSO = Server.CreateObject("Scr"&"ipting"&".Fil"&"eSy"&"stemOb"&"ject")
	Set objName=objFSO.CreateTextFile(Server.MapPath("Inc/Plus.js"),True)
	objName.Write"var Game_List='"&GameMenu&"';"&vbcrlf&"var Plus_List='"&PlusMenu&"';" 
	objName.Close
	Set objFso=Nothing
end sub

Sub DelFaction
	Dim Name
	Name=Request.QueryString("Name")
	BBS94KK.Execute("Delete * From[KK_Faction] where Name='"&Name&"'")
	BBS94KK.Execute("update [KK_User] Set Faction='' where Faction='"&Name&"'")
	Call Suc("","成功删除了帮派!","Admin_Action.asp?Action=Faction")
End Sub

Sub UpdateFaction
	Dim Name,FullName,Note,User,BuildDate,ID
	ID=BBS94KK.Fun.GetStr("ID")
	Name=BBS94KK.Fun.GetStr("Name")
	FullName=BBS94KK.Fun.GetStr("FullName")
	Note=BBS94KK.Fun.GetStr("Note")
	User=BBS94KK.Fun.GetStr("User")
	BuildDate=BBS94KK.Fun.GetStr("BuildDate")
	IF Name="" Or FullName="" Or Note="" or User="" Then Call Goback("",""):Exit Sub
	If Not isDate(BuildDate) Then BuildDate=BBS94KK.NowBBSTime
	Set Rs=BBS94KK.Execute("Select Name From[KK_Faction] where ID="&ID)
	If Rs.Eof Then Call Goback("","记录已被删除了!")
	If Name<>Rs(0) Then
	BBS94KK.Execute("update [KK_User] Set Faction='"&Name&"' where Faction='"&Rs(0)&"'")
	End If
	Rs.Close
	BBS94KK.Execute("update [KK_Faction] Set [Name]='"&Name&"',FullName='"&FullName&"',[Note]='"&Note&"',[User]='"&User&"',BuildDate='"&BuildDate&"' where ID="&ID)
	Call Suc("","成功的更新了帮派!","Admin_Action.asp?Action=Faction")
End Sub

Sub Bank
	Dim Placard,UserType,Sql,Coin,Flag,I,MRs
	Placard=BBS94KK.Fun.GetStr("Placard")
	UserType=BBS94KK.Fun.GetStr("User")
	Coin=BBS94KK.Fun.GetStr("Coin")
	Flag=BBS94KK.Fun.GetStr("Flag")
	If Placard="" or Coin="" Then Call GoBack("",""):Exit Sub
	If Not isnumeric(Coin) Then Call GoBack("","金额请用数字填写!"):Exit Sub
	Select case UserType
	case"0"
	Sql="select name From [KK_online] where Admin<>0"
	case"1"
	sql="select name,max(BoardID) as BoardID from [KK_admin] where BoardID<>0 group by name"
	case"2"
	sql="select name,max(BoardID) as BoardID from [KK_admin] where BoardID=0 group by name"
	case"3"
	sql="select name,max(BoardID) as boardID from [KK_admin] group by name"
	case"4"
	sql="select name from [KK_user] where not isdel"
	case"5"
	sql="select name from [KK_user] where not isdel and isvip"
	case else
	Call GoBack("","非法操作"):Exit Sub
	End select
	Set Rs=BBS94KK.Execute(Sql)
	If Not Rs.Eof Then
	MRs=Rs.GetRows(-1)
	Rs.close
	For I=0 to Ubound(MRs,2)
		If Flag="1" Then
			BBS94KK.Execute("update [KK_user] set Coin=Coin+"&Coin&" where Name='"&MRs(0,i)&"'")
		Else
			Set Rs=BBS94KK.Execute("Select Coin,BankSave From[KK_user] where Name='"&MRs(0,i)&"'")
			If Not Rs.Eof Then
			IF CCur(Rs(0)) < CCur(Coin) Then
				If CCur(Coin)-CCur(Rs(0))>CCur(Rs(1)) Then
					BBS94KK.Execute("update [KK_user] set Coin=0,BankSave=0 where Name='"&MRs(0,i)&"'")
				Else
					BBS94KK.Execute("update [KK_user] set Coin=0,BankSave=BankSave-"&CCur(Coin)-CCur(Rs(0))&" where Name='"&MRs(0,i)&"'")
				End If
			Else
				BBS94KK.Execute("update [KK_user] set Coin=Coin-"&Coin&" where Name='"&MRs(0,i)&"'")
			End If
			End If
			Rs.Close
		End If
	Next
	BBS94KK.Execute("insert into [KK_sms](MyName,Content) values('银行公告','"&Placard&"')")
	Cache.name="BankPlacard"
	Cache.clean()
	End If
	Call Suc("","银行处理成功!并且在银行发布了公告!","Admin_Action.asp?Action=Bank")
End Sub

Sub DelBankPlacard
	Dim ID
	ID=Request.QueryString("ID")
	BBS94KK.Execute("Delete From[KK_Sms] where MyName='银行公告' And ID="&ID)
	Call Suc("","成功删除了银行公告","Admin_Action.asp?Action=Bank")
	Cache.name="BankPlacard"
	Cache.clean()
End Sub

Sub Clean
Application.Contents.RemoveAll
Call Suc("","更新缓存成功","Admin_Action.asp?Action=Clean")
End Sub
%>

⌨️ 快捷键说明

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