#======================================== # V A R I A B L E S T O E D I T #- Script Configurations #- The directory where all the data files will be stored #- This directory must be chmoded to read/write(644). $base_dir = "/home/metro/htdocs/poll/data"; #- The file extension of the data files. $file_ext = "vote"; #- URL to the image file for the bar graphs $image_file = "http://www.telefragged.com/metro/poll/images/sdot.gif"; #- URL to vote.cgi $script_url = "http://www.telefragged.com/metro/poll/index.cgi"; #- URL to admin.cgi $admin_url = "http://www.telefragged.com/metro/poll/cool.cgi"; #- Length of the bar graphs. Just leave it at four unless #- you really want to make the graphs longer or shorter. $length = "4"; #- Height of the bar graph image file. If you are using #- the graphic that came with the scripts leave it at 10. $height = "10"; #- Set this to 1 if you wish to IP track, 0 if you don't #- want to. $check = 1; #- Password of the adminstration script. $password = "g00db0ts"; #- The website's name that is using this script $sitename = "Metropolis"; #- URL to your web site that is using this script $site_url = "http://www.telefragged.com/metro/"; #- HTML Preferences #- The Title of the voting center pages $title = "Metropolis Poll Board"; #- The text or image that will be at the top of every voting #- center page. Enter a URL to an image to display an image #- instead of some text. $heading = "http://www.telefragged.com/metro/logo1.jpg"; #- HTML Color preferences. $background = ""; $bgcolor = "000000"; $text_color = "ababab"; $link_color = "FFFFFF"; $vlink_color = "7d7d7d"; #- Table preferences $table_color = "660000"; $table_border = 0; $cellpadding = 4; $cellspacing = 2; # S T O P E D I T I N G H E R E #======================================= sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $value =~ s/<([^>]|\n)*>//g; $FORM{$name} = $value; } } sub parse_query { @pairs = split(/&/, $ENV{'QUERY_STRING'}); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $QUERY{$name} = $value; } } sub error { local($msg) = @_; print "Content-Type: text/html\n\n"; print "\n"; print "