<% '################################################################################# '## Snitz Forums 2000 v3.4.06 '################################################################################# '## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, '## Huw Reddick and Richard Kinser '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or (at your option) any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from our support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## manderson@snitz.com '## '################################################################################# Forum_ID = Request.QueryString("Forum") User_ID = Request.QueryString("userid") Action_ID = Request.QueryString("action") %> <% if Session(strCookieURL & "Approval") <> "15916941253" then scriptname = split(request.servervariables("SCRIPT_NAME"),"/") Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname)) end if Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & getCurrentIcon(strIconFolderOpen,"","") & " All Forums
" & vbNewLine & _ " " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " Admin Section
" & vbNewLine & _ " " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Moderator Configuration

" & vbNewLine if Forum_ID = "" then txtMessage = "Select a forum to edit moderators for that forum" else if User_ID = "" then txtMessage = "Select a user to grant/revoke moderator powers for that user. Users in bold are currently moderators of this forum." else if Action_ID = "" then txtMessage = "Select an action for this user" else txtMessage = "Action Successful" end if end if end if Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
Moderator Configuration" if txtMessage <> "" Then Response.Write("
" & txtMessage) Response.Write "
" & vbNewLine if Forum_ID = "" then Response.Write " " & vbNewLine '## Forum_SQL strSql = "SELECT C.CAT_ORDER, C.CAT_NAME, F.CAT_ID, F.FORUM_ID, F.F_ORDER, F.F_SUBJECT " &_ " FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F" &_ " WHERE C.CAT_ID = F.CAT_ID " strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT ASC;" set rs = my_Conn.Execute(strSql) if rs.eof or rs.bof then 'nothing else iOldCat = 0 do until rs.EOF iNewCat = rs("CAT_ID") if iNewCat <> iOldCat Then Response.Write " " & vbNewLine iOldCat = iNewCat end if Response.Write " " & vbNewLine rs.MoveNext loop end if Response.Write "
" & rs("CAT_NAME") & "
    " & rs("F_SUBJECT") & "
" & vbNewLine else if Action_ID = "" then if User_ID = "" then '## Forum_SQL strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_LEVEL > 1 " strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC;" set rs = my_Conn.Execute(strSql) Response.Write "
" & vbNewLine & _ "
    " & vbNewLine do until rs.EOF Response.Write "
  • " if chkForumModerator(Forum_ID, rs("M_NAME")) then Response.Write("") Response.Write "" & rs("M_NAME") & "" If chkForumModerator(Forum_ID, rs("M_NAME")) then Response.Write("") Response.Write "
  • " & vbNewLine rs.MoveNext loop Response.Write "
" & vbNewLine else '## Forum_SQL strSql = "SELECT " & strTablePrefix & "MODERATOR.FORUM_ID, " & strTablePrefix & "MODERATOR.MEMBER_ID, " & strTablePrefix & "MODERATOR.MOD_TYPE " strSql = strSql & " FROM " & strTablePrefix & "MODERATOR " strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.MEMBER_ID = " & User_ID & " " strSql = strSql & " AND " & strTablePrefix & "MODERATOR.FORUM_ID = " & Forum_ID & " " set rs = my_Conn.Execute(strSql) if rs.EOF then Response.Write "
" & vbNewLine & _ "
" & vbNewLine & _ " The selected user is not a moderator of the selected forum
" & vbNewLine & _ "
" & vbNewLine & _ " If you would like to make this user the moderator of this forum, click here." & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine else Response.Write "
" & vbNewLine & _ "
" & vbNewLine & _ " The selected user is currently a moderator of the selected forum
" & vbNewLine & _ "
" & vbNewLine & _ " If you would like to remove this user's moderator status in this forum, click here." & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine end if end if else select case Action_ID case 1 '## Forum_SQL strSql = "INSERT INTO " & strTablePrefix & "MODERATOR " strSql = strSql & "(FORUM_ID" strSql = strSql & ", MEMBER_ID" strSql = strSql & ") VALUES (" strSql = strSql & Forum_ID strSql = strSql & ", " & User_ID strSql = strSql & ")" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords Response.Write "
" & vbNewLine & _ "
" & vbNewLine & _ " The selected user is now a moderator of the selected forum
" & vbNewLine & _ "
" & vbNewLine & _ " Back to Moderator Options" & vbNewLine & _ "

" & vbNewLine case 2 '## Forum_SQL strSql = "DELETE FROM " & strTablePrefix & "MODERATOR " strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.FORUM_ID = " & Forum_ID & " " strSql = strSql & " AND " & strTablePrefix & "MODERATOR.MEMBER_ID = " & User_ID my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords Response.Write "
" & vbNewLine & _ "
" & vbNewLine & _ " The selected user's moderator status in the selected forum has been removed
" & vbNewLine & _ "
" & vbNewLine & _ " Back to Moderator Options" & vbNewLine & _ "

" & vbNewLine end select end if end if Response.Write "
" & vbNewLine & _ "

" & vbNewLine WriteFooter Response.End %>