#!/usr/bin/perl $directory_gbook = "/home/???/xxentry.txt"; $guestbook = "http://???/xxentry.txt"; $cgi = "http://www.???/reg.cgi"; $base = "http://www.???/add.htm"; $gif1 = "add.gif"; $gif2 = "miss.gif"; $gif3 = "thanks.gif"; $gif4 = "blueline.gif"; $mail = 0; $mailto = 'support@???'; ############################################################ #Don't touch, these are necessary to run the script! $mailprog = '/usr/lib/sendmail'; $entry = 1; $allow = 1; $date_command = "/usr/bin/date"; ############################################################ $date = `$date_command +"%B %d, %Y"`; chop($date); 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;   $value =~ s///g;   if ($allow != 1) {      $value =~ s/<([^>]|\n)*>//g;   }   $FORM{$name} = $value; } ######## #Checks to see that the comments, name and e-mail address were added! #&no_comments unless $FORM{'comments'}; #&no_name unless $FORM{'name'}; #&no_email unless $FORM{'email'}; ###### #Checks to see if the E-mail address is in the normal form, #yourname@yourcompany.com #if (&email_check($FORM{'email'})) { #} #else { #&no_email; #} ####### #Opens 'shopentry.html' for writting open (FILE,"$directory_gbook") || die "Can't Open $directory_gbook: $!\n"; @LINES=; close(FILE); $SIZE=@LINES; # Open Link File to Output open (GUEST,">$directory_gbook") || die "Can't Open $directory_gbook: $!\n"; for ($i=0;$i<=$SIZE;$i++) {   $_=$LINES[$i];   if (//) {      if ($entry eq '1') {         print GUEST "\n";      }         print GUEST "\n";      if ( $FORM{'150'}) {         print GUEST "  \n";         }      if ($FORM{'152'}) {         print GUEST "\n";      }      if ($FORM{'151'}) {         print GUEST "\n";      }      if ($FORM{'1100'}) {         print GUEST "\n";      } #      if ($FORM{'151'} ne "http://") { #         print GUEST "\n"; #      } #      else { #      } #      if ( $FORM{'city'} ){ #         print GUEST "\n"; #      }      print GUEST " \n";      print GUEST "
150$FORM{'150'}
152 $FORM{'152'}
151 $FORM{'151'}
1100 $FORM{'1100'}
My URL: $FORM{'url'}
Location: $FORM{'city'}"; #         print GUEST ", $FORM{'state'}     $FORM{'country'}
Comments:  $FORM{'comments'}

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


\n\n\n";      if ($entry eq '0') {         print GUEST "