<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** '** Copyright 2001-2004 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to Web Wiz Guide and powered by logo's must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** You should have received a copy of the License along with this program; '** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwizguide.info/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.info '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** 'Set the response buffer to true Response.Buffer = True 'Dimension variables Dim strForumName 'Holds the name of the forum Dim strGroupName 'Holds the name of the forum group Dim intUserGroupID 'Holds the ID number of the group Dim strForumPassword 'Holds the forum password Dim intForumID 'Holds the forum ID number Dim intRead Dim intPost Dim intReply Dim intEdit Dim intDelete Dim intPriority Dim intPollCreate Dim intVote Dim intAttachments Dim intImageUpload Dim rsPermissions 'These are used for forum permissions Dim blnRead Dim blnPost Dim blnReply Dim blnEdit Dim blnDelete Dim blnPriority Dim blnPollCreate Dim blnVote Dim blnAttachments Dim blnImageUpload Dim blnModerateForum 'Read in the details intUserGroupID = CInt(Request("GID")) 'Get the group name 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Group.Name From " & strDbTable & "Group WHERE " & strDbTable & "Group.Group_ID=" & intUserGroupID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'If there is a group name returned get the name If NOT rsCommon.EOF Then strGroupName = rsCommon("Name") rsCommon.Close 'Get all the forums from the database 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Category, " & strDbTable & "Forum WHERE " & strDbTable & "Category.Cat_ID = " & strDbTable & "Forum.Cat_ID ORDER BY " & strDbTable & "Category.Cat_ORDER ASC, " & strDbTable & "Forum.Forum_Order ASC;" 'Query the database rsCommon.Open strSQL, adoCon 'Intialise the ADO recordset object Set rsPermissions = Server.CreateObject("ADODB.Recordset") %> Group Permissions
User Group Permissions for <% = strGroupName %>
Return to the the Administration Menu
Select another Forum to Create, Edit, or Delete Forum Permissions on

Below you can view Generic Forum Permissions for each of the forums as well as Create or Edit any User Group permissions on the forums.

Key to Generic Forum Permissions
  1. All Users
    This gives permission to all users including Guests.
  2. Registered Users
    This gives permission to all users except Guests.
  3. Private Groups
    This gives permissions to Groups that you have given permission to through the setting up of Group Permissions for this forum.
  4. Forum Admin's
    This gives permission to Forum Administers only.

<% 'Loop through forums Do While NOT rsCommon.EOF 'Read in the forums from the recordset strForumName = rsCommon("Forum_name") intForumID = CInt(rsCommon("Forum_ID")) intRead = CInt(rsCommon("Read")) intPost = CInt(rsCommon("Post")) intReply = CInt(rsCommon("Reply_posts")) intEdit = CInt(rsCommon("Edit_posts")) intDelete = CInt(rsCommon("Delete_posts")) intPriority = CInt(rsCommon("Priority_posts")) intPollCreate = CInt(rsCommon("Poll_create")) intVote = CInt(rsCommon("Vote")) intAttachments = CInt(rsCommon("Attachments")) intImageUpload = CInt(rsCommon("Image_upload")) %>

<% = strForumName %>

