<% @ 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 rsCommon2 'Holds a secound recordset for the page Dim intUserGroupID 'Holds the group ID Dim strGroupName 'Holds the name of the group Dim lngMinimumPosts 'Holds the minimum amount of posts to be in that group Dim blnSpecialGroup 'Set to true if a special group Dim intStars 'Holds the number of stars for the group Dim strCustomStars 'Holds the custom stars image if there is one fo0r this group Dim strMode 'Holds the mode of the page Dim intCatID 'Holds the cat ID Dim sarryForums Dim intCurrentRecord Dim sarrySubForums Dim intCurrentRecord2 Dim intSubForumID 'Initlise variables lngMinimumPosts = 0 blnSpecialGroup = False intStars = 1 intCatID = 0 'Read in the details intUserGroupID = CInt(Request.QueryString("GID")) 'Read in the page mode strMode = Request("mode") 'Intialise the ADO recordset object Set rsCommon2 = Server.CreateObject("ADODB.Recordset") 'If this is a post back update the database If (strMode = "edit" OR strMode = "new") AND Request.Form("postBack") AND blnDemoMode = False Then 'Read the various groups from the database 'Initalise the strSQL variable with an SQL statement to query the database If strMode = "new" Then strSQL = "SELECT " & strDbTable & "Group.* FROM " & strDbTable & "Group ORDER BY " & strDbTable & "Group.Group_ID DESC;" Else strSQL = "SELECT " & strDbTable & "Group.* FROM " & strDbTable & "Group WHERE " & strDbTable & "Group.Group_ID = " & intUserGroupID & ";" End If 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set rsCommon.CursorType = 2 '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 'Read in the group details strGroupName = Request.Form("GroupName") lngMinimumPosts = CLng(Request.Form("posts")) blnSpecialGroup = CBool(Request.Form("rank")) intStars = CInt(Request.Form("stars")) strCustomStars = Request.Form("custStars") 'If this is a non ladder group place -1 into the minimum posts variable If blnSpecialGroup Then lngMinimumPosts = CInt("-1") End If With rsCommon 'If this is a new one add new If strMode = "new" Then .AddNew 'Update the recordset .Fields("Name") = strGroupName .Fields("Stars") = intStars .Fields("Custom_stars") = strCustomStars If intUserGroupID <> 1 AND intUserGroupID <> 2 Then .Fields("Minimum_posts") = lngMinimumPosts .Fields("Special_rank") = blnSpecialGroup End If 'Update the database with the group details .Update End With 'Re-run the query to read in the updated recordset from the database 'We need to do this to get the new Group ID rsCommon.Requery 'Get the group ID from database intUserGroupID = CInt(rsCommon("Group_ID")) 'Close RS rsCommon.Close 'Read in the groups from db 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Forum.Forum_ID FROM " & strDbTable & "Forum ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" 'Query the database rsCommon.Open strSQL, adoCon 'Loop through all the categories in the database Do while NOT rsCommon.EOF 'Get the group ID intForumID = CInt(rsCommon("Forum_ID")) '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.Group_ID = " & intUserGroupID & " AND " & strDbTable & "Permissions.Forum_ID = " & intForumID & ";" 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set rsCommon2.CursorType = 2 'Set the Lock Type for the records so that the record set is only locked when it is updated rsCommon2.LockType = 3 'Query the database rsCommon2.Open strSQL, adoCon With rsCommon2 'If no records are returned then add a new record to the database If .EOF Then .AddNew 'Update the recordset .Fields("Group_ID") = intUserGroupID .Fields("Forum_ID") = intForumID .Fields("View_Forum") = CBool(Request.Form("read" & intForumID)) .Fields("Post") = CBool(Request.Form("topic" & intForumID)) .Fields("Priority_posts") = CBool(Request.Form("sticky" & intForumID)) .Fields("Reply_posts") = CBool(Request.Form("reply" & intForumID)) .Fields("Edit_posts") = CBool(Request.Form("edit" & intForumID)) .Fields("Delete_posts") = CBool(Request.Form("delete" & intForumID)) .Fields("Poll_create") = CBool(Request.Form("polls" & intForumID)) .Fields("Vote") = CBool(Request.Form("vote" & intForumID)) .Fields("Display_post") = CBool(Request.Form("approve" & intForumID)) .Fields("Moderate") = CBool(Request.Form("moderator" & intForumID)) .Fields("Calendar_event") = CBool(Request.Form("calEvent" & intForumID)) .Fields("Attachments") = False .Fields("Image_upload") = False 'Update the database .Update End With 'Close rsCommon2 rsCommon2.Close 'Move to the next record in the recordset rsCommon.MoveNext Loop rsCommon.Close 'If this is a new forum go back to the main forums page If strMode = "new" Then 'Release server varaibles Set rsCommon2 = Nothing Call closeDatabase() Response.Redirect("admin_view_groups.asp" & strQsSID1) End If End If 'If this is an edit read in te group details If strMode = "edit" Then 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Group.* FROM " & strDbTable & "Group WHERE " & strDbTable & "Group.Group_ID = " & intUserGroupID & ";" 'Query the database rsCommon.Open strSQL, adoCon If NOT rsCommon.EOF Then 'Get the category name from the database strGroupName = rsCommon("Name") lngMinimumPosts = CLng(rsCommon("Minimum_posts")) blnSpecialGroup = CBool(rsCommon("Special_rank")) intStars = CInt(rsCommon("Stars")) strCustomStars = rsCommon("Custom_stars") End If 'Close the rs rsCommon.Close End If %> Member Group Details <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("") '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>

