#########################################################################
#
#	My Guestbook V4.0
#
#	Copyright, 1998. Jim Melanson, Jim Melanson Web Design.
#	webmaster@thebeaches.to - www.thebeaches.to/jmwd/index.html
#
#	You are free to use this script as you see fit provided
#	that all Copyright information remains intact. Furthermore, you 
#	may redistribute this script under the terms of Charity-Ware which
#	can be found at www.thebeaches.to/jmwd/charity_ware/index.html
#
#	By configuring and or loading this script, you agree to indemnify
#	Jim Melanson and Jim Melanson Web Design from any loss or damage,
#	however caused, including but not limited to negligence, error,
#	misconfiguration, abuse. If the laws governing your local area
#	do not allow such a limitation of exclusion then you do not
#	have my permission to use this script.
#
#########################################################################

Thank youfor considering "My Guestbook V4.0" as your web sites guest book.
This script offers a good looking guestbook script that is ideal
for a personal web site of small business web site. 

This script uses "Attack_Guard_V1.1(Revised)" as it's parsing script. This 
contains a few hefty features. It makes a great effort to remove any 
attempts to hack into your server through your scripts. It removes all 
HTML tags from the guestbook submissions. It also includes a date 
subroutine.

#########################################################################

				V2.0 UPGRADE
			    (August 14th, 1998)

Version 2.0 contains a few upgrades that are decidedly helpful in managing
a guestbook. 

The main upgrade is that you have an approval option. If you
set the approval option, all entries will go to an approval file BEFORE
appearing in the guestbook. You review the approval file and have the choice
of approving an entry for posting to the guestbook, removing an entry so
that it does not appear in the guestbook and holding an entry for later
approval. Actually, if you don't make a choice on the approval page then
that entry will automatically be held for you.

Secondly, you have the option of removing old entries that appear in the
guestbook. From the approval page, follow the "Remove Old Entries" button
and you will be presented with a numbered list of current entries in the
guestbook. You remove entries by entering a single entry number (i.e. '5')
or a range of numbers (i.e. 'From: 1 To: 16').

If your using V1.0 of My Guestbook, set the path to the data directory the
same as with the V1.0 release and this script will use the old guestbook
data files.

V2.0 now uses 'Attack Guard V1.1(Revised)'. This revised script is the same
as the popular 'Attack Guard V1.1' but has a few modifications to suit the
needs of the guestbook. DO NOT USE 'Attack Guard V1.1(Revised)' WITH ANY
OTHER SCRIPT. DOWNLOAD AN UNREVISED VERSION FROM:
	http://www.thebeaches.to/jmwd/charity_ware/attack_guard.html


				V3.0 UPGRADE
			    (January 11th, 1999)

The V3.0 upgrade was brought about because of an idea from Gilnei Moraes.
There is a third approval option added to this release. To prevent people
from posting content with no email address or with a bad email address.

Set the approval variable to '2' and when someone posts to the guestbook,
their entry is held in an approval directory. The program then sends them
an email to the email address they entered with a confirmation number. The
poster simply clicks the confirmation link in their email and the posting
is then posted straight into the guestbook.

If they entered a fake email address they won't get the confirmation
message. If they don't get it or they just don't confirm it, the pending
postings in the confirmation approval directory will be erased after 48Hrs
has elapsed.

This will be of great benefit to those who have had problems with nasty
posts from those who act behind a veil of anonymity!


				V4.0 UPGRADE
			    (October 19, 1999)

The version 4.0 upgrade is for installation and administrative changes
behind the scenes. The end user will see no difference at all.

First off, when setting the guestbook up you no longer have to worry about
creating a $Data directory or setting the absolute path for this directory
as the program reads your server space and creates it's own data structure.

Next, the attack guard routine/script has been replaced by the utility
scripts parse.pl and date.pl. The same level of protection that attack guard
offered is still present in parse.pl.

Next, the email message file no longer is shipped with the program as it's
generated by the setup routine. You can change the content of it any time
you want after you have setup the program.

Next, the confirmation email message file no longer is shipped with the program as it's
generated by the setup routine. You can change the content of it any time
you want after you have setup the program. The only Quid Pro Quo is that
you MUST leave the tag: <<<confirmation>>> in the file. This is what tells
the program where to print out the confirmation link in the confirmation email
message. If you don't leave this in, the confirmation procedure won't work.

Next, no more separate text file for the bad words list. It is now an
array in the config file that you can add words to at will.

Finally, the setup routine automatically creates and index.html document in
the data space to keep prying eyes from stumbling over your data files. If
your servers default directory page is named something other than
index.html (like default.html or index.htm) then you will have to change
the name of this file after the program has been setup.

#########################################################################

				FILES

