<% @ Language=VBScript %> <% 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 email ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.info '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** 'Global '--------------------------------------------------------------------------------- Const strTxtWelcome = "Welcome" 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 = "Logout" 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 Forums to display" Const strTxtReturnToDiscussionForum = "Return to the Discussion Forum" Const strTxtMustBeRegistered = "Sorry, you must be a registered forum member in order to use this feature." Const strClickHereIfNotRegistered = "Click here if you are not a registered forum member" 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" '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 messages 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" 'forum_posts.asp '--------------------------------------------------------------------------------- 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 = "Email this topic" Const strTxtSorryNoReply = "Sorry, you can NOT post a reply." Const strTxtThisForumIsLocked = "This forum has been locked by a forum administrator." Const strTxtPostAReplyRegister = "If you wish to post a reply to this topic you must first" Const strTxtNeedToRegister = "If you are not already registered you must first" Const strTxtSmRegister = "register" Const strTxtNoThreads = "There are no posts in the database relating to this topic" Const strTxtNotGiven = "Not Given" Const strTxtNoMessageError = "Message \t\t- Enter a Message to post" 'search_form.asp '--------------------------------------------------------------------------------- Const strTxtSearchFormError = "Search For\t- Enter something to search for" 'search.asp '--------------------------------------------------------------------------------- Const strTxtSearchResults = "Search Results" Const strTxtYourSearchFor = "Your search for" Const strTxtHasFound = "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" 'printer_friendly_posts.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" 'emoticons.asp '--------------------------------------------------------------------------------- Const strTxtEmoticonSmilies = "Emoticons" Const strTxtClickOnEmoticonToAdd = "Click on the emoticon you would like to add to your message." '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 = "Forum Login" Const strTxtClickHereForgottenPass = "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, the email address entered does not match the one listed for that username." Const strTxtNoEmailAddressInProfile = "Sorry, your profile does not contain an email address.
Your new password can not be emailed to you." Const strTxtReregisterForForum = "You will need to re-register to use the forum." Const strTxtPasswordEmailToYou = "Your new password has been emailed to you." Const strTxtPleaseEnterYourUsername = "Please enter your username and the email address in the boxes below.
Your new password will then be sent to the email address in your profile." Const strTxtValidEmailRequired = "If your forum profile does not contain a valid email address for you then you will have to re-register to use the forum." Const strTxtEmailPassword = "Email Password" Const strTxtEmailPasswordRequest = "A Forgotten Password request has been made for a new password to be emailed to you for the Forum, " Const strTxtEmailPasswordRequest2 = "Your new 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 is a private forum and requires that you enter a forum 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 forum member to view profiles." Const strTxtMemberNo = "Member No." Const strTxtEmail = "Email Address" Const strTxtPrivate = "Private" 'post_message_form.asp '--------------------------------------------------------------------------------- Const strTxtPostNewTopic = "Post New Topic" Const strTxtErrorTopicSubject = "Subject \t\t- Enter a Subject for your new Topic" Const strTxtForumMemberSuspended = "Sorry, this function is disabled as your Forum Membership has been suspended!" 'edit_post.asp '--------------------------------------------------------------------------------- Const strTxtNoPermissionToEditPost = "Sorry, you do not have permission to edit this post!" Const strTxtReturnForumTopic = "Return to Forum Topic" 'email_topic.asp '--------------------------------------------------------------------------------- Const strTxtEmailTopicToFriend = "Email Topic To a Friend" Const strTxtFriendSentEmail = "Your Friend has been sent the email" Const strTxtFriendsName = "Friends Name" Const strTxtFriendsEmail = "Friends Email" Const strTxtYourName = "Your Name" Const strTxtYourEmail = "Your Email" Const strTxtSendEmail = "Send Email" Const strTxtMessage = "Message" Const strTxtEmailFriendMessage = "I thought you might be interested in a post on" Const strTxtFrom = "from" Const strTxtErrorFrinedsName = "Friends Name \t- Enter your Friends Name" Const strTxtErrorFriendsEmail = "Friends Email \t- Enter a valid email address for your friend" Const strTxtErrorYourName = "Your Name \t- Enter your Name" Const strTxtErrorYourEmail = "Your Email \t- Enter your valid email address" Const strTxtErrorEmailMessage = "Message \t- Enter a message for your friend" '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 strTxtNext = "Next" Const strTxtPrevious = "Prev" Const strTxtPage = "Page" Const strTxtErrorMemberSerach = "Member Search\t- Enter a Members Username to search for" 'message_form.asp '--------------------------------------------------------------------------------- Const strTxtTextFormat = "Text Format" Const strTxtPreviewPost = "Preview Post" Const strTxtMode = "Mode" Const strTxtPrompt = "Prompt" Const strTxtBasic = "Basic" Const strTxtAddEmailLink = "Add Email 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 email address" Const strTxtEnterEmailMailto = "Enter the email 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.asp '--------------------------------------------------------------------------------- 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 = "Email Notify me of Replies" Const strTxtUpdatePost = "Update Post" Const strTxtFontColour = "Colour" 'register.asp '--------------------------------------------------------------------------------- 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 posts or if you lose your password." Const strTxtShowHideEmail = "Show my Email Address" Const strTxtShowHideEmailLong = "Hide your email address if you want it kept private from other users." 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 = "Email\t\t- Enter your valid email address" Const strTxtErrorValidEmailLong = "If you don't want to enter your email address then leave the email field blank" Const strTxtErrorNoEmailToShow = "You can not show your email address if you haven\'t entered one!" Const strTxtErrorSignatureToLong = "Signature \t- Your signature has to many characters" Const strTxtUpdateProfile = "Update Profile" Const strTxtUsrenameGone = "Sorry, the Username you requested is already taken.\n\nPlease choose another Username." Const strTxtEmailThankYouForRegistering = "Thank-you for taking the time to register to use " 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 " 'register_new_user.inc '--------------------------------------------------------------------------------- Const strTxtEmailAMeesageHasBeenPosted = "A message has been posted in the forum on" Const strTxtEmailClickOnLinkBelowToView = "To view and/or reply to 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 strTxtInterestingForumPostOn = "Interesting Forum post on" Const strTxtForumLostPasswordRequest = "Forum Lost Password Request" Const strTxtLockForum = "Lock 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 strTxtTheTimeNowIs = "The time now is" Const strTxtYouLastVisitedOn = "You last visited on" Const strTxtSendMsg = "Send PM" Const strTxtSendPrivateMessage = "Send Private Message" Const strTxtActiveUsers = "Active Users" Const strTxtGuestsAnd = "Guest(s) and" Const strTxtMembers = "Member(s)" Const strTxtPreview = "Preview" Const strTxtThereIsNothingToPreview = "There is nothing to preview" Const strTxtEnterTextYouWouldLikeIn = "Enter the text that you would like in" Const strTxtEmailAddressAlreadyUsed = "Sorry, the email address entered has already been used to register another 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 strTxtGuest = "Guest" Const strTxtAccountStatus = "Account Status" Const strTxtNotActive = "Not Active" Const strTxtEmailRequiredForActvation = "Required to be able to receive an email to activate your membership" Const strTxtToActivateYourMembershipFor = "To activate your membership for" Const strTxtForumClickOnTheLinkBelow = "click on the link below" Const strTxtForumAdmin = "Forum Admin" Const strTxtViewLastPost = "View Last Post" Const strTxtSelectAvatar = "Select Avatar" Const strTxtAvatar = "Avatar" 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 Avatar (must be " Const strTxtPixels = " pixels)." Const strTxtForumCodesInSignature = "can be used in your signature" Const strTxtHighPriorityPost = "Announcement" Const strTxtHighPriorityPostLocked = "Locked Announcement" Const strTxtHotTopicNewReplies = "Hot Topic [new posts]" Const strTxtHotTopic = "Hot Topic [no new posts]" Const strTxtOpenTopic = "Topic [no new posts]" Const strTxtOpenTopicNewReplies = "Topic [new post]" Const strTxtPinnedTopic = "Sticky Topic" Const strTxtOpenForum = "Open Forum [no new posts]" Const strTxtOpenForumNewReplies = "Open Forum [new posts]" Const strTxtReadOnly = "Read Only [no new replies]" Const strTxtReadOnlyNewReplies = "Read Only [new posts]" Const strTxtPasswordRequired = "Password Required" Const strTxtNoAccess = "No Access" Const strTxtFont = "Font" Const strTxtSize = "Size" Const strTxtForumCodes = "Forum Codes" Const strTxtPriority = "Sticky Topic" Const strTxtNormal = "Normal Topic" Const strTxtTopAllForums = "Announcement (all forums)" Const strTopThisForum = "Announcement (this forum)" 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 Email" 'insufficient_permission.asp '--------------------------------------------------------------------------------- Const strTxtAccessDenied = "Access Denied" Const strTxtInsufficientPermison = "Sorry, only members with sufficient permission can access this page." 'activate.asp '--------------------------------------------------------------------------------- Const strTxtYourForumMemIsNowActive = "Thank-you for registering.

Your Forum membership is now active." Const strTxtErrorWithActvation = "There is a problem activating your membership.

Please contact the " 'register_mail_confirm.asp '--------------------------------------------------------------------------------- Const strTxtYouShouldReceiveAnEmail = "Your Forum Membership needs to be activated!

An activation email will be sent in a few moments to the email address you gave when registering.
Click on the link in this email to activate your Forum Membership." Const strTxtThankYouForRegistering = "Thank-you for registering to use" Const strTxtIfErrorActvatingMembership = "If you have a problem activating your membership please contact the" '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 = "Anonymous" '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 and/or message body." '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 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" Const strTxtHasBeenSentTo = "has been sent to" Const strTxtCharactersInYourSignatureToLong = "characters in your signature, you must shorten it to below 200" Const strTxtSorryYourSearchFoundNoMembers = "Sorry, your search found no forum members that match your criteria" Const strTxtCahngeOfEmailReactivateAccount = "If you change your email address you will be sent an email to re-activate your account" Const strTxtAddToBuddyList = "Add to Buddy List" 'register_mail_confirm.asp '--------------------------------------------------------------------------------- Const strTxtYourEmailAddressHasBeenChanged = "Your email address has been changed,
you will have to re-activate your forum membership before you can use the forum again." Const strTxtYouShouldReceiveAReactivateEmail = "An activation email will be sent in a few moments to the email address in your profile.
Click on the link in this email to re-activate your Forum Membership." 'Preview signature window '--------------------------------------------------------------------------------- Const strTxtSignaturePreview = "Signature Preview" Const strTxtPostedMessage = "Posted Message" 'New from version 7 '--------------------------------------------------------------------------------- Const strTxtMemberlist = "Memberlist" Const strTxtForums = "Forum(s)" Const strTxtOurUserHavePosted = "Our users have posted" Const strTxtInTotalThereAre = "In total there are" Const strTxtOnLine = "online" Const strTxtWeHave = "We have" Const strTxtActivateAccount = "Activate Account" Const strTxtSorryYouDoNotHavePermissionToPostInTisForum = "Sorry, you do not have permission to post new topics in this forum" Const strTxtSorryYouDoNotHavePerimssionToReplyToPostsInThisForum = "Sorry, you do not have permission to reply to posts in this forum" Const strTxtSorryYouDoNotHavePerimssionToReplyIPBanned = "Sorry, you can not reply to posts, your IP address or range is not permitted.
Please contact the forum administrator if you feel this is in error." Const strTxtLoginSm = "login" Const strTxtYourProfileHasBeenUpdated = "Your profile has been updated." Const strTxtPosted = "Posted:" Const strTxtBackToTop = "Back to Top" Const strTxtNewPassword = "New Password" Const strTxtRetypeNewPassword = "Retype New Password" Const strTxtRegards = "Regards" Const strTxtClickTheLinkBelowToUnsubscribe = "If you no-longer wish to recieve email notification for this Topic or Forum click on the link below " Const strTxtPostsPerDay = "posts per day" Const strTxtGroup = "Group" Const strTxtLastVisit = "Last Visit" Const strTxtPrivateMessage = "Private Message" Const strTxtSorryFunctionNotPermiitedIPBanned = "Sorry, this function is not available as you are using an IP address or range that is not permitted.
Please contact the forum administrator if you feel this is in error." Const strTxtEmailAddressBlocked = "Sorry, the email address or domain entered has been blocked by the forum administrator" Const strTxtTopicAdmin = "Topic Admin" Const strTxtMovePost = "Move Post" Const strTxtPrevTopic = "Prev Topic" Const strTxtTheMemberHasBeenDleted = "The Member has been Deleted." Const strTxtThisPageWasGeneratedIn = "This page was generated in" Const strTxtSeconds = "seconds." Const strTxtEditBy = "Edited by" Const strTxtWrote = "wrote" Const strTxtEnable = "Enable" Const strTxtToFormatPosts = "to format post" Const strTxtFlashFilesImages = "Flash Files/Images" Const strTxtSessionIDErrorCheckCookiesAreEnabled = "A security error has occurred with authentication.
Please ensure that all cookies are enabled on your web browser, and you are not using a saved or cached copy of the page." Const strTxtName = "Name" Const strTxtModerators = "Moderators" Const strTxtMore = "more..." Const strTxtNewRegSuspendedCheckBackLater = "Sorry, new registrations are currently suspended, please check back again later." Const strTxtMoved = "Moved: " Const strTxtNoNameError = "Name \t\t- Enter your name" Const strTxtHelp = "Help" 'PM system '--------------------------------------------------------------------------------- Const strTxtPrivateMessenger = "Private Messenger" Const strTxtUnreadMessage = "Unread message" Const strTxtReadMessage = "Read message" Const strTxtNew = "new" Const strTxtYouHave = "You have" Const strTxtNewMsgsInYourInbox = "new message(s) in your inbox!" Const strTxtNoneSelected = "None Selected" Const strTxtAddBuddy = "Add Buddy" 'active_topics.asp '--------------------------------------------------------------------------------- Const strTxtSelectMember = "Select Member" Const strTxtSelect = "Select" Const strTxtNoMatchesFound = "No matches found" 'active_topics.asp '--------------------------------------------------------------------------------- Const strTxtLastFourHours = "Last 4 hours" Const strTxtLastSixHours = "Last 6 hours" Const strTxtLastEightHours = "Last 8 hours" Const strTxtLastTwelveHours = "Last 12 hours" Const strTxtLastSixteenHours = "Last 16 hours" 'permissions '--------------------------------------------------------------------------------- Const strTxtYou = "You" Const strTxtCan = "can" Const strTxtCannot = "cannot" Const strTxtpostNewTopicsInThisForum = "post new topics in this forum" Const strTxtReplyToTopicsInThisForum = "reply to topics in this forum" Const strTxtEditYourPostsInThisForum = "edit your posts in this forum" Const strTxtDeleteYourPostsInThisForum = "delete your posts in this forum" Const strTxtCreatePollsInThisForum = "create polls in this forum" Const strTxtVoteInPOllsInThisForum = "vote in polls in this forum" 'register.asp '--------------------------------------------------------------------------------- Const strTxtRegistrationDetails = "Registration Details" Const strTxtProfileInformation = "Profile Information (not required)" Const strTxtForumPreferences = "Forum Preferences" Const strTxtICQNumber = "ICQ Number" Const strTxtAIMAddress = "AIM Address" Const strTxtMSNMessenger = "MSN Messenger" Const strTxtYahooMessenger = "Yahoo Messenger" Const strTxtOccupation = "Occupation" Const strTxtInterests = "Interests" Const strTxtDateOfBirth = "Date of Birth" Const strTxtNotifyMeOfReplies = "Notify me of replies to posts" Const strTxtSendsAnEmailWhenSomeoneRepliesToATopicYouHavePostedIn = "Sends an email when someone replies to a topic you have posted in. This can be changed whenever you post." Const strTxtNotifyMeOfPrivateMessages = "Notify me by email when I receive a Private Message" Const strTxtAlwaysAttachMySignature = "Always attach my signature to posts" Const strTxtEnableTheWindowsIEWYSIWYGPostEditor = "Enable the WYSIWYG post editor
Only browsers that are detected as being Rich Text Enabled will have this feature available when posting." Const strTxtTimezone = "Time offset from forum time" Const strTxtPresentServerTimeIs = "Present server date and time is: " Const strTxtDateFormat = "Date Format" Const strTxtDayMonthYear = "Day/Month/Year" Const strTxtMonthDayYear = "Month/Day/Year" Const strTxtYearMonthDay = "Year/Month/Day" Const strTxtYearDayMonth = "Year/Day/Month" Const strTxtHours = "hours" Const strTxtDay = "Day" Const strTxtCMonth = "Month" Const strTxtCYear = "Year" Const strTxtRealName = "Real Name" Const strTxtMemberTitle = "Member Title" 'Polls '--------------------------------------------------------------------------------- Const strTxtCreateNewPoll = "Create New Poll" Const strTxtPollQuestion = "Poll Question" Const strTxtPollChoice = "Poll Choice" Const strTxtErrorPollQuestion = "Poll Question \t- Enter a Question for this Poll" Const strTxtErrorPollChoice = "Poll Choice \t- Enter a least two choices for this Poll" Const strTxtSorryYouDoNotHavePermissionToCreatePollsForum = "Sorry, you do not have permission to create polls in this forum" Const strTxtAllowMultipleVotes = "Allow Multiple Votes in this Poll" Const strTxtMakePollOnlyNoReplies = "Make Poll only (no replies allowed)" Const strTxtYourNoValidPoll = "Your Poll did not contain a valid Question or Choices." Const strTxtPoll = "Poll:" Const strTxtVote = "Vote" Const strTxtVotes = "Votes" Const strTxtCastMyVote = " Cast My Vote" Const strTxtPollStatistics = "Poll Statistics" Const strTxtThisTopicIsClosedNoNewVotesAccepted = "This topic is closed, no new votes accepted" Const strTxtYouHaveAlreadyVotedInThisPoll = "You have already voted in this poll" Const strTxtThankYouForCastingYourVote = "Thank-you for casting your vote." Const strsTxYouCanNotNotVoteInThisPoll = "You can not vote in this poll" Const strTxtYouDidNotSelectAChoiceForYourVote = "Sorry your vote was not cast.\n\nYou did not select a Poll Choice to vote for." Const strTxtThisIsAPollOnlyYouCanNotReply = "This is a Poll only, you can not post a reply." 'Email Notify '--------------------------------------------------------------------------------- Const strTxtWatchThisTopic = "Watch this topic for replies" Const strTxtUn = "Un-" Const strTxtWatchThisForum = "Watch this forum for new posts" Const strTxtYouAreNowBeNotifiedOfPostsInThisForum = "You will now be notified by email of all Posts in this Forum.\n\nTo un-watch this forum click on the \'Un-Watch this forum for new posts\' link at the bottom of the page." Const strTxtYouAreNowNOTBeNotifiedOfPostsInThisForum = "You will now not be notified by email of Posts in this Forum.\n\nTo re-watch this forum click on the \'Watch this forum for new posts\' link at the bottom of the page." Const strTxtYouWillNowBeNotifiedOfAllReplies = "You will now be notified by email of all Replies in this Topic.\n\nTo un-watch this topic click on the \'Un-Watch this topic for replies\' link at the bottom of the page." Const strTxtYouWillNowNOTBeNotifiedOfAllReplies = "You will now not be notified by email of Replies in this Topic.\n\nTo re-watch this topic click on the \'Watch this topic for replies\' link at the bottom of the page." 'email_messenger.asp '--------------------------------------------------------------------------------- Const strTxtEmailMessenger = "Email Messenger" Const strTxtRecipient = "Recipient" Const strTxtNoHTMLorForumCodeInEmailBody = "Please note that the email is sent in plain text only (no HTML or forum codes).

The return email address is set as your own." Const strTxtYourEmailHasBeenSentTo = "Your Email has been sent to" Const strTxtYouCanNotEmail = "You can not email" Const strTxtYouDontHaveAValidEmailAddr = "you do not have a valid email address in your profile." Const strTxtTheyHaveChoosenToHideThierEmailAddr = "they have chosen to hide their email address." Const strTxtTheyDontHaveAValidEmailAddr = "they do not have a valid email address in their profile." Const strTxtSendACopyOfThisEmailToMyself = "Send a copy of this email to myself" Const strTxtTheFollowingEmailHasBeenSentToYouBy = "The following email has been sent to you by" Const strTxtFromYourAccountOnThe = "from your account on the" Const strTxtIfThisMessageIsAbusive = "If this message is spam or you find offensive please contact the webmaster of the forum at the following address" Const strTxtIncludeThisEmailAndTheFollowing = "Include this email and the following" Const strTxtReplyToEmailSetTo = "Please note that the reply address to this email has been set to that of" Const strTxtMessageSent = "Message sent" 'Uploads '--------------------------------------------------------------------------------- Const strTxtImageUpload = "Image Upload" Const strTxtFileUpload = "File Upload" Const strTxtAvatarUpload = "Upload Avatar" Const strTxtUpload = "Upload" Const strTxtImage = "Image" Const strTxtImagesMustBeOfTheType = "Images must be of the type" Const strTxtAndHaveMaximumFileSizeOf = "and have a maximum file size of" Const strTxtImageOfTheWrongFileType = "The image uploaded is of the wrong file type" Const strTxtImageFileSizeToLarge = "The image file size is to large at" Const strTxtMaximumFileSizeMustBe = "Maximum file size must be" Const strTxtFile = "File" Const strTxtFilesMustBeOfTheType = "Files must be of the type" Const strTxtFileOfTheWrongFileType = "The file uploaded is of the wrong file type" Const strTxtFileSizeToLarge = "The file size is to large at" Const strTxtPleaseWaitWhileFileIsUploaded = "Please be patient while the file is being uploaded to the server." Const strTxtPleaseWaitWhileImageIsUploaded = "Please be patient while the image is being uploaded to the server." 'forum_closed.asp '--------------------------------------------------------------------------------- Const strTxtForumClosed = "Forums Closed" Const strTxtSorryTheForumsAreClosedForMaintenance = "Sorry, the forums are presently closed for maintenance.
Please check back again later." 'report_post.asp '--------------------------------------------------------------------------------- Const strTxtReportPost = "Report Post" Const strTxtSendReport = "Send Report" Const strTxtProblemWithPost = "Problem With Post" Const strTxtPleaseStateProblemWithPost = "Please state below the issue with the post, a copy of the post will be emailed to the forum moderators and/or forum administrators so they can deal with it appropriately." Const strTxtTheFollowingReportSubmittedBy = "The following report has been submitted by" Const strTxtWhoHasTheFollowingIssue = "who has the following issue with this post" Const strTxtToViewThePostClickTheLink = "To view the post then click on the link below" Const strTxtIssueWithPostOn = "Issue With Post on" Const strTxtYourReportEmailHasBeenSent = "Your email has been sent to the forum moderators and/or forum administrators so they can deal with it appropriately." 'New from version 7.5 '--------------------------------------------------------------------------------- Const strTxtImportantTopics = "Important Topics" Const strTxtQuickLogin = "Quick Login" Const strTxtThisTopicWasStarted = "This topic was started: " Const strTxtResendActivationEmail = "Resend Activation Email" Const strTxtNoOfStars = "Number of Stars" Const strTxtOnLine2 = "Online" Const strTxtIeSpellNotDetected = "ieSpell not detected. Click OK to go to download page." Const strTxtstrTxtOrderedList = "Ordered List" Const strTxtTextColour = "Text Colour" Const strTxtstrSpellCheck = "Spell Check" Const strTxtCode = "Code" Const strTxtCodeandFixedWidthData = "Code and Fixed Width Data" Const strTxtQuoting = "Quoting" Const strTxtMyCodeData = "My Code or Fixed Width Data" Const strTxtQuotedMessage = "Quoted Message" Const strTxtWithUsername = "With Username" Const strTxtOK = "OK" Const strTxtGo = "Go" Const strTxtDataBasedOnActiveUsersInTheLastXMinutes = "This data is based on users active over the past ten minutes" Const strTxtSoftwareVersion = "Software Version" Const strTxtForumMembershipNotAct = "Your Forum Membership is not yet activated!" Const strTxtMustBeRegisteredToPost = "Sorry, you must be a registered forum member in order to post in this forum." Const strTxtSettings = "Settings" Const strTxtMemberCPMenu = "Member Control Panel Menu" Const strTxtYouCanAccessCP = "You can access forum features and change your Forum Membership preferences through your Forum " Const strTxtEditMembersSettings = "Edit This Members Forum Settings" Const strTxtSecurityCodeConfirmation = "Security Code Confirmation (required)" Const strTxtUniqueSecurityCode = "Unique Security Code" Const strTxtConfirmSecurityCode = "Confirm Security Code* " Const strTxtEnter6DigitCode = "Please enter the 6 digit code shown above in image format.
Only numbers are allowed, a '0' is a numerical zero." Const strTxtErrorSecurityCode = "Security Code \t- You must enter the 6 digit security code" Const strTxtSecurityCodeDidNotMatch = "Sorry, the Security Code entered did not match that displayed.\n\nA new Security Code has been generated.\n\nPlease ensure that cookies are enabled on your browser." Const strTxtCookiesMustBeEnabled = "Cookies must be enabled on your web browser to see images." 'login_user_test.asp '--------------------------------------------------------------------------------- Const strTxtSuccessfulLogin = "Successful Login" Const strTxtSuccessfulLoginReturnToForum = "Your login was successful, please wait while you are returned to the Forum" Const strTxtUnSuccessfulLoginText = "Your login was un-successful due to a cookie problem.

