%
Dvbbs.stats="版主管理页面"
Dvbbs.LoadTemplates("")
Dvbbs.Nav()
Dim sql1,rs1,sql,Rs,i
If Dvbbs.UserID=0 Then Response.redirect "showerr.asp?ErrCodes=
请登录后进行操作。&action=OtherErr"
If DVbbs.BoardID=0 then
Dvbbs.Head_var 2,0,"",""
Else
Dvbbs.Head_var 1,Application(Dvbbs.CacheName&"_boardlist").documentElement.selectSingleNode("board[@boardid='"&Dvbbs.BoardID&"']/@depth").text,"",""
GetBoardPermission
End If
If Not(Dvbbs.boardmaster or Dvbbs.master or Dvbbs.superboardmaster) Then Response.redirect "showerr.asp?ErrCodes=
只有该版版主级别以上的管理员才能登录。&action=OtherErr"
If Not Dvbbs.ChkPost() Then Dvbbs.AddErrCode(16):Dvbbs.Showerr()
Main()
Dvbbs.Footer()
Dvbbs.PageEnd()
Sub Main()
%>
管理成员:
<%
Dim master
For Each master in Application(Dvbbs.CacheName&"_boardmaster").documentElement.selectNodes("boardmaster[@boardid='"&Dvbbs.boardid&"']/master")
Response.Write master.text &" "
Next
%>
<%
Select Case request("action")
Case "new"
'Call savenews()
Case "manage"
Call manage()
Case "updat"
'Call Update()
Case "del"
'Call del()
Case "editbminfo"
Call editbminfo()
Case "saveditbm"
Call savebminfo()
Case "editbmads"
Call editbmads()
Case "savebmads"
Call savebmads()
Case Else
End Select
%>
<%
End Sub
Sub editbmads()
Dim master_1,chkedit
If Not ChkBoardEditor(1) Then
Response.Redirect "showerr.asp?ErrCodes=
你的权限不足,不能进行该项管理设置。&action=OtherErr"
End If
Set Rs=Dvbbs.Execute("select boardmaster,Board_Ads from dv_board where boardid="&Dvbbs.BoardID)
If rs.eof and rs.bof Then Response.redirect "showerr.asp?ErrCodes=
您没有指定相应论坛ID,不能进行管理。&action=OtherErr"
Dvbbs.Forum_Ads = Split(Rs(1),"$")
%>
<%
End Sub
Sub savebmads()
If Not ChkBoardEditor(1) Then
Response.Redirect "showerr.asp?ErrCodes=
你的权限不足,不能进行该项管理设置。&action=OtherErr"
End If
Dim Forum_adsinfo
Dim iSetting
For i = 0 To 30
If Trim(Request.Form("Forum_ads("&i&")"))="" Then
iSetting=0
Else
iSetting=Replace(Trim(Request.Form("Forum_ads("&i&")")),"$","")
End If
If i = 0 Then
Forum_adsinfo = iSetting
Else
Forum_adsinfo = Forum_adsinfo & "$" & iSetting
End If
Next
Dim checkinfo
checkinfo=checkXHTML(Forum_adsinfo)
If checkinfo="" Then
sql = "update dv_board set board_ads='"&Replace(Forum_adsinfo,"'","''")&"' where boardid="&Dvbbs.boardid
Dvbbs.Execute(sql)
Dvbbs.LoadBoardData Dvbbs.BoardID
LoardTextAd()
Response.Write Dvbbs.BoardType&"广告设置成功。"
Dvbbs.Execute("Insert Into Dv_Log (l_AnnounceID,l_BoardID,l_touser,l_username,l_content,l_ip,l_type) values (0,"&Dvbbs.BoardID&",'广告管理','" & Dvbbs.MemberName & "','设置 "&Dvbbs.boardtype&"广告','" & Dvbbs.userTrueIP & "',3)")
Else
Response.Write Dvbbs.BoardType&"广告设置失败,原因:"&checkinfo&"。 如需要设置包含脚本或其他危险标签的广告,请到后台操作。"
Dvbbs.Execute("Insert Into Dv_Log (l_AnnounceID,l_BoardID,l_touser,l_username,l_content,l_ip,l_type) values (0,"&Dvbbs.BoardID&",'广告管理','" & Dvbbs.MemberName & "','设置 "&Dvbbs.boardtype&"广告失败','" & Dvbbs.userTrueIP & "',3)")
End If
End Sub
'版主设置权限 Bloon
'Act 0=修改基本设置,1=修改广告
Function ChkBoardEditor(Act)
Dim Master,IsMaster
IsMaster = False
ChkBoardEditor = False
'修正超版进入分版基本设置出错 2005-6-1 Dv.Yz
If Dvbbs.Master Or Dvbbs.SuperBoardMaster Then
ChkBoardEditor = True
Exit Function
End If
Dim XpathSQL
XpathSQL="boardmaster[@boardid = "& Dvbbs.Boardid &" and master='"& Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@username").text &"']"
IsMaster=Not Application(Dvbbs.CacheName&"_boardmaster").documentElement.selectSingleNode(XpathSQL) Is Nothing
Select Case Act
Case 0
If Dvbbs.Board_Setting(33) = "1" and IsMaster Then
ChkBoardEditor = True
End If
Case 1
If Dvbbs.Board_Setting(35) = "1" Then
ChkBoardEditor = True
Else
If Dvbbs.Board_Setting(34) = "1" and IsMaster Then
ChkBoardEditor = True
End If
End If
End Select
End Function
Sub Editbminfo()
If Not IsObject(Conn) Then ConnectionDatabase
Dim Master_1
Response.Write "
<%
rs.close
End Sub
Sub Savebminfo()
If Not ChkBoardEditor(0) Then
Response.Redirect "showerr.asp?ErrCodes=
你的权限不足,不能进行该项管理设置。&action=OtherErr"
End If
Dim Rname, i,upmaster
Dim Readme, BoardType, Boardmaster, Sid, Boarduser, Rules
Readme = Request.Form("readme")
BoardType = Request.Form("BoardType")
Boardmaster = Request.Form("boardmaster")
Rules = Request.Form("Rules")
Dim Checkinfo
Checkinfo=checkXHTML(Request.Form("readme"))
If Checkinfo<>"" Then
Dvbbs.Execute("Insert Into Dv_Log (l_AnnounceID,l_BoardID,l_touser,l_username,l_content,l_ip,l_type) values (0,"&Dvbbs.BoardID&",'论坛基本信息','" & Dvbbs.MemberName & "','对版面"& Dvbbs.BoardType&"进行基本信息管理失败 ','" & Dvbbs.userTrueIP & "',3)")
Response.Write "
"
Exit Sub
End If
Checkinfo=checkXHTML(Request.Form("Rules"))
If Checkinfo<>"" Then
Dvbbs.Execute("Insert Into Dv_Log (l_AnnounceID,l_BoardID,l_touser,l_username,l_content,l_ip,l_type) values (0,"&Dvbbs.BoardID&",'论坛基本信息','" & Dvbbs.MemberName & "','对版面"& Dvbbs.BoardType&"进行基本信息管理失败','" & Dvbbs.userTrueIP & "',3)")
Response.Write "
"
Exit Sub
End If
If Cint(Dvbbs.Board_Setting(2)) = 1 Then
Boarduser = Request.Form("boarduser")
Boarduser = Replace(boarduser,chr(13)&chr(10),",")
End If
'Sid = Request("sid")
'If IsNumeric(Sid) = 0 Or Sid = "" Then Response.Redirect "showerr.asp?ErrCodes=
非法的模板编号&action=OtherErr"
'Sid=CLng(Sid)
If Len(Readme) > 255 Then Response.Redirect "showerr.asp?ErrCodes=
论坛简介多于255个字。&action=OtherErr"
If BoardType = "" Then Response.Redirect "showerr.asp?ErrCodes=
请输入论坛名称。&action=OtherErr"
'If Boardmaster = "" Then Response.Redirect "showerr.asp?ErrCodes=
请输入管理成员。&action=OtherErr"
Rname = split(Boardmaster,"|")
For i = 0 To Ubound(Rname)
Sql = "SELECT TOP 1 Username FROM [Dv_User] WHERE Username = '" & Replace(Rname(i),"'","") & "'"
Set Rs = Dvbbs.Execute(Sql)
If Rs.Eof And Rs.Bof Then
Response.Redirect "showerr.asp?ErrCodes=
论坛没有" & Replace(Rname(i), "'", "") & "这个用户,不能添加为版主&action=OtherErr"
Exit For
End If
Set Rs = Nothing
Next
Dim Classname, Titlepic
Set Rs = Dvbbs.Execute("SELECT Usertitle, GroupPic FROM [Dv_UserGroups] WHERE UserGroupID = 3")
If Not (Rs.Eof And Rs.Bof) Then
Classname = Rs(0)
Titlepic = Rs(1)
End If
For i = 0 To Ubound(Rname)
Sql = "SELECT Top 1 UserGroupID From [Dv_User] WHERE Username = '" & Replace(Rname(i), "'", "") & "'"
Set Rs = Dvbbs.Execute(Sql)
If Rs(0) > 3 Then Dvbbs.Execute("Update [Dv_user] Set UserGroupID = 3, Userclass = '" & Classname & "', Titlepic = '" & Titlepic & "' WHERE Username = '" & Replace(Rname(i), "'", "") & "'" )
Set Rs = Nothing
Next
Set Rs = Dvbbs.iCreateObject("Adodb.Recordset")
Sql = "SELECT * FROM Dv_Board WHERE Boardid = " & Dvbbs.BoardID
Rs.Open Sql,Conn,1,3
If Rs.Eof And Rs.Bof Then
Response.redirect "showerr.asp?ErrCodes=
您没有指定相应论坛ID,不能进行管理。&action=OtherErr"
End If
If Trim(Boardmaster)<>Trim(Rs("Boardmaster")) Then upmaster=1
Rs("Boardmaster") = Boardmaster
Rs("Readme") = Readme
Rs("Rules") = Rules
Rs("BoardType") = BoardType
If Cint(Dvbbs.Board_Setting(2)) = 1 Then Rs("Boarduser") = Boarduser
'Rs("Sid") = Clng(Sid)
Rs.Update
Dvbbs.Execute("Insert Into Dv_Log (l_AnnounceID,l_BoardID,l_touser,l_username,l_content,l_ip,l_type) values (0,"&Dvbbs.BoardID&",'论坛基本信息','" & Dvbbs.MemberName & "','对版面"& Dvbbs.BoardType&"进行基本信息管理 ','" & Dvbbs.userTrueIP & "',3)")
Response.Write "
论坛修改成功!"
Dvbbs.LoadBoardList()
Dvbbs.LoadBoardData Dvbbs.BoardID
End Sub
%>