<% Response.Buffer = True %> <% if Len(Session("UserID"))=0 then Response.Redirect "error1.asp" Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") 'objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\db\") & "\umcdb.mdb") objConn.Open("dsn=tantraco-tantra") %> <% if len(Session("UserID"))=0 then Response.redirect "error1.asp" end if '**************************************************************************************** '** Copyright Notice '** Scriptname: common.asp '** Discussion Borad '** This file is a main page for the forum.. '** Author: Anurag Rastogi '** Copyright 2002-2003 Webtrix Tecnologies Ltd.(http://www.webtrixindia.com) '**************************************************************************************** %> <% Dim rsConfiguration1 'Holds the Dim strfirmname 'Holds the Firm Name Dim stradminemail 'Holds the Admin Email Dim webmasteremail 'hold the webmaster email Dim firmname 'hold the firmname Dim webaddress 'hold the firm website URl Dim address 'hold the firm address Dim phone1,phone2,phone3 'hold the firm's phone number Dim fax1,fax2 'hold the firm's Fax number Set rsConfiguration1 = objConn.CreateObject("ADODB.Recordset") rsConfiguration1.Open "SELECT * From AdministrationUsers",objConn 'If there is config deatils in the recordset then read them in If NOT rsConfiguration1.EOF Then stradminemail=rsConfiguration1("Email") firmname=rsConfiguration1("firmname") webaddress=rsConfiguration1("webaddress") address=rsConfiguration1("address") phone1=rsConfiguration1("phone1") phone2=rsConfiguration1("phone2") phone3=rsConfiguration1("phone3") fax1=rsConfiguration1("fax1") fax2=rsConfiguration1("fax2") end if rsConfiguration1.close 'Set the timeout of the forum Server.ScriptTimeout = 200 Dim adoCon 'Database Connection Variable Dim rsLoggedInUser 'Hols the recordset for the user Id number Dim rsConfiguration 'Holds the configuartion recordset Dim rsModerator 'holds wether the user can moderate this forum Dim strSQL 'Holds the SQL query for the database Dim lngLoggedInUserID 'Holds a logged in users ID number Dim strLoggedInUsername 'Holds a logged in users username Dim strForumEmailAddress 'Holds the forum e-mail address Dim blnTextLinks 'Set to true if you want text links instead of the powered by logo Dim blnIEEditor 'Set to true if the HTML editor for IE 5+ is turned on Dim blnEmail 'Boolean set to true if e-mail is on Dim blnAdminEmail 'Boolean set to true if admin e-mail is on Dim strMailComponent 'Email coponent the forum useses Dim strIncomingMailServer 'Forums incomming mail server Dim strLoggedInUserCode 'Holds the user code of the user Dim blnLCode 'set to true Dim blnModerator 'Set to true if the user is a forum moderator Dim blnActiveMember 'Set to false if the member is no longer allowed to post messages on the forum Dim blnLoggedInUserEmail 'Set to true if the user has entered there e-mail Dim blnLoggedInUserSignature 'set to true if the user has enetered a signature Dim intTopicPerPage 'Holds the number of topics to show on each page Dim blnEmoticons 'Set to true if emoticons are turned on Dim strDatabaseDateFunction 'Holds a different date function for Access or SQL server Dim strDatabaseType 'Holds the type of database used Dim blnGuestPost 'Set to true if guests can post Dim intMemberStatus 'Holds the members status level Dim blnModeratorAdmin 'Set to true if the moderator has some admin rights Dim blnEmailActivation 'Set to true if the e-mail activation is turned on Dim blnSendPost 'Set to true if post is sent with e-mail notification Dim intNumHotViews 'Holds the number of how many views a topic has before it becomes a hot topic Dim intNumHotReplies 'Holds the number of replies before a topic becomes a hot topic Dim intThreadsPerPage 'Holds the number of threads shown per page Dim strDbPathAndName 'Holds the path and name of the database Dim intSpamTimeLimitSeconds 'Holds the number of secounds between posts Dim intSpamTimeLimitMinutes 'Holds the number of minutes the user can post five posts in 'Initialise variables lngLoggedInUserID = 0 intMemberStatus = 0 blnEmail = False blnAdminEmail = False blnLCode = True blnModerator = False blnIEEditor = True blnActiveMember = True blnLoggedInUserEmail = False blnLoggedInUserSignature = False blnEmoticons = True blnGuestPost = False 'Database Type strDatabaseType = "Access" 'strDatabaseType = "SQLServer" 'Create database connection 'Create a connection odject Set adoCon = Server.CreateObject("ADODB.Connection") '--------------------- Set the path and name of the database -------------------------------------------------------------------------------- 'strDbPathAndName = "../db/umcdb.mdb" '--------------------------------------------------------------------------------------------------------------------------------------------- '------------- If you are having problems with the script then try using a diffrent driver or DSN by editing the lines below -------------- 'Database connection info and driver (if this driver does not work then comment it out and use one of the alternative drivers) 'strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(strDbPathAndName) 'Alternative drivers faster than the basic one above 'strCon = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=" & Server.MapPath(strDbPathAndName) 'This one is if you convert the database to Access 97 'strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(strDbPathAndName) 'This one is for Access 2000/2002 'If you wish to use DSN then comment out the driver above and uncomment the line below (DSN is slower than the above drivers) 'strCon = "DSN=tantraco-tantra" 'Place the DSN where you see DSN_NAME '--------------------------------------------------------------------------------------------------------------------------------------------- 'Set the diffrent variables for diffrent database types If strDatabaseType = "SQLServer" Then %> <% '**************************************************************************************** '** Copyright Notice '** '** WebtriX Discussion Forum '** '** Copyright 2001-2002 All Rights Reserved. '** '**************************************************************************************** Dim strSQLServerName 'Holds the name of the SQL Server Dim strSQLDBUserName 'Holds the user name (for SQL Server Authentication) Dim strSQLDBPassword 'Holds the password (for SQL Server Authentication) Dim strSQLDBName 'Holds name of a database on the server '------------- The Driver Below is if you are using SQL Server (Do Not Use Unless you know and have an SQL Server) --------------------------- 'Enter the details of your SQL server below strSQLServerName = "" 'Holds the name of the SQL Server strSQLDBUserName = "" 'Holds the user name (for SQL Server Authentication) strSQLDBPassword = "" 'Holds the password (for SQL Server Authentication) strSQLDBName = "" 'Holds name of a database on the server 'Please note the forum has been optimised for the SQL OLE DB Driver using another driver 'or system DSN to connect to the SQL Server database will course errors in the forum and 'drastically reduce the performance of the forum! 'The SQLOLEDB driver offers the highest performance at this time for connecting to SQL Server databases from within ASP. 'SQL Server OLE Driver strCon = "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";" '--------------------------------------------------------------------------------------------------------------------------------------------- %> <% 'The GetDate() function is used in SQL Server strDatabaseDateFunction = "GetDate()" Else 'The now() function is used in Access strDatabaseDateFunction = "Now()" End If 'Set an active connection to the Connection object adoCon.Open strCon 'Read in the Forum configuration 'Intialise the ADO recordset object Set rsConfiguration = Server.CreateObject("ADODB.Recordset") 'Initialise the SQL variable with an SQL statement to get the configuration details from the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpSelectConfiguration" Else strSQL = "SELECT tblConfiguration.* From tblConfiguration;" End If 'Query the database rsConfiguration.Open strSQL, strCon 'If there is config deatils in the recordset then read them in If NOT rsConfiguration.EOF Then 'read in the configuration details from the recordset strMailComponent = rsConfiguration("mail_component") strIncomingMailServer = rsConfiguration("mail_server") blnLCode = CBool(rsConfiguration("L_Code")) blnEmail = CBool(rsConfiguration("email_notify")) blnAdminEmail = CBool(rsConfiguration("email_admin")) blnTextLinks = rsConfiguration("Text_link") blnIEEditor = CBool(rsConfiguration("IE_editor")) intTopicPerPage = CInt(rsConfiguration("Topics_per_page")) blnEmoticons = CBool(rsConfiguration("Emoticons")) blnGuestPost = CBool(rsConfiguration("Guest_post")) blnModeratorAdmin = CBool(rsConfiguration("Mod_admin")) blnEmailActivation = CBool(rsConfiguration("Email_activate")) intNumHotViews = CInt(rsConfiguration("Hot_views")) intNumHotReplies = CInt(rsConfiguration("Hot_replies")) blnSendPost = CBool(rsConfiguration("Email_post")) intThreadsPerPage = CInt(rsConfiguration("Threads_per_page")) intSpamTimeLimitSeconds = CInt(rsConfiguration("Spam_seconds")) intSpamTimeLimitMinutes = CInt(rsConfiguration("Spam_minutes")) End If 'Set a cookie with the last date/time the user used the forum to calculate if there any new posts 'If the date/time the user was last here is 20 mintes since the last visit then set the session variable to the users last date they were here If Session("dtmLastVisit") = "" AND Request.Cookies("ForumVisit")("LastVist") <> "" Then Session("dtmLastVisit") = CDate(Request.Cookies("ForumVisit")("LastVist")) Response.Cookies("ForumVisit")("LastVist") = Day(Now()) & " " & MonthName(Month(Now()),True) & " " & Year(Now()) & " " & FormatDateTime(Now(), vbShortTime) Response.Cookies("ForumVisit").Expires = DateAdd("yyyy", 1, Now()) 'If the last enetry date is not alreay set set it to now ElseIf Session("dtmLastVisit") = "" Then Session("dtmLastVisit") = Now() End If 'If the cookie is older than 5 mintues set a new one If isDate(Request.Cookies("ForumVisit")("LastVist")) Then If CDate(Request.Cookies("ForumVisit")("LastVist")) < DateAdd("n", -5, Now()) Then Response.Cookies("ForumVisit")("LastVist") = Day(Now()) & " " & MonthName(Month(Now()),True) & " " & Year(Now()) & " " & FormatDateTime(Now(), vbShortTime) Response.Cookies("ForumVisit").Expires = DateAdd("yyyy", 1, Now()) End If 'If there is no date in the cookie or it is empty then set the date to now() Else Response.Cookies("ForumVisit")("LastVist") = Day(Now()) & " " & MonthName(Month(Now()),True) & " " & Year(Now()) & " " & FormatDateTime(Now(), vbShortTime) Response.Cookies("ForumVisit").Expires = DateAdd("yyyy", 1, Now()) End If strLoggedInUserCode =Session("UserID") 'If a cookie exsists on the users system then read in there username from the database If isEmpty(strLoggedInUserCode) = False Then 'Intialise the ADO recordset object Set rsLoggedInUser = Server.CreateObject("ADODB.Recordset") 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpChkUserID @strUserID = '" & strLoggedInUserCode & "'" Else strSQL = "SELECT * FROM Members WHERE ID = " & strLoggedInUserCode & "" End If 'Query the database rsLoggedInUser.Open strSQL, strCon 'If the database has returned a record then run next bit If NOT rsLoggedInUser.EOF Then Dim MemberStatus 'Before getting the users details make sure then are not trying to log in under the guest account If rsLoggedInUser("ID") <> 2 Then 'Read in the users details from the recordset strLoggedInUsername = rsLoggedInUser("Nickname") lngLoggedInUserID = CLng(rsLoggedInUser("ID")) If rsLoggedInUser("Nickname") <> "" Then blnLoggedInUserEmail = True intMemberStatus = Cint(rsLoggedInUser("Status")) 'If we are in a forum see if this user is a forum moderator If Request("ForumID") <> "" Then 'Intialise the ADO recordset object Set rsModerator = Server.CreateObject("ADODB.Recordset") 'SQL query to see if this person moderates this forum If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpCheckUserIsModerator @lngUserID = " & CLng(lngLoggedInUserID) & ", @intForumID = " & CInt(Request("ForumID")) Else strSQL = "SELECT TOP 1 tblModerator.Moderator_ID FROM tblModerator " strSQL = strSQL & "WHERE tblModerator.Author_ID=" & CLng(lngLoggedInUserID) & " AND (tblModerator.Forum_ID=" & CInt(Request("ForumID")) & " OR tblModerator.Forum_ID=0);" End If 'Query the database rsModerator.Open strSQL, strCon 'If a record is returned then this user moderates this forum :) If NOT rsModerator.EOF Then blnModerator = True 'Get rid of them objects rsModerator.Close Set rsModerator = Nothing End If Else lngLoggedInUserID = 0 End If 'Otherwise the username is not correct or the user has been barred so set there User ID to 0 Else lngLoggedInUserID = 0 End If End If 'If the user is logged in and the Guest account posting is enabled then set the user up to be able to post If lngLoggedInUserID = 0 AND blnGuestPost = True then strLoggedInUsername = strTxtGuest lngLoggedInUserID = 2 intMemberStatus = 0 blnActiveMember = True End If 'Make sure the admin account remains active and full access rights If lngLoggedInUserID = 1 Then intMemberStatus = 3 blnActiveMember = True End If 'If the logged on user id is 0 then this person is a guest so set the username to guest If lngLoggedInUserID = 0 Then strLoggedInUsername = strTxtGuest 'Reset server objects rsConfiguration.Close Set rsConfiguration = Nothing 'rsLoggedInUser.Close Set rsLoggedInUser = Nothing %> <%'**************************************************************************************** '** Copyright Notice '** '** WebtriX Discussion Forum '** '** Copyright 2001-2002 All Rights Reserved. '** '**************************************************************************************** 'Dimension variables Dim rsDateTimeFormat 'Holds the date a time data Dim saryDateTimeData(19) 'Holds the info for converting the date and time Dim intLoopCounter 'loop counter 'Craete a recordset to get the date and time format data Set rsDateTimeFormat = Server.CreateObject("ADODB.Recordset") 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpTimeAndDateSettings" Else strSQL = "SELECT tblDateTimeFormat.* FROM tblDateTimeFormat;" End If 'Query the database rsDateTimeFormat.Open strSQL, strCon 'All the data is feed into an array from the recordset to be used later, this is done 'as some versions of MDAC will report an error if the recordset is opened in the functions 'below, if called a large number of times. 'If there are records returned then enter the data returned into an array If NOT rsDateTimeFormat.EOF Then 'Initilise the array saryDateTimeData(0) = rsDateTimeFormat("Date_format") saryDateTimeData(1) = rsDateTimeFormat("Year_format") saryDateTimeData(2) = rsDateTimeFormat("Seporator") 'Initialise the mounth part of the array in a loop to save writing it 12 times For intLoopCounter = 1 to 12 saryDateTimeData((intLoopCounter + 2)) = rsDateTimeFormat("Month" & (intLoopCounter)) Next saryDateTimeData(15) = rsDateTimeFormat("Time_format") saryDateTimeData(16) = rsDateTimeFormat("Server_offset") saryDateTimeData(17) = rsDateTimeFormat("Server_offset_hours") saryDateTimeData(18) = rsDateTimeFormat("am") saryDateTimeData(19) = rsDateTimeFormat("pm") End If 'Relese server objects rsDateTimeFormat.Close Set rsDateTimeFormat = Nothing 'Function to format date Private Function DateFormat(dtmDate, saryDateTimeData) Dim strNewDate 'Holds the new date format Dim intDay 'Holds the integer number for the day Dim intMonth 'Holds a integer number from 1 to 12 for the month Dim strMonth 'Holds the month in it's final format which may be a number or a string so it is set to a sring value Dim intYear 'Holds the year Dim dtmTempDate 'Temprary storage area for date 'If the array is empty set the date as UK If isNull(saryDateTimeData) Then 'Set the date as orginal DateFormat = dtmDate 'If there is a data in the array then format the date Else 'Place the server time off set onto the recorded database time If saryDateTimeData(16) = "+" Then dtmTempDate = DateAdd("h", + CInt(saryDateTimeData(17)), dtmDate) ElseIf saryDateTimeData(16) = "-" Then dtmTempDate = DateAdd("h", - CInt(saryDateTimeData(17)), dtmDate) End If 'Seprate the date into differnet strings intDay = CInt(Day(dtmTempDate)) intMonth = CInt(Month(dtmTempDate)) intYear = CInt(Year(dtmTempDate)) 'Place 0 infront of days under 10 If intDay < 10 then intDay = "0" & intDay 'If the year is two digits then sorten the year string If saryDateTimeData(1) = "short" Then intYear = Right(intYear, 2) 'Format the month strMonth = saryDateTimeData((intMonth + 2)) 'Format the date Select Case saryDateTimeData(0) 'Format dd/mm/yy Case "dd/mm/yy" DateFormat = intDay & saryDateTimeData(2) & strMonth & saryDateTimeData(2) & intYear 'Format mm/dd/yy Case "mm/dd/yy" DateFormat = strMonth & saryDateTimeData(2) & intDay & saryDateTimeData(2) & intYear 'Format yy/dd/mm Case "yy/dd/mm" DateFormat = intYear & saryDateTimeData(2) & intDay & saryDateTimeData(2) & strMonth 'Format yy/mm/dd Case "yy/mm/dd" DateFormat = intYear & saryDateTimeData(2) & strMonth & saryDateTimeData(2) & intDay End Select End If End Function 'Function to format time Function TimeFormat(dtmTime, saryDateTimeData) Dim strNewDate 'Holds the new date format Dim intHour 'Holds the integer number for the hours Dim intMinute 'Holds a integer number for the mintes Dim strPeriod 'Holds wether it is am or pm Dim dtmTempTime 'Temporary storage area for the time 'If the array is empty then return tyhe original time If isNull(saryDateTimeData) Then 'Set the date as UK TimeFormat = dtmTime 'If there is a data in the array then format the date Else 'Place the server time off set onto the recorded database time If saryDateTimeData(16) = "+" Then dtmTempTime = DateAdd("h", + CInt(saryDateTimeData(17)), dtmTime) ElseIf saryDateTimeData(16) = "-" Then dtmTempTime = DateAdd("h", - CInt(saryDateTimeData(17)), dtmTime) End If 'Seprate the time into differnet strings intHour = CInt(Hour(dtmTempTime)) intMinute = CInt(Minute(dtmTempTime)) 'Place 0 infront of minutes under 10 If intMinute < 10 then intMinute = "0" & intMinute 'If the time is 12 hours then change the time to 12 hour clock If CInt(saryDateTimeData(15)) = 12 Then 'Set the time period If intHour >= 12 then strPeriod = saryDateTimeData(19) Else strPeriod = saryDateTimeData(18) End If 'Change the hour to 12 hour clock time Select Case intHour Case 00 intHour = 12 Case 01 intHour = 1 Case 02 intHour = 2 Case 03 intHour = 3 Case 04 intHour = 4 Case 05 intHour = 5 Case 06 intHour = 6 Case 07 intHour = 7 Case 08 intHour = 8 Case 09 intHour = 9 Case 13 intHour = 1 Case 14 intHour = 2 Case 15 intHour = 3 Case 16 intHour = 4 Case 17 intHour = 5 Case 18 intHour = 6 Case 19 intHour = 7 Case 20 intHour = 8 Case 21 intHour = 9 Case 22 intHour = 10 Case 23 intHour = 11 End Select 'ElseIf it is 24 hour clock place another 0 infront of anything below 10 hours ElseIf intHour < 10 Then intHour = "0" & intHour End If 'Return the Formated time TimeFormat = intHour & ":" & intMinute & strPeriod End If End Function %> <% 'Response.write (Session("UserID")) If (Session("UserID"))="" Then Response.Redirect "../login.asp?error=1" ElseIf session("userID")<>"" then Dim pduser set pduser = CreateObject("Adodb.Recordset") pduser.open "select * from members where ID=" & session("userID") & " and paid=true", objconn, 3, 3 if pduser.eof then Response.Redirect "../paynow.asp?msg=forum" end if End If %> <% '**************************************************************************************** '** Copyright Notice '** '** WebtriX Discussion Forum '** '** Copyright 2001-2002 All Rights Reserved. '** '**************************************************************************************** 'Global '--------------------------------------------------------------------------------- Const strTxtWelcome = "Welcome" Const strTxtWelcomeGuest = "Welcome Guest" Const strTxtAllForums = "All Forums" Const strTxtTopics = "Topics" Const strTxtPosts = "Posts" Const strTxtLastPost = "Last Post" Const strTxtPostPreview = "Post Preview" Const strTxtAt = "at" Const strTxtBy = "By" Const strTxtOn = "on" Const strTxtProfile = "Profile" Const strTxtSearch = "Search" Const strTxtQuote = "Quote" Const strTxtVisit = "Visit" Const strTxtView = "View" Const strTxtHome = "Home" Const strTxtHomepage = "Homepage" Const strTxtEdit = "Edit" Const strTxtDelete = "Delete" Const strTxtEditProfile = "Edit Profile" Const strTxtLogOff = "Log Off" Const strTxtRegister = "Register" Const strTxtLogin = "Login" Const strTxtMembersList = "Display List of Forum Members" Const strTxtForumLocked = "Forum Locked" Const strTxtSearchTheForum = "Search The Forum" Const strTxtPostReply = "Post Reply" Const strTxtNewTopic = "Post New Topic" Const strTxtCloseWindow = "Close Window" Const strTxtNoForums = "There are no Forum's to display" Const strTxtReturnToDiscussionForum = "Return to the Main Page" Const strTxtMustBeRegistered = "You must be a registered user in order to be able to use this forum" Const strClickHereIfNotRegistered = "Click here if you are not a registered user" Const strTxtResetForm = "Reset Form" Const strTxtClearForm = "Clear Form" Const strTxtYes = "Yes" Const strTxtNo = "No" Const strTxtForumLockedByAdmim = "Sorry, this function has been disabled.
This Forum has been locked by the Forum Administrator." Const strTxtRequiredFields = "Indicates required fields" Const strTxtForumJump = "Forum Jump" Const strTxtSelectForum = "Select Forum" 'Global Error '--------------------------------------------------------------------------------- Const strTxtErrorDisplayLine = "_______________________________________________________________" Const strTxtErrorDisplayLine1 = "The form has not been submitted because there are problem(s) with the form." Const strTxtErrorDisplayLine2 = "Please correct the problem(s) and re-submit the form." Const strTxtErrorDisplayLine3 = "The following field(s) need to be corrected: -" Const strResetFormConfirm = "Are you sure you want to reset the form?" 'default.asp '--------------------------------------------------------------------------------- Const strTxtCookies = "Cookies and JavaScript must be enabled on your web browser in order to use this forum" Const strTxtForum = "Forum" Const strTxtLatestForumPosts = "Latest Forum Posts" Const strTxtForumStatistics = "Forum Statistics" Const strTxtNoForumPostMade = "There have been no Forum Posts" Const strTxtThereAre = "There are" Const strTxtPostsIn = "Posts in" Const strTxtTopicsIn = "Topics in" Const strTxtLastPostOn = "Last Post on" Const strTxtLastPostBy = "Last Post by" Const strTxtForumMembers = "Forum Members" Const strTxtTheNewestForumMember = "The Newest Forum Member is" 'display_forum_topics.asp '--------------------------------------------------------------------------------- Const strTxtThreadStarter = "Topic Starter" Const strTxtReplies = "Replies" Const strTxtViews = "Views" Const strTxtDeleteTopicAlert = "Are you sure you want to delete this topic?" Const strTxtDeleteTopic = "Delete Topic" Const strTxtNextTopic = "Next Topic" Const strTxtLastTopic = "Last Topic" Const strTxtShowTopics = "Show Topics" Const strTxtNoTopicsToDisplay = "There are no message's posted in this forum in the last" Const strTxtAll = "All" Const strTxtLastWeek = "from the Last Week" Const strTxtLastTwoWeeks = "from the Two Weeks" Const strTxtLastMonth = "from the Last Month" Const strTxtLastTwoMonths = "from the Last Two Months" Const strTxtLastSixMonths = "from the Last Six Months" Const strTxtLastYear = "from the Year" 'display_topic_threads.asp '--------------------------------------------------------------------------------- Const strTxtMessageBy = "Message posted by" Const strTxtLocation = "Location" Const strTxtJoined = "Joined" Const strTxtForumAdministrator = "Forum Administrator" Const strTxtForumModerator = "Forum Moderator" Const strTxtDeletePostAlert = "Are you sure you want to delete this post?" Const strTxtEditPost = "Edit Post" Const strTxtDeletePost = "Delete Post" Const strTxtSearchForPosts = "Search for other posts by" Const strTxtSubjectFolder = "Subject" Const strTxtPrintVersion = "Printable version" Const strTxtEmailTopic = "E-mail this topic" Const strTxtSorryNoReply = "Sorry, you can NOT post a reply." Const strTxtForumMembershipSespended = "Your Forum Membership is not active!" Const strTxtThisForumIsLocked = "This forum has been locked by the forum administrator." Const strTxtPostAReplyRegister = "If you wish to post a reply to this thread you must first" Const strTxtNeedToRegister = "If you are not already registered you must first" Const strTxtSmRegister = "register" Const strTxtNoThreads = "There are no thread's in the database relating to this topic" Const strTxtNotGiven = "Not Given" Const strTxtNoMessageError = "Message \t- Enter a Message to post" 'search_form.asp '--------------------------------------------------------------------------------- Const strTxtDiscussionForumSearch = "Discussion Forum Search" Const strTxtSearchFormError = "Search For\t- Enter something to search for" 'search.asp '--------------------------------------------------------------------------------- Const strTxtSearchResults = "Forum Search Results" Const strTxtYourSearchHasFound = "Your search has found" Const strTxtResults = "results" Const strTxtNoSearchResults = "Sorry, your search found no results" Const strTxtClickHereToRefineSearch = "Click here to refine your search" Const strTxtSearchFor = "Search For" Const strTxtSearchIn = "Search In" Const strTxtSearchOn = "Search On" Const strTxtAllWords = "All Words" Const strTxtAnyWords = "Any Words" Const strTxtPhrase = "Phrase" Const strTxtTopicSubject = "Topic Subject" Const strTxtMessageBody = "Message Body" Const strTxtAuthor = "Author" Const strTxtSearchForum = "Search Forum" Const strTxtSortResultsBy = "Sort Results By" Const strTxtLastPostTime = "Last Post Time" Const strTxtTopicStartDate = "Topic Start Date" Const strTxtSubjectAlphabetically = "Subject Alphabetically" Const strTxtNumberViews = "Number of Views" Const strTxtStartSearch = "Start Search" 'display_printer_threads.asp '--------------------------------------------------------------------------------- Const strTxtPrintPage = "Print Page" Const strTxtPrintedFrom = "Printed From" Const strTxtForumName = "Forum Name" Const strTxtForumDiscription = "Forum Discription" Const strTxtURL = "URL" Const strTxtPrintedDate = "Printed Date" Const strTxtTopic = "Topic" Const strTxtPostedBy = "Posted By" Const strTxtDatePosted = "Date Posted" 'IE_textbox.asp '--------------------------------------------------------------------------------- Const strTxtOriginallyPostedBy = "Originally posted by" 'emoticons.asp '--------------------------------------------------------------------------------- Const strTxtEmoticonSmilies = "Emoticon Smilies" Const strTxtClickOnEmoticonToAdd = "Click on the emoticon smiley you would like to add to your message." Const strTxtSmile = "Smile" Const strTxtEmbarassed = "Embarrassed" Const strTxtWink = "Wink" Const strTxtStar = "Star" Const strTxtShocked = "Shocked" Const strTxtDead = "Dead" Const strTxtBigSmile = "Big smile" Const strTxtSleepy = "Sleepy" Const strTxtConfused = "Confused" Const strTxtDisapprove = "Disapprove" Const strTxtUnhappy = "Unhappy" Const strTxtApprove = "Approve" Const strTxtAngry = "Angry" Const strTxtEvil = "Evil smile" Const strTxtClown = "Clown" Const strTxtCool = "Cool" 'login.asp '--------------------------------------------------------------------------------- Const strTxtSorryUsernamePasswordIncorrect = "Sorry the Username or Password entered is incorrect." Const strTxtPleaseTryAgain = "Please try again." Const strTxtUsername = "Username" Const strTxtPassword = "Password" Const strTxtLoginUser = "Login User" Const strTxtClickHereForgottenPass = "Click here if you have forgotten your password" Const strTxtErrorUsername = "Username \t- Enter your Forum Username" Const strTxtErrorPassword = "Password \t- Enter your Forum Password" 'forgotten_password.asp '--------------------------------------------------------------------------------- Const strTxtForgottenPassword = "Forgotten Password" Const strTxtNoRecordOfUsername = "Sorry, no record of the Username entered can not be found." Const strTxtNoEmailAddressInProfile = "Sorry, your profile does not contain an e-mail address.
Your password can not be e-mailed to you." Const strTxtReregisterForForum = "You will need to re register to use the forum." Const strTxtPasswordEmailToYou = "Your password has been e-mailed to you." Const strTxtPleaseEnterYourUsername = "Please enter your username in the box bellow.
Your password will then be sent to the e-mail address in your profile." Const strTxtValidEmailRequired = "If your forum profile does not contain a valid e-mail address for you then you will have to re register to use the forum." Const strTxtEmailPassword = "E-mail Password" Const strTxtEmailPasswordRequest = "A request has been made for your password to be e-mailed to you for the Forum on" Const strTxtEmailPasswordRequest2 = "Your password is: -" Const strTxtEmailPasswordRequest3 = "To go to the forum now click on the link below: -" 'forum_password_form.asp '--------------------------------------------------------------------------------- Const strTxtForumLogin = "Forum Login" Const strTxtErrorEnterPassword = "Password \t- Enter a Password to use this Forum" Const strTxtPasswordRequiredForForum = "This forum requires that you enter a password to proceed." Const strTxtForumPasswordIncorrect = "Sorry the Password entered is incorrect." Const strTxtAutoLogin = "Auto Login" Const strTxtLoginToForum = "Login To Forum" 'profile.asp '--------------------------------------------------------------------------------- Const strTxtNoUserProfileFound = "Sorry no profile can be found for this user" Const strTxtRegisteredToViewProfile = "Sorry, you must be a registered user to view profiles." Const strTxtMemberNo = "Member No." Const strTxtEmail = "E-mail" Const strTxtPrivate = "Private" 'post_message_form.asp '--------------------------------------------------------------------------------- Const strTxtPostNewTopic = "Post New Topic" Const strTxtErrorTopicSubject = "Subject \t- Enter a Subject for your new Topic" Const strTxtForumMemberSuspended = "Sorry, this function is disabled as your Forum Membership is not activate!" 'edit_post.asp '--------------------------------------------------------------------------------- Const strTxtNoPermissionToEditPost = "Sorry, you do not have permission to edit this post!" Const strTxtReturnForumTopic = "Return to Forum Topic" 'e-mail_topic.asp '--------------------------------------------------------------------------------- Const strTxtEmailTopicToFriend = "Email Topic To a Friend" Const strTxtFriendSentEmail = "Your Friend has been sent the e-mail" Const strTxtFriendsName = "Friends Name" Const strTxtFriendsEmail = "Friends Email" Const strTxtYourName = "Your Name" Const strTxtYourEmail = "Your E-mail" Const strTxtSendEmail = "Send E-mail" Const strTxtMessage = "Message" Const strTxtEmailFriendMessage = "I thought you might be interested in a post on the " Const strTxtEmailRecievedFrom = "You have received this e-mail from: -" Const strTxtErrorFrinedsName = "Friends Name \t- Enter your Friends Name" Const strTxtErrorFriendsEmail = "Friends E-mail \t- Enter a valid e-mail address for your friend" Const strTxtErrorYourName = "Your Name \t- Enter your Name" Const strTxtErrorYourEmail = "Your E-mail \t- Enter your valid e-mail address" Const strTxtErrorEmailMessage = "Message \t- Enter a message for your friend" 'forum_members.asp '--------------------------------------------------------------------------------- Const strTxtForumMembersList = "Forum Members List" Const strTxtMemberSearch = "Member Search" Const strTxtForumMembersOn = "forum members on" Const strTxtPageYouAerOnPage = "pages and you are on page number" Const strTxtYourSearchMembersFound = "Your search of the forum members found" Const strTxtMatches = "matches" Const strTxtUsernameAlphabetically = "Username Alphabetically" Const strTxtNewForumMembersFirst = "New Forum Members First" Const strTxtOldForumMembersFirst = "Old Forum Members First" Const strTxtLocationAlphabetically = "Location Alphabetically" Const strTxtRegistered = "Registered" Const strTxtSend = "Send" Const strTxtPrivateEmail = "a private e-mail" Const strTxtNext = "Next" Const strTxtPrevious = "Prev" Const strTxtPage = "Page" Const strTxtErrorMemberSerach = "Member Search\t- Enter a Memebers Username to search for" 'message_form.inc '--------------------------------------------------------------------------------- Const strTxtTextFormat = "Text Format" Const strTxtPreviewPost = "Preview Post" Const strTxtMode = "Mode" Const strTxtPrompt = "Prompt" Const strTxtBasic = "Basic" Const strTxtAddEmailLink = "Add E-mail Link" Const strTxtList = "List" Const strTxtCentre = "Centre" Const strTxtEnterBoldText = "Enter text you want formatted in Bold" Const strTxtEnterItalicText = "Enter text you want formatted in Italic" Const strTxtEnterUnderlineText = "Enter text you want Underlined" Const strTxtEnterCentredText = "Enter text you want Centred" Const strTxtEnterHyperlinkText = "Enter the on screen display text for the Hyperlink" Const strTxtEnterHeperlinkURL = "Enter the URL address to create Hyperlink to" Const strTxtEnterEmailText = "Enter the on screen display text for the e-mail address" Const strTxtEnterEmailMailto = "Enter the e-mail address to link to" Const strTxtEnterImageURL = "Enter the web address of the image" Const strTxtEnterTypeOfList = "Type of list" Const strTxtEnterEnter = "Enter" Const strTxtEnterNumOrBlankList = "for numbered or leave blank for bulleted" Const strTxtEnterListError = "ERROR! Please enter" Const strEnterLeaveBlankForEndList = "List item Leave blank to end list" 'IE_message_form.inc '--------------------------------------------------------------------------------- Const strTxtCut = "Cut" Const strTxtCopy = "Copy" Const strTxtPaste = "Paste" Const strTxtBold = "Bold" Const strTxtItalic = "Italic" Const strTxtUnderline = "Underline" Const strTxtLeftJustify = "Left Justify" Const strTxtCentrejustify = "Centre Justify" Const strTxtRightJustify = "Right Justify" Const strTxtUnorderedList = "Unordered List" Const strTxtOutdent = "Outdent" Const strTxtIndent = "Indent" Const strTxtAddHyperlink = "Add Hyperlink" Const strTxtAddImage = "Add Image" Const strTxtJavaScriptEnabled = "JavaScript must be enabled on your web browser for you to post a message in the forum!" Const strTxtShowSignature = "Show Signature" Const strTxtEmailNotify = "E-mail Notify me of Replies" Const strTxtUpdatePost = "Update Post" Const strTxtSpecialCharacters = "Special Characters" Const strTxtFontColour = "Colour" 'register_form.inc '--------------------------------------------------------------------------------- Const strTxtRegisterNewUser = "Register New User" Const strTxtProfileUsernameLong = "This is the name displayed when you use the forum" Const strTxtRetypePassword = "Retype Password" Const strTxtProfileEmailLong = "Not required, but useful if you wish to be notified when someone answers one of your post's or if you lose your password" Const strTxtShowHideEmail = "Show or hide e-mail" Const strTxtShowHideEmailLong = "Hide your e-mail address if you want it kept private from other users" Const strTxtShowEmail = "Show E-mail" Const strTxtHideEmail = "Hide E-mail" Const strTxtSelectCountry = "Select Country" Const strTxtProfileAutoLogin = "Automatically log me in when I return to the Forum" Const strTxtSignature = "Signature" Const strTxtSignatureLong = "Enter a signature that you would like shown at the bottom of your Forum Posts" Const strTxtErrorUsernameChar = "Username \t- Your Username must be at least 4 characters" Const strTxtErrorPasswordChar = "Password \t- Your Password must be at least 4 characters" Const strTxtErrorPasswordNoMatch = "Password Error\t- The passwords entered do not match" Const strTxtErrorValidEmail = "E-mail\t\t- Enter your valid e-mail address" Const strTxtErrorValidEmailLong = "If you don't want to enter your e-mail address then leave the e-mail field blank" Const strTxtErrorNoEmailToShow = "You can not show your e-mail address if you haven\'t enetered one!" Const strTxtErrorSignatureToLong = "Signature \t- Your signature has to many characters" 'profile_edit.inc '--------------------------------------------------------------------------------- Const strTxtUpdateProfile = "Update Profile" 'register_new_user.inc '--------------------------------------------------------------------------------- Const strTxtUsrenameGone = "Sorry the Username you requested is already taken.
Please choose another Username." Const strTxtEmailThankYouForRegistering = "Thank-you for taking the time to register to use the" Const strTxtEmailYouCanNowUseTheForumAt = "Your login details can be found below and now you have registered for a new account you can post new messages and reply to existing ones on the" Const strTxtEmailForumAt = "Forum at" Const strTxtEmailToThe = "to the" 'register_new_user.inc '--------------------------------------------------------------------------------- Const strTxtEmailAMeesageHasBeenPosted = "A message has been posted in the forum on" Const strTxtEmailClickOnLinkBelowToView = "To view the post then click on the link below" Const strTxtEmailAMeesageHasBeenPostedOnForumNum = "A message has been posted in the forum number" 'registration_rules.asp '--------------------------------------------------------------------------------- Const strTxtForumRulesAndPolicies = "Forum Rules and Policies" Const srtTxtAccept = "Accept" Const strTxtCancel = "Cancel" 'New from version 6 '--------------------------------------------------------------------------------- Const strTxtHi = "Hi" Const strTxtForumPostNotifi = "Forum Post Notification" Const strTxtInterestingForumPostOn = "Interesting Forum post on" Const strTxtForumLostPasswordRequest = "Forum Lost Password Request" Const strTxtLockTopic = "Lock Closed" Const strTxtLockForum = "Lock Forum" Const strTxtLockTopicAlert = "Are you sure you want to Lock this Topic?" Const strTxtUnLockTopicAlert = "Are you sure you want to Un-Lock this Topic?" Const strTxtLockForumAlert = "Are you sure you want to Lock this Forum?" Const strTxtUnLockForumAlert = "Are you sure you want to Un-Lock this Forum?" Const strTxtLockedTopic = "Closed Topic" Const strTxtUnLockTopic = "Un-Lock Topic" Const strTxtTopicLocked = "Topic Closed" Const strTxtUnForumLocked = "Un-Lock Forum" Const strTxtThisTopicIsLocked = "This topic is closed." Const strTxtThatYouAskedKeepAnEyeOn = "that you asked us to keep an eye on." Const strTxtTheTopicIsNowDeleted = "The Topic has now been Deleted." Const strTxtOf = "of" Const strTxtDeleteMember = "Delete Member" Const strTxtTheTimeNowIs = "The time now is" Const strTxtYouLastVisitedOn = "You last visited on" Const strTxtSendMsg = "Send Msg" Const strTxtSendPrivateMessage = "Send Private Message" Const strTxtDeleteMemberCheck = "Are you sure you want to permanently Delete this Member from the Forum?" Const strTxtActiveUsers = "Active Users" Const strTxtGuestsAnd = "Guest(s) and" Const strTxtMembers = "Member(s)" Const strTxtPreview = "Preview" Const strTxtRemoveAvatar = "Remove Icons" Const strTxtRemoveSignature = "Remove Signature" Const strTxtThereIsNothingToPreview = "There is nothing to preview" Const strTxtEnterTextYouWouldLikeIn = "Enter the text that you would like in" Const strTxtEmailAddressAlreadyUsed = "Sorry, the e-mail address entered has already been used to register a member." Const strTxtIP = "IP" Const strTxtIPLogged = "IP Logged" Const strTxtPages = "Pages" Const strTxtCharacterCount = "Character Count" Const strTxtAdmin = "Admin" Const strTxtType = "Group" Const strTxtActive = "Active" Const strNotActive = "Not Active" Const strTxtSuspended = "Suspended" Const strTxtMembership = "Membership" Const strTxtUpdateAccount = "Update Profile" Const strTxtGuest = "Guest" Const strTxtStandardMember = "Standard Member" Const strTxtGoldMember = "Gold Member" Const strTxtPlatinumMember = "Platinum Member" Const strTxtEmailRequiredForActvation = "Required to be able to receive an e-mail to activate your membership" Const strTxtToActivateYourMembershipFor = "To activate your membership for" Const strTxtForumClickOnTheLinkBelow = "Forum click on the link below" Const strTxtForumAdmin = "Forum Admin" Const strTxtViewLastPost = "View Last Post" Const strTxtSelectAvatar = "Select Icons" Const strTxtAvatar = "Icons" Const strTxtSelectAvatarDetails = "This is the small icon shown next to your posts. Either select one from the list or type the path in to your own Icons (must be 32 x 32 pixels)." Const strTxtForumCodesInSignature = "can be used in your signature" Const strTxtHighPriorityPost = "Priority Topic" Const strTxtHighPriorityPostLocked = "Locked Priority Topic" Const strTxtHotTopicNewReplies = "Hot Topic (new replies)" Const strTxtHotTopic = "Hot Topic (no new replies)" Const strTxtOpenTopic = "Open Topic (no new replies)" Const strTxtOpenTopicNewReplies = "Open Topic (new replies)" Const strTxtPinnedTopic = "Pinned Topic" Const strTxtOpenForum = "Open Forum (no new replies)" Const strTxtOpenForumNewReplies = "Open Forum (new replies)" Const strTxtReadOnly = "Read Only (no new replies)" Const strTxtReadOnlyNewReplies = "Read Only (new replies)" Const strTxtPasswordRequired = "Password Required" Const strTxtNoAccess = "No Access" Const strTxtFont = "Font" Const strTxtSize = "Size" Const strTxtForumCodes = "Forum Codes" Const strTxtPriority = "Priority" Const strTxtNormal = "Normal" Const strTxtTopAllForums = "Top (all forums)" Const strTopThisForum = "Top (this forum)" Const strTopPinned = "Pinned" Const strTxtMarkAllPostsAsRead = "Mark all posts as read" Const strTxtDeleteCookiesSetByThisForum = "Delete cookies set by this forum" 'forum_codes '--------------------------------------------------------------------------------- Const strTxtYouCanUseForumCodesToFormatText = "You can use the following Forum Codes to Format your text" Const strTxtTypedForumCode = "Typed Forum Code" Const strTxtConvetedCode = "Converted Code" Const strTxtTextFormating = "Text Formatting" Const strTxtImagesAndLinks = "Images and Links" Const strTxtFontTypes = "Font Types" Const strTxtFontSizes ="Font Sizes" Const strTxtFontColours ="Font Colours" Const strTxtEmoticons = "Emoticons" Const strTxtFontSize = "Font Size" Const strTxtMyLink = "My Link" Const strTxtMyEmail = "My E-mail" 'insufficient_permission.asp '--------------------------------------------------------------------------------- Const strTxtAccessDenied = "Access Denied" Const strTxtInsufficientPermison = "Sorry, only members with sufficient permission can access this page." 'move_topic_form.asp '--------------------------------------------------------------------------------- Const strTxtMoveTopic = "Move Topic" Const strTxtSelectTheForumYouWouldLikeForumIn = "Select the Forum you would like this topic to be in" Const strTxtMoveTopicErrorMsg = "Forum\t- Please select a Forum to move the Topic to" 'active_users.asp '--------------------------------------------------------------------------------- Const strTxtActiveForumUsers = "Active Forum Users" Const strTxtAddMToActiveUsersList = "Add me to Active Users list" Const strTxtLoggedIn = "Logged In" Const strTxtLastActive = "Last Active" Const strTxtBrowser = "Browser" Const strTxtOS = "OS" Const strTxtMinutes = "minutes" Const strTxtAnnoymous = "Annoymous" 'not_posted.asp '--------------------------------------------------------------------------------- Const strTxtMessageNotPosted = "Message Not Posted" Const strTxtDoublePostingIsNotPermitted = "Double posting is not permitted; your message has been posted already." Const strTxtSpammingIsNotPermitted = "Spamming is not permitted!" Const strTxtYouHaveExceededNumOfPostAllowed = "You have exceeded the number of posts permitted in the time span.