Please ensure that all cookies are enabled on your web browser for this web site." Const strTxtUnSuccessfulLoginReTry = "Click here to retry logging into the Forum." Const strTxtToActivateYourForumMem = "To activate your forum membership click on the link in the activation email you should have received after registering." 'email_notify_subscriptions.asp '--------------------------------------------------------------------------------- Const strTxtEmailNotificationSubscriptions = "Email Notification Subscriptions" Const strTxtSelectForumErrorMsg = "Select Forum\t- Select a Forum to Subscribe to" Const strTxtYouHaveNoSubToEmailNotify = "You have no subscriptions to email notification" Const strTxtThatYouHaveSubscribedTo = "that you have Subscribed to Email Notification" Const strTxtUnsusbribe = "Unsubscribe" Const strTxtAreYouWantToUnsubscribe = "Are you sure you want to Un-subscribe from these" 'RTE editor '--------------------------------------------------------------------------------- Const strTxtFontStyle = "Font Style" Const strTxtBackgroundColour = "Background Colour" Const strTxtUndo = "Undo" Const strTxtRedo = "Redo" Const strTxtJustify = "Justify" Const strTxtToggleHTMLView = "Toggle HTML View" Const strTxtAboutRichTextEditor = "About Rich Text Editor" Const strTxtImageURL = "Image URL" Const strTxtAlternativeText = "Alternative Text" Const strTxtLayout = "Layout" Const strTxtAlignment = "Alignment" Const strTxtBorder = "Border" Const strTxtSpacing = "Spacing" Const strTxtHorizontal = "Horizontal" Const strTxtVertical = "Vertical" Const strTxtRows = "Rows" Const strTxtColumns = "Columns" Const strTxtWidth = "Width" Const strTxtCellPad = "Cell Pad" Const strTxtCellSpace = "Cell Space" Const strTxtInsertTable = "Insert Table" 'New from version 7.51 '--------------------------------------------------------------------------------- Const strTxtSubscribeToForum = "Subscribe to Email Notification of New Posts" Const strTxtSelectForumToSubscribeTo = "Select Forum to Subscribe to" %> <% '**************************************************************************************** '** 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 timeout of the forum Server.ScriptTimeout = 90 Session.Timeout = 20 'Set the date time format to your own if you are getting a CDATE error 'Session.LCID = 1033 Dim adoCon 'Database Connection Variable Object Dim strCon 'Holds the string to connect to the db Dim rsCommon 'Holds the configuartion recordset 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 intGroupID 'Holds the group ID number the member is a group of Dim strWebsiteName 'Holds the website name Dim strMainForumName 'Holds the forum name Dim strForumPath 'Holds the virtual path to the forum 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 blnRTEEditor 'Set to true if the Rich Text Editor(RTE) is enabled Dim blnEmail 'Boolean set to true if 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 blnAdmin 'set to true if the user is a forum admininstrator (Group ID 1) Dim blnModerator 'Set to true if the user is a forum moderator Dim blnGuest 'set to true for the Guest account (Group ID 2) 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 strTitleImage 'Holds the path and name for the title image for the forum 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 blnAvatar 'Set to true if the forum can use avatars 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 blnPrivateMessages 'Set to true if private messages are allowed Dim intNumPrivateMessages 'Holds the number of private messages allowed by each user 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 Dim strDateFormat 'Holds the users date format Dim strTimeOffSet 'Holds the users time offset in + or - Dim intTimeOffSet 'Holds the users time offset Dim blnReplyNotify 'Set to true if the user wants to be notified of replies to posts Dim blnAttachSignature 'Set to true if the user always wants there signature attached Dim blnWYSIWYGEditor 'Set to true if the user wants to use the IE WYSIWYG post editor Dim intMaxPollChoices 'Holds the maximum allowed number of poll choices Dim blnEmailMessenger 'Set to true if the email system is on Dim blnActiveUsers 'Set to true if active users is enabled Dim blnForumClosed 'Set to true of the forum is cloded for maintence Dim blnShowEditUser 'Set to true if we are to show the username and time a post is edited Dim blnShowProcessTime 'Set to true if we are to show how long the page took to be processed on the server Dim dblStartTime 'Holds the start time for the page process Dim blnClosedForumPage 'Set to true if we are looking at the closed forum page Dim blnFlashFiles 'Set to true if Flash support is enabled Dim strWebsiteURL 'Holds the URL to the sites homepage Dim blnShowMod 'Set to true if mod groups are shown on the main forum page Dim blnAvatarUploadEnabled 'Set to true if avatars are enabled Dim blnRegistrationSuspeneded 'Set to true if new registrations are suspended Dim strLoggedInUserEmail 'Holds the logged in users email address Dim strImageTypes 'Holds the types of images allowed in the forum Dim blnLongRegForm 'Set to true if the reg form is to be the long version Dim blnLongSecurityCode 'Set to true if the security code feature is required when logging in 'These are used for forum permissions Dim blnRead Dim blnPost Dim blnReply Dim blnEdit Dim blnDelete Dim blnPriority Dim blnPollCreate Dim blnVote Dim blnAttachments Dim blnImageUpload 'Initialise variables Const strVersion = "7.51a" Const strRTEversion = "1.2a" lngLoggedInUserID = 0 strLoggedInUsername = strTxtGuest blnActiveMember = true blnLoggedInUserEmail = false blnLoggedInUserSignature = false intGroupID = 2 lngLoggedInUserID = 2 blnAdmin = false blnModerator = false blnGuest = true intTimeOffSet = 0 strTimeOffSet = "+" blnWYSIWYGEditor = true blnLongRegForm = false blnLongSecurityCode = false 'Database Type strDatabaseType = "Access" 'strDatabaseType = "SQLServer" 'Set up the database table name prefix and stored procedure prefix '(This is useful if you are running multiple forums from one database) ' - make sure you also change this in the msSQL_server_setup.asp file if setting up an ms SQL server database) Const strDbTable = "tbl" Const strDbProc = "wwfSp" 'Set up the forum cookie name '(This is useful if you run multiple copies of Web Wiz Forums on the same site so that cookies don't interfer with each other) Const strCookieName = "WWF" 'Encrypted passwords 'This will make your forum unsecure from hackers if you disable this!!!!! 'This can NOT be changed once your forum is in use!!! 'You will also need to directly edit the database to type in the admin password to the Password field in the tblAuthor table at record position 1 'also edit both common.asp files to change this variable Const blnEncryptedPasswords = true 'Create database connection 'Create a connection odject Set adoCon = Server.CreateObject("ADODB.Connection") '--------------------- Set the path and name of the database -------------------------------------------------------------------------------- 'Virtual path to database 'strDbPathAndName = Server.MapPath("./access_db/mueller.mdb") 'This is the path of the database from this files location on the server 'Physical path to database strDbPathAndName = "d:\hosting\benmueller\access_db\mueller.mdb" 'Use this if you use the physical server path, eg:- C:\Inetpub\private\wwForum.mdb 'BRINKSTER USERS (Web Wiz Forums only works with free Brinkster accounts, not for the paid accounts) 'Brinkster users remove the ' single quote mark from infront of the line below and replace USERNAME with your Brinkster uersname 'strDbPathAndName = Server.MapPath("/USERNAME/db/wwForum.mdb") 'PLEASE NOTE: - For extra security it is highly recommended you change the name of the database, wwForum.mdb, to another name and then 'replace the wwForum.mdb found above with the name you changed the forum database to. '--------------------------------------------------------------------------------------------------------------------------------------------- '------------- If you are having problems with the script then try using a diffrent driver or DSN by editing the lines below -------------- 'Generic MS Access Database connection info and driver (if this driver does not work then comment it out and use one of the alternative faster JET OLE DB drivers) 'strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & strDbPathAndName 'Alternative drivers faster than the generic one above 'strCon = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=" & strDbPathAndName 'This one is if you convert the database to Access 97 strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & 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=DSN_NAME" 'Place the DSN where you see DSN_NAME '--------------------------------------------------------------------------------------------------------------------------------------------- 'Set the diffrent variables for diffrent database types If strDatabaseType = "SQLServer" Then %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** 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. 'MS SQL Server OLE Driver (If you change this string make sure you also change it in the msSQL_server_setup.asp file when creating the database) strCon = "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";" '--------------------------------------------------------------------------------------------------------------------------------------------- %> <% End If If strDatabaseType = "SQLServer" Then 'The GetDate() function is used in SQL Server strDatabaseDateFunction = "GetDate()" Else 'The now() function is used in Access strDatabaseDateFunction = "Now()" End If 'Set the connection string to the database adoCon.connectionstring = strCon 'Set an active connection to the Connection object adoCon.Open 'Read in the Forum configuration 'Intialise the ADO recordset object Set rsCommon = 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 " & strDbProc & "SelectConfiguration" Else strSQL = "SELECT TOP 1 " & strDbTable & "Configuration.* From " & strDbTable & "Configuration;" End If 'Query the database rsCommon.Open strSQL, adoCon 'If there is config deatils in the recordset then read them in If NOT rsCommon.EOF Then 'read in the configuration details from the recordset strWebsiteName = rsCommon("website_name") strMainForumName = rsCommon("forum_name") strWebsiteURL = rsCommon("website_path") strForumPath = rsCommon("forum_path") strMailComponent = rsCommon("mail_component") strIncomingMailServer = rsCommon("mail_server") strForumEmailAddress = rsCommon("forum_email_address") blnLCode = CBool(rsCommon("L_Code")) blnEmail = CBool(rsCommon("email_notify")) blnTextLinks = rsCommon("Text_link") blnRTEEditor = CBool(rsCommon("IE_editor")) intTopicPerPage = CInt(rsCommon("Topics_per_page")) strTitleImage = rsCommon("Title_image") blnEmoticons = CBool(rsCommon("Emoticons")) blnAvatar = CBool(rsCommon("Avatar")) blnEmailActivation = CBool(rsCommon("Email_activate")) intNumHotViews = CInt(rsCommon("Hot_views")) intNumHotReplies = CInt(rsCommon("Hot_replies")) blnSendPost = CBool(rsCommon("Email_post")) blnPrivateMessages = CBool(rsCommon("Private_msg")) intNumPrivateMessages = CInt(rsCommon("No_of_priavte_msg")) intThreadsPerPage = CInt(rsCommon("Threads_per_page")) intSpamTimeLimitSeconds = CInt(rsCommon("Spam_seconds")) intSpamTimeLimitMinutes = CInt(rsCommon("Spam_minutes")) intMaxPollChoices = CInt(rsCommon("Vote_choices")) blnEmailMessenger = CBool(rsCommon("Email_sys")) blnActiveUsers = CBool(rsCommon("Active_users")) If blnClosedForumPage = False Then blnForumClosed = CBool(rsCommon("Forums_closed")) blnShowEditUser = CBool(rsCommon("Show_edit")) blnShowProcessTime = CBool(rsCommon("Process_time")) blnFlashFiles = CBool(rsCommon("Flash")) blnShowMod = CBool(rsCommon("Show_mod")) blnAvatarUploadEnabled = CBool(rsCommon("Upload_avatar")) blnRegistrationSuspeneded = CBool(rsCommon("Reg_closed")) strImageTypes = rsCommon("Upload_img_types") End If 'Close the recordset rsCommon.Close 'If the forums are closed redirect to the forums closed page If blnForumClosed Then 'Reset server objects Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'Redirect to the forum closed page Response.Redirect("forum_closed.asp") End If 'Get the process start time If blnShowProcessTime Then dblStartTime = Timer() '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 minutes since the last visit then set the session variable to the users last date they were here If Session("dtmLastVisit") = "" AND Request.Cookies(strCookieName)("LTVST") <> "" Then Session("dtmLastVisit") = CDate(Request.Cookies(strCookieName)("LTVST")) Response.Cookies(strCookieName)("LTVST") = CDbl(Now()) Response.Cookies(strCookieName).Expires = DateAdd("yyyy", 1, Now()) 'If the last entry 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 isNumeric(Request.Cookies(strCookieName)("LTVST")) Then If CDate(Request.Cookies(strCookieName)("LTVST")) < DateAdd("n", -5, Now()) Then Response.Cookies(strCookieName)("LTVST") = CDbl(Now()) Response.Cookies(strCookieName).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(strCookieName)("LTVST") = CDbl(Now()) Response.Cookies(strCookieName).Expires = DateAdd("yyyy", 1, Now()) End If 'If someone has placed the default.asp in the path to the forum then remove it as it's not needed strForumPath = Replace(strForumPath, "default.asp", "") 'Read in users ID number from the cookie strLoggedInUserCode = Trim(Mid(Request.Cookies(strCookieName)("UID"), 1, 44)) 'If a cookie exsists on the users system then read in there username from the database If strLoggedInUserCode <> "" Then 'Make the usercode SQL safe strLoggedInUserCode = formatSQLInput(strLoggedInUserCode) 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "ChkUserID @strUserID = '" & strLoggedInUserCode & "'" Else strSQL = "SELECT " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Group_ID, " & strDbTable & "Author.Active, " & strDbTable & "Author.Signature, " & strDbTable & "Author.Author_email, " & strDbTable & "Author.Date_format, " & strDbTable & "Author.Time_offset, " & strDbTable & "Author.Time_offset_hours, " & strDbTable & "Author.Reply_notify, " & strDbTable & "Author.Attach_signature, " & strDbTable & "Author.Rich_editor, " & strDbTable & "Author.Last_visit " strSQL = strSQL & "FROM " & strDbTable & "Author " strSQL = strSQL & "WHERE " & strDbTable & "Author.User_code = '" & strLoggedInUserCode & "';" End If 'Query the database rsCommon.Open strSQL, adoCon 'If the database has returned a record then run next bit If NOT rsCommon.EOF Then 'Read in the users details from the recordset strLoggedInUsername = rsCommon("Username") intGroupID = rsCommon("Group_ID") lngLoggedInUserID = CLng(rsCommon("Author_ID")) blnActiveMember = CBool(rsCommon("Active")) strDateFormat = rsCommon("Date_format") strTimeOffSet = rsCommon("Time_offset") intTimeOffSet = CInt(rsCommon("Time_offset_hours")) blnReplyNotify = CBool(rsCommon("Reply_notify")) blnAttachSignature = CBool(rsCommon("Attach_signature")) blnWYSIWYGEditor = CBool(rsCommon("Rich_editor")) strLoggedInUserEmail = rsCommon("Author_Email") If rsCommon("Signature") <> Trim("") Then blnLoggedInUserSignature = True 'See if the user has entered an email address If strLoggedInUserEmail <> Trim("") Then blnLoggedInUserEmail = True 'Read in the Last Visit Date for the user from the db if we haven't already If Session("ViRead") = "" Then If isDate(rsCommon("Last_visit")) Then Session("dtmLastVisit") = CDate(rsCommon("Last_visit")) Session("ViRead") = True End If 'Check that there is a last visit date in the db or we will get an error If isDate(rsCommon("Last_visit")) Then 'If the Last Visit date in the db is older than 5 minutes for the user then update it If CDate(rsCommon("Last_visit")) < DateAdd("n", -5, Now()) Then 'Initilse sql statement If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "UpdateLasVisit @lngUserID = " & lngLoggedInUserID Else strSQL = "UPDATE " & strDbTable & "Author SET " & strDbTable & "Author.Last_visit = Now() WHERE " & strDbTable & "Author.Author_ID=" & lngLoggedInUserID & ";" End If 'Write to database adoCon.Execute(strSQL) End If 'Else there is no date already in db for the last time this visitor came to the site so update db Else 'Initilse sql statement If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "UpdateLasVisit @lngUserID = " & lngLoggedInUserID Else strSQL = "UPDATE " & strDbTable & "Author SET " & strDbTable & "Author.Last_visit=Now() WHERE " & strDbTable & "Author.Author_ID=" & lngLoggedInUserID & ";" End If 'Write to database adoCon.Execute(strSQL) End If 'If the members account is not active then set there group to 2 (Guest Group) If blnActiveMember = False Then intGroupID = 2 'Set the Guest boolean to false blnGuest = False End If 'Clean up rsCommon.Close End If 'Make sure the admin account remains active and full access rights and in the admin group If lngLoggedInUserID = 1 Then intGroupID = 1 blnActiveMember = True End If 'If in the admin group set the admin boolean to true If intGroupID = 1 Then blnAdmin = True 'If active users is on update the table If blnActiveUsers Then %><% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'Dimension variables Dim strIPAddress 'Holds the uesrs IP address to keep track of em with Dim dtmLoggedIn 'Holds the date/time the user logged in Dim dtmLastActive 'Holds the date/time the user was last active Dim strOS 'Holds the users OS Dim strBrowserUserType 'Holds the users browser type Dim intActiveUsers 'Holds the number of active users Dim intActiveGuests 'Holds the number of active guests Dim intActiveMembers 'Holds the number of logged in active members Dim blnHideActiveUser 'Holds if the user wants to be shown in the active users list Dim lngActiveUsersID 'Hols the active users ID number 'Get the users IP address strIPAddress = getIP() 'Get if the user wants to be shown in the active users list If Request.Cookies(strCookieName)("NS") = "1" Then blnHideActiveUser = 1 Else blnHideActiveUser = 0 End If 'Calculate the active users ID number lngActiveUsersID = lngLoggedInUserID 'Initialise the SQL variable with an SQL statement to get the active users details If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "ActiveUsersWhereIPis @strIPAddress = '" & strIPAddress & "'" Else strSQL = "SELECT " & strDbTable & "ActiveUser.Author_ID From " & strDbTable & "ActiveUser WHERE " & strDbTable & "ActiveUser.IP ='" & strIPAddress & "';" End If 'Query the database rsCommon.Open strSQL, adoCon 'If there are no records for this user then add them to the datatbase If rsCommon.EOF Then 'Get the uesrs web browser strBrowserUserType = BrowserType() 'Get the OS type strOS = OSType() 'If the user is not in the active users list then write them to it 'Initilse sql statement If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "AddNewActiveUser @strIPAddress = '" & strIPAddress & "', @lngActiveUsersID = '" & lngActiveUsersID & "', @strOS = '" & strOS & "', @strBrowserUserType = '" & strBrowserUserType & "', @blnHideActiveUser = '" & blnHideActiveUser & "'" Else strSQL = "INSERT INTO " & strDbTable & "ActiveUser (IP, Author_ID, OS, Browser, Hide) VALUES ('" & strIPAddress & "','" & lngActiveUsersID & "','" & strOS & "','" & strBrowserUserType & "','" & blnHideActiveUser & "');" End If 'Write to database adoCon.Execute(strSQL) 'Delete older second entries if the user has returned in under 10 minutes with a new IP If lngActiveUsersID <> 2 Then If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "DeleteActiveUserDoubleEntry @lngActiveUsersID = " & lngActiveUsersID & ", @strIPAddress = '" & strIPAddress & "'" Else strSQL = "DELETE FROM " & strDbTable & "ActiveUser WHERE " & strDbTable & "ActiveUser.Author_ID=" & lngActiveUsersID & " AND " & strDbTable & "ActiveUser.IP <> '" & strIPAddress & "';" End If 'Detlete from database adoCon.Execute(strSQL) End If 'Requery the database to allow access to catch up rsCommon.Requery 'Else if there's records returned then update them Else 'The user is already in the db so just update the recordset 'Initilse sql statement If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "UpdateActiveUser @lngActiveUsersID = '" & lngActiveUsersID & "', @blnHideActiveUser = '" & blnHideActiveUser & "', @strIPAddress = '" & strIPAddress & "'" Else strSQL = "UPDATE " & strDbTable & "ActiveUser SET " & strDbTable & "ActiveUser.Author_ID=" & lngActiveUsersID & ", " & strDbTable & "ActiveUser.Active=Now(), " & strDbTable & "ActiveUser.Hide=" & blnHideActiveUser & " WHERE IP='" & strIPAddress & "';" End If 'Write to database adoCon.Execute(strSQL) 'Clean up old users 'Initilse sql statement If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "DeleteActiveUser" Else strSQL = "DELETE FROM " & strDbTable & "ActiveUser WHERE " & strDbTable & "ActiveUser.Active < Now() - 0.0070;" End If 'Detlete from database adoCon.Execute(strSQL) 'Requery the database to allow access to catch up rsCommon.Requery End If 'Close the recordset rsCommon.Close %><% End If %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** '****************************************** '*** Create Usercode ***** '****************************************** Private Function userCode(ByVal strUsername) 'Randomise the system timer Randomize Timer 'Calculate a code for the user strUserCode = strUsername & hexValue(10) 'Make the usercode SQL safe strUserCode = formatSQLInput(strUserCode) 'Replace double quote with single in this intance strUserCode = Replace(strUserCode, "''", "'", 1, -1, 1) 'Return the function userCode = strUserCode End Function '****************************************** '*** Random Hex Generator **** '****************************************** Private Function hexValue(ByVal intHexLength) Dim intLoopCounter Dim strHexValue 'Randomise the system timer Randomize Timer() 'Generate a hex value For intLoopCounter = 1 to intHexLength 'Genreate a radom decimal value form 0 to 15 intHexLength = CInt(Rnd * 1000) Mod 16 'Turn the number into a hex value Select Case intHexLength Case 1 strHexValue = "1" Case 2 strHexValue = "2" Case 3 strHexValue = "3" Case 4 strHexValue = "4" Case 5 strHexValue = "5" Case 6 strHexValue = "6" Case 7 strHexValue = "7" Case 8 strHexValue = "8" Case 9 strHexValue = "9" Case 10 strHexValue = "A" Case 11 strHexValue = "B" Case 12 strHexValue = "C" Case 13 strHexValue = "D" Case 14 strHexValue = "E" Case 15 strHexValue = "F" Case Else strHexValue = "Z" End Select 'Place the hex value into the return string hexValue = hexValue & strHexValue Next End Function '******************************************** '*** Rich Text Compatible Browser type ***** '******************************************** Private Function RTEenabled() Dim strUserAgent 'Holds info on the users browser 'Get the users HTTP user agent (web browser) strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") '************************************* '***** Windows Internet Explorer ***** '************************************* 'See if the user agent is IE on Winows and not Opera trying to look like IE If InStr(1, strUserAgent, "MSIE", 1) > 0 AND InStr(1, strUserAgent, "Win", 1) > 0 AND InStr(1, strUserAgent, "Opera", 1) = 0 Then 'Now we know this is Windows IE we need to see if the version number is 5 If Trim(Mid(strUserAgent, CInt(inStr(1, strUserAgent, "MSIE", 1)+5), 1)) = "5" Then RTEenabled = "winIE5" 'Now we know this is Windows IE we need to see if the version number is above 5 ElseIf CInt(Trim(Mid(strUserAgent, CInt(inStr(1, strUserAgent, "MSIE", 1)+5), 1))) => 6 Then RTEenabled = "winIE" 'Else the IE version is below 5 so return na Else RTEenabled = "false" End If '**************************** '***** Mozilla Firebird ***** '**************************** 'See if this is a version of Mozilla Firebird that supports Rich Text Editing under it's Midas API ElseIf inStr(1, strUserAgent, "Firebird", 1) Then 'Now we know this is Mozilla Firebird we need to see if the version 0.6.1 or above; relase date is above 2003/07/28 If CLng(Trim(Mid(strUserAgent, CInt(inStr(1, strUserAgent, "Gecko/", 1)+6), 8))) => 20030728 Then RTEenabled = "Gecko" 'Else the Mozilla Firebird version is below 1.5 so return false Else RTEenabled = "false" End If '************************************** '***** Mozilla Seamonkey/Netscape ***** '************************************** 'See if this is a version of Mozilla/Netscape that supports Rich Text Editing under it's Midas API ElseIf inStr(1, strUserAgent, "Gecko", 1) > 0 AND inStr(1, strUserAgent, "Firebird", 1) = 0 AND isNumeric(Trim(Mid(strUserAgent, CInt(inStr(1, strUserAgent, "Gecko/", 1)+6), 8))) Then 'Now we know this is Mozilla/Netscape we need to see if the version number is above 1.3 or above; relase date is above 2003/03/12 If CLng(Trim(Mid(strUserAgent, CInt(inStr(1, strUserAgent, "Gecko/", 1)+6), 8))) => 20030312 Then RTEenabled = "Gecko" 'Else the Mozilla version is below 1.3 or below 7.1 of Netscape so return false Else RTEenabled = "false" End If '*********************************** '***** Non RTE Enabled Browser ***** '*********************************** 'Else this is a browser that does not support Rich Text Editing Else 'RTEenabled - false RTEenabled = "false" End If End Function '****************************************** '*** Get Web Browser Details ***** '****************************************** Private Function BrowserType() Dim strUserAgent 'Holds info on the users browser and os Dim strBrowserUserType 'Holds the users browser type 'Get the users HTTP user agent (web browser) strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") 'Get the uesrs web browser 'Opera If InStr(1, strUserAgent, "Opera 1", 1) > 0 Then strBrowserUserType = "Opera 1" ElseIf InStr(1, strUserAgent, "Opera 2", 1) > 0 Then strBrowserUserType = "Opera 2" ElseIf InStr(1, strUserAgent, "Opera 3", 1) > 0 Then strBrowserUserType = "Opera 3" ElseIf InStr(1, strUserAgent, "Opera 4", 1) > 0 Then strBrowserUserType = "Opera 4" ElseIf InStr(1, strUserAgent, "Opera 5", 1) > 0 Then strBrowserUserType = "Opera 5" ElseIf InStr(1, strUserAgent, "Opera 6", 1) > 0 Then strBrowserUserType = "Opera 6" ElseIf InStr(1, strUserAgent, "Opera 7", 1) > 0 Then strBrowserUserType = "Opera 7" ElseIf InStr(1, strUserAgent, "Opera 8", 1) > 0 Then strBrowserUserType = "Opera 8" ElseIf InStr(1, strUserAgent, "Opera", 1) > 0 Then strBrowserUserType = "Opera" 'AOL ElseIf inStr(1, strUserAgent, "AOL 3", 1) > 0 Then strBrowserUserType = "AOL 3" ElseIf inStr(1, strUserAgent, "AOL 4", 1) > 0 Then strBrowserUserType = "AOL 4" ElseIf inStr(1, strUserAgent, "AOL 5", 1) > 0 Then strBrowserUserType = "AOL 5" ElseIf inStr(1, strUserAgent, "AOL 6", 1) > 0 Then strBrowserUserType = "AOL 6" ElseIf inStr(1, strUserAgent, "AOL 7", 1) > 0 Then strBrowserUserType = "AOL 7" ElseIf inStr(1, strUserAgent, "AOL 8", 1) > 0 Then strBrowserUserType = "AOL 8" ElseIf inStr(1, strUserAgent, "AOL 9", 1) > 0 Then strBrowserUserType = "AOL 9" ElseIf inStr(1, strUserAgent, "AOL", 1) > 0 Then strBrowserUserType = "AOL" 'Konqueror ElseIf inStr(1, strUserAgent, "Konqueror", 1) > 0 Then strBrowserUserType = "Konqueror" 'EudoraWeb ElseIf inStr(1, strUserAgent, "EudoraWeb", 1) > 0 Then strBrowserUserType = "EudoraWeb" 'Dreamcast ElseIf inStr(1, strUserAgent, "Dreamcast", 1) > 0 Then strBrowserUserType = "Dreamcast" 'Safari ElseIf inStr(1, strUserAgent, "Safari", 1) > 0 Then strBrowserUserType = "Safari" 'Lynx ElseIf inStr(1, strUserAgent, "Lynx", 1) > 0 Then strBrowserUserType = "Lynx" 'ICE ElseIf inStr(1, strUserAgent, "ICE", 1) > 0 Then strBrowserUserType = "ICE" 'iCab ElseIf inStr(1, strUserAgent, "iCab", 1) > 0 Then strBrowserUserType = "iCab" 'HotJava ElseIf inStr(1, strUserAgent, "Sun", 1) > 0 AND inStr(1, strUserAgent, "Mozilla/3", 1) > 0 Then strBrowserUserType = "HotJava" 'Galeon ElseIf inStr(1, strUserAgent, "Galeon", 1) > 0 Then strBrowserUserType = "Galeon" 'Epiphany ElseIf inStr(1, strUserAgent, "Epiphany", 1) > 0 Then strBrowserUserType = "Epiphany" 'DocZilla ElseIf inStr(1, strUserAgent, "DocZilla", 1) > 0 Then strBrowserUserType = "DocZilla" 'Camino ElseIf inStr(1, strUserAgent, "Chimera", 1) > 0 OR inStr(1, strUserAgent, "Camino", 1) > 0 Then strBrowserUserType = "Camino" 'Dillo ElseIf inStr(1, strUserAgent, "Dillo", 1) > 0 Then strBrowserUserType = "Dillo" 'amaya ElseIf inStr(1, strUserAgent, "amaya", 1) > 0 Then strBrowserUserType = "Amaya" 'Internet Explorer ElseIf inStr(1, strUserAgent, "MSIE 7", 1) > 0 Then strBrowserUserType = "Microsoft IE 7" ElseIf inStr(1, strUserAgent, "MSIE 6", 1) > 0 Then strBrowserUserType = "Microsoft IE 6" ElseIf inStr(1, strUserAgent, "MSIE 5", 1) > 0 Then strBrowserUserType = "Microsoft IE 5" ElseIf inStr(1, strUserAgent, "MSIE 4", 1) > 0 Then strBrowserUserType = "Microsoft IE 4" ElseIf inStr(1, strUserAgent, "MSIE 3", 1) > 0 Then strBrowserUserType = "Microsoft IE 3" ElseIf inStr(1, strUserAgent, "MSIE 2", 1) > 0 Then strBrowserUserType = "Microsoft IE 2" ElseIf inStr(1, strUserAgent, "MSIE 1", 1) > 0 Then strBrowserUserType = "Microsoft IE 1" 'Pocket Internet Explorer ElseIf inStr(1, strUserAgent, "MSPIE 1", 1) > 0 Then strBrowserUserType = "Pocket IE 1" ElseIf inStr(1, strUserAgent, "MSPIE 1", 1) > 0 Then strBrowserUserType = "Pocket IE 2" 'Mozilla Firebird ElseIf inStr(1, strUserAgent, "Gecko", 1) > 0 AND inStr(1, strUserAgent, "Firebird", 1) > 0 Then strBrowserUserType = "Mozilla Firebird" 'Mozilla ElseIf inStr(1, strUserAgent, "Gecko", 1) > 0 AND inStr(1, strUserAgent, "rv:2", 1) > 0 AND inStr(1, strUserAgent, "Netscape", 1) = 0 Then strBrowserUserType = "Mozilla 2" ElseIf inStr(1, strUserAgent, "Gecko", 1) > 0 AND inStr(1, strUserAgent, "rv:1", 1) > 0 AND inStr(1, strUserAgent, "Netscape", 1) = 0 Then strBrowserUserType = "Mozilla 1" ElseIf inStr(1, strUserAgent, "Gecko", 1) > 0 AND inStr(1, strUserAgent, "rv:0", 1) > 0 AND inStr(1, strUserAgent, "Netscape", 1) = 0 Then strBrowserUserType = "Mozilla" 'Netscape ElseIf inStr(1, strUserAgent, "Netscape/8", 1) > 0 Then strBrowserUserType = "Netscape 8" ElseIf inStr(1, strUserAgent, "Netscape/7", 1) > 0 Then strBrowserUserType = "Netscape 7" ElseIf inStr(1, strUserAgent, "Netscape6", 1) > 0 Then strBrowserUserType = "Netscape 6" ElseIf inStr(1, strUserAgent, "Mozilla/4", 1) > 0 Then strBrowserUserType = "Netscape 4" ElseIf inStr(1, strUserAgent, "Mozilla/3", 1) > 0 Then strBrowserUserType = "Netscape 3" ElseIf inStr(1, strUserAgent, "Mozilla/2", 1) > 0 Then strBrowserUserType = "Netscape 2" ElseIf inStr(1, strUserAgent, "Mozilla/1", 1) > 0 Then strBrowserUserType = "Netscape 1" 'Googlebot search engine robot ElseIf inStr(1, strUserAgent, "Googlebot", 1) > 0 Then strBrowserUserType = "Googlebot" 'ZyBorg search engine robot ElseIf inStr(1, strUserAgent, "ZyBorg", 1) > 0 Then strBrowserUserType = "ZyBorg" 'Else unknown or robot Else strBrowserUserType = "Unknown" End If 'Return function BrowserType = strBrowserUserType End Function '****************************************** '*** Get OS Type ***** '****************************************** Private Function OSType () Dim strUserAgent 'Holds info on the users browser and os Dim strOS 'Holds the users OS 'Get the users HTTP user agent (web browser) strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") 'Get users OS 'Windows If inStr(1, strUserAgent, "Windows 2003", 1) > 0 Or inStr(1, strUserAgent, "NT 5.2", 1) > 0 Then strOS = "Windows 2003" ElseIf inStr(1, strUserAgent, "Windows XP", 1) > 0 Or inStr(1, strUserAgent, "NT 5.1", 1) > 0 Then strOS = "Windows XP" ElseIf inStr(1, strUserAgent, "Windows 2000", 1) > 0 Or inStr(1, strUserAgent, "NT 5", 1) > 0 Then strOS = "Windows 2000" ElseIf inStr(1, strUserAgent, "Windows NT", 1) > 0 Or inStr(1, strUserAgent, "WinNT", 1) > 0 Then strOS = "Windows NT 4" ElseIf inStr(1, strUserAgent, "Windows 95", 1) > 0 Or inStr(1, strUserAgent, "Win95", 1) > 0 Then strOS = "Windows 95" ElseIf inStr(1, strUserAgent, "Win 9x 4.90", 1) > 0 Then strOS = "Windows ME" ElseIf inStr(1, strUserAgent, "Windows 98", 1) > 0 Or inStr(1, strUserAgent, "Win98", 1) > 0 Then strOS = "Windows 98" ElseIf Instr(1, strUserAgent, "Windows 3.1", 1) > 0 or Instr(1, strUserAgent, "Win16", 1) > 0 Then strOS = "Windows 3.x" ElseIf Instr(1, strUserAgent, "Windows CE", 1) > 0 Then strOS = "Windows CE" 'PalmOS ElseIf inStr(1, strUserAgent, "PalmOS", 1) > 0 Then strOS = "Palm OS" 'PalmPilot ElseIf inStr(1, strUserAgent, "Elaine", 1) > 0 Then strOS = "PalmPilot" 'Nokia ElseIf inStr(1, strUserAgent, "Nokia", 1) > 0 Then strOS = "Nokia" 'Linux ElseIf inStr(1, strUserAgent, "Linux", 1) > 0 Then strOS = "Linux" 'Amiga ElseIf inStr(1, strUserAgent, "Amiga", 1) > 0 Then strOS = "Amiga" 'Solaris ElseIf inStr(1, strUserAgent, "Solaris", 1) > 0 Then strOS = "Solaris" 'SunOS ElseIf inStr(1, strUserAgent, "SunOS", 1) > 0 Then strOS = "Sun OS" 'BSD ElseIf inStr(1, strUserAgent, "BSD", 1) > 0 or inStr(1, strUserAgent, "FreeBSD", 1) > 0 Then strOS = "Free BSD" 'Unix ElseIf inStr(1, strUserAgent, "Unix", 1) > 0 OR inStr(1, strUserAgent, "X11", 1) > 0 Then strOS = "Unix" 'AOL webTV ElseIf inStr(1, strUserAgent, "AOLTV", 1) > 0 OR inStr(1, strUserAgent, "AOL_TV", 1) > 0 Then strOS = "AOL TV" ElseIf inStr(1, strUserAgent, "WebTV", 1) > 0 Then strOS = "Web TV" 'Machintosh ElseIf inStr(1, strUserAgent, "Mac OS X", 1) > 0 Then strOS = "Mac OS X" ElseIf inStr(1, strUserAgent, "Mac_PowerPC", 1) > 0 or Instr(1, strUserAgent, "PPC", 1) > 0 Then strOS = "Mac PowerPC" ElseIf (inStr(1, strUserAgent, "6800", 1) > 0 OR inStr(1, strUserAgent, "68k", 1) > 0) AND inStr(1, strUserAgent, "Mac", 1) > 0 Then strOS = "Mac 68k" ElseIf inStr(1, strUserAgent, "Mac", 1) > 0 or inStr(1, strUserAgent, "apple", 1) > 0 Then strOS = "Macintosh" 'OS/2 ElseIf inStr(1, strUserAgent, "OS/2", 1) > 0 Then strOS = "OS/2" 'Googlebot ElseIf inStr(1, strUserAgent, "Googlebot", 1) > 0 OR inStr(1, strUserAgent, "ZyBorg", 1) > 0 Then strOS = "Search Robot" Else strOS = "Unknown" End If 'Return function OSType = strOS End Function '****************************************** '*** DB Topic/Post Count Update ***** '****************************************** Private Function updateTopicPostCount(ByVal intForumID) Dim rsCount 'Database recordset holding the number of topics and posts Dim lngNumberOfTopics 'Holds the number of topics Dim lngNumberOfPosts 'Holds the number of posts 'Intilaise variables lngNumberOfTopics = 0 lngNumberOfPosts = 0 'Intialise the ADO recordset object Set rsCount = Server.CreateObject("ADODB.Recordset") '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 " & strDbProc & "ForumTopicCount @intForumID = " & intForumID Else strSQL = "SELECT Count(" & strDbTable & "Topic.Forum_ID) AS Topic_Count " strSQL = strSQL & "From " & strDbTable & "Topic " strSQL = strSQL & "WHERE " & strDbTable & "Topic.Forum_ID = " & intForumID & " " End If 'Query the database rsCount.Open strSQL, adoCon 'Read in the number of Topics If NOT rsCount.EOF Then lngNumberOfTopics = CLng(rsCount("Topic_Count")) 'Close the rs rsCount.Close '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 " & strDbProc & "ForumThreadCount @intForumID = " & intForumID Else strSQL = "SELECT Count(" & strDbTable & "Thread.Thread_ID) AS Thread_Count " strSQL = strSQL & "FROM " & strDbTable & "Topic INNER JOIN " & strDbTable & "Thread ON " & strDbTable & "Topic.Topic_ID = " & strDbTable & "Thread.Topic_ID " strSQL = strSQL & "GROUP BY " & strDbTable & "Topic.Forum_ID " strSQL = strSQL & "HAVING (((" & strDbTable & "Topic.Forum_ID)=" & intForumID & "));" End If 'Query the database rsCount.Open strSQL, adoCon 'Get the thread count If NOT rsCount.EOF Then lngNumberOfPosts = CLng(rsCount("Thread_Count")) 'Reset server variables rsCount.Close Set rsCount = Nothing 'Initalise the SQL string with an SQL update command to update the number of topics and posts in the forum strSQL = "UPDATE " & strDbTable & "Forum SET " strSQL = strSQL & "" & strDbTable & "Forum.No_of_topics = " & lngNumberOfTopics & ", " & strDbTable & "Forum.No_of_posts = " & lngNumberOfPosts strSQL = strSQL & " WHERE " & strDbTable & "Forum.Forum_ID= " & intForumID & ";" 'Write the updated number of posts to the database adoCon.Execute(strSQL) End Function '****************************************** '*** Forum Permisisons ***** '****************************************** Public Function forumPermisisons(ByVal intForumID, ByVal intGroupID, ByVal intRead, ByVal intPost, ByVal intReply, ByVal intEdit, ByVal intDelete, ByVal intPriority, ByVal intPollCreate, ByVal intVote, ByVal intAttachments, ByVal intImageUpload) 'Declare variables Dim rsPermissions 'Holds the permissions recordset 'Initilise variables blnRead = False blnPost = False blnReply = False blnEdit = False blnDelete = False blnPriority = False blnPollCreate = False blnVote = False blnAttachments = False blnImageUpload = False blnModerator = False 'Intialise the ADO recordset object Set rsPermissions = Server.CreateObject("ADODB.Recordset") 'Get the users group permissions from the db if there are any '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 " & strDbProc & "ForumPermissions @intForumID = " & intForumID & ", @intGroupID = " & intGroupID & ", @intAuthorID = " & lngLoggedInUserID Else strSQL = "SELECT " & strDbTable & "Permissions.* " strSQL = strSQL & "FROM " & strDbTable & "Permissions " strSQL = strSQL & "WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") AND " & strDbTable & "Permissions.Forum_ID = " & intForumID & " " strSQL = strSQL & "ORDER BY " & strDbTable & "Permissions.Author_ID DESC;" End If 'Query the database rsPermissions.Open strSQL, adoCon 'Read in the permissions for the group the member is part of if there are any If NOT rsPermissions.EOF Then blnRead = CBool(rsPermissions("Read")) blnPost = CBool(rsPermissions("Post")) blnReply = CBool(rsPermissions("Reply_posts")) blnEdit = CBool(rsPermissions("Edit_posts")) blnDelete = CBool(rsPermissions("Delete_posts")) blnPriority = CBool(rsPermissions("Priority_posts")) blnPollCreate = CBool(rsPermissions("Poll_create")) blnVote = CBool(rsPermissions("Vote")) blnAttachments = CBool(rsPermissions("Attachments")) blnImageUpload = CBool(rsPermissions("Image_upload")) blnModerator = CBool(rsPermissions("Moderate")) 'Else there are no forum permissions for this group so use the generic forum permissions Else 'If ALL(1) OR (REG(2) AND NOT GID2(Guest Group)) OR (Admin(5) AND GID1(Admin Group)) Then set to true If intRead = 1 OR (intRead = 2 AND intGroupID <> 2) OR (blnAdmin) Then blnRead = True If intPost = 1 OR (intPost = 2 AND intGroupID <> 2) OR (blnAdmin) Then blnPost = True If intReply = 1 OR (intReply = 2 AND intGroupID <> 2) OR (blnAdmin) Then blnReply = True If intEdit = 1 OR (intEdit = 2 AND intGroupID <> 2) OR (blnAdmin) Then blnEdit = True If intDelete = 1 OR (intDelete = 2 AND intGroupID <> 2) OR (blnAdmin) Then blnDelete = True If intPriority = 1 OR (intPriority = 2 AND intGroupID <> 2) OR (blnAdmin) Then blnPriority = True If (intPollCreate = 1 OR (intPollCreate = 2 AND intGroupID <> 2) OR (blnAdmin)) AND intPollCreate <> 0 Then blnPollCreate = True If (intVote = 1 OR (intVote = 2 AND intGroupID <> 2) OR (blnAdmin)) AND intVote <> 0 Then blnVote = True If (intAttachments = 1 OR (intAttachments = 2 AND intGroupID <> 2) OR (blnAdmin)) AND intAttachments <> 0 Then blnAttachments = True If (intImageUpload = 1 OR (intImageUpload = 2 AND intGroupID <> 2) OR (blnAdmin)) AND intImageUpload <> 0 Then blnImageUpload = True End If 'Clean up rsPermissions.Close Set rsPermissions = Nothing End Function '****************************************** '*** Is Moderator ***** '****************************************** 'Although the above function can work out if the user is a moderator sometimes we only need to know if the user is a moderator or not Private Function isModerator(ByVal intForumID, ByVal intGroupID) 'Declare variables Dim rsPermissions 'Holds the permissions recordset Dim blnModerator 'Set to true if the user is a moderator 'Initilise vairiables blnModerator = False 'Intialise the ADO recordset object Set rsPermissions = Server.CreateObject("ADODB.Recordset") 'Get the users group permissions from the db if there are any '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 " & strDbProc & "ForumPermissions @intForumID = " & intForumID & ", @intGroupID = " & intGroupID & ", @intAuthorID = " & lngLoggedInUserID Else strSQL = "SELECT " & strDbTable & "Permissions.* " strSQL = strSQL & "FROM " & strDbTable & "Permissions " strSQL = strSQL & "WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") AND " & strDbTable & "Permissions.Forum_ID = " & intForumID & " " strSQL = strSQL & "ORDER BY " & strDbTable & "Permissions.Author_ID DESC;" End If 'Query the database rsPermissions.Open strSQL, adoCon 'If there is a result returned by the db set it to the blnModerator variable If NOT rsPermissions.EOF Then blnModerator = CBool(rsPermissions("Moderate")) 'Clean up rsPermissions.Close Set rsPermissions = Nothing 'Return the function isModerator = blnModerator End Function '****************************************** '*** Disallowed Member Names ***** '****************************************** Private Function disallowedMemberNames(ByVal strUserName) strUsername = Replace(strUsername, "salt", "", 1, -1, 1) strUsername = Replace(strUsername, "password", "", 1, -1, 1) strUsername = Replace(strUsername, "author", "", 1, -1, 1) strUsername = Replace(strUsername, "code", "", 1, -1, 1) strUsername = Replace(strUsername, "username", "", 1, -1, 1) strUsername = Replace(strUsername, "N0act", "", 1, -1, 1) 'Return Function disallowedMemberNames = strUsername End Function '****************************************** '**** Banned IP's ***** '****************************************** Private Function bannedIP() 'Declare variables Dim rsIPAddr Dim strCheckIPAddress Dim strUserIPAddress Dim blnIPMatched 'Intilise variable blnIPMatched = False 'Get the users IP strUserIPAddress = getIP() 'Intialise the ADO recordset object Set rsIPAddr = Server.CreateObject("ADODB.Recordset") 'Get any banned IP address from the database '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 " & strDbProc & "BannedIPs" Else strSQL = "SELECT " & strDbTable & "BanList.IP FROM " & strDbTable & "BanList WHERE " & strDbTable & "BanList.IP Is Not Null;" End If 'Query the database rsIPAddr.Open strSQL, adoCon 'Loop through the IP address and check 'em out Do while NOT rsIPAddr.EOF 'Get the IP address to check from the recordset strCheckIPAddress = rsIPAddr("IP") 'See if we need to check the IP range or just one IP address 'If the last character is a * then this is a wildcard range to be checked If Right(strCheckIPAddress, 1) = "*" Then 'Remove the wildcard charcter form the IP strCheckIPAddress = Replace(strCheckIPAddress, "*", "", 1, -1, 1) 'Trim the users IP to the same length as the IP range to check strUserIPAddress = Mid(strUserIPAddress, 1, Len(strCheckIPAddress)) 'See if whats left of the IP matches If strCheckIPAddress = strUserIPAddress Then blnIPMatched = True 'Else check the IP address metches Else 'Else check to see if the IP address match If strCheckIPAddress = strUserIPAddress Then blnIPMatched = True End If 'Move to the next record rsIPAddr.MoveNext Loop 'Clean up rsIPAddr.Close Set rsIPAddr = Nothing 'Return the function bannedIP = blnIPMatched End Function '****************************************** '*** Check the session ID *** '****************************************** Private Function checkSessionID(lngAspSessionID) 'Check to see if the session ID's match if they don't send the user away If lngAspSessionID <> Session.SessionID Then 'clean up before redirecting Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'redirect to insufficient permissions page Response.Redirect("insufficient_permission.asp?FID=" & intForumID & "&M=sID") End If End Function '****************************************** '*** Get users IP address *** '****************************************** Private Function getIP() Dim strIPAddr 'If they are not going through a proxy get the IP address If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then strIPAddr = Request.ServerVariables("REMOTE_ADDR") 'If they are going through multiple proxy servers only get the fisrt IP address in the list (,) ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1) 'If they are going through multiple proxy servers only get the fisrt IP address in the list (;) ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1) 'Get the browsers IP address not the proxy servers IP Else strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR") End If 'Place the IP address back into the returning function getIP = Trim(Mid(strIPAddr, 1, 30)) End Function %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** '********************************************** '*** Check HTML input for malicious code ***** '********************************************** 'Check images function Private Function checkHTML(ByVal strMessageInput) Dim strTempHTMLMessage 'Temporary message store Dim lngMessagePosition 'Holds the message position Dim intHTMLTagLength 'Holds the length of the HTML tags Dim strHTMLMessage 'Holds the HTML message Dim strTempMessageInput 'Temp store for the message input Dim lngLoopCounter 'Loop counter 'Include the array of disallowed HTML tags %><% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'Dimension variables Dim saryHTMLtags(73) 'If you add more disallowed HTML tags then increase the array size 'Initalise array values saryHTMLtags(0) = "html" saryHTMLtags(1) = "body" saryHTMLtags(2) = "head" saryHTMLtags(3) = "meta" saryHTMLtags(4) = "button" saryHTMLtags(5) = "input" saryHTMLtags(6) = "type" saryHTMLtags(7) = "select" saryHTMLtags(8) = "radio" saryHTMLtags(9) = "file" saryHTMLtags(10) = "hidden" saryHTMLtags(11) = "checkbox" saryHTMLtags(12) = "password" saryHTMLtags(13) = "checked" saryHTMLtags(14) = "fieldset" saryHTMLtags(15) = "language" saryHTMLtags(16) = "javascript" saryHTMLtags(17) = "vbscript" saryHTMLtags(18) = "script" saryHTMLtags(19) = "object" saryHTMLtags(20) = "applet" saryHTMLtags(21) = "embed" saryHTMLtags(22) = "event" saryHTMLtags(23) = "server" saryHTMLtags(24) = "function" saryHTMLtags(25) = "document" saryHTMLtags(26) = "cookie" saryHTMLtags(27) = "onclick" saryHTMLtags(28) = "ondblclick" saryHTMLtags(29) = "onkeyup" saryHTMLtags(30) = "onkeydown" saryHTMLtags(31) = "onkeypress" saryHTMLtags(32) = "onkey" saryHTMLtags(33) = "onmouseenter" saryHTMLtags(34) = "onmouseleave" saryHTMLtags(35) = "onmousemove" saryHTMLtags(36) = "onmouseout" saryHTMLtags(37) = "onmouseover" saryHTMLtags(38) = "onrollover" saryHTMLtags(39) = "onmouse" saryHTMLtags(40) = "onchange" saryHTMLtags(41) = "onunloadhave" saryHTMLtags(42) = "onunload" saryHTMLtags(43) = "onsubmit" saryHTMLtags(44) = "onselect" saryHTMLtags(45) = "accesskey" saryHTMLtags(46) = "tabindex" saryHTMLtags(47) = "onfocus" saryHTMLtags(48) = "onblur" saryHTMLtags(49) = "onsubmit" saryHTMLtags(50) = "onreset" saryHTMLtags(51) = "form" saryHTMLtags(52) = "iframe" saryHTMLtags(53) = "ilayer" saryHTMLtags(54) = "textarea" saryHTMLtags(55) = "action" saryHTMLtags(56) = "enctype" saryHTMLtags(57) = "layer" saryHTMLtags(58) = "multicol" saryHTMLtags(59) = "frameset" saryHTMLtags(60) = "marquee" saryHTMLtags(61) = "blink" saryHTMLtags(62) = "filter" saryHTMLtags(63) = "overlay" saryHTMLtags(64) = "param" saryHTMLtags(65) = "bgsound" saryHTMLtags(66) = "behavior" saryHTMLtags(67) = "ismap" saryHTMLtags(68) = "sound" saryHTMLtags(69) = "disabled" saryHTMLtags(70) = "ENCTYPE" saryHTMLtags(71) = "!DOCTYPE" saryHTMLtags(72) = "BACKGROUND-COLOR" saryHTMLtags(73) = "base" 'saryHTMLtags(74) = "table" 'If you want to include these commeneted out tags then increase the number in the Dim statement at the top! 'saryHTMLtags(75) = "tr" 'saryHTMLtags(76) = "td" 'If you add more disallowed HTML tags don't forget to increase the number in the Dim statement at the top! %><% 'Place the message input into a temp store strTempMessageInput = strMessageInput 'Loop through each character in the post message For lngMessagePosition = 1 to CLng(Len(strMessageInput)) 'If this is the end of the message then save some process time and jump out the loop If Mid(strMessageInput, lngMessagePosition, 1) = "" Then Exit For 'If an HTML tag is found then move to the end of it so that we can strip the HTML tag and check it for malicious code If Mid(strMessageInput, lngMessagePosition, 1) = "<" Then 'Get the length of the HTML tag intHTMLTagLength = (InStr(lngMessagePosition, strMessageInput, ">", 1) - lngMessagePosition) 'Place the HTML tag back into the temporary message store strHTMLMessage = Mid(strMessageInput, lngMessagePosition, intHTMLTagLength + 1) 'Place the HTML tag into a temporay variable store to be stripped of malcious code strTempHTMLMessage = strHTMLMessage '***** Filter Hyperlinks ***** 'If this is an hyperlink tag then check it for malicious code If InStr(1, strTempHTMLMessage, "href", 1) <> 0 Then 'Turn < and > into forum codes so they aren't stripped when checking links strTempHTMLMessage = Replace(strTempHTMLMessage, "<", "**/**", 1, -1, 1) strTempHTMLMessage = Replace(strTempHTMLMessage, ">", "**\**", 1, -1, 1) 'Call the format link function to strip malicious codes strTempHTMLMessage = formatLink(strTempHTMLMessage) 'Turn **/** and **\** back from forum codes strTempHTMLMessage = Replace(strTempHTMLMessage, "**/**", "<", 1, -1, 1) strTempHTMLMessage = Replace(strTempHTMLMessage, "**\**", ">", 1, -1, 1) 'Format link tag strTempHTMLMessage = Replace(strTempHTMLMessage, ">", " target=""_blank"">", 1, -1, 1) End If '***** Filter Image Tags ***** 'If this is an Image tag then check it for malicious code If InStr(1, strTempHTMLMessage, "img", 1) <> 0 AND InStr(1, strTempHTMLMessage, "src", 1) <> 0 Then 'Turn < and > into forum codes so they aren't stripped when checking links strTempHTMLMessage = Replace(strTempHTMLMessage, "<", "**/**", 1, -1, 1) strTempHTMLMessage = Replace(strTempHTMLMessage, ">", "**\**", 1, -1, 1) 'Call the check images function to strip malicious codes strTempHTMLMessage = checkImages(strTempHTMLMessage) 'Turn **/** and **\** back from forum codes strTempHTMLMessage = Replace(strTempHTMLMessage, "**/**", "<", 1, -1, 1) strTempHTMLMessage = Replace(strTempHTMLMessage, "**\**", ">", 1, -1, 1) 'Format image tag strTempHTMLMessage = Replace(strTempHTMLMessage, ">", " border=""0"">", 1, -1, 1) End If '***** Filter Unwanted HTML Tags ***** 'If this is not an image or a link then cut all unwanted HTML out of the HTML tag If InStr(1, strTempHTMLMessage, "href", 1) = 0 AND InStr(1, strTempHTMLMessage, "img", 1) = 0 Then 'Loop through the array of disallowed HTML tags For lngLoopCounter = LBound(saryHTMLtags) To UBound(saryHTMLtags) strTempHTMLMessage = Replace(strTempHTMLMessage, saryHTMLtags(lngLoopCounter), "", 1, -1, 1) Next End If '***** Format Unwanted HTML Tags ***** 'Strip out malicious code from the HTML that may have not been stripped but trying to sneak through in a hyperlink or image src strTempHTMLMessage = formatInput(strTempHTMLMessage) 'Place the new fromatted HTML tag back into the message post strTempMessageInput = Replace(strTempMessageInput, strHTMLMessage, strTempHTMLMessage, 1, -1, 1) End If Next 'Return the function checkHTML = strTempMessageInput End Function '****************************************** '*** Check Images for malicious code ***** '****************************************** 'Check images function Private Function checkImages(ByVal strInputEntry) Dim strImageFileExtension 'Holds the file extension of the image Dim saryImageTypes 'Array holding allowed image types in the forum Dim intExtensionLoopCounter 'Holds the loop counter for the array Dim blnImageExtOK 'Set to true if the image extension is OK 'If there is no . in the link then there is no extenison and so can't be an image If inStr(1, strInputEntry, ".", 1) = 0 Then strInputEntry = "" 'Else remove malicious code and check the extension is an image extension Else 'Initiliase variables blnImageExtOK = false 'Get the file extension strImageFileExtension = LCase(Mid(strInputEntry, InStrRev(strInputEntry, "."), 4)) 'Get the image types allowed in the forum strImageTypes = strImageTypes & ";gif;jpg;jpe;bmp;png" 'Place the image types into an array saryImageTypes = Split(Trim(strImageTypes), ";") 'Loop through all the allowed extensions and see if the iamge has one For intExtensionLoopCounter = 0 To UBound(saryImageTypes) 'Reformat extension to check saryImageTypes(intExtensionLoopCounter) = "." & Trim(Mid(saryImageTypes(intExtensionLoopCounter), 1, 3)) 'Check to see if the image extension is allowed If saryImageTypes(intExtensionLoopCounter) = strImageFileExtension Then blnImageExtOK = true Next 'If the image extension is not OK then strip it from the image link If blnImageExtOK = false Then strInputEntry = Replace(strInputEntry, strImageFileExtension, "", 1, -1, 1) 'Call the format link function to strip malicious codes strInputEntry = formatLink(strInputEntry) 'Chop out any querystring question marks that maybe in the image link strInputEntry = Replace(strInputEntry, "?", "", 1, -1, 1) End If 'Return checkImages = strInputEntry End Function '******************************************** '*** Format Links ***** '******************************************** 'Format links funtion Private Function formatLink(ByVal strInputEntry) 'Remove malisous charcters from links and images strInputEntry = Replace(strInputEntry, "document.cookie", ".", 1, -1, 1) strInputEntry = Replace(strInputEntry, "javascript:", "javascript ", 1, -1, 1) strInputEntry = Replace(strInputEntry, "vbscript:", "vbscript ", 1, -1, 1) strInputEntry = Replace(strInputEntry, "javascript :", "javascript ", 1, -1, 1) strInputEntry = Replace(strInputEntry, "vbscript :", "vbscript ", 1, -1, 1) strInputEntry = Replace(strInputEntry, "[", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "]", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "(", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, ")", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "{", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "}", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "<", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, ">", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "|", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "script", "script", 1, -1, 1) strInputEntry = Replace(strInputEntry, "object", "object", 1, -1, 1) strInputEntry = Replace(strInputEntry, "applet", "applet", 1, -1, 1) strInputEntry = Replace(strInputEntry, "embed", "embed", 1, -1, 1) strInputEntry = Replace(strInputEntry, "document", "document", 1, -1, 1) strInputEntry = Replace(strInputEntry, "cookie", "cookie", 1, -1, 1) strInputEntry = Replace(strInputEntry, "event", "event", 1, -1, 1) strInputEntry = Replace(strInputEntry, "on", "on", 1, -1, 1) 'Return formatLink = strInputEntry End Function '****************************************** '*** Format user input ***** '****************************************** 'Format user input function Private Function formatInput(ByVal strInputEntry) 'Get rid of malicous code in the message strInputEntry = Replace(strInputEntry, "script", "script", 1, -1, 0) strInputEntry = Replace(strInputEntry, "SCRIPT", "SCRIPT", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Script", "Script", 1, -1, 0) strInputEntry = Replace(strInputEntry, "script", "Script", 1, -1, 1) strInputEntry = Replace(strInputEntry, "object", "object", 1, -1, 0) strInputEntry = Replace(strInputEntry, "OBJECT", "OBJECT", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Object", "Object", 1, -1, 0) strInputEntry = Replace(strInputEntry, "object", "Object", 1, -1, 1) strInputEntry = Replace(strInputEntry, "applet", "applet", 1, -1, 0) strInputEntry = Replace(strInputEntry, "APPLET", "APPLET", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Applet", "Applet", 1, -1, 0) strInputEntry = Replace(strInputEntry, "applet", "Applet", 1, -1, 1) strInputEntry = Replace(strInputEntry, "embed", "embed", 1, -1, 0) strInputEntry = Replace(strInputEntry, "EMBED", "EMBED", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Embed", "Embed", 1, -1, 0) strInputEntry = Replace(strInputEntry, "embed", "Embed", 1, -1, 1) strInputEntry = Replace(strInputEntry, "event", "event", 1, -1, 0) strInputEntry = Replace(strInputEntry, "EVENT", "EVENT", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Event", "Event", 1, -1, 0) strInputEntry = Replace(strInputEntry, "event", "Event", 1, -1, 1) strInputEntry = Replace(strInputEntry, "document", "document", 1, -1, 0) strInputEntry = Replace(strInputEntry, "DOCUMENT", "DOCUMENT", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Document", "Document", 1, -1, 0) strInputEntry = Replace(strInputEntry, "document", "Document", 1, -1, 1) strInputEntry = Replace(strInputEntry, "cookie", "cookie", 1, -1, 0) strInputEntry = Replace(strInputEntry, "COOKIE", "COOKIE", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Cookie", "Cookie", 1, -1, 0) strInputEntry = Replace(strInputEntry, "cookie", "Cookie", 1, -1, 1) strInputEntry = Replace(strInputEntry, "form", "form", 1, -1, 0) strInputEntry = Replace(strInputEntry, "FORM", "FORM", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Form", "Form", 1, -1, 0) strInputEntry = Replace(strInputEntry, "form", "Form", 1, -1, 1) strInputEntry = Replace(strInputEntry, "iframe", "iframe", 1, -1, 0) strInputEntry = Replace(strInputEntry, "IFRAME", "IFRAME", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Iframe", "Iframe", 1, -1, 0) strInputEntry = Replace(strInputEntry, "iframe", "iframe", 1, -1, 1) strInputEntry = Replace(strInputEntry, "textarea", "textarea", 1, -1, 0) strInputEntry = Replace(strInputEntry, "TEXTAREA", "TEXTAREA", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Textarea", "Textarea", 1, -1, 0) strInputEntry = Replace(strInputEntry, "textarea", "Textarea", 1, -1, 1) strInputEntry = Replace(strInputEntry, "on", "on", 1, -1, 0) strInputEntry = Replace(strInputEntry, "ON", "ON", 1, -1, 0) strInputEntry = Replace(strInputEntry, "On", "On", 1, -1, 0) strInputEntry = Replace(strInputEntry, "on", "on", 1, -1, 1) 'Reformat a few bits strInputEntry = Replace(strInputEntry, "", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "font", "font", 1, -1, 0) strInputEntry = Replace(strInputEntry, "FONT", "FONT", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Font", "Font", 1, -1, 0) strInputEntry = Replace(strInputEntry, "fOnt", "font", 1, -1, 1) strInputEntry = Replace(strInputEntry, "font", "font", 1, -1, 1) strInputEntry = Replace(strInputEntry, "mono", "mono", 1, -1, 0) strInputEntry = Replace(strInputEntry, "MONO", "MONO", 1, -1, 0) strInputEntry = Replace(strInputEntry, "MOno", "Mono", 1, -1, 0) strInputEntry = Replace(strInputEntry, "mOno", "mono", 1, -1, 1) strInputEntry = Replace(strInputEntry, "mono", "mono", 1, -1, 1) 'Return formatInput = strInputEntry End Function '******************************************** '*** Format SQL input ***** '******************************************** 'Format SQL Query funtion Private Function formatSQLInput(ByVal strInputEntry) 'Remove malisous charcters from links and images strInputEntry = Replace(strInputEntry, "<", "<") strInputEntry = Replace(strInputEntry, ">", ">") strInputEntry = Replace(strInputEntry, "[", "[;") strInputEntry = Replace(strInputEntry, "]", "]") strInputEntry = Replace(strInputEntry, """", "", 1, -1, 1) strInputEntry = Replace(strInputEntry, "=", "=", 1, -1, 1) strInputEntry = Replace(strInputEntry, "'", "''", 1, -1, 1) strInputEntry = Replace(strInputEntry, "select", "select", 1, -1, 1) strInputEntry = Replace(strInputEntry, "join", "join", 1, -1, 1) strInputEntry = Replace(strInputEntry, "union", "union", 1, -1, 1) strInputEntry = Replace(strInputEntry, "where", "where", 1, -1, 1) strInputEntry = Replace(strInputEntry, "insert", "insert", 1, -1, 1) strInputEntry = Replace(strInputEntry, "delete", "delete", 1, -1, 1) strInputEntry = Replace(strInputEntry, "update", "update", 1, -1, 1) strInputEntry = Replace(strInputEntry, "like", "like", 1, -1, 1) strInputEntry = Replace(strInputEntry, "drop", "drop", 1, -1, 1) strInputEntry = Replace(strInputEntry, "create", "create", 1, -1, 1) strInputEntry = Replace(strInputEntry, "modify", "modify", 1, -1, 1) strInputEntry = Replace(strInputEntry, "rename", "rename", 1, -1, 1) strInputEntry = Replace(strInputEntry, "alter", "alter", 1, -1, 1) strInputEntry = Replace(strInputEntry, "cast", "cast", 1, -1, 1) 'Return formatSQLInput = strInputEntry End Function '********************************************* '*** Strip all tags ***** '********************************************* 'Remove all tags for text only display (mainly for subject lines) Private Function removeAllTags(ByVal strInputEntry) 'Remove all HTML scripting tags etc. for plain text output strInputEntry = Replace(strInputEntry, "&", "&", 1, -1, 1) strInputEntry = Replace(strInputEntry, "<", "<", 1, -1, 1) strInputEntry = Replace(strInputEntry, ">", ">", 1, -1, 1) strInputEntry = Replace(strInputEntry, "'", "’", 1, -1, 1) strInputEntry = Replace(strInputEntry, """", """, 1, -1, 1) 'Return removeAllTags = strInputEntry End Function '****************************************** '*** Non-Alphanumeric Character Strip **** '****************************************** 'Function to strip non alphanumeric characters Private Function characterStrip(strTextInput) 'Dimension variable Dim intLoopCounter 'Holds the loop counter 'Loop through the ASCII characters For intLoopCounter = 0 to 47 strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0) Next 'Loop through the ASCII characters numeric characters to lower-case characters For intLoopCounter = 91 to 96 strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0) Next 'Loop through the extended ASCII characters For intLoopCounter = 58 to 64 strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0) Next 'Loop through the extended ASCII characters For intLoopCounter = 123 to 255 strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0) Next 'Return the string characterStrip = strTextInput End Function '********************************************** '*** Strip HTML ***** '********************************************** 'Remove HTML function Private Function removeHTML(ByVal strMessageInput) Dim lngMessagePosition 'Holds the message position Dim intHTMLTagLength 'Holds the length of the HTML tags Dim strHTMLMessage 'Holds the HTML message Dim strTempMessageInput 'Temp store for the message input 'Place the message input into a temp store strTempMessageInput = strMessageInput 'Loop through each character in the post message For lngMessagePosition = 1 to CLng(Len(strMessageInput)) 'If this is the end of the message then save some process time and jump out the loop If Mid(strMessageInput, lngMessagePosition, 1) = "" Then Exit For 'If an HTML tag is found then jump to the end so we can strip it If Mid(strMessageInput, lngMessagePosition, 1) = "<" Then 'Get the length of the HTML tag intHTMLTagLength = (InStr(lngMessagePosition, strMessageInput, ">", 1) - lngMessagePosition) 'If the end of the HTML string is in error then set it to the number of characters being passed If intHTMLTagLength < 0 Then intHTMLTagLength = CLng(Len(strTempMessageInput)) 'Place the HTML tag back into the temporary message store strHTMLMessage = Mid(strMessageInput, lngMessagePosition, intHTMLTagLength + 1) 'Strip the HTML from the temp message store strTempMessageInput = Replace(strTempMessageInput, strHTMLMessage, "", 1, -1, 0) End If Next 'Replace a few characters in the remaining text strTempMessageInput = Replace(strTempMessageInput, "<", "<", 1, -1, 1) strTempMessageInput = Replace(strTempMessageInput, ">", ">", 1, -1, 1) strTempMessageInput = Replace(strTempMessageInput, "'", "'", 1, -1, 1) strTempMessageInput = Replace(strTempMessageInput, """", """, 1, -1, 1) strTempMessageInput = Replace(strTempMessageInput, " ", "", 1, -1, 1) 'Return the function removeHTML = strTempMessageInput End Function '****************************************** '*** Split long text strings *** '****************************************** 'Function to strip out long words, long rows of chars, and long text lines from text Private Function removeLongText(ByVal strMessageInput) Dim lngMessagePosition 'Holds the message position Dim intHTMLTagLength 'Holds the length of the HTML tags Dim strHTMLMessage 'Holds the HTML message Dim strTempMessageText 'Temp store for the message input Dim strTempPlainTextWord 'Holds the plain text word Dim saryPlainTextWord 'Array holding the plain text words Dim sarySplitTextWord() 'Array holding the plain text word that has been split Dim lngSplitPlainTextWordLoop 'Loop counter for looping through the pain text split word Dim strTempOutputMessage 'Outputted string Dim intWordSartPos 'Holds the location in the word to start the split Dim saryHTMLlinks() 'Holds links from the message and thier corrisponding code Dim strHTMLlinksCode 'Holds the code that is replaced the links with Dim lngLoopCounter 'loop counter to count the number of HTML links in meesage Dim blnHTMLlink 'Set to true if there is a link in the message body Dim strTempFlashMsg 'Temp store for the falsh forum code Dim lngStartPos Dim lngEndPos Const intMaxWordLength = 60 'Holds the max word lentgh (can't be below 22 or will mess up the link code placed into messages) 'Initliase variables lngLoopCounter = 0 blnHTMLlink = False 'Place the message input into a temp store strTempMessageText = strMessageInput strTempOutputMessage = strMessageInput '****** Remove flash forum code so it's not changed ******* 'Loop through all the codes in the message and convert them to formated flash links Do While InStr(1, strTempMessageText, "[FLASH", 1) > 0 AND InStr(1, strTempMessageText, "[/FLASH]", 1) > 0 'Get the Flash BBcode from the message lngStartPos = InStr(1, strTempMessageText, "[FLASH", 1) lngEndPos = InStr(lngStartPos, strTempMessageText, "[/FLASH]", 1) + 8 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Get the original Flash BBcode from the message strTempFlashMsg = Trim(Mid(strTempMessageText, lngStartPos, lngEndPos-lngStartPos)) 'Add 1 to the loop counter lngLoopCounter = lngLoopCounter + 1 'Redim the array, use preserve to keep the old array parts ReDim Preserve saryHTMLlinks(2,lngLoopCounter) 'Create a code to replace the link with in original string strHTMLlinksCode = " **/**WWFflash00" & lngLoopCounter & "**\** " 'Place the code and the original link into the array saryHTMLlinks(1,lngLoopCounter) = strHTMLlinksCode saryHTMLlinks(2,lngLoopCounter) = strHTMLMessage 'Rpleace the HTML tag with the new code that is saved in array strTempMessageText = Replace(strTempMessageText, strTempFlashMsg, strHTMLlinksCode, 1, -1, 0) 'A link is found so set the link found variable to true blnHTMLlink = True strTempMessageText = Replace(strTempMessageText, strTempFlashMsg, Replace(strTempFlashMsg, "[", "[", 1, -1, 1), 1, -1, 1) Loop '****** Strip HTML from message ******* 'Loop through each character in the post message For lngMessagePosition = 1 to CLng(Len(strMessageInput)) 'If this is the end of the message then save some process time and jump out the loop If Mid(strMessageInput, lngMessagePosition, 1) = "" Then Exit For 'If an HTML tag is found then jump to the end so we can strip it If Mid(strMessageInput, lngMessagePosition, 1) = "<" Then 'Get the length of the HTML tag intHTMLTagLength = (InStr(lngMessagePosition, strMessageInput, ">", 1) - lngMessagePosition) 'If the end of the HTML string is in error then set it to the number of characters being passed If intHTMLTagLength < 0 Then intHTMLTagLength = CLng(Len(strTempMessageText)) 'Place the HTML tag back into the temporary message store strHTMLMessage = Mid(strMessageInput, lngMessagePosition, intHTMLTagLength + 1) '****** Remove links so they aren't changed ******* 'See if the HTML tag is a link, if so replace with a code so it is not changed when spliting long chars If InStr(1, strHTMLMessage, "href", 1) Then 'Add 1 to the loop counter lngLoopCounter = lngLoopCounter + 1 'Redim the array, use preserve to keep the old array values ReDim Preserve saryHTMLlinks(2,lngLoopCounter) 'Create a code to replace the link with in original string strHTMLlinksCode = " **/**WWFlink00" & lngLoopCounter & "**\** " 'Place the code and the original link into the array saryHTMLlinks(1,lngLoopCounter) = strHTMLlinksCode saryHTMLlinks(2,lngLoopCounter) = strHTMLMessage 'Rpleace the HTML tag with the new code that is saved in array strTempOutputMessage = Replace(strTempOutputMessage, strHTMLMessage, strHTMLlinksCode, 1, -1, 0) 'A link is found so set the link found variable to true blnHTMLlink = True End If '*************************************************** 'Strip the HTML strTempMessageText = Replace(strTempMessageText, strHTMLMessage, " ", 1, -1, 0) End If Next '****** Strip Forum Codes from message ******* 'Loop through each character in the post message For lngMessagePosition = 1 to CLng(Len(strMessageInput)) 'If this is the end of the message then save some process time and jump out the loop If Mid(strMessageInput, lngMessagePosition, 1) = "" Then Exit For 'If an BBCode tag is found then jump to the end so we can strip it If Mid(strMessageInput, lngMessagePosition, 1) = "[" Then 'Get the length of the BBCode tag intHTMLTagLength = (InStr(lngMessagePosition, strMessageInput, "]", 1) - lngMessagePosition) 'If the end of the BBCode string is in error then set it to the number of characters being passed If intHTMLTagLength < 0 Then intHTMLTagLength = CLng(Len(strTempMessageText)) 'Place the BBCode tag back into the temporary message store strHTMLMessage = Mid(strMessageInput, lngMessagePosition, intHTMLTagLength + 1) 'Strip the BBCode strTempMessageText = Replace(strTempMessageText, strHTMLMessage, " ", 1, -1, 0) End If Next '****** Check for and remove long strings ******* 'Now we have just the text (no HTML) in plain text variable see if any of the text strings in it are over 30 chars in length saryPlainTextWord = Split(Trim(strTempMessageText), " ") 'Loop through all the words till they are shortened For lngLoopCounter = 0 To UBound(saryPlainTextWord) 'If the text string length is more than the max word length then place spaces in the text string If Len(saryPlainTextWord(lngLoopCounter)) > intMaxWordLength Then 'Redim the array (don't use preserve as we want to loose the last data in the array) Redim sarySplitTextWord(CInt(Len(saryPlainTextWord(lngLoopCounter))/intMaxWordLength+1)) 'Initiliase variable intWordSartPos = 1 'Loop through all the splits in the word For lngSplitPlainTextWordLoop = 1 To UBound(sarySplitTextWord) 'Place the split word into the array sarySplitTextWord(lngSplitPlainTextWordLoop) = Mid(saryPlainTextWord(lngLoopCounter), intWordSartPos, intMaxWordLength) 'Add max word length to the start position intWordSartPos = intWordSartPos + intMaxWordLength Next 'Place the split up long text string back together in one variable with spaces at the max word length strTempPlainTextWord = Join(sarySplitTextWord, " ") 'Place the split up word back into the orginal message strTempOutputMessage = Replace(strTempOutputMessage, saryPlainTextWord(lngLoopCounter), strTempPlainTextWord, 1, -1, 0) End If Next '****** Replace links so they aren't changed ****** 'Place back all the links into the message in place of the codes placed in for them If blnHTMLlink Then 'Loop through each of the changed links For lngLoopCounter = 1 To Ubound(saryHTMLlinks,2) 'Replace the code with the link strTempOutputMessage = Replace(strTempOutputMessage, saryHTMLlinks(1,lngLoopCounter), saryHTMLlinks(2,lngLoopCounter), 1, -1, 0) Next End If 'Return the function removeLongText = strTempOutputMessage End Function '********************************************* '*** Decode HTML encoding ***** '********************************************* 'Decode encoded strings Private Function decodeString(ByVal strInputEntry) 'Decode HTML character entities strInputEntry = Replace(strInputEntry, "a", "a", 1, -1, 0) strInputEntry = Replace(strInputEntry, "b", "b", 1, -1, 0) strInputEntry = Replace(strInputEntry, "c", "c", 1, -1, 0) strInputEntry = Replace(strInputEntry, "d", "d", 1, -1, 0) strInputEntry = Replace(strInputEntry, "e", "e", 1, -1, 0) strInputEntry = Replace(strInputEntry, "f", "f", 1, -1, 0) strInputEntry = Replace(strInputEntry, "g", "g", 1, -1, 0) strInputEntry = Replace(strInputEntry, "h", "h", 1, -1, 0) strInputEntry = Replace(strInputEntry, "i", "i", 1, -1, 0) strInputEntry = Replace(strInputEntry, "j", "j", 1, -1, 0) strInputEntry = Replace(strInputEntry, "k", "k", 1, -1, 0) strInputEntry = Replace(strInputEntry, "l", "l", 1, -1, 0) strInputEntry = Replace(strInputEntry, "m", "m", 1, -1, 0) strInputEntry = Replace(strInputEntry, "n", "n", 1, -1, 0) strInputEntry = Replace(strInputEntry, "o", "o", 1, -1, 0) strInputEntry = Replace(strInputEntry, "p", "p", 1, -1, 0) strInputEntry = Replace(strInputEntry, "q", "q", 1, -1, 0) strInputEntry = Replace(strInputEntry, "r", "r", 1, -1, 0) strInputEntry = Replace(strInputEntry, "s", "s", 1, -1, 0) strInputEntry = Replace(strInputEntry, "t", "t", 1, -1, 0) strInputEntry = Replace(strInputEntry, "u", "u", 1, -1, 0) strInputEntry = Replace(strInputEntry, "v", "v", 1, -1, 0) strInputEntry = Replace(strInputEntry, "w", "w", 1, -1, 0) strInputEntry = Replace(strInputEntry, "x", "x", 1, -1, 0) strInputEntry = Replace(strInputEntry, "y", "y", 1, -1, 0) strInputEntry = Replace(strInputEntry, "z", "z", 1, -1, 0) strInputEntry = Replace(strInputEntry, "A", "A", 1, -1, 0) strInputEntry = Replace(strInputEntry, "B", "B", 1, -1, 0) strInputEntry = Replace(strInputEntry, "C", "C", 1, -1, 0) strInputEntry = Replace(strInputEntry, "D", "D", 1, -1, 0) strInputEntry = Replace(strInputEntry, "E", "E", 1, -1, 0) strInputEntry = Replace(strInputEntry, "F", "F", 1, -1, 0) strInputEntry = Replace(strInputEntry, "G", "G", 1, -1, 0) strInputEntry = Replace(strInputEntry, "H", "H", 1, -1, 0) strInputEntry = Replace(strInputEntry, "I", "I", 1, -1, 0) strInputEntry = Replace(strInputEntry, "J", "J", 1, -1, 0) strInputEntry = Replace(strInputEntry, "K", "K", 1, -1, 0) strInputEntry = Replace(strInputEntry, "L", "L", 1, -1, 0) strInputEntry = Replace(strInputEntry, "M", "M", 1, -1, 0) strInputEntry = Replace(strInputEntry, "N", "N", 1, -1, 0) strInputEntry = Replace(strInputEntry, "O", "O", 1, -1, 0) strInputEntry = Replace(strInputEntry, "P", "P", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Q", "Q", 1, -1, 0) strInputEntry = Replace(strInputEntry, "R", "R", 1, -1, 0) strInputEntry = Replace(strInputEntry, "S", "S", 1, -1, 0) strInputEntry = Replace(strInputEntry, "T", "T", 1, -1, 0) strInputEntry = Replace(strInputEntry, "U", "U", 1, -1, 0) strInputEntry = Replace(strInputEntry, "V", "V", 1, -1, 0) strInputEntry = Replace(strInputEntry, "W", "W", 1, -1, 0) strInputEntry = Replace(strInputEntry, "X", "X", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Y", "Y", 1, -1, 0) strInputEntry = Replace(strInputEntry, "Z", "Z", 1, -1, 0) strInputEntry = Replace(strInputEntry, "0", "0", 1, -1, 0) strInputEntry = Replace(strInputEntry, "1", "1", 1, -1, 0) strInputEntry = Replace(strInputEntry, "2", "2", 1, -1, 0) strInputEntry = Replace(strInputEntry, "3", "3", 1, -1, 0) strInputEntry = Replace(strInputEntry, "4", "4", 1, -1, 0) strInputEntry = Replace(strInputEntry, "5", "5", 1, -1, 0) strInputEntry = Replace(strInputEntry, "6", "6", 1, -1, 0) strInputEntry = Replace(strInputEntry, "7", "7", 1, -1, 0) strInputEntry = Replace(strInputEntry, "8", "8", 1, -1, 0) strInputEntry = Replace(strInputEntry, "9", "9", 1, -1, 0) strInputEntry = Replace(strInputEntry, "=", "=", 1, -1, 0) strInputEntry = Replace(strInputEntry, "<", "<", 1, -1, 0) strInputEntry = Replace(strInputEntry, ">", ">", 1, -1, 0) strInputEntry = Replace(strInputEntry, "&", "&", 1, -1, 0) strInputEntry = Replace(strInputEntry, "’", "'", 1, -1, 1) 'Return decodeString = strInputEntry End Function %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'Dimension variables Dim rsDateTimeFormat 'Holds the date a time data Dim saryDateTimeData(17) '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 " & strDbProc & "TimeAndDateSettings" Else strSQL = "SELECT " & strDbTable & "DateTimeFormat.* FROM " & strDbTable & "DateTimeFormat;" End If 'Query the database rsDateTimeFormat.Open strSQL, adoCon '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 'Calculate which date format to use If strDateFormat <> "" Then saryDateTimeData(0) = strDateFormat Else saryDateTimeData(0) = rsDateTimeFormat("Date_format") End If 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("am") saryDateTimeData(17) = rsDateTimeFormat("pm") End If 'Relese server objects rsDateTimeFormat.Close Set rsDateTimeFormat = Nothing '****************************************** '*** Date Format ***** '****************************************** 'Function to format date Private Function DateFormat(ByVal dtmDate, ByVal 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 users time off set onto the recorded database time If strTimeOffSet = "+" Then dtmTempDate = DateAdd("h", + intTimeOffSet, dtmDate) ElseIf strTimeOffSet = "-" Then dtmTempDate = DateAdd("h", - intTimeOffSet, 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 '****************************************** '*** Time Format ***** '****************************************** 'Function to format time Function TimeFormat(ByVal dtmTime, ByVal 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 users time off-set onto the recorded database time If strTimeOffSet = "+" Then dtmTempTime = DateAdd("h", + intTimeOffSet, dtmTime) ElseIf strTimeOffSet = "-" Then dtmTempTime = DateAdd("h", - intTimeOffSet, 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(17) Else strPeriod = saryDateTimeData(16) 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 %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** '****************************************** '*** Strip entites from IE posts ***** '****************************************** Private Function WYSIWYGFormatPost(ByVal strMessage) 'Format messages that use the WYSIWYG Editor strMessage = Replace(strMessage, " border=0>", ">", 1, -1, 1) strMessage = Replace(strMessage, " target=_blank>", ">", 1, -1, 1) strMessage = Replace(strMessage, " target=_top>", ">", 1, -1, 1) strMessage = Replace(strMessage, " target=_self>", ">", 1, -1, 1) strMessage = Replace(strMessage, " target=_parent>", ">", 1, -1, 1) strMessage = Replace(strMessage, " style=""CURSOR: hand""", "", 1, -1, 1) 'Strip ou add blocking injection code 'Strip out Norton Internet Security pop up add blocking injected code strMessage = Replace(strMessage, "", "", 1, -1, 1) strMessage = Replace(strMessage, "", "", 1, -1, 1) strMessage = Replace(strMessage, "", "", 1, -1, 1) 'Strip out Zone Alarm Pro's pop up add blocking injected code (bloody pain in the arse crap software) If Instr(1, strMessage, "", 1) Then strMessage = Replace(strMessage, "", "", 1, -1, 1) strMessage = Replace(strMessage, "", "", 1, -1, 1) strMessage = Replace(strMessage, "window.open=NS_ActualOpen; orig_onload = window.onload; orig_onunload = window.onunload; window.onload = noopen_load; window.onunload = noopen_unload;", "", 1, -1, 1) End If 'Strip out Norton Personal Firewall 2003's pop up add blocking injected code strMessage = Replace(strMessage, "", "", 1, -1, 1) strMessage = Replace(strMessage, "", "", 1, -1, 1) 'Return the function WYSIWYGFormatPost = strMessage End Function '****************************************** '*** Format Post Function ***** '****************************************** 'Format Post Function to covert HTML tags into safe tags Private Function FormatPost(ByVal strMessage) 'Format spaces and HTML strMessage = Replace(strMessage, "<", "<", 1, -1, 1) strMessage = Replace(strMessage, ">", ">", 1, -1, 1) strMessage = Replace(strMessage, " ", "       ", 1, -1, 1) strMessage = Replace(strMessage, " ", "      ", 1, -1, 1) strMessage = Replace(strMessage, " ", "     ", 1, -1, 1) strMessage = Replace(strMessage, " ", "    ", 1, -1, 1) strMessage = Replace(strMessage, " ", "   ", 1, -1, 1) strMessage = Replace(strMessage, vbTab, "     ", 1, -1, 1) strMessage = Replace(strMessage, Chr(10), "
", 1, -1, 1) 'Return the function FormatPost = strMessage End Function '****************************************** '*** Format Forum Codes Function ***** '****************************************** 'Format Forum Codes Function to covert forum codes to HTML Private Function FormatForumCodes(ByVal strMessage) Dim strTempMessage 'Temporary word hold for e-mail, fonts, and url words Dim strMessageLink 'Holds the new mesage link that needs converting back into code Dim lngStartPos 'Holds the start position for a link Dim lngEndPos 'Holds the end position for a word Dim intLoop 'Loop counter 'If emoticons are on then change the emotion symbols for the path to the relative smiley icon If blnEmoticons = True Then 'Loop through the emoticons array For intLoop = 1 to UBound(saryEmoticons) strMessage = Replace(strMessage, saryEmoticons(intLoop,2), "", 1, -1, 1) Next End If 'Change forum codes for bold and italic HTML tags back to the normal satandard HTML tags strMessage = Replace(strMessage, "[B]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/B]", "", 1, -1, 1) strMessage = Replace(strMessage, "[STRONG]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/STRONG]", "", 1, -1, 1) strMessage = Replace(strMessage, "[I]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/I]", "", 1, -1, 1) strMessage = Replace(strMessage, "[EM]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/EM]", "", 1, -1, 1) strMessage = Replace(strMessage, "[U]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/U]", "", 1, -1, 1) strMessage = Replace(strMessage, "[HR]", "
", 1, -1, 1) strMessage = Replace(strMessage, "[LIST=1]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[/LIST=1]", "
", 1, -1, 1) strMessage = Replace(strMessage, "[LIST]", "", 1, -1, 1) strMessage = Replace(strMessage, "[LI]", "
  • ", 1, -1, 1) strMessage = Replace(strMessage, "[/LI]", "
  • ", 1, -1, 1) strMessage = Replace(strMessage, "[CENTER]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[/CENTER]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[BR]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[P]", "

    ", 1, -1, 1) strMessage = Replace(strMessage, "[/P]", "

    ", 1, -1, 1) strMessage = Replace(strMessage, "[P ALIGN=CENTER]", "

    ", 1, -1, 1) strMessage = Replace(strMessage, "[P ALIGN=LEFT]", "

    ", 1, -1, 1) strMessage = Replace(strMessage, "[P ALIGN=RIGHT]", "

    ", 1, -1, 1) strMessage = Replace(strMessage, "[DIV]", "

    ", 1, -1, 1) strMessage = Replace(strMessage, "[/DIV]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[DIV ALIGN=CENTER]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[DIV ALIGN=LEFT]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[DIV ALIGN=RIGHT]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[BLOCKQUOTE]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[/BLOCKQUOTE]", "
    ", 1, -1, 1) strMessage = Replace(strMessage, "[SIZE=1]", "", 1, -1, 1) strMessage = Replace(strMessage, "[SIZE=2]", "", 1, -1, 1) strMessage = Replace(strMessage, "[SIZE=3]", "", 1, -1, 1) strMessage = Replace(strMessage, "[SIZE=4]", "", 1, -1, 1) strMessage = Replace(strMessage, "[SIZE=5]", "", 1, -1, 1) strMessage = Replace(strMessage, "[SIZE=6]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/SIZE]", "", 1, -1, 1) strMessage = Replace(strMessage, "[FONT=Arial]", "", 1, -1, 1) strMessage = Replace(strMessage, "[FONT=Courier]", "", 1, -1, 1) strMessage = Replace(strMessage, "[FONT=Times]", "", 1, -1, 1) strMessage = Replace(strMessage, "[FONT=Verdana]", "", 1, -1, 1) strMessage = Replace(strMessage, "[/FONT]", "", 1, -1, 1) 'These are for backward compatibility with old forum codes strMessage = Replace(strMessage, "[BLACK]", "", 1, -1, 1) strMessage = Replace(strMessage, "[WHITE]", "", 1, -1, 1) strMessage = Replace(strMessage, "[BLUE]", "", 1, -1, 1) strMessage = Replace(strMessage, "[RED]", "", 1, -1, 1) strMessage = Replace(strMessage, "[GREEN]", "", 1, -1, 1) strMessage = Replace(strMessage, "[YELLOW]", "", 1, -1, 1) strMessage = Replace(strMessage, "[ORANGE]", "", 1, -1, 1) strMessage = Replace(strMessage, "[BROWN]", "", 1, -1, 1) strMessage = Replace(strMessage, "[MAGENTA]", "", 1, -1, 1) strMessage = Replace(strMessage, "[CYAN]", "", 1, -1, 1) strMessage = Replace(strMessage, "[LIME GREEN]", "", 1, -1, 1) 'Loop through the message till all or any images are turned into HTML images Do While InStr(1, strMessage, "[IMG]", 1) > 0 AND InStr(1, strMessage, "[/IMG]", 1) > 0 'Find the start position in the message of the [IMG] code lngStartPos = InStr(1, strMessage, "[IMG]", 1) 'Find the position in the message for the [/IMG]] closing code lngEndPos = InStr(lngStartPos, strMessage, "[/IMG]", 1) + 6 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Read in the code to be converted into a hyperlink from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message link into the tempoary message variable strTempMessage = strMessageLink 'Format the IMG tages into an HTML image tag strTempMessage = Replace(strTempMessage, "[IMG]", " at the end If InStr(1, strTempMessage, "[/IMG]", 1) Then strTempMessage = Replace(strTempMessage, "[/IMG]", """>", 1, -1, 1) Else strTempMessage = strTempMessage & ">" End If 'Place the new fromatted hyperlink into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Loop through the message till all or any hyperlinks are turned into HTML hyperlinks Do While InStr(1, strMessage, "[URL=", 1) > 0 AND InStr(1, strMessage, "[/URL]", 1) > 0 'Find the start position in the message of the [URL= code lngStartPos = InStr(1, strMessage, "[URL=", 1) 'Find the position in the message for the [/URL] closing code lngEndPos = InStr(lngStartPos, strMessage, "[/URL]", 1) + 6 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 7 'Read in the code to be converted into a hyperlink from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message link into the tempoary message variable strTempMessage = strMessageLink 'Format the link into an HTML hyperlink strTempMessage = Replace(strTempMessage, "[URL=", " at the end If InStr(1, strTempMessage, "[/URL]", 1) Then strTempMessage = Replace(strTempMessage, "[/URL]", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "]", """>", 1, -1, 1) Else strTempMessage = strTempMessage & ">" End If 'Place the new fromatted hyperlink into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Loop through the message till all or any hyperlinks are turned into HTML hyperlinks Do While InStr(1, strMessage, "[URL]", 1) > 0 AND InStr(1, strMessage, "[/URL]", 1) > 0 'Find the start position in the message of the [URL] code lngStartPos = InStr(1, strMessage, "[URL]", 1) 'Find the position in the message for the [/URL]] closing code lngEndPos = InStr(lngStartPos, strMessage, "[/URL]", 1) + 6 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Read in the code to be converted into a hyperlink from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message link into the tempoary message variable strTempMessage = strMessageLink 'Remove hyperlink BB codes strTempMessage = Replace(strTempMessage, "[URL]", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "[/URL]", "", 1, -1, 1) 'Format the URL tages into an HTML hyperlinks strTempMessage = "" & strTempMessage & "" 'Place the new fromatted hyperlink into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Loop through the message till all or any email links are turned into HTML mailto links Do While InStr(1, strMessage, "[EMAIL=", 1) > 0 AND InStr(1, strMessage, "[/EMAIL]", 1) > 0 'Find the start position in the message of the [EMAIL= code lngStartPos = InStr(1, strMessage, "[EMAIL=", 1) 'Find the position in the message for the [/EMAIL] closing code lngEndPos = InStr(lngStartPos, strMessage, "[/EMAIL]", 1) + 8 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 9 'Read in the code to be converted into a email link from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message link into the tempoary message variable strTempMessage = strMessageLink 'Format the link into an HTML mailto link strTempMessage = Replace(strTempMessage, "[EMAIL=", " at the end If InStr(1, strTempMessage, "[/EMAIL]", 1) Then strTempMessage = Replace(strTempMessage, "[/EMAIL]", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "]", """>", 1, -1, 1) Else strTempMessage = strTempMessage & ">" End If 'Place the new fromatted HTML mailto into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Loop through the message till all or any files are turned into HTML hyperlinks Do While InStr(1, strMessage, "[FILE=", 1) > 0 AND InStr(1, strMessage, "[/FILE]", 1) > 0 'Find the start position in the message of the [FILE= code lngStartPos = InStr(1, strMessage, "[FILE=", 1) 'Find the position in the message for the [/FILE] closing code lngEndPos = InStr(lngStartPos, strMessage, "[/FILE]", 1) + 7 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 8 'Read in the code to be converted into a hyperlink from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message link into the tempoary message variable strTempMessage = strMessageLink 'Format the link into an HTML hyperlink strTempMessage = Replace(strTempMessage, "[FILE=", " at the end If InStr(1, strTempMessage, "[/FILE]", 1) Then strTempMessage = Replace(strTempMessage, "[/FILE]", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "]", """>", 1, -1, 1) Else strTempMessage = strTempMessage & ">" End If 'Place the new fromatted hyperlink into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Loop through the message till all font colour codes are turned into fonts colours Do While InStr(1, strMessage, "[COLOR=", 1) > 0 AND InStr(1, strMessage, "[/COLOR]", 1) > 0 'Find the start position in the message of the [COLOR= code lngStartPos = InStr(1, strMessage, "[COLOR=", 1) 'Find the position in the message for the [/COLOR] closing code lngEndPos = InStr(lngStartPos, strMessage, "[/COLOR]", 1) + 8 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 9 'Read in the code to be converted into a font colour from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message colour into the tempoary message variable strTempMessage = strMessageLink 'Format the link into an font colour HTML tag strTempMessage = Replace(strTempMessage, "[COLOR=", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "]", ">", 1, -1, 1) Else strTempMessage = strTempMessage & ">" End If 'Place the new fromatted colour HTML tag into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Hear for backward compatability with old colour codes abive strMessage = Replace(strMessage, "[/COLOR]", "", 1, -1, 1) 'Return the function FormatForumCodes = strMessage End Function '****************************************** '*** Format User Quote *** '****************************************** 'This function formats quotes that contain usernames Function formatUserQuote(ByVal strMessage) 'Declare variables Dim strQuotedAuthor 'Holds the name of the author who is being quoted Dim strQuotedMessage 'Hold the quoted message Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions Dim strBuildQuote 'Holds the built quoted message Dim strOriginalQuote 'Holds the quote in original format 'Loop through all the quotes in the message and convert them to formated quotes Do While InStr(1, strMessage, "[QUOTE=", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 'Get the start and end in the message of the author who is being quoted lngStartPos = InStr(1, strMessage, "[QUOTE=", 1) + 7 lngEndPos = InStr(lngStartPos, strMessage, "]", 1) 'If there is something returned get the authors name If lngStartPos > 6 AND lngEndPos > 0 Then strQuotedAuthor = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) End If 'Get the start and end in the message of the message to quote lngStartPos = lngStartPos + Len(strQuotedAuthor) + 1 lngEndPos = InStr(lngStartPos, strMessage, "[/QUOTE]", 1) 'Make sure the end position is not in error If lngEndPos - lngStartPos =< 0 Then lngEndPos = lngStartPos + Len(strQuotedAuthor) 'If there is something returned get message to quote If lngEndPos > lngStartPos Then 'Get the message to be quoted strQuotedMessage = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Srip out any perenetis for those that are use to BBcodes that are different strQuotedAuthor = Replace(strQuotedAuthor, """", "", 1, -1, 1) 'Build the HTML for the displying of the quoted message strBuildQuote = "" strBuildQuote = strBuildQuote & vbCrLf & "" strBuildQuote = strBuildQuote & vbCrLf & "" strBuildQuote = strBuildQuote & vbCrLf & "
    " & strQuotedAuthor & " " & strTxtWrote & ":
    " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & "
    " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & "
    " & strQuotedMessage & "
    " End If 'Get the start and end position in the start and end position in the message of the quote lngStartPos = InStr(1, strMessage, "[QUOTE=", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/QUOTE]", 1) + 8 'Make sure the end position is not in error If lngEndPos - lngStartPos =< 7 Then lngEndPos = lngStartPos + Len(strQuotedAuthor) + 8 'Get the original quote to be replaced in the message strOriginalQuote = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Replace the quote codes in the message with the new formated quote If strBuildQuote <> "" Then strMessage = Replace(strMessage, strOriginalQuote, strBuildQuote, 1, -1, 1) Else strMessage = Replace(strMessage, strOriginalQuote, Replace(strOriginalQuote, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop 'Return the function formatUserQuote = strMessage End Function '****************************************** '*** Format Quote *** '****************************************** 'This function formats the quote Function formatQuote(ByVal strMessage) 'Declare variables Dim strQuotedMessage 'Hold the quoted message Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions Dim strBuildQuote 'Holds the built quoted message Dim strOriginalQuote 'Holds the quote in original format 'Loop through all the quotes in the message and convert them to formated quotes Do While InStr(1, strMessage, "[QUOTE]", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 'Get the start and end in the message of the author who is being quoted lngStartPos = InStr(1, strMessage, "[QUOTE]", 1) + 7 lngEndPos = InStr(lngStartPos, strMessage, "[/QUOTE]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 7 'If there is something returned get message to quote If lngEndPos > lngStartPos Then 'Get the message to be quoted strQuotedMessage = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Build the HTML for the displying of the quoted message strBuildQuote = "" strBuildQuote = strBuildQuote & vbCrLf & "" strBuildQuote = strBuildQuote & vbCrLf & "" strBuildQuote = strBuildQuote & vbCrLf & "
    " & strTxtQuote & ":
    " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & "
    " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & " " strBuildQuote = strBuildQuote & vbCrLf & "
    " & strQuotedMessage & "
    " End If 'Get the start and end position in the start and end position in the message of the quote lngStartPos = InStr(1, strMessage, "[QUOTE]", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/QUOTE]", 1) + 8 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 7 'Get the original quote to be replaced in the message strOriginalQuote = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Replace the quote codes in the message with the new formated quote If strBuildQuote <> "" Then strMessage = Replace(strMessage, strOriginalQuote, strBuildQuote, 1, -1, 1) Else strMessage = Replace(strMessage, strOriginalQuote, Replace(strOriginalQuote, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop 'Return the function formatQuote = strMessage End Function '****************************************** '*** Format Code Block *** '****************************************** 'This function formats the code blocks Function formatCode(ByVal strMessage) 'Declare variables Dim strCodeMessage 'Hold the coded message Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions Dim strBuildCodeBlock 'Holds the built coded message Dim strOriginalCodeBlock 'Holds the code block in original format 'Loop through all the codes in the message and convert them to formated code block Do While InStr(1, strMessage, "[CODE]", 1) > 0 AND InStr(1, strMessage, "[/CODE]", 1) > 0 'Get the start and end in the message of the author who is being coded lngStartPos = InStr(1, strMessage, "[CODE]", 1) + 6 lngEndPos = InStr(lngStartPos, strMessage, "[/CODE]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'If there is something returned get message to code block If lngEndPos > lngStartPos Then 'Get the message to be coded strCodeMessage = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Format the message strCodeMessage = Replace(strCodeMessage, " ", "       ", 1, -1, 1) strCodeMessage = Replace(strCodeMessage, " ", "      ", 1, -1, 1) strCodeMessage = Replace(strCodeMessage, " ", "     ", 1, -1, 1) strCodeMessage = Replace(strCodeMessage, " ", "    ", 1, -1, 1) strCodeMessage = Replace(strCodeMessage, " ", "   ", 1, -1, 1) strCodeMessage = Replace(strCodeMessage, vbTab, "     ", 1, -1, 1) strCodeMessage = Replace(strCodeMessage, chr(9), "     ", 1, -1, 1) 'strCodeMessage = Replace(strCodeMessage, Chr(10), "
    ", 1, -1, 1) 'Build the HTML for the displying of the coded message strBuildCodeBlock = "" strBuildCodeBlock = strBuildCodeBlock & vbCrLf & "" strBuildCodeBlock = strBuildCodeBlock & vbCrLf & "" strBuildCodeBlock = strBuildCodeBlock & vbCrLf & "
    " & strTxtCode & ":
    " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & "
    " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & " " strBuildCodeBlock = strBuildCodeBlock & vbCrLf & "
    " & strCodeMessage & "
    " End If 'Get the start and end position in the start and end position in the message of the code block lngStartPos = InStr(1, strMessage, "[CODE]", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/CODE]", 1) + 7 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Get the original code to be replaced in the message strOriginalCodeBlock = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Replace the code codes in the message with the new formated code block If strBuildCodeBlock <> "" Then strMessage = Replace(strMessage, strOriginalCodeBlock, strBuildCodeBlock, 1, -1, 1) Else strMessage = Replace(strMessage, strOriginalCodeBlock, Replace(strOriginalCodeBlock, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop 'Return the function formatCode = strMessage End Function '****************************************** '*** Format Flash File Support *** '****************************************** 'This function formats falsh codes Function formatFlash(ByVal strMessage) 'Declare variables Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions Dim saryFlashAttributes 'Holds the features of the input flash file Dim intAttrbuteLoop 'Holds the attribute loop counter Dim strFlashWidth 'Holds the string value of the width of the Flash file Dim intFlashWidth 'Holds the interger value of the width of the flash file Dim strFlashHeight 'Holds the string value of the height of the Flash file Dim intFlashHeight 'Holds the interger value of the height of the flash file Dim strBuildFlashLink 'Holds the converted BBcode for the flash file Dim strTempFlashMsg 'Tempoary store for the BBcode Dim strFlashLink 'Holds the link to the flash file 'Loop through all the codes in the message and convert them to formated flash links Do While InStr(1, strMessage, "[FLASH", 1) > 0 AND InStr(1, strMessage, "[/FLASH]", 1) > 0 'Initiliase variables intFlashWidth = 50 intFlashHeight = 50 strFlashLink = "" strBuildFlashLink = "" strTempFlashMsg = "" 'Get the Flash BBcode from the message lngStartPos = InStr(1, strMessage, "[FLASH", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/FLASH]", 1) + 8 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Get the original Flash BBcode from the message strTempFlashMsg = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Get the start and end in the message of the attributes of the Flash file lngStartPos = InStr(1, strTempFlashMsg, "[FLASH", 1) + 6 lngEndPos = InStr(lngStartPos, strTempFlashMsg, "]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos 'If there is something returned get the details (eg. dimensions) of the flash file If strTempFlashMsg <> "" Then 'Place any attributes for the flash file in an array saryFlashAttributes = Split(Trim(Mid(strTempFlashMsg, lngStartPos, lngEndPos-lngStartPos)), " ") 'Get the dimensions of the Flash file 'Loop through the array of atrributes that are for the falsh file to get the dimentions For intAttrbuteLoop = 0 To UBound(saryFlashAttributes) 'If this is the width attribute then read in the width dimention If InStr(1, saryFlashAttributes(intAttrbuteLoop), "WIDTH=", 1) Then 'Get the width dimention strFlashWidth = Replace(saryFlashAttributes(intAttrbuteLoop), "WIDTH=", "", 1, -1, 1) 'Make sure we are left with a numeric number if so convert to an interger and place in an interger variable If isNumeric(strFlashWidth) Then intFlashWidth = CInt(strFlashWidth) End If 'If this is the height attribute then read in the height dimention If InStr(1, saryFlashAttributes(intAttrbuteLoop), "HEIGHT=", 1) Then 'Get the height dimention strFlashHeight = Replace(saryFlashAttributes(intAttrbuteLoop), "HEIGHT=", "", 1, -1, 1) 'Make sure we are left with a numeric number if so convert to an interger and place in an interger variable If isNumeric(strFlashHeight) Then intFlashHeight = CInt(strFlashHeight) End If Next 'Get the link to the flash file lngStartPos = InStr(1, strTempFlashMsg, "]", 1) + 1 lngEndPos = InStr(lngStartPos, strTempFlashMsg, "[/FLASH]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 8 'Read in the code to be converted into a hyperlink from the message strFlashLink = Trim(Mid(strTempFlashMsg, lngStartPos, (lngEndPos - lngStartPos))) 'Build the HTML for the displying of the flash file If strFlashLink <> "" Then strBuildFlashLink = "" End If End If 'Replace the flash codes in the message with the new formated flash link If strBuildFlashLink <> "" Then strMessage = Replace(strMessage, strTempFlashMsg, strBuildFlashLink, 1, -1, 1) Else strMessage = Replace(strMessage, strTempFlashMsg, Replace(strTempFlashMsg, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop 'Return the function formatFlash = strMessage End Function '****************************************** '*** Display edit author *** '****************************************** 'This function formats XML into the name of the author and edit date and time if a message has been edited 'XML is used so that the date can be stored as a double npresion number so that it can display the local edit time to the message reader Function editedXMLParser(ByVal strMessage) 'Declare variables Dim strEditedAuthor 'Holds the name of the author who is editing the post Dim dtmEditedDate 'Holds the date the post was edited Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions 'Get the start and end in the message of the author who edit the post lngStartPos = InStr(1, strMessage, "", 1) + 8 lngEndPos = InStr(1, strMessage, "", 1) If lngEndPos < lngStartPos Then lngEndPos = lngStartPos 'If there is something returned get the authors name strEditedAuthor = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Get the start and end in the message of the date the message was edited lngStartPos = InStr(1, strMessage, "", 1) + 10 lngEndPos = InStr(1, strMessage, "", 1) If lngEndPos < lngStartPos Then lngEndPos = lngStartPos 'If there is something returned get the date the message was edited dtmEditedDate = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'If it is a date then read convert it to a date otherwise set the variable to 0 If isNumeric(dtmEditedDate) Then dtmEditedDate = CDate(dtmEditedDate) Else dtmEditedDate = 0 'Get the start and end position in the string of the XML to remove lngStartPos = InStr(1, strMessage, "", 1) lngEndPos = InStr(1, strMessage, "", 1) + 9 If lngEndPos < lngStartPos Then lngEndPos = lngStartPos 'If there is something returned strip the XML from the message strMessage = Replace(strMessage, Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)), "", 1, -1, 1) 'Place the date and time into the message for when the post was edited If strEditedAuthor <> "" Then editedXMLParser = strMessage & "

    " & strTxtEditBy & " " & strEditedAuthor & " " & strTxtOn & " " & DateFormat(dtmEditedDate, saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(dtmEditedDate, saryDateTimeData) & "
    " End If End Function '****************************************** '*** Convert Post to Text Function *** '****************************************** 'Function to romove icons and colurs to just leave plain text Function ConvertToText(ByVal strMessage) Dim strTempMessage 'Temporary word hold for e-mail and url words Dim strMessageLink 'Holds the new mesage link that needs converting back into code Dim lngStartPos 'Holds the start position for a link Dim lngEndPos 'Holds the end position for a word Dim intLoop 'Loop counter 'Remove hyperlinks strMessage = Replace(strMessage, " target=""_blank""", "", 1, -1, 1) 'Loop through the message till all or any hyperlinks are turned into back into froum codes Do While InStr(1, strMessage, " 0 AND InStr(1, strMessage, "", 1) > 0 'Find the start position in the message of the HTML hyperlink lngStartPos = InStr(1, strMessage, " closing code lngEndPos = InStr(lngStartPos, strMessage, "", 1) + 4 'Make sure the end position is not in error If lngEndPos - lngStartPos =< 9 Then lngEndPos = lngStartPos + 9 'Read in the code to be converted back into forum codes from the message strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the message link into the tempoary message variable strTempMessage = strMessageLink 'Format the HTML hyperlink back into forum codes If InStr(1, strTempMessage, "src=""", 1) Then strTempMessage = Replace(strTempMessage, "", " ", 1, -1, 1) Else strTempMessage = Replace(strTempMessage, "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "", " ", 1, -1, 1) strTempMessage = Replace(strTempMessage, """>", "
    - ", 1, -1, 1) End If 'Place the new fromatted codes into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop 'Get any that may slip through (don't look as good but still has the same effect) strMessage = Replace(strMessage, " <% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'Dimension variables Dim saryEmoticons(35,3) 'If you add more emoticons increase the first number to the number of emoticons you have in the array below saryEmoticons(1,1) = "Smile" 'Emoticon Name saryEmoticons(1,2) = "[:)]" 'Forum code saryEmoticons(1,3) = "smileys/smiley1.gif" 'URL/path to smiley saryEmoticons(2,1) = "Tongue" saryEmoticons(2,2) = "[:P]" saryEmoticons(2,3) = "smileys/smiley17.gif" saryEmoticons(3,1) = "Wink" saryEmoticons(3,2) = "[;)]" saryEmoticons(3,3) = "smileys/smiley2.gif" saryEmoticons(4,1) = "Star" saryEmoticons(4,2) = "[:*:]" saryEmoticons(4,3) = "smileys/smiley10.gif" saryEmoticons(5,1) = "Shocked" saryEmoticons(5,2) = "[:o]" saryEmoticons(5,3) = "smileys/smiley3.gif" saryEmoticons(6,1) = "Dead" saryEmoticons(6,2) = "[xx(]" saryEmoticons(6,3) = "smileys/smiley11.gif" saryEmoticons(7,1) = "Big smile" saryEmoticons(7,2) = "[:D]" saryEmoticons(7,3) = "smileys/smiley4.gif" saryEmoticons(8,1) = "Sleepy" saryEmoticons(8,2) = "[|)]" saryEmoticons(8,3) = "smileys/smiley12.gif" saryEmoticons(9,1) = "Confused" saryEmoticons(9,2) = "[:s]" saryEmoticons(9,3) = "smileys/smiley5.gif" saryEmoticons(10,1) = "Unhappy" saryEmoticons(10,2) = "[:(]" saryEmoticons(10,3) = "smileys/smiley6.gif" saryEmoticons(11,1) = "Cry" saryEmoticons(11,2) = "[:^(]" saryEmoticons(11,3) = "smileys/smiley19.gif" saryEmoticons(12,1) = "Approve" saryEmoticons(12,2) = "[:^:]" saryEmoticons(12,3) = "smileys/smiley14.gif" saryEmoticons(13,1) = "Cool" saryEmoticons(13,2) = "[8D]" saryEmoticons(13,3) = "smileys/smiley16.gif" saryEmoticons(14,1) = "Angry" saryEmoticons(14,2) = "[:x]" saryEmoticons(14,3) = "smileys/smiley7.gif" saryEmoticons(15,1) = "Clown" saryEmoticons(15,2) = "[:o)]" saryEmoticons(15,3) = "smileys/smiley8.gif" saryEmoticons(16,1) = "Ouch" saryEmoticons(16,2) = "[8(]" saryEmoticons(16,3) = "smileys/smiley18.gif" saryEmoticons(17,1) = "Embarrassed" saryEmoticons(17,2) = "[:$]" saryEmoticons(17,3) = "smileys/smiley9.gif" saryEmoticons(18,1) = "Evil Smile" saryEmoticons(18,2) = "[}:)]" saryEmoticons(18,3) = "smileys/smiley15.gif" saryEmoticons(19,1) = "Disapprove" saryEmoticons(19,2) = "[:V:]" saryEmoticons(19,3) = "smileys/smiley13.gif" saryEmoticons(20,1) = "Stern Smile" saryEmoticons(20,2) = "[:|]" saryEmoticons(20,3) = "smileys/smiley22.gif" saryEmoticons(21,1) = "Thumbs Up" saryEmoticons(21,2) = "[:Y:]" saryEmoticons(21,3) = "smileys/smiley20.gif" saryEmoticons(22,1) = "Thumbs Down" saryEmoticons(22,2) = "[:N:]" saryEmoticons(22,3) = "smileys/smiley21.gif" saryEmoticons(23,1) = "Geek" saryEmoticons(23,2) = "[:-B]" saryEmoticons(23,3) = "smileys/smiley23.gif" saryEmoticons(24,1) = "Ermm" saryEmoticons(24,2) = "[:[]" saryEmoticons(24,3) = "smileys/smiley24.gif" saryEmoticons(25,1) = "Question" saryEmoticons(25,2) = "[:?:]" saryEmoticons(25,3) = "smileys/smiley25.gif" saryEmoticons(26,1) = "Pinch" saryEmoticons(26,2) = "[><]" saryEmoticons(26,3) = "smileys/smiley26.gif" saryEmoticons(27,1) = "Heart" saryEmoticons(27,2) = "[L]" saryEmoticons(27,3) = "smileys/smiley27.gif" saryEmoticons(28,1) = "Broken Heart" saryEmoticons(28,2) = "[%(]" saryEmoticons(28,3) = "smileys/smiley28.gif" saryEmoticons(29,1) = "Wacko" saryEmoticons(29,2) = "[8-}]" saryEmoticons(29,3) = "smileys/smiley29.gif" saryEmoticons(30,1) = "Pig" saryEmoticons(30,2) = "[:@)]" saryEmoticons(30,3) = "smileys/smiley30.gif" saryEmoticons(31,1) = "Hug" saryEmoticons(31,2) = "[>:D<]" saryEmoticons(31,3) = "smileys/smiley31.gif" saryEmoticons(32,1) = "Clap" saryEmoticons(32,2) = "[=D>]" saryEmoticons(32,3) = "smileys/smiley32.gif" saryEmoticons(33,1) = "Ying Yang" saryEmoticons(33,2) = "[%]" saryEmoticons(33,3) = "smileys/smiley33.gif" saryEmoticons(34,1) = "Grabbing Hand" saryEmoticons(34,2) = "[ben1]" saryEmoticons(34,3) = "smileys/smiley34.gif" saryEmoticons(35,1) = "Hitchhiker" saryEmoticons(35,2) = "[ben2]" saryEmoticons(35,3) = "smileys/smiley35.gif" 'If you add more emoticons don't forget to increase the number in the Dim statement at the top! %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** Response.Buffer = True 'Make sure this page is not cached Response.Expires = -1 Response.ExpiresAbsolute = Now() - 2 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "No-Store" '****************************************** '*** Search Word Highlighter *** '****************************************** 'Function to highlight search words if coming from search page Private Function searchHighlighter(ByVal strMessage, ByVal sarySearchWord) Dim intHighlightLoopCounter 'Loop counter to loop through words and hightlight them Dim strTempMessage 'Temporary message store Dim lngMessagePosition 'Holds the message position Dim intHTMLTagLength 'Holds the length of the HTML tags Dim intSearchWordLength 'Holds the length of teh search word Dim blnTempUpdate 'Set to true if the temp message variable is updated 'Loop through each character in the post message For lngMessagePosition = 1 to Len(strMessage) 'Initilise for each pass blnTempUpdate = False 'If an HTML tag is found then move to the end of it so that no words in the HTML are highlighted If Mid(strMessage, lngMessagePosition, 1) = "<" Then 'Get the length of the HTML tag intHTMLTagLength = (InStr(lngMessagePosition, strMessage, ">", 1) - lngMessagePosition) 'Place the HTML tag back into the tempary message store strTempMessage = strTempMessage & Mid(strMessage, lngMessagePosition, intHTMLTagLength) 'Add the length of the HTML tag to the post message position variable lngMessagePosition = lngMessagePosition + intHTMLTagLength End If 'Loop through the search words to see if they are in the message post For intHighlightLoopCounter = 0 to UBound(sarySearchWord) 'If there is a search word in the array position check it If sarySearchWord(intHighlightLoopCounter) <> "" Then 'Get the length of the search word intSearchWordLength = Len(sarySearchWord(intHighlightLoopCounter)) 'If the next XX characters are the same as the search word then highlight them If LCase(Mid(strMessage, lngMessagePosition, intSearchWordLength)) = LCase(sarySearchWord(intHighlightLoopCounter)) Then 'Highlight the search word strTempMessage = strTempMessage & "" & Mid(strMessage, lngMessagePosition, intSearchWordLength) & "" 'Add the length of the replaced search word to the post message position variable lngMessagePosition = lngMessagePosition + intSearchWordLength - 1 'Set the changed boolean to true blnTempUpdate = True End If End If Next 'If a search word is not highlighted then add the character from the post message being checked to the temp variable If blnTempUpdate = False Then strTempMessage = strTempMessage & Mid(strMessage, lngMessagePosition, 1) End If Next 'Return the function searchHighlighter = strTempMessage End Function 'Dimension variables Dim rsTopic 'Holds the Database Recordset Variable for the topic details Dim rsPost 'Holds the database recordset variable for the thread Dim intForumID 'Holds the forum ID number Dim strForumName 'Holds the forum name Dim lngTopicID 'Holds the topic number Dim strSubject 'Holds the topic subject Dim strUsername 'Holds the Username of the thread Dim lngUserID 'Holds the ID number of the user Dim dtmTopicDate 'Holds the date the thread was made Dim strMessage 'Holds the message body of the thread Dim lngMessageID 'Holds the message ID number Dim strAuthorHomepage 'Holds the homepage of the Username if it is given Dim strAuthorLocation 'Holds the location of the user if given Dim strAuthorAvatar 'Holds the authors avatar Dim strAuthorSignature 'Holds the authors signature Dim lngAuthorNumOfPosts 'Holds the number of posts the user has made to the forum Dim dtmAuthorRegistration 'Holds the registration date of the user Dim lngNumberOfViews 'Holds the number of times the topic has been viewed to save back to the database Dim intStatus 'Holds the users interger status Dim strStatus 'Holds the users status Dim strMode 'Holds the mode of the page that is being passed Dim intTopicPageNumber 'Holds the topic page position to link back to Dim blnNoThread 'Set to true if there is no thread to view Dim blnIsModerator 'Set to true if the user who posted the message is a forum moderator Dim blnForumLocked 'Set to true if the forum is locked Dim blnTopicLocked 'set to true if the topic is locked Dim intThreadNo 'Holds the number of threads in the topic Dim intPriority 'Holds the priority level of the topic Dim strPostPage 'Holds the page the form is posted to Dim intRecordPositionPageNum 'Holds the recorset page number to show the Threads for Dim intTotalNumOfPages 'Holds the number of pages Dim intRecordLoopCounter 'Holds the loop counter numeber Dim intTopicPageLoopCounter 'Loop counter for other thread page link Dim intTotalNumOfThreads 'Holds the total number of therads in this topic Dim strAuthorIP 'Holds the authors IP Dim strSearchKeywords 'Holds the keywords to search for Dim sarySearchWord 'Array to hold the search words Dim strGroupName 'Holds the authors group name Dim intRankStars 'Holds the number of stars for the group Dim strRankCustomStars 'Holds custom stars for the user group Dim lngPollID 'Holds the poll ID Dim blnPollNoReply 'Set to true if users can't reply to a poll Dim blnBannedIP 'Set to true if the user is using a banned IP Dim dtmLastEntryDate 'Holds the date of the last post entry to the topic Dim intIndexPosition 'Holds the idex poistion in the emiticon array Dim intNumberOfOuterLoops 'Holds the outer loop number for rows Dim intLoop 'Holds the loop index position Dim intInnerLoop 'Holds the inner loop number for columns Dim strMemberTitle 'Holds the members title Dim blnTopicWatched 'Set to true if this topic is being watched 'Initialise variables strMode = "reply" lngMessageID = 0 intForumID = 0 lngTopicID = 0 intThreadNo = 0 blnNoThread = False blnIsModerator = False blnPollNoReply = False blnBannedIP = False blnTopicWatched = False 'See if the user is using a banned IP address If bannedIP() Then 'If the user is using a banned IP then set the banned IP variable to true and active member variable to false blnBannedIP = True End If 'If this is the first time the page is displayed then the Forum Thread record position is set to page 1 If Request.QueryString("TPN") = "" Then intRecordPositionPageNum = 1 'Else the page has been displayed before so the Forum Thread record postion is set to the Record Position number Else intRecordPositionPageNum = CInt(Request.QueryString("TPN")) End If 'Read in the Topic ID for the topic to display and page number lngTopicID = CLng(Request.QueryString("TID")) intTopicPageNumber = CInt(Request.QueryString("PN")) 'If there is no Topic ID then redirect the user to the main forum page If lngTopicID = 0 Then 'Clean up Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'Redirect Response.Redirect "default.asp" End If 'Read in the keywords if comming from a search strSearchKeywords = Trim(Mid(Request.QueryString("KW"), 1, 35)) 'Split up the keywords to be searched sarySearchWord = Split(Trim(strSearchKeywords), " ") 'Get the posts from the database 'Create a record set object to the Threads held in the database Set rsPost = Server.CreateObject("ADODB.Recordset") 'Initalise the strSQL variable with an SQL statement to query the database get the thread details If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "ThreadDetails @lngTopicID = " & lngTopicID Else strSQL = "SELECT " & strDbTable & "Topic.*, " & strDbTable & "Thread.*, " & strDbTable & "Author.Username, " & strDbTable & "Author.Homepage, " & strDbTable & "Author.Location, " & strDbTable & "Author.No_of_posts, " & strDbTable & "Author.Join_date, " & strDbTable & "Author.Signature, " & strDbTable & "Author.Active, " & strDbTable & "Author.Avatar, " & strDbTable & "Author.Avatar_title, " & strDbTable & "Group.Name, " & strDbTable & "Group.Stars, " & strDbTable & "Group.Custom_stars " strSQL = strSQL & "FROM " & strDbTable & "Topic, " & strDbTable & "Thread, " & strDbTable & "Author, " & strDbTable & "Group " strSQL = strSQL & "WHERE " & strDbTable & "Topic.Topic_ID = " & strDbTable & "Thread.Topic_ID AND " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID AND " & strDbTable & "Author.Group_ID = " & strDbTable & "Group.Group_ID AND " & strDbTable & "Topic.Topic_ID = " & lngTopicID & " " strSQL = strSQL & "ORDER BY " & strDbTable & "Thread.Message_date ASC;" End If 'Set the cursor type property of the record set to dynamic so we can naviagate through the record set rsPost.CursorType = 1 'Query the database rsPost.Open strSQL, adoCon 'Set the number of records to display on each page rsPost.PageSize = intThreadsPerPage 'If there is no topic in the database then display the appropraite mesasage If rsPost.EOF Then 'If there are no thread's to display then display the appropriate error message strSubject = strTxtNoThreads blnNoThread = True 'Else there are records returned by the database Else 'Count the number of pages there are in the recordset calculated by the PageSize attribute set by admin intTotalNumOfPages = rsPost.PageCount 'Get the total amount of threads in the topic intTotalNumOfThreads = rsPost.RecordCount 'Get the record poistion to display from 'If the page number to show from is higher than the last page number then the last page number is the highers page If (intRecordPositionPageNum > intTotalNumOfPages) OR (Request.QueryString("get") = "last") Then 'Set the page number to show from rsPost.AbsolutePage = intTotalNumOfPages 'Set the page position number to the highest page number intRecordPositionPageNum = intTotalNumOfPages 'Else the page number to show from is the requested page number Else rsPost.AbsolutePage = intRecordPositionPageNum End If 'Read in the number of views for the page form the database lngNumberOfViews = CLng(rsPost("No_of_views")) 'Add 1 to the number of views the Topic has had lngNumberOfViews = lngNumberOfViews + 1 'Write the number of times the Topic has been viewed back to the database 'Initalise the strSQL variable with the SQL string If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "UpdateViewPostCount @lngNumberOfViews = " & lngNumberOfViews & ", @lngTopicID= " & lngTopicID Else strSQL = "UPDATE " & strDbTable & "Topic SET " strSQL = strSQL & "" & strDbTable & "Topic.No_of_views=" & lngNumberOfViews strSQL = strSQL & " WHERE (((" & strDbTable & "Topic.Topic_ID)=" & lngTopicID & "));" End If 'Write to the database adoCon.Execute(strSQL) 'Read in the thread subject forum ID and where the topic is locked intForumID = Cint(rsPost("Forum_ID")) lngPollID = CLng(rsPost("Poll_ID")) strSubject = rsPost("Subject") blnTopicLocked = CBool(rsPost("Locked")) intPriority = CInt(rsPost("Priority")) dtmLastEntryDate = CDate(rsPost("Last_entry_date")) 'If this is a unread new post set a cookie so that it is not shown as a new post If(CDate(Session("dtmLastVisit")) < dtmLastEntryDate) AND (Request.Cookies("RT" & lngTopicID) = "") Then Response.Cookies("RT")("TID" & lngTopicID) = 1 End If End If 'If this is a top priority post across all forums then read in teh forum ID form the querystring and ingnore the real topic forum ID If Request.QueryString("PR") = "3" Then intForumID = Cint(Request.QueryString("FID")) 'Create a recordset to get the forum details Set rsTopic = Server.CreateObject("ADODB.Recordset") 'Read in the forum name and forum permssions from the database 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "ForumsAllWhereForumIs @intForumID = " & intForumID Else strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Forum WHERE " & strDbTable & "Forum.Forum_ID = " & intForumID & ";" End If 'Query the database rsTopic.Open strSQL, adoCon 'If there is a record returned by the recordset then check to see if you need a password to enter it If NOT rsTopic.EOF Then 'Read in forum details from the database strForumName = rsTopic("Forum_name") 'Read in wether the forum is locked or not blnForumLocked = CBool(rsTopic("Locked")) 'Check the user is welcome in this forum Call forumPermisisons(intForumID, intGroupID, CInt(rsTopic("Read")), CInt(rsTopic("Post")), CInt(rsTopic("Reply_posts")), CInt(rsTopic("Edit_posts")), CInt(rsTopic("Delete_posts")), 0, CInt(rsTopic("Poll_create")), CInt(rsTopic("Vote")), CInt(rsTopic("Attachments")), CInt(rsTopic("Image_upload"))) 'If the user has no read writes then kick them If blnRead = False Then 'Reset Server Objects rsPost.Close Set rsPost = Nothing rsTopic.Close Set rsTopic = Nothing Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'Redirect to a page asking for the user to enter the forum password Response.Redirect "insufficient_permission.asp" End If 'If the forum requires a password and a logged in forum code is not found on the users machine then send them to a login page If rsTopic("Password") <> "" AND Request.Cookies(strCookieName)("Forum" & intForumID) <> rsTopic("Forum_code") Then 'Reset Server Objects rsPost.Close Set rsPost = Nothing rsTopic.Close Set rsTopic = Nothing Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'Redirect to a page asking for the user to enter the forum password Response.Redirect "forum_password_form.asp?RP=PT&FID=" & intForumID & "&TID=" & lngTopicID End If End If 'Write the HTML head of the page Response.Write("" & _ vbCrLf & "" & _ vbCrLf & "" & strMainForumName & ": " & strSubject & "" & _ vbCrLf & "" & _ vbCrLf & vbCrLf & "" & _ vbCrLf & vbCrLf & "") %> <% Response.Write(vbCrLf & "" & _ vbCrLf & "" & _ vbCrLf & " " & _ vbCrLf & "" & _ vbCrLf & " " & _ vbCrLf & " " & vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    ") 'Display the forum name Response.Write(strForumName) 'If the forum is locked show a locked pad lock icon If blnForumLocked = True Then Response.Write (" ( " & strTxtForumLocked & ")") End If Response.Write("
     " & strMainForumName & "") Response.Write(strNavSpacer) 'Check there are forum's to display If rsTopic.EOF Then 'If there are no forum's to display then display the appropriate error message Response.Write "" & strTxtNoForums & "" 'Else there the are forum's to write the HTML to display it the forum names and a discription Else 'Write the HTML of the forum descriptions as hyperlinks to the forums Response.Write ("" & strForumName & "") End If 'Clean Up rsTopic.Close Response.Write(vbCrLf & "") 'If the user is the forum admin or a moderator then give them admin functions on this topic If blnAdmin OR blnModerator Then Response.Write(vbCrLf & " ") End If Response.Write(vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") 'If the user can reply and they are not suspened then display real reply links If blnReply = True AND blnActiveMember = True Then 'If the reply box is on the same page shorten the reply link If intRecordPositionPageNum = intTotalNumOfPages Then 'Display images with links to reply to post or post a new topic Response.Write (vbCrLf & "" & _ vbCrLf & " " & _ vbCrLf & "
    " & strTxtTopic & ": " & strSubject & "") 'If the topic is locked then have a locked icon If blnTopicLocked = True Then Response.Write (" ( " & strTxtTopicLocked & ")") End If Response.Write(vbCrLf & " ") Else 'Display images with links to reply to post or post a new topic Response.Write (vbCrLf & "") End If 'Else the user can not reply Else 'Display images with links to reply to post or post a new topic but get redirected to a login screen if user is not logged in Response.Write (vbCrLf & "") End If 'Display new topic link Response.Write ("") 'If the user can create a poll disply a create poll link If blnPollCreate = True Then Response.Write ("") End If Response.Write(vbCrLf & "
    ") 'If there is a poll then display the poll include If lngPollID > 0 Then %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'Declare variables Dim strPollQuestion 'Holds the poll question Dim intPollChoiceNumber 'Holds the poll choice number Dim strPollChoice 'Holds the poll choice Dim lngPollChoiceVotes 'Holds the choice number of votes Dim lngTotalPollVotes 'Holds the total number of votes Dim dblPollVotePercentage 'Holds the vote percentage for the vote choice Dim lngLastVoteUserID 'Holds the IP address of the voter Dim blnAlreadyVoted 'Set to true if the user has already voted Dim blnMultipleVotes 'set to true if multiple votes are allowed 'Initlise variables blnAlreadyVoted = False 'Get the poll from the database 'Initalise the strSQL variable with an SQL statement to query the database get the thread details If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "PollDetails @lngPollID = " & lngPollID Else strSQL = "SELECT " & strDbTable & "Poll.*, " & strDbTable & "PollChoice.* " strSQL = strSQL & "FROM " & strDbTable & "Poll INNER JOIN " & strDbTable & "PollChoice ON " & strDbTable & "Poll.Poll_ID = " & strDbTable & "PollChoice.Poll_ID " strSQL = strSQL & "WHERE (((" & strDbTable & "Poll.Poll_ID)=" & lngPollID & "));" End If 'Query the database rsCommon.Open strSQL, adoCon 'If there is a poll then display it If NOT rsCommon.EOF Then 'Read in the poll question strPollQuestion = rsCommon("Poll_question") 'Read the last voters ID lngLastVoteUserID = rsCommon("Author_ID") 'See if multiple votes are allowed blnMultipleVotes = CBool(rsCommon("Multiple_votes")) 'See if this is a poll only blnPollNoReply = CBool(rsCommon("Reply")) 'If multiple votes are not allowed see if the user has voted before If blnMultipleVotes = False Then 'Check to see if the last voted ID matches the ID of the current user unless the user is using the guest account If lngLastVoteUserID = lngLoggedInUserID AND lngLoggedInUserID <> 2 Then blnAlreadyVoted = True 'Check the user has not already voted by reading in a cookie from there system 'Read in the Poll ID number of the last poll the user has voted in If CInt(Request.Cookies(strCookieName)("PID" & lngPollID)) = lngPollID Then blnAlreadyVoted = True End If 'Loop through and get the total number of votes Do While NOT rsCommon.EOF 'Get the total number of votes lngTotalPollVotes = lngTotalPollVotes + rsCommon("Votes") 'Move to the next record rsCommon.MoveNext Loop 'Go back to the begining of the recordset rsCommon.MoveFirst %>
    <% 'Display the vote choice slection column if the user CAN vote in this poll If blnVote = True AND blnForumLocked = False AND blnTopicLocked = False AND blnActiveMember = True AND blnAlreadyVoted = False Then %> <% End If %> <% 'Loop through the Poll Choices Do While NOT rsCommon.EOF 'Read in the poll details intPollChoiceNumber = Cint(rsCommon("Choice_ID")) strPollChoice = rsCommon("Choice") lngPollChoiceVotes = CLng(rsCommon("Votes")) 'If there are no votes yet then format the percent by 0 otherwise an overflow error will happen If lngTotalPollVotes = 0 Then dblPollVotePercentage = FormatPercent(0, 2) 'Else read in the the percentage of votes cast for the vote choice Else dblPollVotePercentage = FormatPercent((lngPollChoiceVotes / lngTotalPollVotes), 2) End If 'Calculate the row colour intRecordLoopCounter = intRecordLoopCounter + 1 %> <% 'Display the vote radio buttons if the user CAN vote in this poll If blnVote = True AND blnForumLocked = False AND blnTopicLocked = False AND blnActiveMember = True AND blnAlreadyVoted = False Then %> <% End If %> <% 'Move to the next record rsCommon.MoveNext Loop %>
    <% = strTxtPollQuestion %>: <% = strPollQuestion %>
    <% = strTxtVote %><% = strTxtPollChoice %> <% = strTxtVotes %> <% = strTxtPollStatistics %>
    <% = lngPollChoiceVotes %> " height="11" align="middle"> [<% = dblPollVotePercentage %>]
    <% 'Display either text msg if the user can NOT vote or a button if they can 'If the forum is locked display a locked forum meesage If blnForumLocked = True OR blnTopicLocked = True Then Response.Write(strTxtThisTopicIsClosedNoNewVotesAccepted) 'Else the user can not vote or they are not an active member of the forum ElseIf blnActiveMember = False OR blnVote = False Then Response.Write(strsTxYouCanNotNotVoteInThisPoll) 'Else the user has already voted in this poll and multiple votes are not permitted ElseIf blnAlreadyVoted = True Then Response.Write(strTxtYouHaveAlreadyVotedInThisPoll) 'Else display vote button Else %> <% End If %>

    <% End If 'Clean up rsCommon.Close 'Display a msg letting the user know if there vote has been cast or not Select Case Request.QueryString("RN") Case "1" Response.Write("") Case "2" Response.Write("") End Select %><% End If 'If there are threads display them If NOT rsPost.EOF Then 'Check to see if user is watching this topic or not If blnEmail AND intGroupID <> 2 Then 'Initalise the SQL string with a query to see if this person is watching the topic If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "TopicEmailNotify @lngAuthorID = " & lngLoggedInUserID & ", @lngTopicID= " & lngTopicID Else strSQL = "SELECT " & strDbTable & "EmailNotify.* " strSQL = strSQL & "FROM " & strDbTable & "EmailNotify " strSQL = strSQL & "WHERE " & strDbTable & "EmailNotify.Author_ID=" & lngLoggedInUserID & " AND " & strDbTable & "EmailNotify.Topic_ID=" & lngTopicID & ";" End If 'Query the database rsTopic.Open strSQL, adoCon 'If a record is return the user is watching this topic If NOT rsTopic.EOF Then blnTopicWatched = True blnReplyNotify = True End If 'Clean up rsTopic.Close End If 'Create the HTML for the top of the table Response.Write("" & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") 'Calculate the post number intThreadNo = (intRecordPositionPageNum - 1) * intThreadsPerPage 'Loop round to read in all the thread's in the database For intRecordLoopCounter = 1 to intThreadsPerPage 'Initilise moderator variable blnIsModerator = False 'If there are no reacrds left exit for loop If rsPost.EOF Then Exit For 'Calculate the thread number intThreadNo = intThreadNo + 1 'Read in threads details for the topic from the database lngMessageID = CLng(rsPost("Thread_ID")) strMessage = rsPost("Message") strUsername = rsPost("Username") lngUserID = CLng(rsPost("Author_ID")) dtmTopicDate = CDate(rsPost("Message_date")) strAuthorHomepage = rsPost("Homepage") strAuthorLocation = rsPost("Location") dtmAuthorRegistration = CDate(rsPost("Join_date")) lngAuthorNumOfPosts = CLng(rsPost("No_of_posts")) strAuthorAvatar = rsPost("Avatar") strMemberTitle = rsPost("Avatar_title") strAuthorSignature = rsPost("Signature") strAuthorIP = rsPost("IP_addr") strGroupName = rsPost("Name") intRankStars = CInt(rsPost("Stars")) strRankCustomStars = rsPost("Custom_stars") 'If the poster is a guest see if they have entered their name in the GuestName table and get it If lngUserID = 2 Then 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "GuestPoster @lngThreadID = " & lngMessageID Else strSQL = "SELECT " & strDbTable & "GuestName.Name FROM " & strDbTable & "GuestName WHERE " & strDbTable & "GuestName.Thread_ID = " & lngMessageID & ";" End If 'Query the database rsTopic.Open strSQL, adoCon 'Read in the guest posters name If NOT rsTopic.EOF Then strUsername = rsTopic("Name") 'Close the recordset rsTopic.Close End If 'If the post contains a quote or code block then format it If InStr(1, strMessage, "[QUOTE=", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 Then strMessage = formatUserQuote(strMessage) If InStr(1, strMessage, "[QUOTE]", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 Then strMessage = formatQuote(strMessage) If InStr(1, strMessage, "[CODE]", 1) > 0 AND InStr(1, strMessage, "[/CODE]", 1) > 0 Then strMessage = formatCode(strMessage) 'If the post contains a flash link then format it If blnFlashFiles Then If InStr(1, strMessage, "[FLASH", 1) > 0 AND InStr(1, strMessage, "[/FLASH]", 1) > 0 Then strMessage = formatFlash(strMessage) If InStr(1, strAuthorSignature, "[FLASH", 1) > 0 AND InStr(1, strAuthorSignature, "[/FLASH]", 1) > 0 Then strAuthorSignature = formatFlash(strAuthorSignature) End If 'If the message has been edited parse the 'edited by' XML into HTML for the post If InStr(1, strMessage, "", 1) Then strMessage = editedXMLParser(strMessage) 'Call the function to highlight search words if coming froma search page If strSearchKeywords <> "" Then strMessage = searchHighlighter(strMessage, sarySearchWord) 'If the user wants there signature shown then attach it to the message If rsPost("Show_signature") AND strAuthorSignature <> "" Then strMessage = strMessage & "

    __________________
    " & strAuthorSignature & "" Response.Write(vbCrLf & "
    " & _ vbCrLf & " ") Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") Response.Write(vbCrLf & " " & vbCrLf & " " & vbCrLf & " " & vbCrLf & " ") Response.Write(vbCrLf & " ") 'Move to the next database record rsPost.MoveNext Next End If Response.Write(" " & _ vbCrLf & "
    " & strTxtAuthor & "" & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & strTxtMessage & "<< " & strTxtPrevTopic & " | " & strTxtNextTopic & " >>
    " & _ vbCrLf & " " & _ vbCrLf & " " & strUsername & "
    " & strGroupName & "
    " & _ vbCrLf & " "" Then Response.Write(strRankCustomStars) Else Response.Write(strImagePath & intRankStars & "_star_rating.gif") Response.Write(""" alt=""" & strGroupName & """>
    ") 'If the user has an avatar then display it If blnAvatar = True AND strAuthorAvatar <> "" Then Response.Write("") 'If there is a title for this member then display it If strMemberTitle <> "" Then Response.Write(vbCrLf & "
    " & strMemberTitle) Response.Write("

    " & strTxtJoined & ": " & DateFormat(dtmAuthorRegistration, saryDateTimeData)) 'If the is a location display it If strAuthorLocation <> "" Then Response.Write("
    " & strTxtLocation & ": " & strAuthorLocation) 'Display the num of posts Response.Write("
    " & strTxtPosts & ": " & lngAuthorNumOfPosts) 'Create the table for the main post Response.Write(vbCrLf & "
    ") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") Response.Write(VbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & strTxtPosted & " " & DateFormat(dtmTopicDate, saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(dtmTopicDate, saryDateTimeData)) 'If the user is the admin or moderatir then display the authors IP If (blnAdmin OR blnModerator) AND strAuthorIP <> "" Then Response.Write(" | " & strTxtIP & " " & strAuthorIP & "") Else Response.Write(" | " & strTxtIPLogged) End If Response.Write(VbCrLf & " ") 'Display the report post feature if email is enabled. If blnEmail AND intGroupID <> 2 AND lngUserID <> lngLoggedInUserID Then Response.Write(VbCrLf & "") 'If the topic is not locked put in a link for someone to quote this message If (blnTopicLocked = False) AND blnPollNoReply = False Then Response.Write(vbCrLf & " ") 'Else put in a non breakin space for netscape 4 bug Else Response.Write(" ") End If Response.Write(vbCrLf & "

    " & _ vbCrLf & "" & vbCrLf & strMessage & vbCrLf & "" & _ vbCrLf & "
    " & strTxtBackToTop & "") Response.Write(vbCrLf & " ") 'If the user has a hompeage put in a link button If strAuthorHomepage <> "" Then Response.Write(vbCrLf & " ") 'If the private msg's are on then display a link to enable use to send them a msg If blnPrivateMessages AND intGroupID <> 2 Then Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") End If 'If the logged in user is the person who posted the message or the forum administrator/moderator then allow them to edit or delete the message If (lngLoggedInUserID = lngUserID AND blnForumLocked = False AND blnActiveMember AND blnTopicLocked = False) OR (blnAdmin OR blnModerator) Then 'Only let the user edit the post if they have edit rights If blnEdit OR blnAdmin Then Response.Write(vbCrLf & " ") 'Only let a normal user delete there post if someone hasn't posted a reply If (intTotalNumOfThreads = intThreadNo) OR (blnAdmin OR blnModerator) Then 'Only let the user delete the post if they have delete rights If blnDelete OR blnAdmin Then Response.Write(vbCrLf & " ") End If End If 'If the user is the forum admin or a moderator then let them move the topic to another forum If blnAdmin OR blnModerator Then Response.Write(vbCrLf & " ") Response.Write(vbCrLf & "
     
    " & _ vbCrLf & "
    " & _ vbCrLf & "
    " & _ vbCrLf & "
    ") 'Clean up rsPost.Close Set rsPost = Nothing 'Set up an achor Response.Write("") 'Display a message if the users IP is banned If blnBannedIP Then Response.Write(vbCrLf & "

    " & strTxtSorryYouDoNotHavePerimssionToReplyIPBanned & "

    ") 'Display message if the users forum membership is suspended ElseIf blnActiveMember = False AND (intRecordPositionPageNum = intTotalNumOfPages) Then Response.Write(vbCrLf & "

    " & strTxtSorryNoReply & "
    ") 'If mem suspended display message If InStr(1, strLoggedInUserCode, "N0act", vbTextCompare) Then Response.Write(strTxtForumMemberSuspended) 'Else account not yet active Else Response.Write(strTxtForumMembershipNotAct) End If 'If email is on then place a re-send activation email link If InStr(1, strLoggedInUserCode, "N0act", vbTextCompare) = False AND blnEmailActivation AND blnLoggedInUserEmail Then Response.Write("
    " & strTxtResendActivationEmail & "") Response.Write("

    ") 'Display message if the forum is locked ElseIf blnForumLocked AND (intRecordPositionPageNum = intTotalNumOfPages) Then Response.Write(vbCrLf & "

    " & strTxtSorryNoReply & "
    " & strTxtThisForumIsLocked & "

    ") 'Display message if the user does not have permisison to post in this forum ElseIf blnReply = False AND intGroupID <> 2 Then Response.Write(vbCrLf & "

    " & strTxtSorryYouDoNotHavePerimssionToReplyToPostsInThisForum & "

    ") 'Display message if the topic is locked ElseIf (blnTopicLocked = True) AND (intRecordPositionPageNum = intTotalNumOfPages) Then Response.Write(vbCrLf & "

    " & strTxtSorryNoReply & "
    " & strTxtThisTopicIsLocked & "

    ") 'Display message if this is a poll only ElseIf blnPollNoReply Then Response.Write(vbCrLf & "

    " & strTxtThisIsAPollOnlyYouCanNotReply & "

    ") 'Display message if the user is a guest or not logged in ElseIf blnReply = False AND (intRecordPositionPageNum = intTotalNumOfPages) Then Response.Write(vbCrLf & "

    " & strTxtPostAReplyRegister & " " & strTxtLoginSm & "
    " & strTxtNeedToRegister & " " & strTxtSmRegister & "

    ") 'Else disply the reply post box ElseIf intRecordPositionPageNum = intTotalNumOfPages Then Response.Write(vbCrLf & " " & strTxtPostReply & "
    ") 'See if the users browser is RTE enabled If RTEenabled() <> "false" AND blnRTEEditor AND blnWYSIWYGEditor Then 'Open the message form for RTE enabled browsers %><% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Rich Text Editor '** '** 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 '** '**************************************************************************************** Dim blnAbout 'Initiliase variables blnAbout = blnLCode 'The following enables and disables functions of the Rich Text Editor 'To disable or enable functions change the following to true of false Const blnBold = true Const blnUnderline = true Const blnItalic = true Const blnFontStyle = false Const blnFontType = true Const blnFontSize = true Const blnTextColour = true Const blnTextBackgroundColour = false Const blnCut = true Const blnCopy = true Const blnPaste = true Const blnUndo = true Const blnRedo = true Const blnLeftJustify = true Const blnCentre = true Const blnRightJustify = true Const blnFullJustify = false Const blnOrderList = true Const blnUnOrderList = true Const blnOutdent = true Const blnIndent = true Const blnAddHyperlink = true Const blnAddImage = true Const blnInsertTable = false Const blnHTMLView = false 'Best to leave the HTML view disabled to stop users entering malicious HTML code Const blnSpellCheck = true Const blnEmoticonPopUp = false %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'If a private message go to pm post message page otherwise goto post message page If strMode = "PM" Then strPostPage = "pm_post_message.asp" Else strPostPage = "post_message.asp?PN=" & Trim(Mid(Request.Form("PN"), 1, 8)) End If Response.Write(vbCrLf & "" & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") 'If the poster is in a guest then get them to enter a name If lngLoggedInUserID = 2 AND (strMode <> "edit" AND strMode <> "editTopic") Then Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If 'If this is a private message display the username box If strMode = "PM" Then Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If 'If this is a new post or editing the first thread then display the subject text box If strMode = "new" or strMode="editTopic" or strMode = "PM" or strMode = "poll" Then Response.Write(" " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If 'If this is a new poll then display space to enter the poll If strMode = "poll" Then %><% '**************************************************************************************** '** 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 '** '**************************************************************************************** %> <% 'Loop around to display text boxes for the maximum amount of allowed poll questions For intPollLoopCounter = 1 to intMaxPollChoices Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") Next %> <% End If Response.Write(" " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If '****************************************** Response.Write(" " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") 'If not PM then display another row If strMode <> "PM" Then 'If signature of e-mail notify then display row to show If (blnLoggedInUserEmail = True AND blnEmail = True) OR blnLoggedInUserSignature = True Then Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If 'If this is a private e-mail and e-mail is on and the user gave an e-mail address let them choose to be notified when pm msg is read ElseIf strMode = "PM" AND blnEmail AND blnLoggedInUserEmail Then Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    *" & strTxtRequiredFields & "
    " & strTxtName & "*:" & _ vbCrLf & " " & _ vbCrLf & "
    " & strTxtToUsername & "*:") 'Get the users buddy list if they have one 'Initlise the sql statement strSQL = "SELECT " & strDbTable & "Author.Username " strSQL = strSQL & "FROM " & strDbTable & "Author INNER JOIN " & strDbTable & "BuddyList ON " & strDbTable & "Author.Author_ID = " & strDbTable & "BuddyList.Buddy_ID " strSQL = strSQL & "WHERE " & strDbTable & "BuddyList.Author_ID=" & lngLoggedInUserID & " AND " & strDbTable & "BuddyList.Buddy_ID <> 2 " strSQL = strSQL & "ORDER By " & strDbTable & "Author.Username ASC;" 'Query the database rsCommon.Open strSQL, adoCon Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") 'If there are records returned then display the users buddy list If NOT rsCommon.EOF Then Response.Write(vbCrLf & " " & strSelectFormBuddyList & ":" & _ vbCrLf & " ") Else Response.Write(vbCrLf & " ") End If 'Reset server variables rsCommon.Close Response.Write(vbCrLf & "
    " & strTxtSubjectFolder & "*:" & _ vbCrLf & " ") 'If this is the forums moderator or forum admim then let them slect the priority level of the post If (blnAdmin = True OR blnPriority = True) AND (strMode = "new" or strMode="editTopic" or strMode = "poll") Then Response.Write("  " & strTxtPriority & ":" & _ vbCrLf & " " & _ vbCrLf & " ") End If Response.Write("
       
    <% = strTxtPollQuestion %>*:
    ") 'Display the poll choice text Response.Write(strTxtPollChoice & " ") 'Display poll number Response.Write(intPollLoopCounter) 'If this is choice 1 or 2 display a required astrerix If intPollLoopCounter < 3 Then Response.Write("*") Response.Write(":
       <% = strTxtAllowMultipleVotes %>
       <% = strTxtMakePollOnlyNoReplies %>
       
     " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    ") 'RTE Tool Bar 1 '--------------------------------------------------------------------------- %><% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Rich Text Editor '** '** 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 '** '**************************************************************************************** 'RTE Toolbar 1 Response.Write(vbCrLf & " ") 'Font Style If blnFontStyle Then Response.Write(vbCrLf & " ") End If 'Font Type If blnFontType Then Response.Write(vbCrLf & " ") End If 'Font Size If blnFontSize Then Response.Write(vbCrLf & " ") End If If blnBold Then Response.Write(vbCrLf & " ") If blnItalic Then Response.Write(vbCrLf & " ") If blnUnderline Then Response.Write(vbCrLf & "   ") If blnTextColour Then Response.Write(vbCrLf & " ") If (RTEenabled = "winIE" OR RTEenabled = "winIE5") AND blnTextBackgroundColour Then Response.Write(vbCrLf & "  ") If blnImageUpload Then Response.Write(vbCrLf & " ") If blnAttachments Then Response.Write(vbCrLf & " ") Response.Write(" ") %><% '--------------------------------------------------------------------------- Response.Write("
    ") 'RTE Tool Bar 2 '--------------------------------------------------------------------------- %><% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Rich Text Editor '** '** 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 '** '**************************************************************************************** 'RTE Toolbox 2 Response.Write(vbCrLf & " ") If blnCut AND RTEenabled <> "Gecko" Then Response.Write(vbCrLf & " ") If blnCopy AND RTEenabled <> "Gecko" Then Response.Write(vbCrLf & " ") If blnPaste AND RTEenabled <> "Gecko" Then Response.Write(vbCrLf & "  ") If blnUndo Then Response.Write(vbCrLf & " ") If blnRedo Then Response.Write(vbCrLf & "  ") If blnLeftJustify Then Response.Write(vbCrLf & " ") If blnCentre Then Response.Write(vbCrLf & " ") If blnRightJustify Then Response.Write(vbCrLf & " ") If blnFullJustify Then Response.Write(vbCrLf & "  ") If blnOrderList Then Response.Write(vbCrLf & " ") If blnUnOrderList Then Response.Write(vbCrLf & "  ") If blnOutdent Then Response.Write(vbCrLf & " ") If blnIndent Then Response.Write(vbCrLf & "  ") If blnAddHyperlink Then Response.Write(vbCrLf & " ") 'If this is IE then open pop up image insert window If (RTEenabled = "winIE" OR RTEenabled = "winIE5") AND blnAddImage Then Response.Write(vbCrLf & " ") 'If this is Gecko have a pop up JS prompt for link to image URL ElseIf blnAddImage Then Response.Write(vbCrLf & " ") End If 'If this is IE then open pop up table insert window If (RTEenabled = "winIE" OR RTEenabled = "winIE5") AND blnInsertTable Then Response.Write(vbCrLf & " ") 'Button Pop up for emoticons If blnEmoticonPopUp Then Response.Write(vbCrLf & "  ") 'If this is IE then show the spell check button If (RTEenabled = "winIE" OR RTEenabled = "winIE5") AND blnSpellCheck Then Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") If blnHTMLView Then Response.Write(vbCrLf & " ") If blnAbout Then Response.Write(vbCrLf & "  ") %><% '--------------------------------------------------------------------------- Response.Write(vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & "
    " & _ vbCrLf & "
    " & strTxtMessage & "*:") '*************** Emoticons ******************* 'If emoticons are enabled show them next to the post window If blnEmoticons Then Response.Write(vbCrLf & " " & _ vbCrLf & " ") 'Intilise the index position (we are starting at 1 instead of position 0 in the array for simpler calculations) intIndexPosition = 1 'Calcultae the number of outer loops to do intNumberOfOuterLoops = 5 'If there is a remainder add 1 to the number of loops If UBound(saryEmoticons) MOD 2 > 0 Then intNumberOfOuterLoops = intNumberOfOuterLoops + 1 'Loop throgh th list of emoticons For intLoop = 1 to intNumberOfOuterLoops Response.Write("") 'Loop throgh th list of emoticons For intInnerLoop = 1 to 3 'If there is nothing to display show an empty box If intIndexPosition > UBound(saryEmoticons) Then Response.Write(vbCrLf & " ") 'Else show the emoticon Else Response.Write(vbCrLf & " ") End If 'Minus one form the index position intIndexPosition = intIndexPosition + 1 Next Response.Write("") Next Response.Write(vbCrLf & " ") Response.Write(vbCrLf & "

    " & strTxtEmoticons & "
     
    " & strTxtMore & "
    ") 'This bit creates a random number to add to the end of the Iframe link as IE will cache the page 'Randomise the system timer Randomize Timer Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
      " & strTxtEnable & " " & strTxtForumCodes & " " & strTxtToFormatPosts & _ vbCrLf & "
     ") 'If the user has a signature offer them the chance to show it If blnLoggedInUserSignature Then Response.Write(vbCrLf & "  " & strTxtShowSignature & " ") End If 'Display e-mail notify of replies option If blnEmail AND blnLoggedInUserEmail Then Response.Write(vbCrLf & "  " & strTxtEmailNotify & " ") End If Response.Write(vbCrLf & "
      " & strTxtEmailNotifyWhenPMIsRead & "
    " & _ vbCrLf & " ") If strMode <> "PM" Then Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") 'If reply get the thread position number in the topic If strMode = "reply" Then Response.Write(vbCrLf & " ") End If End If Response.Write(vbCrLf & " " & _ vbCrLf & "  " & _ vbCrLf & " " & _ vbCrLf & "

    ") Dim strGetMessageBoxHTML 'Set how to get the HTML form the message box for Win IE5 and then for other RTE browsers If RTEenabled = "winIE5" Then strGetMessageBoxHTML = "frames.message.document.body.innerHTML;" Else strGetMessageBoxHTML = "document.getElementById('message').contentWindow.document.body.innerHTML;" 'Select the correct button for the page If strMode="edit" OR strMode = "editTopic" Then Response.Write(vbCrLf & " ") ElseIf strMode = "new" OR strMode = "poll" Then Response.Write(vbCrLf & " ") ElseIf strMode = "PM" Then Response.Write(vbCrLf & " ") Else Response.Write(vbCrLf & " ") End If Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "

    " & _ vbCrLf & "
    " & _ vbCrLf & "
    " & _ vbCrLf & "
    " & _ vbCrLf & "
    ") %><% Else 'Open up the mesage form for non RTE enabled browsers %><% '**************************************************************************************** '** 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 '** '**************************************************************************************** 'If a private message go to pm post message page otherwise goto post message page If strMode = "PM" Then strPostPage = "pm_post_message.asp" Else strPostPage = "post_message.asp?PN=" & Trim(Mid(Request.Form("PN"), 1, 8)) End If %>
    <% 'If the poster is in a guest then get them to enter a name If lngLoggedInUserID = 2 AND (strMode <> "edit" AND strMode <> "editTopic") Then %> <% End If 'If this is a private message display the username box If strMode = "PM" Then %> <% End If 'If this is a new post or editing the first thread then display the subject text box If strMode = "new" or strMode="editTopic" or strMode = "PM" or strMode = "poll" Then %> <% End If 'If this is a new poll then display space to enter the poll If strMode = "poll" Then %><% '**************************************************************************************** '** 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 '** '**************************************************************************************** %> <% 'Loop around to display text boxes for the maximum amount of allowed poll questions For intPollLoopCounter = 1 to intMaxPollChoices Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") Next %> <% End If %> <% End If %><% 'If not PM then display another row If strMode <> "PM" Then 'If signature of e-mail notify then display row to show If (blnLoggedInUserEmail = True AND blnEmail = True) OR blnLoggedInUserSignature = True Then %> <% End If 'If this is a private e-mail and e-mail is on and the user gave an e-mail address let them choose to be notified when pm msg is read ElseIf strMode = "PM" AND blnEmail = True AND blnLoggedInUserEmail Then %> <% End If %>
    *<% = strTxtRequiredFields %>
    <% = strTxtName %>*:
    <% = strTxtToUsername %>: <% 'Get the users buddy list if they have one 'Initlise the sql statement strSQL = "SELECT " & strDbTable & "Author.Username " strSQL = strSQL & "FROM " & strDbTable & "Author INNER JOIN " & strDbTable & "BuddyList ON " & strDbTable & "Author.Author_ID = " & strDbTable & "BuddyList.Buddy_ID " strSQL = strSQL & "WHERE " & strDbTable & "BuddyList.Author_ID=" & lngLoggedInUserID & " AND " & strDbTable & "BuddyList.Buddy_ID <> 2 " strSQL = strSQL & "ORDER By " & strDbTable & "Author.Username ASC;" 'Query the database rsCommon.Open strSQL, adoCon %> /> <% = strTxtMemberSearch %><% 'If there are records returned then display the users buddy list If NOT rsCommon.EOF Then %> <% = strSelectFormBuddyList %>: <% Else Response.Write("") End If 'Reset server variables rsCommon.Close %>
    <% = strTxtSubjectFolder %>*: /><% 'If this is the forums moderator or forum admim then let them select the priority level of the post If (blnAdmin = True OR blnPriority = True) AND (strMode = "new" or strMode="editTopic" or strMode = "poll") Then %>  <% = strTxtPriority %>: <% 'Else the priority of the post is normal Else Response.Write("") End If %>
       
    <% = strTxtPollQuestion %>*:
    ") 'Display the poll choice text Response.Write(strTxtPollChoice & " ") 'Display poll number Response.Write(intPollLoopCounter) 'If this is choice 1 or 2 display a required astrerix If intPollLoopCounter < 3 Then Response.Write("*") Response.Write(":
       <% = strTxtAllowMultipleVotes %>
       <% = strTxtMakePollOnlyNoReplies %>
       
    <% = strTxtBold	%> <%	= strTxtItalic %> <% =	strTxtUnderline	%> <% = strTxtAddHyperlink %> <%	= strTxtAddEmailLink %> <% =	strTxtCentre %> <% = strTxtList %> <% =	strTxtIndent %> <% =	strTxtAddImage %><% 'If image uploading is allowed have an image upload button If blnImageUpload Then %> <%	= strTxtImageUpload %><% End If 'If file uploading is allowed have an file upload button If blnAttachments Then %> <% = strTxtFileUpload	%><% End If %> <% = strTxtMode %>:
    <% = strTxtMessage %>*:<% 'If emoticons are enabled show them next to the post window If blnEmoticons Then %> <% 'Intilise the index position (we are starting at 1 instead of position 0 in the array for simpler calculations) intIndexPosition = 1 'Calcultae the number of outer loops to do intNumberOfOuterLoops = 5 'If there is a remainder add 1 to the number of loops If UBound(saryEmoticons) MOD 2 > 0 Then intNumberOfOuterLoops = intNumberOfOuterLoops + 1 'Loop throgh th list of emoticons For intLoop = 1 to intNumberOfOuterLoops Response.Write("") 'Loop throgh th list of emoticons For intInnerLoop = 1 to 3 'If there is nothing to display show an empty box If intIndexPosition > UBound(saryEmoticons) Then Response.Write(vbCrLf & " ") 'Else show the emoticon Else Response.Write(vbCrLf & " ") End If 'Minus one form the index position intIndexPosition = intIndexPosition + 1 Next Response.Write("") Next %>

    <% = strTxtEmoticons %>
     
    <% = strTxtMore %>
       <% Response.Write(strTxtEnable & " " & strTxtForumCodes & " " & strTxtToFormatPosts) %>
      <% 'If the user has a signature offer them the chance to show it If blnLoggedInUserSignature = True Then %>   /><% = strTxtShowSignature %> <% End If 'Display e-mail notify of replies option If blnEmail = True AND blnLoggedInUserEmail = True Then %>   /><% = strTxtEmailNotify %> <% End If %>
       <% = strTxtEmailNotifyWhenPMIsRead %>
    <% If NOT strMode = "PM" Then %> <% 'If reply get the thread position number in the topic If strMode = "reply" Then %> <% End If End If %>  

    <% 'Select the button for this page If strMode="edit" OR strMode = "editTopic" Then Response.Write(" ") ElseIf strMode = "new" OR strMode = "poll" Then Response.Write(" ") ElseIf strMode = "PM" Then Response.Write(" ") Else Response.Write(" ") End If %>

    <% End If End If Response.Write(vbCrLf & " " & _ vbCrLf & " ") 'If there is more than 1 page of topics then dispaly drop down list to the other threads If intTotalNumOfPages > 1 Then 'Display an image link to the last topic Response.Write (vbCrLf & " ") End If Response.Write("" & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    ") 'Display a prev link if previous pages are available If intRecordPositionPageNum > 1 Then If Request.QueryString("KW") <> "" Then Response.Write("<< " & strTxtPrevious & " ") Else Response.Write("<< " & strTxtPrevious & " ") End If End If Response.Write (strTxtPage & " " & _ vbCrLf & " " & strTxtOf & " " & intTotalNumOfPages ) 'Display a next link if needed If intRecordPositionPageNum <> intTotalNumOfPages Then If Request.QueryString("KW") <> "" Then Response.Write(" " & strTxtNext & " >>") Else Response.Write(" " & strTxtNext & " >>") End If End If Response.Write("
    ") 'Display a link to watch or un-watch this topic if email notification is enabled If blnEmail AND intGroupID <> 2 Then 'Create link Response.Write("") 'If topic is watched allow unwatch link display If blnTopicWatched Then Response.Write(strTxtUn) 'Display link to watch the topic Response.Write(strTxtWatchThisTopic & "") 'Display a non breaking space for Netscrape 4 bug Else Response.Write(" ") End If Response.Write(vbCrLf & " ") 'If the user is not suspened and can reply then have links to reply etc. If blnReply AND blnActiveMember Then 'Only show the post reply link button on pages without the reply box as some people seem to think this button should actually post the forum!!! If intRecordPositionPageNum <> intTotalNumOfPages Then Response.Write (vbCrLf & "") End If 'Else the user is not logged Else 'Display images with links to reply to post or post a new topic but get redirected to a login screen if user is not logged in Response.Write (vbCrLf & "") End If 'Display new topic link Response.Write ("") 'If the user can create a poll disply a create poll link If blnPollCreate = True Then Response.Write ("") End If Response.Write(vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
    " & _ vbCrLf & " " & strTxtPrintVersion & "") 'If the user has logged in then the Logged In and the e-mail is on then display a link to allow the user to e-mail topic to a friend If intGroupID <> 2 AND blnEmail AND blnActiveMember Then Response.Write("  " & _ vbCrLf & " " & strTxtEmailTopic & "") End If Response.Write("
    " & _ vbCrLf & "

    ") %><% Response.Write("
    ") %><% Response.Write("
    " & _ vbCrLf & "
    ") 'Clear server objects Set rsTopic = Nothing Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode Then If blnTextLinks Then Response.Write("Powered by Web Wiz Forums version " & strVersion & "") Else Response.Write("") End If Response.Write("
    Copyright ©2001-2003 Web Wiz Guide") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Display the process time If blnShowProcessTime Then Response.Write("

    " & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 4) & " " & strTxtSeconds & "
    ") Response.Write("
    ") 'Display an alert message if the user is watching this topic for email notification If Request.QueryString("EN") = "TS" Then Response.Write("") End If 'Display an alert message if the user is not watching this topic for email notification If Request.QueryString("EN") = "TU" Then Response.Write("") End If %>