#!/usr/local/bin/perl # ######################################################################### # # Perl Guestbook: By Calypso # # ######################################################################### # # This is a simple guestbook script (configured specificly for # # http://rebeccasghost.cjb.net # # ######################################################################### # # This code is free and may be redistributed as you please as long as these # # comments remain. Otherwise you will be asked to remove it. (unless I say # # you can take credits out :) # # ######################################################################### # # all options (0 = no) (1 = yes) # This is a simple online configuration tool. With it you can set some of # the common things on the site. $datafile = "datastore.dat"; # This is where we store all the options for the guestbook. $password = "password.psw"; # location of the password file. sub Read_Request{ if ($ENV{'CONTENT_LENGTH'} > 0){ read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @fields = split (/&/, $buffer); } else { $_ = "$ENV{'QUERY_STRING'}"; @fields = split (/&/, $_); } foreach $field (@fields){ ($name, $value) = split (/=/, $field); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } } &Read_Request; open (PASSWRD, "$password") || die("Error opening the password file.\n"); $passstore=; close(PASSWRD); if ((length($FORM{password}) < 1) || $passstore ne $FORM{password}){ print "Content-type: text/html\n\n"; print "\n"; print "\n"; print "$title\n"; print "\n"; print "
Make your own free website on Tripod.com
\n"; print "
\n"; print "\n"; print "
\n"; print "\n"; print "
\n"; print "\n"; print "
"; print "Password:
\n"; print "\n"; print "
\n"; print "\n"; exit; } # now we read it all out of the file. open (FILE,"$datafile") || die("Can't Open $datafile - for input\n"); $data=; chop($data); ($email, $title, $toptable, $bottomtable, $toptext, $bottomtext, $gnumber, $reqemail, $reqname, $requrl, $reqwwwname, $reqfound, $reqcomments, $sendemail, $logip, $topbanner, $bannerwidth, $bannerheight, $banneralt, $viewgrx, $viewwidth, $viewheight, $viewalt, $signgrx, $signwidth, $signheight, $signalt)=split(/õ/,$data); close(FILE); print "Content-type: text/html\n\n"; print "\n"; print "\n"; print "$title\n"; print "\n"; print "\n"; print "$banneralt
\n"; print "\n"; print "\n"; print ""; print "
\n"; print "$signalt\n"; print "\n"; print "$viewalt\n"; print "

\n"; print "\n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "
Owners Email Address
Title Of Guestbook
Top Portion Of Table Color
Bottom Portion Of Table Color
Text Color (Top Table)
Text Color (Bottom Table)
Number Of Guests Per Page
Require Name?
Require Email?
Require WWW URL?
Require WWW Name?
Require How They Found Your Site?
Require Comments?
Send Email To Owner When Book Is Signed.
Include Users IP Address
URL Of Top Banner
Top Banner Width
Top Banner Height
Banner Alt Tag
Sign Guestbook Graphic URL
Sign Guestbook Graphic Width
Sign Guestbook Graphic Height
Sign Graphic Alt Tag
View Guestbook Graphic URL
View Guestbook Graphic Width
View Guestbook Graphic Height
View Graphic Alt Tag
Old Password (Required for update)
New Password
Confirm New Password

\n"; print "  
\n"; print "
\n"; print "\n"; print "\n";