Please try again later." Const strTxtYourMessageNoValidSubjectHeading = "Your message did not contain a valid subject heading." 'active_topics.asp '--------------------------------------------------------------------------------- Const strTxtActiveTopics = "Active Topics" Const strTxtLastVisitOn = "Last visit on" Const strTxtLastFifteenMinutes = "Last 15 minutes" Const strTxtLastThirtyMinutes = "Last 30 minutes" Const strTxtLastFortyFiveMinutes = "Last 45 minutes" Const strTxtLastHour = "Last hour" Const strTxtLastTwoHours = "Last 2 hours" Const strTxtYesterday = "Yesterday" Const strTxtShowActiveTopicsSince = "Show Active Topics since" Const strTxtNoActiveTopicsSince = "There are no Active Topics since" Const strTxtToDisplay = "to display" Const strTxtThereAreCurrently = "There are currently" 'pm_check.inc '--------------------------------------------------------------------------------- Const strTxtNewPMsClickToGoNowToPM = "new Private Message(s).\n\nClick OK to go to go to your Private Messenger." 'display_forum_topics.inc '--------------------------------------------------------------------------------- Const strTxtFewYears = "few years" Const strTxtWeek = "week" Const strTxtTwoWeeks = "two weeks" Const strTxtMonth = "month" Const strTxtTwoMonths = "two months" Const strTxtSixMonths = "6 months" Const strTxtYear = "year" 'Colours '--------------------------------------------------------------------------------- Const strTxtBlack = "Black" Const strTxtWhite = "White" Const strTxtBlue = "Blue" Const strTxtRed = "Red" Const strTxtGreen = "Green" Const strTxtYellow = "Yellow" Const strTxtOrange = "Orange" Const strTxtBrown = "Brown" Const strTxtMagenta = "Magenta" Const strTxtCyan = "Cyan" Const strTxtLimeGreen = "Lime Green" 'New from version 6.1 '--------------------------------------------------------------------------------- Const strTxtHasBeenSentTo = "has been sent to" Const strTxtCharactersInYourSignatureToLong = "characters in your signature, you must shorten it to below 200" Const strTxtThisIsToNotifyYouThat = "This is to notify you that" Const strTxtHasReadPMYouSentThem = "has read the Private Message you sent to them on" %> <% '**************************************************************************************** '** Copyright Notice '** '** WebtriX Discussion Forum '** '** Copyright 2001-2002 All Rights Reserved. '** '**************************************************************************************** 'Declare varibles Dim rsSecurityLevel 'Holds the recordset for the security setting Dim intMemberSecurityLevel 'Holds the security level of the forum Dim strMemberStatus 'Holds the string version of thye members status level 'Turn the members status number returned from the database into a string value Select Case intMemberStatus 'Guest status Case 0 strMemberStatus = "Guest" 'Standard member status Case 1 strMemberStatus = "Standard" 'Super member status Case 2 strMemberStatus = "Super" 'Power member status Case 3 strMemberStatus = "Power" End select 'Get the security level for the member within this forum If Request.QueryString("ForumID") <> "" Then 'Intialise the ADO recordset object Set rsSecurityLevel = Server.CreateObject("ADODB.Recordset") 'Initlise the sql statement If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpForumsAllWhereForumIs @intForumID = " & CInt(Request("ForumID")) Else strSQL = "SELECT tblForum." & strMemberStatus & " FROM tblForum WHERE tblForum.Forum_ID=" & CInt(Request("ForumID")) & "; " End If 'Query the database rsSecurityLevel.Open strSQL, strCon 'If theres a record returned then get the security level of the user on this forum If NOT rsSecurityLevel.EOF Then intMemberSecurityLevel = CInt(rsSecurityLevel(strMemberStatus)) End If 'Get rid of them objects rsSecurityLevel.Close Set rsSecurityLevel = Nothing End If 'If the user is the forum admin or moderator then set there security level to 1 (read and write) If lngLoggedInUserID = 1 OR blnModerator = True Then intMemberSecurityLevel = 1 'If the security level for this user on this forum is 3 they don't have permission to view this forum so send them elsewhere If intMemberSecurityLevel = 3 Then 'Reset Server Objects Set adoCon = Nothing Set strCon = Nothing 'Redirect to no permission page Response.Redirect("insufficient_permission.asp?" & Request.ServerVariables("QUERY_STRING")) End If %> <% '**************************************************************************************** '** Copyright Notice '** Scriptname: default.asp '** Discussion Borad '** This file is a main page for the forum.. '** Author: Anurag Rastogi '** Copyright 2002-2003 Webtrix Tecnologies Ltd.(http://www.webtrixindia.com) '**************************************************************************************** %> Tantra Connection... Discussion Forum <% 'Default White/Silver Skin '**************************************************************************************** '** Copyright Notice '** '** WebtriX Discussion Forum '** '** Copyright 2001-2002 All Rights Reserved. '** '**************************************************************************************** 'Global on Each Page '--------------------------------------------------------------------------------- Const strBgColour = "#17547B" Const strBgImage = "" Const strTextColour = "#0099ff" Const intSmallFontSize = 10 'Table colours '--------------------------------------------------------------------------------- Const strTableColour = "#17547B" Const strTableBgImage = "" Const strTableBorderColour = "#ffffff" Const strTableVariableWidth = "98%" Const strTableTitleColour = "#CCCCCC" Const strTableTitleBgImage = "forum_images/table_bg_image.gif" Const strTableTitleColour2 = "#17547B" Const strTableTitleBgImage2 = "" Const strTableEvenRowColour = "#17547B" Const strTableOddRowColour = "#17547B" 'Misc '--------------------------------------------------------------------------------- Const strProfileBgColour = "#CCCCCC" Const strIETextBoxColour = "#17547B" Const strImagePath = "forum_images/" 'Posts and Private Msg display box '--------------------------------------------------------------------------------- Const strTopBarColour = "#17547B" Const strTopBarBgImage = "" Const strSideBarColour = "#17547B" Const strSideBarImage = "" Const strDisplayPostBoxColour = "#17547B" Const strDisplayPostBoxImage = "" Const strBehindBgColour = "#666666" 'Buttons and Images '--------------------------------------------------------------------------------- Const intButtonHeight = 36 Const intButtonWidth = 117 Const intAvatarHeight = 32 Const intAvatarWidth = 32 Const strProfileBgImage = "" 'Cascading Style Sheet '--------------------------------------------------------------------------------- Response.Write(VbCrLf & "") %>
button3
<% = strTxtWelcome & " " & strLoggedInUsername %> <% 'If the user has logged in then the Logged In User ID number will not be 0 and not 2 for the guest account If NOT lngLoggedInUserID = 0 AND NOT lngLoggedInUserID = 2 Then 'Else the user is not logged Else 'Display a " & strTxtWelcome & " guset message with the option to login or register Response.Write vbCrLf & "" End If %> <% = strTxtActiveTopics %> <% = strTxtSearchTheForum %> 
<% Response.Write(strTxtTheTimeNowIs & " " & TimeFormat(now(), saryDateTimeData)) %>.
<% 'If this is not the first time the user has visted the site display the last visit time and date If Session("dtmLastVisit") < CDate(Request.Cookies("ForumVisit")("LastVist")) Then Response.Write(strTxtYouLastVisitedOn & " " & DateFormat(Session("dtmLastVisit"), saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(Session("dtmLastVisit"), saryDateTimeData) & ".") End If %>
<% 'Dimension variables Dim rsCategory 'Holds the categories for the forums Dim rsForum 'Holds the Recordset for the forum details Dim rsCount 'Holds the Recordset for the count of Topics Dim rsThread 'Holds the recordset for the thread details Dim rsStatistics 'Holds the latest posts from the database Dim intForumID 'Holds the forum ID number Dim strCategory 'Holds the category name Dim intCatID 'Holds the id for the category Dim strForumName 'Holds the forum name Dim strForumDiscription 'Holds the forum description Dim dtmForumStartDate 'Holds the forum start date Dim lngNumberOfTopics 'Holds the number of topics in a forum Dim lngNumberOfPosts 'Holds the number of Posts in the forum Dim lngTotalNumberOfTopics 'Holds the total number of topics in a forum Dim lngTotalNumberOfPosts 'Holds the total number of Posts in the forum Dim intNumberofForums 'Holds the number of forums Dim lngLastEntryMessageID 'Holds the message ID of the last entry Dim lngLastEntryTopicID 'Holds the topic ID of the last entry Dim dtmLastEntryDate 'Holds the date of the last entry to the forum Dim strLastEntryUser 'Holds the the username of the user who made the last entry Dim lngLastEntryUserID 'Holds the ID number of the last user to make and entry Dim blnForumLocked 'Set to true if the forum is locked Dim intForumColourNumber 'Holds the number to calculate the table row colour 'Initialise variables lngTotalNumberOfTopics = 0 lngTotalNumberOfPosts = 0 intNumberofForums = 0 intForumColourNumber = 0 'Craete a recordset to get the forum details Set rsCategory = Server.CreateObject("ADODB.Recordset") 'Create a record set object to the Threads held in the database Set rsThread = Server.CreateObject("ADODB.Recordset") 'Read the various categories from the database 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpCategoryAll" Else strSQL = "SELECT tblCategory.Cat_name, tblCategory.Cat_ID FROM tblCategory ORDER BY tblCategory.Cat_order ASC;" End If '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") 'Create a record set object to the Topics held in the database Set rsCount = Server.CreateObject("ADODB.Recordset") '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")) 'Display the category name 'Response.Write vbCrLf & "" 'Read the various forums from the database 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpForumsAllWhereCatIs @intCatID = " & intCatID Else strSQL = "SELECT tblForum.* FROM tblForum WHERE tblForum.Cat_ID = " & intCatID & " ORDER BY tblForum.Forum_Order ASC;" End If '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 'Loop round to read in all the forums in the database Do While NOT rsForum.EOF 'Get the row number intForumColourNumber = intForumColourNumber + 1 'Initialise variables lngNumberOfTopics = 0 lngNumberOfPosts = 0 lngLastEntryTopicID = 0 'Read in forum details from the database intForumID = CInt(rsForum("Forum_ID")) strForumName = rsForum("Forum_name") strForumDiscription = rsForum("Forum_description") dtmForumStartDate = CDate(rsForum("Date_Started")) blnForumLocked = CBool(rsForum("Locked")) intMemberSecurityLevel = CInt(rsForum(strMemberStatus)) 'Initilaise variables for the information required for each forum dtmLastEntryDate = dtmForumStartDate strLastEntryUser = strTxtForumAdministrator lngLastEntryUserID = 1 'Get the number of Topics 'Initalise the strSQL variable with an SQL statement to query the database to count the number of topics in the forums If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpForumTopicCount @intForumID = " & intForumID Else strSQL = "SELECT Count(tblTopic.Forum_ID) AS Topic_Count " strSQL = strSQL & "From tblTopic " strSQL = strSQL & "WHERE tblTopic.Forum_ID = " & intForumID & " " End If 'Query the database rsCount.Open strSQL, strCon 'Read in the number of Topics lngNumberOfTopics = CLng(rsCount("Topic_Count")) lngTotalNumberOfTopics = lngTotalNumberOfTopics + CLng(rsCount("Topic_Count")) 'Close the rs rsCount.Close 'Initalise the strSQL variable with an SQL statement to query the database for the date of the last entry and the author for the thread If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpLastForumPostEntry @intForumID = " & intForumID Else strSQL = "SELECT TOP 1 tblThread.Thread_ID, tblThread.Message_date, tblThread.Topic_ID, Members.Email, Members.ID, Members.Nickname " strSQL = strSQL & "FROM (tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID) INNER JOIN (Members INNER JOIN tblThread ON Members.ID = tblThread.Author_ID) ON tblTopic.Topic_ID = tblThread.Topic_ID " strSQL = strSQL & "WHERE tblTopic.Forum_ID = " & intForumID & " " strSQL = strSQL & "ORDER BY tblThread.Message_date DESC;" End If 'Query the database rsThread.Open strSQL, strCon 'If there are threads for topic then read in the date and author of the last entry If NOT rsThread.EOF Then 'Read in the deatils from the recorset lngLastEntryMessageID = CLng(rsThread("Thread_ID")) lngLastEntryTopicID = CLng(rsThread("Topic_ID")) dtmLastEntryDate = CDate(rsThread("Message_date")) strLastEntryUser = rsThread("Nickname") lngLastEntryUserID = CLng(rsThread("ID")) 'Get the number of Posts 'Initalise the strSQL variable with an SQL statement to query the database to count the number of threads in the forums If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpForumThreadCount @intForumID = " & intForumID Else strSQL = "SELECT Count(tblThread.Thread_ID) AS Thread_Count " strSQL = strSQL & "FROM tblTopic INNER JOIN tblThread ON tblTopic.Topic_ID = tblThread.Topic_ID " strSQL = strSQL & "GROUP BY tblTopic.Forum_ID " strSQL = strSQL & "HAVING (((tblTopic.Forum_ID)=" & intForumID & "));" End If 'Query the database rsCount.Open strSQL, strCon 'Get the thread count lngNumberOfPosts = CLng(rsCount("Thread_Count")) lngTotalNumberOfPosts = lngTotalNumberOfPosts + CLng(rsCount("Thread_Count")) 'Reset server variables rsCount.Close End If 'Reset variables rsThread.Close 'Write the HTML of the forum descriptions and hyperlinks to the forums %> <% 'Count the number of forums intNumberofForums = intNumberofForums + 1 '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 'Release server variables rsCategory.Close Set rsCategory = Nothing Set rsForum = Nothing Set rsCount = Nothing Set rsThread = Nothing %>
  <% = strTxtForum %> <% = strTxtTopics %> <% = strTxtPosts %> <% = strTxtLastPost %>
" & strTxtNoForums & "
" & strCategory & "
" & strTxtNoForums & "
<% 'If the user has no access to a forum diplay a no access icon If intMemberSecurityLevel = 3 AND blnModerator = False AND NOT lngLoggedInUserID = 1 Then Response.Write (" ") 'If the forum requires a password diplay the password icon ElseIf NOT rsForum("Password") = "" Then Response.Write (" ") 'If the forum is read only and has new posts show the locked new posts icon ElseIf CDate(Session("dtmLastVisit")) < dtmLastEntryDate AND (CBool(rsForum("Locked")) = True OR intMemberSecurityLevel = 2) AND lngLoggedInUserID > 1 AND blnModerator = False Then Response.Write (" ") 'If the forum is read only show the locked new posts icon ElseIf CBool(rsForum("Locked")) = True OR intMemberSecurityLevel = 2 AND lngLoggedInUserID > 1 AND blnModerator = False Then Response.Write (" ") 'If the forum has new posts show the new posts icon ElseIf CDate(Session("dtmLastVisit")) < dtmLastEntryDate Then Response.Write (" ") 'If the forum is open but with no new replies Else Response.Write (" ") End If %> <% 'If the forum is locked and the user is admin let them unlock it If blnForumLocked = True AND lngLoggedInUserID = 1 Then Response.Write (" ") 'If the forum is not locked and this is the admin then let them lock it ElseIf blnForumLocked = False AND lngLoggedInUserID = 1 Then Response.Write (" ") End If %> <% = strForumName %>
<% = strForumDiscription %>
<% If lngNumberOfTopics > 0 Then Response.Write(lngNumberOfTopics) Else Response.Write(" ") End If %> <% If lngNumberOfPosts > 0 Then Response.Write(lngNumberOfPosts) Else Response.Write(" ") End If %> <% = DateFormat(dtmLastEntryDate, saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDate, saryDateTimeData) %>
<% = strTxtBy %> <% = strLastEntryUser %> <% = strTxtViewLastPost %>