Generic Forum Permissions for <% = strForumName %>
Forum Access New Topics Reply to Posts Edit Posts Delete Posts Sticky Topics Create Poll's Vote in Poll's Upload Images Attach Files
<% If intRead = 1 Then Response.Write("All Users") %> <% If intRead = 2 Then Response.Write("Registered Users") %> <% If intRead = 3 Then Response.Write("Private Groups") %> <% If intRead = 4 Then Response.Write("Forum Admin's Only") %> <% If intPost = 1 Then Response.Write("All Users") %> <% If intPost = 2 Then Response.Write("Registered Users") %> <% If intPost = 3 Then Response.Write("Private Groups") %> <% If intPost = 4 Then Response.Write("Forum Admin's Only") %> <% If intReply = 1 Then Response.Write("All Users") %> <% If intReply = 2 Then Response.Write("Registered Users") %> <% If intReply = 3 Then Response.Write("Private Groups") %> <% If intReply = 4 Then Response.Write("Forum Admin's Only") %> <% If intEdit = 1 Then Response.Write("All Users") %> <% If intEdit = 2 Then Response.Write("Registered Users") %> <% If intEdit = 3 Then Response.Write("Private Groups") %> <% If intEdit = 4 Then Response.Write("Forum Admin's Only") %> <% If intDelete = 1 Then Response.Write("All Users") %> <% If intDelete = 2 Then Response.Write("Registered Users") %> <% If intDelete = 3 Then Response.Write("Private Groups") %> <% If intDelete = 4 Then Response.Write("Forum Admin's Only") %> <% If intPriority = 1 Then Response.Write("All Users") %> <% If intPriority = 2 Then Response.Write("Registered Users") %> <% If intPriority = 3 Then Response.Write("Private Groups") %> <% If intPriority = 4 Then Response.Write("Forum Admin's Only") %> <% If intPollCreate = 0 Then Response.Write("Off") %> <% If intPollCreate = 1 Then Response.Write("All Users") %> <% If intPollCreate = 2 Then Response.Write("Registered Users") %> <% If intPollCreate = 3 Then Response.Write("Private Groups") %> <% If intPollCreate = 4 Then Response.Write("Forum Admin's Only") %> <% If intVote = 0 Then Response.Write("Off") %> <% If intVote = 1 Then Response.Write("All Users") %> <% If intVote = 2 Then Response.Write("Registered Users") %> <% If intVote = 3 Then Response.Write("Private Groups") %> <% If intVote = 4 Then Response.Write("Forum Admin's Only") %> <% If intImageUpload = 0 Then Response.Write("Off") %> <% If intImageUpload = 1 Then Response.Write("All Users") %> <% If intImageUpload = 2 Then Response.Write("Registered Users") %> <% If intImageUpload = 3 Then Response.Write("Private Groups") %> <% If intImageUpload = 4 Then Response.Write("Forum Admin's Only") %> <% If intAttachments = 0 Then Response.Write("Off") %> <% If intAttachments = 1 Then Response.Write("All Users") %> <% If intAttachments = 2 Then Response.Write("Registered Users") %> <% If intAttachments = 3 Then Response.Write("Private Groups") %> <% If intAttachments = 4 Then Response.Write("Forum Admin's Only") %>
<% 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Permissions.* From " & strDbTable & "Permissions WHERE " & strDbTable & "Permissions.Group_ID=" & intUserGroupID & " AND " & strDbTable & "Permissions.Forum_ID=" & intForumID & ";" 'Query the database rsPermissions.Open strSQL, adoCon 'Read in the forum details from the recordset Do While NOT rsPermissions.EOF 'Read in the permissions from the recordset blnRead = CBool(rsPermissions("Read")) blnPost = CBool(rsPermissions("Post")) blnReply = CBool(rsPermissions("Reply_posts")) blnEdit = CBool(rsPermissions("Edit_posts")) blnDelete = CBool(rsPermissions("Delete_posts")) blnPriority = CBool(rsPermissions("Priority_posts")) blnPollCreate = CBool(rsPermissions("Poll_create")) blnVote = CBool(rsPermissions("Vote")) blnAttachments = CBool(rsPermissions("Attachments")) blnImageUpload = CBool(rsPermissions("Image_upload")) blnModerateForum = CBool(rsPermissions("Moderate")) %>
<% = strGroupName %> Permissions for <% = strForumName %>
Forum Access New Topics Reply to Posts Edit Posts Delete Posts Sticky Topics Create Poll's Vote in Poll's Upload Images Attach Files Moderate this Forum
<% If blnRead = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnPost = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnReply = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnEdit = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnDelete = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnPriority = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnPollCreate = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnVote = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnImageUpload = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnAttachments = True Then Response.Write("Yes") Else Response.Write("No") %> <% If blnModerateForum = True Then Response.Write("Yes") Else Response.Write("No") %>
Remove this Group Permissions Remove

<% 'Move to the next recordset rsPermissions.MoveNext Loop 'Close rs rsPermissions.Close 'Move next record rsCommon.MoveNext Loop 'Reset Server Objects Set rsPermissions = Nothing rsCommon.Close Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %>