WebSupport (c)Copyright 1999-2002 DHWW.org

Author:		DHWW - Bismarck Tan (bizzy@dhww.org)
Email:		websupport@dhww.org
Web:		http://websupport.sourceforge.net
Version:	1.0


---------------------
 1. Copyright Notice
---------------------
All distributed software, papers, and other works are free to use by any
individual, organization, or commercial venture as long as the following
conditions are agreed to:

    1. All copyright notices, and headers remain intact and
       unmodified in the source.
    2. The 'Powered by WebSupport v1.0' text remains/is placed
       on the links home page.
    3. The text is linked to:
		http://websupport.sourceforge.net


Selling the code for this program, or a program derived from WebSupport,
without prior written consent is expressly forbidden. Similarly,
redistributing this program, or a program derived from WebSupport, over
the Internet, CD-Rom or any other medium is expressly forbidden without 
prior written consent. By using this program you agree to indemnify 
DHWW and company, WebSupport.sourceforge.net. from any liability.


-----------------
 2. Introduction
-----------------
WebSupport is a CGI application that generates a unique ticket number to 
track requests by customers. It is designed specifically for web hosting
companies to assist the support team.

WebSupport consists of two scripts: index.cgi and admin.cgi

index.cgi	- Gets input from user and issues a ticket
         	- Allows user to view his/her ticket request
admin.cgi	- Lists all the current ticket requests
		- Allows administrator to update ticket or change its 
status
		- Allows administrator to email user without an external 
email
	    	  client.


------------------------
 3. System Requirements
------------------------
WebSupport requires the following:

    o A Unix platform. WebSupport does NOT run on WinNT systems.
    o A working copy of Perl 5 (might have problems on versions less then
      5.002).
    o WebSupport requires CGI.pm, a standard module included in standard
      perl distributions. The latest version can be found at:
            
            http://stein.cshl.org/WWW/software/CGI/


-----------------
 4. Installation
-----------------
If you are comfortable with Perl, here's some instructions that
should get the script up and running quickly.

1. Unzip the distribution and upload everything in ASCII mode to a
   directory on your server that can run cgi.
                
   You can rename the directories or store them elsewhere (not
   neccessary for the files to be in the same directory as the scripts).

2. Double check that the Path to perl is correct. The program defaults 
   with
        #!/usr/bin/perl
  
   If this is incorrect, you'll need to edit the first line of every .cgi
   program, and change it to where you have Perl version 5 installed.


3. Set permissions:
        chmod 755 (-rwxr-xr-x) on all .cgi, .pl and .conf files.
        chmod 666 (-rw-rw-rw-) on all files in the database directory.
        chmod 666 (-rw-rw-rw-) on all your template files
        chmod 777 (drwxrwxrwx) on the database directory
        chmod 777 (drwxrwxrwx) on the templates directory

4. Edit ws.conf:
	- Do not remove or change this line
		$version_no = '1.0';
	- Your domain name or server address that calls the script
		@referers = ('www.dhww.org','66.96.223.16');
	
	- Server path to the main database
		$maindb = '/home/www/ws/db/data.db';
	- Server path to the count file
		$countdb = '/home/www/ws/db/count.db';
	
	- Server path to templates directory (include trailing slash)
		$base_path = '/home/www/ws/tpl/';
	- File name for New Request template
		$new_request_tpl = $base_path . 'new.html';
	- File name for Request Details template
		$request_details_tpl = $base_path . 'details.html';
	- File name for View Status template
		$view_status_tpl = $base_path . 'status.html';
	- File name for Ticket Status template
		$ticket_view_tpl = $base_path . 'ticket.html';
	- File name for Error Page template
		$error_page_tpl = $base_path . 'error.html';
	- File name for Email message template
		$email_tpl = $base_path . 'email.tpl';
	- File name for Completed Ticket Notification template
		$notify_tpl = $base_path . 'notify.tpl';
	
	- Server path to sendmail program
		$mailprog = '/usr/sbin/sendmail';
	
	- Set to 1 to notify for new requests
		$notify = 1;
	- Administrator's email address
		$notifywho = 'disturb@me.com';

