<% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Guestbook '** http://www.webwizguestbook.com '** '** Copyright 2001-2006 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 adoCon 'Database Connection Variable Dim rsCommon 'Holds the common recordset Dim strCon 'Holds the Database driver and the path and name of the database Dim strSQL 'Holds the SQL query for the database 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 Dim strDbPathAndName 'Holds the database path and name Dim intRecordsPerPage 'Holds the number of files shown on each page Dim strBgColour 'Holds the background colour of the guestbook Dim strTextColour 'Holds the text colour of the guestbook Dim strLinkColour 'Holds the link colour of the guestbook Dim strTextType 'Holds the font type of the guestbook Dim intTextSize 'Holds the font size of the guestbook Dim strTableColour 'Holds the table colour Dim strTableBorderColour 'Holds the table border colour Dim strTableTitleColour 'Holds the table title colour Dim strVisitedLinkColour 'Holds the visited link colour of the guestbook Dim strActiveLinkColour 'Holds the active link colour of the guestbook Dim strHoverLinkColour 'Holds the active link colour of the guestbook Dim blnLCode 'set to true Dim blnEmail 'Boolean set to true if e-mail is on Dim strCode 'Holds the page code Dim strCode2 'Holds the page code Dim strWebSiteEmailAddress 'Holds the e-mail address for the web site the Guestbook is on Dim strMailComponent 'Email coponent the guestbook useses Dim strSMTPServer 'SMTP server for sending the e-mails through Dim strLoggedInUserCode 'Holds the user code of the user Dim strTitleImage 'Holds the path and name for the title image for the guestbook Dim intMsgCharNo 'Holds the number of characters allowed for the messages Dim blnCookieSet 'Set to true if cookies are to be set to stop multiple posts Dim blnIPBlocking 'Set to true if IP blooking is to be used to stop multiple posts Dim strDatabaseType 'Holds the database type Dim blnSessionCheck 'Set to true if the session ID is checked Dim blnURL 'Set to true if user can post a URL Dim blnAuthorise 'Set to true if posts are to be authorised first Dim blnSecurityImages 'Set to true if security images are enabled Dim blnEmailAddress 'Set to true if an email address can be added to the comments Dim strDBFalse 'Holds the false value for SQL queries Dim strDBTrue 'Holds the true value for SQL queries Dim strDBNoLock 'Holds if the database is locked while running the query for SQL Server Dim strRowLock 'Holds if the database row is locked while running the query for SQL Server Dim strDBTop1 'Holds the SQL limit operator (TOP 1) for SQL Server and Access Dim strDBLimit1 'Holds the SQL limit operator (LIMIT 1) for mySQL 'Initiliase varibales Const strVersion = "8.2" Const strSalt = "5CB237B1D85" Const strCodeField = "Code" 'Create database connection 'Create a connection odject Set adoCon = Server.CreateObject("ADODB.Connection") 'Link to database setup include file %><% 'Set the connection string to the database adoCon.connectionstring = strCon 'Set an active connection to the Connection object adoCon.Open 'Read in the Guestbook 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 strSQL = "SELECT " & strDbTable & "Configuration.* " & _ "From " & strDbTable & "Configuration" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Configuration.ID=1;" 'Query the database rsCommon.Open strSQL, strCon '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 strMailComponent = rsCommon("mail_component") strSMTPServer = rsCommon("mail_server") strBgColour = rsCommon("bg_colour") strTextColour = rsCommon("text_colour") strTextType = rsCommon("text_type") intTextSize = CInt(rsCommon("text_size")) strLinkColour = rsCommon("links_colour") strTableColour = rsCommon("table_colour") strTableBorderColour = rsCommon("table_border_colour") strTableTitleColour = rsCommon("table_title_colour") strVisitedLinkColour = rsCommon("visited_links_colour") strHoverLinkColour = rsCommon("active_links_colour") strWebSiteEmailAddress = rsCommon("email_address") blnLCode = CBool(rsCommon("Code")) blnEmail = CBool(rsCommon("email_notify")) intRecordsPerPage = CInt(rsCommon("Comments_per_page")) strTitleImage = rsCommon("Title_image") intMsgCharNo = rsCommon("Message_char_no") blnCookieSet = CBool(rsCommon("Cookie")) blnIPBlocking = CBool(rsCommon("IP_blocking")) blnSessionCheck = CBool(rsCommon("Session")) blnURL = CBool(rsCommon("URL")) blnAuthorise = CBool(rsCommon("Authorisation")) blnSecurityImages = CBool(rsCommon("Security_images")) blnEmailAddress = CBool(rsCommon("Email")) End If 'Close the recordset rsCommon.Close %>