<% '**************************************************************************************** '** 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 '** '**************************************************************************************** '****************************************** '*** Database System Type **** '****************************************** 'Database Type 'strDatabaseType = "SQLServer" 'Microsoft SQL Server 2000 or 2006 strDatabaseType = "mySQL" 'mySQL 4+ 'strDatabaseType = "Access" 'Microsoft Access Database (Flat database file, slowest and least secure of the 3) '****************************************** '*** Microsoft Access **** '****************************************** If strDatabaseType = "Access" Then 'Microsoft Access is a flat file database system, it suffers from slow performance, limited 'connections, and as a flat file it can be easly downloaded by a hacker if you do not secure 'the database file 'Virtual path to database strDbPathAndName = Server.MapPath("database/WWGguestbook.mdb") 'This is the path of the database from the applications location 'Physical path to database strDbPathAndName = "e:\websites\guestbookdatabase\database\svguestbook.mdb" 'Use this if you use the physical server path, eg:- C:\Inetpub\private\WWGguestbook.mdb 'BRINKSTER USERS '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/WWGguestbook.mdb") 'PLEASE NOTE: - For extra security it is highly recommended you change the name of the database, WWGguestbook.mdb, 'to another name and then replace the WWGguestbook.mdb found above with the name you changed the forum database to. 'Database driver (Microsoft JET OLE DB driver version 4) strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDbPathAndName 'Set true and false for db strDBFalse = "false" strDBTrue = "true" 'Set the limit operator for Access strDBTop1 = " TOP 1" End If '****************************************** '*** Microsoft SQL Server **** '****************************************** If strDatabaseType = "SQLServer" Then 'SQL Server is a high performance database server, this requires that you have installed an 'instence SQL Server 2000 or 2005 with mixed mode connection and have created a database for 'the Guestbook on the SQL Server 'Enter the details of your Microsoft SQL Server and database below strSQLServerName = "" 'Holds the name of the SQL Server (This is the name/location or IP address 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 this application 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 application and 'drastically reduce the performance! '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 & ";" 'Set true and false for db strDBFalse = 0 strDBTrue = 1 'Set the lock variavbles for the db strDBNoLock = " WITH (NOLOCK) " strRowLock = " WITH (ROWLOCK) " 'Set the Limit opertaor for SQL Server strDBTop1 = " TOP 1" End If '****************************************** '*** mySQL Database System **** '****************************************** If strDatabaseType = "mySQL" Then 'mySQL is a free database server, it's a very fast and robust, this requires that you have 'installed an instance of mySQL 4 or higher and have created an database for the Guestbook 'on the mySQL database system 'Enter the details of your mySQL and database below strSQLServerName = "localhost" 'Holds the name of the mySQL (This is the name/location or IP address of the mySQL) strSQLDBUserName = "maplesyrupv" 'Holds the user name (for mySQL Authentication) strSQLDBPassword = "ariss94" 'Holds the password (for mySQL Authentication) strSQLDBName = "maplesyrupvGB" 'Holds name of a database on the server 'This application requires the myODBC 3.51 driver or higher 'myODBC Driver 3.51 strCon = "Driver={MySQL ODBC 3.51 Driver};Server=" & strSQLServerName & ";User=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";Port=3306;Option=3;" 'Set true and false for db (true value is -1) strDBFalse = 0 strDBTrue = -1 'Set the limit operator strDBLimit1 = " LIMIT 1" End If 'Set up the database table name prefix '(This is useful if you are running multiple Guestbooks from one database) Const strDbTable = "tblGB" %>