5. Make sure that all .cgi scripts point to the correct path where your 
   ws.conf and ws-lib.pl resides:
	require '/home/www/ws/ws.conf';
	require '/home/www/ws/ws-lib.pl';

6. Give it a test!

   To create a new ticket:
	http://yourserver.com/cgi-bin/ws/index.cgi

   To view a ticket:
	http://yourserver.com/cgi-bin/ws/index.cgi/view

   To view current requests (ADMIN):
	http://yourserver.com/cgi-bin/ws/admin.cgi

   To view all requests, included completed ones (ADMIN):
	http://yourserver.com/cgi-bin/ws/admin.cgi/full
    
   If everything goes ok, you should be all done!


------------------
 5. Customization
------------------
All html pages generated by the WebSupport script are template based.
This excludes the administration pages since no one but the
administration team will be view those pages. By default, the templates
are found in the /tpl directory. You can change this by editing the
ws.conf file. 

Any variables found on these templates are enclosed in brackets ([ ]).
Below is a list of the variables available for use in each template:

o new.html
  This is the html page for accepting new ticket requests.

  [VERSION NUMBER]   	Shows the software version number
			Please do not remove this line unless you have
			registered for this program!

o details.html
  This is the html page for showing the ticket details after the
  submission has been accepted.

  [EMAIL]	     	Shows the user's email address
  [TICKET]	     	Shows the user's ticket number
  [NAME]		Shows the user's name
  [USERNAME]		Shows the user's username
  [DOMAIN]           	Shows the user's domain address
  [PRIORITY]         	Shows the priority of the user's request
  [PROBLEM]          	Shows the user's problem
  [VERSION NUMBER]   	Shows the software version number
		     	Please do not remove this line unless you have
		     	registered for this program!

o status.html
  This is the html page for users to check their ticket

  [SCRIPT_URL]	     	Sets the path to the script
		     	Please do not remove or change this line!
  [VERSION NUMBER]   	Shows the software version number
		     	Please do not remove this line unless you have
		     	registered for this program!

o ticket.html
  This is the html page for showing the ticket details after user has
  been verified

  [EMAIL]	     	Shows the user's email address
  [TICKET]	     	Shows the user's ticket number
  [NAME]	     	Shows the user's name
  [USERNAME]            Shows the user's username
  [DOMAIN]           	Shows the user's domain address
  [PRIORITY]         	Shows the priority of the user's request
  [PROBLEM]          	Shows the user's problem
  [SOLUTION]            Shows the solution to the user's problem
  [VERSION NUMBER]   	Shows the software version number
		     	Please do not remove this line unless you have
		     	registered for this program!

o error.html
  This is the html page for outputing error messages

  [ERROR MESSAGE]    	Shows the error message(s)
		     	Please do not remove or change this line!
  [VERSION NUMBER]   	Shows the software version number
		     	Please do not remove this line unless you have
		     	registered for this program!


-------------
 6. Security
-------------
This program has no built-in security for the admin programs. It is 
strongly recommended to use an htpasswd type security on the admin
directory. Also, I've included some security tips that you ought to 
follow:
    
1. Try keeping all your data files OUT of the public_html directory 
   so that users cannot access it through the WWW.
2. Put your administration scripts in another directory, either in the
   cgi-bin or password protect the directory using .htaccess (if running
   Apache). Leaving it not password protected is a major security risk!


---------------------
 7. Acknowledgements
---------------------
  - DHWW.org acquired WebSupport on 8/04/01.
  - Melissa Peh (http://www.sigh.org) -  the original author of WebSupport.
  - Chris Hughes (http://www.twelve.net)
  - Susanne Bullo (http://www.sweethomes.com)
  - Last but not least, thanks to the many others who found bugs, thought
    of features, submitted patches, and other things which are too many 
    to begin to list.


--------------------
 8. Support/Contact
--------------------
email: websupport@dhww.org
http://websupport.sourceforge.net