<% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** '** Copyright 2001-2002 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.com '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** 'Set the response buffer to true Response.Buffer = True %> Set up and Administer Forums

Set up and Administer Forums

Return to the the Administration Menu
Forum Details
Add New Forum Category Add New Forum

Click on Forum name or Category to Amend Details.

Select the order you would like the forums to be in from the Order drop down list and click on the Update Order button

<% 'Dimension variables Dim rsCategory 'db recordset object Dim rsForum 'Holds the Recordset for the forum details Dim strCategory 'Holds the categories Dim intCatID 'Holds the category ID number Dim intForumID 'Holds the forum ID number Dim strForumName 'Holds the forum name Dim strForumDiscription 'Holds the forum description Dim blnForumLocked 'Set to true if the forum is locked Dim intLoop 'Holds the number of times round in the Loop Counter Dim intNumOfForums 'Holds the number of forums Dim intForumOrder 'Holds the order number of the forum Dim intNumOfCategories 'Holds the number of categories Dim intCatOrder 'Holds the order number of the category 'Craete a recordset to get the forum details Set rsCategory = Server.CreateObject("ADODB.Recordset") 'Read the various categories from the database 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT tblCategory.* FROM tblCategory ORDER BY tblCategory.Cat_order ASC;" rsCategory.CursorType = 1 'Query the database rsCategory.Open strSQL, strCon 'Check there are categories to display If rsCategory.EOF Then 'If there are no categories to display then display the appropriate error message Response.Write vbCrLf & "" 'Else there the are categories so write the HTML to display categories and the forum names and a discription Else 'Create a recordset to get the forum details Set rsForum = Server.CreateObject("ADODB.Recordset") 'Get the number of categories intNumOfCategories = rsCategory.RecordCount 'Loop round to read in all the categories in the database Do While NOT rsCategory.EOF 'Get the category name from the database strCategory = rsCategory("Cat_name") intCatID = CInt(rsCategory("Cat_ID")) intCatOrder = CInt(rsCategory("Cat_order")) 'Display the category name%> <% 'Read the various forums from the database 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT tblForum.* FROM tblForum WHERE tblForum.Cat_ID = " & intCatID & " ORDER BY tblForum.Forum_Order ASC;" rsForum.CursorType = 1 'Query the database rsForum.Open strSQL, strCon 'Check there are forum's to display If rsForum.EOF Then 'If there are no forum's to display then display the appropriate error message Response.Write vbCrLf & "" 'Else there the are forum's to write the HTML to display it the forum names and a discription Else 'Get the number of categories intNumOfForums = rsForum.RecordCount 'Loop round to read in all the forums in the database Do While NOT rsForum.EOF 'Read in forum details from the database intForumID = CInt(rsForum("Forum_ID")) strForumName = rsForum("Forum_name") strForumDiscription = rsForum("Forum_description") intForumOrder = CInt(rsForum("Forum_order")) blnForumLocked = CBool(rsForum("Locked")) 'Write the HTML of the forum descriptions and hyperlinks to the forums%> <% 'Move to the next database record rsForum.MoveNext 'Loop back round for next forum Loop End If 'Close recordsets rsForum.Close 'Move to the next database record rsCategory.MoveNext 'Loop back round for next category Loop End If %>
Forum Lock Delete Order
There are no Categories to display. Click here to create a Forum Category
<% = strCategory %> Delete
There are no Forum's to display. Click here to create a Forum
<% = strForumName %>
<% = strForumDiscription %>
<% 'If the forum is locked and the user is admin let them unlock it If blnForumLocked = True Then Response.Write (" ") 'If the forum is not lovked and this is the admin then let them lock it ElseIf blnForumLocked = False Then Response.Write (" ") End If %> Delete


Please note to set up Moderators on any of the Forum's please use the Forum Membership Administration,
from where you can select moderators by clicking on the members Username and editing their Forum status.