###########################################################
#  A Postcard 2.11 Program				  #
#  Written by Jason W. Maloney - December 20, 1998	  #
#							  #
#  This script is very easy to set-up, even for those     #
#  just starting out with CGI.  It shouldn't take longer  #
#  than 10 minutes to get it up and ruuning.              #
#							  #
#  I do not take responsibility for any problems this     #
#  script may cause.  It has been tested on UNIX servers  #
#  and no problems have discovered.			  #
#							  #
#  The use of templates make it very easy to customize    #
#  the postcard script to your needs.			  #
###########################################################

Instructions
  1.) Change the top portion of the script to meet your servers requirements.
  2.) Upload the files to your server....
  3.) Then set the permissions..

###################################################
###################################################
1.) Change the Following...

  These three variables are the URL's of the main postcard file, where the pictures will be kept,
  and the cgi of the postcard, respectively. These need to be changed according to your server

	$location = "http://www.aestheticsurgerycenter.com/postcard/";
	$basepicurl = "http://www.aestheticsurgerycenter.com/postcard/pictures/";
	$cgi = "http://www.aestheticsurgerycenter.com/postcard/card.cgi";

  These are the directories of the template files and locatation of the picture folder.  
  So if '$preview1' will be stored at http://www.yourcompany.com/postcard/preview1.html, then 
  leave '$preview1' the same.   This '$ENV{DOCUMENT_ROOT}' finds the exact location of the 
  path to the files, so let it there.  
	
        $cards = "$ENV{DOCUMENT_ROOT}/postcard/cards/";
        $preview1 = "$ENV{DOCUMENT_ROOT}/postcard/preview1.html";
        $preview2 = "$ENV{DOCUMENT_ROOT}/postcard/preview2.html";
	$makecard = "$ENV{DOCUMENT_ROOT}/postcard/makecard.html";
	$thank_you = "$ENV{DOCUMENT_ROOT}/postcard/thankyou.html";
	$error = "$ENV{DOCUMENT_ROOT}/postcard/error.html";
	$email1 = "$ENV{DOCUMENT_ROOT}/postcard/email1.txt";
	$email2 = "$ENV{DOCUMENT_ROOT}/postcard/email2.txt";
 
  This is location of your email program, if you don't know it, ask you ISP, but this is the 
  most commonly recognized variable.

	$mailprog = '/usr/lib/sendmail';

  This is the number of days you want the postcard to remain on the server.

	$MAX_DAYS = '10';

  The following two variables are subject headers of the e-mail's being sent. $subject1 is 
  the subject header of the e-mail being sent to the recipient while $subject2 is the 
  subject header of the e-mail received by the sender when the postcard was picked up by
  the recipient!

	$subject1 = "You Have A Postcard!";
	$subject2 = "The Postcard was Pickup!";


2 & 3.) Upload the files to your server and give the following permissions....

/postcard/ 
	/preview.html	-        chmod 755
	/makecard.html	-        chmod 755
	/thankyou.html	-        chmod 755
	/error.html     -        chmod 755
	/email1.txt     -        chmod 755
	/email2.txt     -        chmod 755
	/card.cgi*     	-        chmod 755

/postcard/cards/	-	 chmod 755

 *Some hosts make you put your cgi scripts in a separate '/cgi-bin/', if so, please
  place the script in your cgi-bin, rather than in the /postcard/ folder.  But if 
  you can place the script in any folder, than place it within /postcard


/postcard/pictures/**
	/waterfall.jpg
	/beach.jpg
        /snowmts.jpg
        /nights.jpg
	
 **Please place all photos here.

########################################################	 
########################################################
########################################################
In changing the template files, you can edit them in any way you want.  However,
you must not change them around, i.e, leave the %%% before and after the variables 
or else it will not work.

the variables do the following and thus can add them to any of the template files..


%%%PICTURES%%%		- URL of the Picture
%%%SENDER%%%		- The name of the sender
%%%MAILFROM%%%		- The e-mail of the sender
%%%RECIPIENT%%%		- The name of the recipient
%%%MAILTO%%%		- The e-mail of the recipient
%%%MESSAGE%%%		- The message
%%%CGI%%%		- The URL of card.cgi
%%%MAX_DAYS%%%		- The max number of days on the server
%%%SHORTDATE%%%		- The exact date in the format - MONTH DAY, YEAR at TIME
%%%url_of_card%%%	- The URL of the postcard that was created



########################################################	 
########################################################
########################################################
Editing the main page of the postcard script...
IF you open the file, you should see the following...
You need to change the 'http:' part to point to your own server

	<FORM METHOD=POST ACTION="http://www.company.com/postcard/card.cgi">

To add your own pictures, link the 'http://' to the picture on your server.  Then for the
value, input the name of the picture, so if you have the picture 'bluefish.jpg' then type in
'bluefish.jpg' for VALUE.  it is pretty self-explanatory.

   <TD WIDTH=75 ALIGN=CENTER>
     <IMG SRC="http://www.company.com/postcard/pictures/bluefish.jpg" HEIGHT=107 WIDTH=75 BORDER=1><BR>
     <INPUT TYPE="radio" NAME="PICTURES" VALUE="bluefish.jpg"></TD>

########################################################
If you have any further questions or comments, please feel free to e-mail.
########################################################

Thank you,
Jason Maloney
http://www2.bc.edu/~malonejr
malonejr@bc.edu