<% = strTxtLatestForumPosts %>
<% 'Get the latest forum posts 'Intialise the ADO recordset object Set rsStatistics = Server.CreateObject("ADODB.Recordset") 'Cursor type to one to count rsStatistics.CursorType = 1 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT Top 6 tblTopic.Forum_ID, tblTopic.Topic_ID, tblTopic.Subject, tblForum.Password, tblForum." & strMemberStatus & " " strSQL = strSQL & "FROM tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID " strSQL = strSQL & "WHERE ((tblForum.Password) Is Null) " 'As long as the user is not the admin don't display a post unless they have permission to view it If lngLoggedInUserID <> 1 Then strSQL = strSQL & " AND (tblForum." & strMemberStatus & " < 3) " End If strSQL = strSQL & "ORDER BY tblTopic.Last_entry_date DESC;" 'Query the database rsStatistics.Open strSQL, strCon 'If EOF then display an error message If rsStatistics.EOF Then Response.Write "" & strTxtNoForumPostMade & "" 'If there are pages to display then display them Do while NOT rsStatistics.EOF %> &TopicID=<% = rsStatistics("Topic_ID") %>&PagePosition=1" target="_self"><% = rsStatistics("Subject") %>
<% rsStatistics.MoveNext Loop 'Close the recordset rsStatistics.Close %>
 