There are six files, besides this Readme file, with this program.

	1)	The first file is "my_guestbook.cgi". This is the main
		script and you do not have to change anything in this script.
		It is a "Load & CHMOD" script.

	2)	The second file is "my_config.cgi". This script contains all
		nine variables that must be set by the user. These are 
		described below.

	3-4)    The utility scripts 'parse.pl' and 'date.pl' 
		are also Load and CHMOD scripts. No changes required.

	5)	'setup.pl'. Load and CHMOD to 755 then call it to setup 
		the program, follow on-screen instructions.

	   *** All other files will be generated by the program.

#########################################################################

			     SETTING VARIABLES

There are eleven variables in the 'gb_config.cgi' file that must be set
by the user.

$SiteName = "My Guestbook Co.";
	# Name of the company or website this guestbook is being used for.
	# It will appear on all guestbook pages.

$FromEmail = "theirname\@theirisp.com";
	# Email address of the person responsible for administering the 
	# website guestbook. Use the your e-mail or the e-mail address of
	# the person you are setting this script up for. If you are using
	# this guestbook for yourself, then you will put your e-mail here.
	# Make sure you have the backslash before the '@' symbol.

$WebsiteURL = "http://www.domain.com";
	# Full URL of the home page for the website using this guestbook.
	# When a viewer makes an entry in the guestbook, the results page
	# will contain a link back to the website. This is the link that
	# will be provided.

$MailProgram = "/usr/sbin/sendmail";
	# Absolute path for the sendmail program on your server. To find
	# the abs-path to sendmail, Telnet into your server and at the
	# command prompt, type "whereis sendmail". You will receive three
	# or four options but the one you want is the one closest or 
	# identical to above.

$ThankYouMail = 1;
	# If you wish to have an acknowledgement e-mail message sent out
	# automatically to the person submitting an entry to the guestbook, 
	# set this variable to 1. If you do not wish to have automatic 
	# e-mail acknowledgement then set it to 0.

$EmailNotify = 0;
	# If you wish to have a notification e-mail message sent out to you
	# automatically whenever someone posts comments, set this variable 
	# to '1'. If you do not wish to be notified via email whenever
	# someone posts comments, then leave this set to '0'.

$Approval = '2';
	# There are three approval options, place the number 0, 1, or 2
	# with the above variable to activate that option.
	# Option '0': If you do not wish any approval of submissions and
	# want them posted directly to the guestbook, set this value to '0'.
	# Option '1': If you wish to approve all guestbook submissions,
	# before they are actually posted to the guestbook, set this 
	# value to '1'.
	# Option '2': If you wish to have all posting held and confirmed
	# via email to the poster, set this option to '2'. This last option
	# will deliver the poster a confirmation e-mail with a link in it.
	# They must click that link to have their posting added to the
	# guestbook. Failure to do so will erase the held posting in 48 hrs.


@BadWords = ('damn', 'moron', 'idiot');
	# If you wish to have the program remove any banned words, 
	#specify the bad words in this array. Be creative. If you don't
	#want any bad words removed, set this to a null value:
	#		@BadWords = ();

########################## LOADING & CHMOD'ing ######################### 

In your cgi-bin/directory, you will place gb_config.cgi, my_guestbook.cgi,
setup.pl, parse.pl, date.pl and redirect_html.pl. Each of these scripts 
must be CHMOD 755 (rwx-rx-rx)

#########################################################################

			     CALLING THE SCRIPT

There are two URL's that you you need to run this script.  To call the
guestbook for people to view or make submission to, the URL is:

	www.yourcompany.com/your_page/cgi/path/to/script/my_guestbook.cgi

For the admin page (approval of entries and removal of old entries) the
URL is:

  www.yourcompany.com/your_page/cgi/path/to/script/my_guestbook.cgi?admin

NOTE: Before you can do anything, however, you must set up the program.
This is done by typing the URL to the setup script in your browsers address
line:

	www.yourcompany.com/your_page/cgi/path/to/script/setup.pl

Once you have done this, follow the onscreen instructions.

	NOTE: This program creates it's own data directory structure and
	you do not have to specify any data directories. The program will
	create two directories 'jmcw_logs' and 'jmcw_logs/guestbook_v4'.
	If you have any other Charity Ware programs that were written
	after October 1st, 1999, then they will all share the data 
	directory 'jmcw_logs'.

#########################################################################

	If you have any problems setting up the script or making it run,
	I have an extensive FAQ section on these topics at:

			http://www.thebeaches.to/jmwd/faq/

#########################################################################

That's it. Enjoy. If you wish to have some customization work done then
contact me at webmaster@thebeaches.to for a quote. The rates are very
reasonable. 

Jim Melanson
Pefferlaw, Ontario
January 11th, 1999.
