#!/usr/bin/perl ############################################################################################ # AnyVote # $version = 1.31; # # Released : 14th June 1999 # # Written by Jonathan Cogley # Copyright 1998. THYCOTIC WEBDESIGN # http://www.thycotic.com # E-Mail : info@thycotic.com # ############################################################################################ # This script may not be sold or distributed in any other form # without the permission of Thycotic WebDesign. # # Please note that the script is supplied as is under the Shareware agreement. You are # not permitted to customise the actual code without permission by Thycotic WebDesign. # If you wish to customise Anyvote further then you will have to contact us to purchase a # commercial license. ########################################################################################### ########################################################################################### # # READ THIS! # # This file contains all the configuration information and installation instructions for # Anyvote. Simply work your way down this file, reading all the instructions as you go! :) # NOTE: The Changes History is still contained in the anyvote.cgi file. # ########################################################################################### ########################################################################################### # # DESCRIPTION # # This script uses server side includes to present the viewer with a choice of options for # which to vote. If their favourite is not there, they can easily 'suggest' it be added. # 'Suggestions' can easily be added to the voting pool using the admin functions of the # script. This script is ideal for voting on a topic such as your favourite music band # - the script was originally written for that exact purpose :) - where there are limitless # options and it must be easy to allow the visitor to suggest new options. # ########################################################################################### # # INSTALLATION INSTRUCTIONS # # Okay, so now to get this script working? (in 4 easy steps) # # 1. Upload all 7 of the files in ASCII mode to their own directory # # 2. Set the File Permissions: # vote.dat (CHMOD 777) - Voting data file - must be writeable # waiting.dat (CHMOD 777) - Voting waiting data file - must be writeable # reject.dat (CHMOD 777) - Optional (stores rejected suggestions if you opt to allow this) # voteip.dat (CHMOD 777) - IP tracking file - must be writeable # voteip.log (CHMOD 777) - Vote logging file (stores who is voting) - must be writeable # anyvote.cgi (CHMOD 755) - the script must be executable # config.cgi (CHMOD 755) - this will prevent anyone reading your configuration settings! :) # # 3. Edit the following configuration variables in config.cgi (this file) # - Ensure the top line of the script points to Perl on your server # e.g. #!/usr/bin/perl # You can use 'whereis perl' at the telnet prompt to find perl on your server # ########################################################################################### ########################### # Configuration variables # ########################### ######## $SCRIPTURL must give the relative URL to the anyvote.cgi script $SCRIPTURL = "http://www.whatever.com/anyvote/anyvote.cgi"; ######## $VOTEDATA must give the path to the vote.dat file which stores vote information $VOTEDATA = "/www/htdocs/anyvote/vote.dat"; ######## Prevent people from voting again right away? ######## (you probably want this; 1=yes, 0=no) $LOGIP = 1; ######## $VOTEIP must give the path to the voteip.dat file for storing voters ip addresses $VOTEIP = "/www/htdocs/anyvote/voteip.dat"; ######## Stops last "however many" people from voting again - I recommend 10? $IPBLOCKNUM = 10; ######## $WAITING must give the path to the waiting.dat file $WAITING = "/www/htdocs/anyvote/waiting.dat"; ####### Do you want to have a rejected suggestion list? (1 = yes, 0 = no) ####### This may help potential suggesters to see what has already been rejected. It can ####### also be quite amusing for visitors if some suggestions are outrageous for your topic! :) $REJECT = 1; #File to store rejection list in ... $REJFILE = "/www/htdocs/anyvote/reject.dat"; ######## $USELOGGING Do you want to log all votes (logs vote,ip address,hostname)? (1=yes,0=no) $USELOGGING = 1; #File to store logging in ... $VOTELOG = "/www/htdocs/anyvote/voteip.log"; ####### $ADMIN is the Administration password ####### Make use of the admin functions by calling the script as follows: ####### http://www.whatever.com/anyvote/anyvote.cgi?secret $ADMIN = "secret"; ####### $RETURNURL is the URL of the page to link back to after voting $RETURNURL = "http://www.whatever.com/anyvote/front.shtml"; ####### $RETURNTEXT is the link text for the $RETURNURL $RETURNTEXT = "Back to previous page ..."; ####### Anchor TARGET tag for hyperlinks ####### Set to equal to "_top" if you want hyperlinks to clear all frames and start from the top. ####### If you have no idea what I am talking about then leave it blank or go read some documentation ####### on HTML frames to learn more ... $TARGETTAG = ""; ############################################################################################ # # 4. Last step, include a SSI call to the script in one of your html pages # e.g. # # # # Note: You often have to give the html page the extension .shtml for the # SSI call to work. # # # There are some further OPTIONAL configuration variables which can be # found just below this installation guide. # ############################################################################################ # # If you like this script, please register it! Only $10/£10 to get a registered version! # It will encourage us to produce more scripts like Anyvote! # http://www.thycotic.com/scripts # E-Mail: info@thycotic.com # ############################################################################################ # $BODYTAG defines the body tag for generated pages - duh! ;) # $DEFAULT is the top line of the vote options # $USEIMAGES determines whether images will be used when showing top ten # $USE_BAR determines whether the bar image will be used to show bar graph # $MAX_BAR_LENGTH gives the maximum length of a bar (ie.100%) for the bar graph # $IMAGEPATH is the path to the images for the top ten # images should be in the form of ball1.gif, ball2.gif -> ball10.gif # $MAXLENGTH sets the number of characters a user may enter when suggesting # $SUGGEST_STARTVOTE gives the start number of votes for a suggested item # $MANUALADD_STARTVOTE gives the start number of votes for an Admin added item # ############################################################################################ # The configuration below is optional and not essential ############################################################################################ #Body tag for generated pages $BODYTAG = ""; #Default option for drop-down list $DEFAULT = "Choose your favourite something!"; #Allow Admin to remove current voting items? #(this can be dangerous if you accidentally delete an item from your current list; 1=yes, 0=no) $REMOVEFROMMAIN = 1; #use ball images to show the top ten? 1=yes, 0=no $USEIMAGES = 1; #use bar image to show bar graph of the top ten? 1=yes, 0=no $USE_BAR = 1; $MAX_BAR_LENGTH = 100; # this is the value in pixels of an item having 100% of the votes #URL to the images that will be used to show top ten if images are used $IMAGEPATH = "http://www.whatever.com/anyvote/images"; #Amount of characters to allow in suggestion input box (Recommend about 40-50) $MAXLENGTH = 40; #The default number of votes new voting items should start with #when being added to the vote list from the Admin screen #(I would recommend 1 for $SUGGEST_STARTVOTE since someone suggested it) $SUGGEST_STARTVOTE = 1; #(I would recommend 0 for $MANUALADD_STARTVOTE since the Admin person added it) $MANUALADD_STARTVOTE = 0; # DO NOT REMOVE OR CHANGE THIS NEXT LINE! # The 1 tells the PERL interpreter that it has successfully loaded the config options. 1;