#!/usr/local/bin/perl # Name valentine.pl # Date 14 Feb 1996 # Author Kang SoonLAi # # ############################################################################### print "Content-type: text/html\n\n"; # Get the input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Split the name-value pairs @pairs = split(/&/, $buffer); $i = 0; foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); # Un-Webify plus signs and %-encoding $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; # Stop people from using subshells to execute commands # Not a big deal when using sendmail, but very important # when using UCB mail (aka mailx). $value =~ s/~!/ ~!/g; # Uncomment for debugging purposes # print "Setting $name to $value

"; $FORMVALUE{$i} = $value; $FORMNAME{$i} = $name; $i = $i + 1; } print "Love Delivered!\n"; print "\n"; if ($FORMVALUE{0}) { print "
"; print "
    "; print "\nDearest $FORMVALUE{0},\n

    "; print "I think it all the time and I don't say it enough . . .

    \n"; print "

    I LOVE YOU!\n

    &

    "; print " HAPPY VALENTINE'S DAY


    \n"; print "





    "; print "

    LOVE,
    \nCupid\n

"; print "
"; print "



"; print "Wanna leave Cupid a message?"; print "
Another Proud Product of "; print "designKY®
"; } else { print "


"; print "You need to enter your name in order to claim your LOVE."; print "
Click here to go back.

"; }