Приглашаем посетить
Набоков (nabokov-lit.ru)

Voting Booth

#######################################################################
#                                                                     #
#                 vote.cgi - v2.0 - by Michael Hall               #
#                                                                     #
#         Copyright ©1996 by Virtual Marketing Technologies.          #
#                         All Rights Reserved.                        #
#                                                                     #
# The user of this script is licensed to use this script on one       #
# machine only for non-commercial use only.  For commercial use, a    #
# payment is required.  See The Scripts Home at                       #
# "http://www.virtualcenter.com/scripts2" for more details.  Use of   #
# this script means acceptance of this license agreement.  Commercial #
# use of this script without payment is a violation of copyright laws #
# and subject to fines and/or prosecution.  If you have questions     #
# regarding the use of this script for commercial purposes, please    #
# e-mail vmt@airmail.net.  The author of this script cannot be held   #
# responsible for any errors or cause of loss due to this program.    #
# Use of this program is provided as is.  No other warranties are     #
# expressed or implied.                                               #
#                                                                     #
# If you do not pay for a license to use this program, you may not    #
# edit out any sections of this script that give credit and links to  #
# the author, The Scripts Home, and Virtual Marketing Technologies.   #
#                                                                     #
#######################################################################

CHANGES IN THIS VERSION
-----------------------

This is a major upgrade from version 1.1 as it has been totally rewritten
from the ground up.  It no longer writes the results to an HTML page and
should prove to be more compatible to most machines.

Also, the script now only allows a user to vote once on each topic.



INSTRUCTIONS FOR SETTING UP THE VOTE.CGI SCRIPT

This script requires atleast Perl v4 to run.  Place it in your cgi-lib
directory on your web server and "chmod 755" to turn it into an
executable script.

You'll need to do some adjusting to the script to customize it for your
own site.  Find the section of the script titled "Edit the following
variables...." and make the following changes:

	$BaseDir = "/var/www/docs/votes/";
		Change this path to the path where your voting files will be.
		
	$Header
		Edit all HTML between the two "EOT" tags with standard HTML.  There
		is no need to worry about quotes.  Just place the HTML in as you
		would any normal web page.  Everything in the $Header tag will be
		displayed at the top of the results page on each voting topic.
		
	$Footer
		This is the same as the $Header tag only this is what will be
		displayed at the bottom of the results page for each voting topic.
		
Now you'll need to edit the included "oscars" file.  You'll need one of
these files for each vote topic you run.  It is a standard Unix text
file that is the name of the topic.  For this example, we're allowing
our users to vote on their favorite Oscar nominated movie.

Within this file, you'll need the following information:

The very first line should have the name of this topic.  Each additional
line after that should start with the choice seperated by two colons (:)
and a zero (0).  Save this file and put it in the same directory you
specified as "$BaseDir" in the vote script.  Make sure you "chmod 777"
this file since the script will need to constantly read and rewrite this
file.

Now, you'll need to edit the included "Vote2.html" file for your
own vote form.  You can name this anything you want as you can have as
many of these voting pages as you like, with only the need for one
script.

You can design it in any way.  Just make sure you set up links (either
around text or around pictures) that call the script.  Each vote choice
is called in the following manner:

	<a href="/cgi-bin/vote.cgi?option=1&topic=oscars">Your Choice</a>
	
where "/cgi-bin/vote.cgi" points the browser to wherever you put the
"vote.cgi" script, "option=1" tells the script which choice this is,
and "topic=oscars" tells the script which topic it is.  This should be
the same name as the file you saved above.  The voting script will load
this text file during the voting process.
	
So, the first choice should be "1", the second choice should be "2",
and so on.  You can have as many choices in a voting topic as you
want.

You can also allow them to view the current results without voting by
setting up a link just like the regular choices above but set "option"
to "option=results" instead of a number.

You can go by the example form for an idea of how to set up your own.


NOTICE ON SUPPORT
-----------------

Support is available only to those who purchased support when they purchased this script.
To gain that support, simply send an e-mail to "vmt@airmail.net" and include
the support number you got with the e-mail for this script.

If you did not purchase the support but find you are having problems, a special
message forum has been set up in The Scripts Home at "http://www.virtualcenter.com/scripts2"
for those needing help.  If you are able to successfully setup this program, please stop
by these message forums and help others set them up.

If you need help, please post a message to this message forum.  DO NOT send e-mail to the
author or Virtual Marketing Technologies unless you have purchased a license.  These scripts
are provided at no charge for personal, non-commercial use and we simply don't have the
resources to provide further support at no charge.


NOTICE ON INSTALLATION
----------------------

Installation of this program is available from Virtual Marketing Technologies at the
standard rate of $60/hour (minimum 1 hour).  If you find it too difficult to install
this program on your own, you may request custom installation.  $60 is due immediately
before installation can be started.  Commercial sites must also include the cost of
the program along with the $60 installation charge.