Member Group Details


Control Panel Menu
Return to the Member Group Administration page

<% 'If this is the admin group or guest group then don't let em change anything else If intUserGroupID <> 1 AND intUserGroupID <> 2 Then %> <% End If %>
Member Group Details
Group Name*: />
Number of Stars*:
This is the number of stars displayed for this user group, unless you use your own custom stars/image.
Custom Stars Image Link:
If you wish to use your own custom stars/image for this group type the path in here to the image.
/>

Non Ladder Group:
What is the Ladder System?

If you check this box then this group will not be a part of the Ladder System.

/>
Ladder Group Minimum No. of Posts:
This is the number of posts a user needs to post to automatically become a member of this group. This will not effect a Non Ladder Group.


Group Permissions
Use the grid below to set Permissions for the this Member Group on various forums.
What do the different permissions mean?

<% '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 '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.Group_ID = " & intUserGroupID & " AND " & strDbTable & "Permissions.Forum_ID = " & intForumID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'If no records are returned use default values If rsCommon.EOF OR strMode="new" 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 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.Group_ID = " & intUserGroupID & " AND " & strDbTable & "Permissions.Forum_ID = " & intSubForumID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'If no records are returned use default values If rsCommon.EOF OR strMode = "new" 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 'Reset Server Objects Set rsCommon2 = Nothing Call closeDatabase() %>
Member Group Access New Topics Sticky Topics Post Reply Edit Posts Delete Posts New Polls Poll Vote Calendar Event Post Approval Forum Moderator
Check All  
There are presently no Forums created to set permissions on
<% = sarryForums(1,intCurrentRecord) %>
<% = sarryForums(3,intCurrentRecord) %> <% If intUserGroupID = 2 Then Response.Write(" disabled=true") %> /> />
<% = sarryForums(3,intCurrentRecord) %> /> /> <% If intUserGroupID = 2 Then Response.Write(" disabled=true") %> /> /> value="true"<% If CBool(rsCommon("Edit_posts")) Then Response.Write(" checked") %> /> value="true"<% If CBool(rsCommon("Delete_posts")) Then Response.Write(" checked") %> /> /> /> /> /> <% If intUserGroupID = 2 Then Response.Write(" disabled=true") %> />
   <% = sarrySubForums(1,intCurrentRecord2) %> <% If intUserGroupID = 2 Then Response.Write(" disabled=true") %> /> />
   <% = sarrySubForums(1,intCurrentRecord2) %> /> /> <% If intUserGroupID = 2 Then Response.Write(" disabled=true") %> /> /> value="true"<% If CBool(rsCommon("Edit_posts")) Then Response.Write(" checked") %> /> value="true"<% If CBool(rsCommon("Delete_posts")) Then Response.Write(" checked") %> /> /> /> /> /> <% If intUserGroupID = 2 Then Response.Write(" disabled=true") %> />

/>



Forum Permissions Table
Access: Allows the Group access to the forum
New Topics: Allows the Group to post new topics
Sticky Topics: Allows the Group to post sticky topics that remain at the top of the forum
Post Reply:
Allows the Group to reply to posts
Edit Posts: Allows the Group to edit their posts
Delete Posts: Allows the Group to delete their posts, but only if no-one has posted a reply
New Polls: Allows the Group to create new polls
Poll Vote: Allows the Group to vote in polls
If you allow Guest Groups to vote in Polls, only cookies prevent Guests from multiple voting.
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 Group 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 Group 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

Please be aware that the Group Permissions can be over ridden by setting permissions on this forum for individual members.



What is the Ladder System?
The Ladder system enables your members to move up forum groups automatically depending on the number of posts they make. Once a member has made the minimum amount of posts for a Ladder User Group that member will be moved up to that user group.

If you select that a user group is a Non Ladder Group, any member of the group will not be effected by the ladder system, this is useful if you wish not to use the Ladder System or for special groups like moderator groups.