<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Forums(TM) '** http://www.webwizforums.com '** '** Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved. '** '** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'. '** '** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE '** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE '** AND DERIVATIVE WORKS IMMEDIATELY. '** '** If you have not received a copy of the license with this work then a copy of the latest '** license contract can be found at:- '** '** http://www.webwizguide.com/license '** '** For more information about this software and for licensing information please contact '** 'Web Wiz' at the address and website below:- '** '** Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England '** http://www.webwizguide.com '** '** Removal or modification of this copyright notice will violate the license contract. '** '**************************************************************************************** '*************************** SOFTWARE AND CODE MODIFICATIONS **************************** '** '** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE '** AGREEMENT AND IS STRICTLY PROHIBITED '** '** If you wish to modify any part of this software a license must be purchased '** '**************************************************************************************** 'Set the response buffer to true Response.Buffer = True 'Dimension variables Dim strForumName 'Holds the name of the forum Dim strMemberName 'Holds the name of the forum member Dim lngMemberID 'Holds the ID number of the member Dim intSelGroupID 'Holds the group ID to select Dim iaryForumID 'Holds the forum ID array Dim intCatID 'Holds the cat ID Dim sarryForums Dim intCurrentRecord Dim sarrySubForums Dim intCurrentRecord2 Dim intSubForumID 'Read in the details lngMemberID = CLng(Request("UID")) 'Read in the member name 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Author.Username From " & strDbTable & "Author WHERE " & strDbTable & "Author.Author_ID=" & lngMemberID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the forum name form the recordset If NOT rsCommon.EOF Then 'Read in the forums from the recordset strMemberName = rsCommon("Username") End If 'Release server varaibles rsCommon.Close 'If this is a post back update the database If Request.Form("postBack") AND blnDemoMode = False Then 'Run through till all checked forums are added For each iaryForumID in Request.Form("chkFID") 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Permissions.* From " & strDbTable & "Permissions WHERE " & strDbTable & "Permissions.Forum_ID=" & iaryForumID & " AND " & strDbTable & "Permissions.Author_ID = " & lngMemberID & ";" 'Set the Lock Type for the records so that the record set is only locked when it is updated rsCommon.LockType = 3 'Query the database rsCommon.Open strSQL, adoCon With rsCommon 'If this is a new one add new If rsCommon.EOF Then .AddNew 'Update the recordset .Fields("Forum_ID") = iaryForumID .Fields("Author_ID") = lngMemberID .Fields("View_Forum") = CBool(Request.Form("read")) .Fields("Post") = CBool(Request.Form("post")) .Fields("Reply_posts") = CBool(Request.Form("reply")) .Fields("Edit_posts") = CBool(Request.Form("edit")) .Fields("Delete_posts") = CBool(Request.Form("delete")) .Fields("Priority_posts") = CBool(Request.Form("priority")) .Fields("Poll_create") = CBool(Request.Form("poll")) .Fields("Vote") = CBool(Request.Form("vote")) .Fields("Attachments") = CBool(Request.Form("files")) .Fields("Image_upload") = CBool(Request.Form("images")) .Fields("Moderate") = CBool(Request.Form("moderate")) .Fields("Display_post") = CBool(Request.Form("display")) .Fields("Calendar_event") = CBool(Request.Form("calEvent")) .Fields("Attachments") = False .Fields("Image_upload") = False 'Update the database with the new user's details .Update 'Close recordset .close End With Next 'Release server varaibles Call closeDatabase() 'Redirect back to permissions page Response.Redirect("admin_user_permissions.asp?UID=" & lngMemberID & strQsSID3) End If %> Create Member Permissions <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("" & vbCrLf & vbCrLf) '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>

Create Member Permissions for <% = strMemberName %>


Control Panel Menu
Select another Member to Create, Edit, or Delete Permissions for

Use the form below to create permissions on Forums for the member <% = strMemberName %> .
These member permissions override any Group Permissions the member would have on forums.

Permissions

Select what permissions you require for this user

What do the different permissions mean?