<% 'Get the date and author of the last post 'Initalise the strSQL variable with an SQL statement to query the database for the date of the last entry and the author for the thread If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpLastAllForumsAuthorAndDate" Else strSQL = "SELECT TOP 1 tblThread.Message_date, Members.Email, Members.Nickname, Members.ID " strSQL = strSQL & "FROM (tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID) INNER JOIN (Members INNER JOIN tblThread ON Members.ID = tblThread.Author_ID) ON tblTopic.Topic_ID = tblThread.Topic_ID " strSQL = strSQL & "ORDER BY tblThread.Message_date DESC;" End If 'Query the database rsStatistics.Open strSQL, strCon 'If there are records returned by the database then get there details If NOT rsStatistics.EOF Then dtmLastEntryDate = CDate(rsStatistics("Message_date")) strLastEntryUser = rsStatistics("Nickname") lngLastEntryUserID = CLng(rsStatistics("ID")) End If %>
<% = strTxtForumStatistics %>
<% Response.Write(vbCrLf & " " & strTxtThereAre & " " & lngTotalNumberOfPosts & " " & strTxtPostsIn & " " & lngTotalNumberOfTopics & " " & strTxtTopicsIn & " " & intNumberofForums & " " & strTxtForum) Response.Write(vbCrLf & "
" & strTxtLastPostOn & " " & DateFormat(dtmLastEntryDate, saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDate, saryDateTimeData)) Response.Write(vbCrLf & "
" & strTxtLastPostBy & " " & strLastEntryUser & "") 'Close the recordset rsStatistics.Close 'Get the last signed up user 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpAuthorDesc" Else strSQL = "SELECT Members.Email, Members.Nickname, Members.ID " strSQL = strSQL & "FROM Members " strSQL = strSQL & "ORDER BY Members.ID DESC;" End If 'Query the database rsStatistics.Open strSQL, strCon 'Display some statistics for the members If NOT rsStatistics.EOF Then Response.Write(vbCrLf & "
" & strTxtThereAre & " " & rsStatistics.RecordCount & " " & strTxtForumMembers) Response.Write(vbCrLf & "
" & strTxtTheNewestForumMember & " " & rsStatistics("Nickname") & "") End If 'Close the recordset rsStatistics.Close 'Get the number of active users 'Initialise the SQL variable with an SQL statement count the number of records If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpCountOfActiveUsers" Else strSQL = "SELECT Count(tblActiveUser.Author_ID) AS ActiveUser From tblActiveUser;" End If 'Query the database rsStatistics.Open strSQL, strCon 'Read in the active users from the recordset Dim intActiveUsers,intActiveGuests,intActiveMembers intActiveUsers = CInt(rsStatistics("ActiveUser")) 'Close the recordset rsStatistics.Close 'Get the number of active guests 'Initialise the SQL variable with an SQL statement count the number of records If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE wwfSpCountOfActiveGuests" Else strSQL = "SELECT Count(tblActiveUser.Author_ID) AS ActiveUser From tblActiveUser WHERE tblActiveUser.Author_ID=2;" End If 'Query the database rsStatistics.Open strSQL, strCon 'Read in the active guests from the recordset intActiveGuests = CInt(rsStatistics("ActiveUser")) 'To save another database hit we can get the number of members online by taking the number of guest away from the total active users intActiveMembers = intActiveUsers - intActiveGuests 'Close the recordset rsStatistics.Close Set rsStatistics = Nothing Response.Write(vbCrLf & "
" & strTxtThereAre & " " & intActiveUsers & " " & strTxtActiveUsers & ", " & intActiveGuests & " " & strTxtGuestsAnd & " " & intActiveMembers & " " & strTxtMembers & "") %>
<% 'Reset Server Objects Set adoCon = Nothing Set strCon = Nothing %>

<% = strTxtOpenForum %> <% = strTxtOpenForum %> <% = strTxtReadOnly %> <% = strTxtReadOnly %> <% = strTxtPasswordRequired %> <% = strTxtPasswordRequired %>
<% = strTxtOpenForumNewReplies %> <% = strTxtOpenForumNewReplies %> <% = strTxtReadOnlyNewReplies %> <% = strTxtReadOnlyNewReplies %> <% = strTxtNoAccess %> <% = strTxtNoAccess %>

<% = strTxtMarkAllPostsAsRead %> :: <% = strTxtDeleteCookiesSetByThisForum %>

<% = strTxtCookies %>