<% @ Language=VBScript codepage=1255 %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** '** Copyright 2001-2003 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 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 'Read the various categories from the database 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Category.* FROM " & strDbTable & "Category ORDER BY " & strDbTable & "Category.Cat_order ASC;" 'Set the curson type to 1 so we can count the number of records returned rsCommon.CursorType = 1 'Query the database rsCommon.Open strSQL, adoCon 'Check there are categories to display If rsCommon.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 = rsCommon.RecordCount 'Loop round to read in all the categories in the database Do While NOT rsCommon.EOF 'Get the category name from the database strCategory = rsCommon("Cat_name") intCatID = CInt(rsCommon("Cat_ID")) intCatOrder = CInt(rsCommon("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 " & strDbTable & "Forum.* FROM " & strDbTable & "Forum WHERE " & strDbTable & "Forum.Cat_ID = " & intCatID & " ORDER BY " & strDbTable & "Forum.Forum_Order ASC;" rsForum.CursorType = 1 'Query the database rsForum.Open strSQL, adoCon '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 rsCommon.MoveNext 'Loop back round for next category Loop End If Set rsForum = Nothing Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %>
פורום נעילה מחיקה סידור
אין קטגוריות. לחצו כאן כדי ליצור קטגוריה חדשה
<% = strCategory %> מחיקה
אין פורומים. לחצו כאן כדי ליצור פורום חדש
<% = 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 %> מחיקה