Member Name Access New Topics Sticky Topics Post Reply Edit Posts Delete Posts New Polls Poll Vote Calendar Event Post Approval Forum Moderator
<% = strMemberName %>

Forums
Select which forums you would like to apply/modify these permissions on


<% 'Read in the groups from db 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Category.Cat_ID, " & strDbTable & "Category.Cat_name, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name FROM " & strDbTable & "Category, " & strDbTable & "Forum WHERE " & strDbTable & "Category.Cat_ID=" & strDbTable & "Forum.Cat_ID AND " & strDbTable & "Forum.Sub_ID=0 ORDER BY " & strDbTable & "Category.Cat_order ASC, " & strDbTable & "Category.Cat_ID ASC, " & strDbTable & "Forum.Forum_Order ASC;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the row from the db using getrows for better performance If NOT rsCommon.EOF Then sarryForums = rsCommon.GetRows() End If 'close rsCommon.Close 'If no forums to set permisisons on display a message saying so If NOT isArray(sarryForums) Then %> <% 'If there are results show them Else 'Loop round to read in all the forums in the database Do While intCurrentRecord <= Ubound(sarryForums,2) 'Get the forum ID intForumID = CInt(sarryForums(2,intCurrentRecord)) 'If this is a different cat display the cat ID If intCatID <> CInt(sarryForums(0,intCurrentRecord)) Then 'Change the cat ID intCatID = CInt(sarryForums(0,intCurrentRecord)) %> <% End If %> <% '********* check for sub forums ***************** 'Reset intCurrentRecord2 intCurrentRecord2 = 0 'Read in the groups from db 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name FROM " & strDbTable & "Forum WHERE " & strDbTable & "Forum.Sub_ID= " & intForumID & " ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" 'Query the database rsCommon.Open strSQL, adoCon 'Place rs in array If NOT rsCommon.EOF Then sarrySubForums = rsCommon.GetRows() Else sarrySubForums = null End If 'close rsCommon.Close 'Read in the row from the db using getrows for better performance If isArray(sarrySubForums) Then 'Loop round to read in all the forums in the database Do While NOT intCurrentRecord2 > Ubound(sarrySubForums,2) 'Get the forum ID intSubForumID = CInt(sarrySubForums(0,intCurrentRecord2)) %> <% 'Move to the next record in the recordset intCurrentRecord2 = intCurrentRecord2 + 1 Loop End If 'Move to the next record in the recordset intCurrentRecord = intCurrentRecord + 1 Loop End If %>
  Member Group
There are presently no Forums created to set permissions on
<% = sarryForums(1,intCurrentRecord) %>
<% = sarryForums(3,intCurrentRecord) %>
  <% = sarrySubForums(1,intCurrentRecord2) %>

/>


Present Member Permissions For <% = strMemberName %>


Below are the present member forum permissions for <% = strMemberName %> .
These member permissions override any Group Permissions the member would have on these forums.

What do the different permissions mean?

<% 'Reset record position holders intCurrentRecord = 0 intCurrentRecord2 = 0 'Read in the groups from db 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Category.Cat_ID, " & strDbTable & "Category.Cat_name, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name " & _ "FROM " & strDbTable & "Category, " & strDbTable & "Forum " & _ "WHERE " & strDbTable & "Category.Cat_ID=" & strDbTable & "Forum.Cat_ID " & _ "AND " & strDbTable & "Forum.Sub_ID=0 " & _ "ORDER BY " & strDbTable & "Category.Cat_order ASC, " & strDbTable & "Forum.Forum_Order ASC;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the row from the db using getrows for better performance If NOT rsCommon.EOF Then sarryForums = rsCommon.GetRows() 'close rsCommon.Close 'If there are results show them If isArray(sarryForums) Then 'Loop round to read in all the forums in the database Do While intCurrentRecord <= Ubound(sarryForums,2) 'Get the forum ID intForumID = CInt(sarryForums(2,intCurrentRecord)) 'If this is a different cat display the cat ID If intCatID <> CInt(sarryForums(0,intCurrentRecord)) Then 'Change the cat ID intCatID = CInt(sarryForums(0,intCurrentRecord)) %> <% End If 'Read in the permssions from the db for this group (not very efficient doing it this way, but this page won't be run often) 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Permissions.* FROM " & strDbTable & "Permissions WHERE " & strDbTable & "Permissions.Author_ID = " & lngMemberID & " AND " & strDbTable & "Permissions.Forum_ID = " & intForumID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'If no records are returned use default values If rsCommon.EOF Then %> <% 'Else display the values for this group Else %> <% End If 'Close rsCommon rsCommon.Close '********* check for sub forums ***************** 'Reset intCurrentRecord2 intCurrentRecord2 = 0 'Read in the groups from db 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name FROM " & strDbTable & "Forum WHERE " & strDbTable & "Forum.Sub_ID= " & intForumID & " ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" 'Query the database rsCommon.Open strSQL, adoCon 'Place rs in array If NOT rsCommon.EOF Then sarrySubForums = rsCommon.GetRows() Else sarrySubForums = null End If 'close rsCommon.Close 'Read in the row from the db using getrows for better performance If isArray(sarrySubForums) Then 'Loop round to read in all the forums in the database Do While NOT intCurrentRecord2 > Ubound(sarrySubForums,2) 'Get the forum ID intSubForumID = CInt(sarrySubForums(0,intCurrentRecord2)) 'Read in the permssions from the db for this group (not very efficient doing it this way, but this page won't be run often) 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Permissions.* FROM " & strDbTable & "Permissions WHERE " & strDbTable & "Permissions.Author_ID = " & lngMemberID & " AND " & strDbTable & "Permissions.Forum_ID = " & intSubForumID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'If no records are returned use default values If rsCommon.EOF Then %> <% 'Else display the values for this group Else %> <% End If 'Close rsCommon rsCommon.Close 'Move to the next record in the recordset intCurrentRecord2 = intCurrentRecord2 + 1 Loop End If 'Move to the next record in the recordset intCurrentRecord = intCurrentRecord + 1 Loop End If %>
Forum Access New Topics Sticky Topics Post Reply Edit Posts Delete Posts New Polls Poll Vote Calendar Event Post Approval Forum Moderator  
<% = sarryForums(1,intCurrentRecord) %>
<% = sarryForums(3,intCurrentRecord) %>                        
<% = sarryForums(3,intCurrentRecord) %> <% If CBool(rsCommon("View_Forum")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Post")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Priority_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Reply_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Edit_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Delete_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Poll_create")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Vote")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Calendar_event")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Display_post")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Moderate")) Then Response.Write("") Else Response.Write("") %> Remove
  <% = sarrySubForums(1,intCurrentRecord2) %>                      
  <% = sarrySubForums(1,intCurrentRecord2) %> <% If CBool(rsCommon("View_Forum")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Post")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Priority_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Reply_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Edit_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Delete_posts")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Poll_create")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Vote")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Calendar_event")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Display_post")) Then Response.Write("") Else Response.Write("") %> <% If CBool(rsCommon("Moderate")) Then Response.Write("") Else Response.Write("") %> Remove



<% 'Reset Server Objects Call closeDatabase() %>


Forum Permissions Table
Access: Allows the Member access to the forum
New Topics: Allows the Member to post new topics
Sticky Topics: Allows the Member to post sticky topics that remain at the top of the forum
Post Reply:
Allows the Member to reply to posts
Edit Posts: Allows the Member to edit their posts
Delete Posts: Allows the User to delete their posts, but only if no-one has posted a reply
New Polls: Allows the Member to create new polls
Poll Vote: Allows the Member to vote in polls
Calendar Event: Allows the Group to enter Topics into the Calendar system as an event to be displayed in the Calendar.
The Calendar System needs to be enabled from the 'Calendar Settings' Page
Post Approval:
Requires that posts for this Member need to be approved before they are displayed
If you choose to not let users have there posts displayed, then their posts will first need to be approved by the forum admin/moderator.
Forum Moderator:
Allows the Member to have Moderator rights in this forum
This will allow the group to be able to delete, edit, move, etc. all posts in this forum, and edit user profiles etc. across the entire board