#!/usr/local/bin/perl # order2.pl # ITA online order form # 2/22/96 Brian Goldman # last modified 3/12/96 # Print out a content-type for HTTP/1.0 Compatibility print "Content-type: text/html\n\n"; print "\n"; # Print a title and initial heading print "
ITA On-Line Ordering - Order Verification\n"; print "

ITA On-Line Ordering

\n"; print "

Order Verification

\n"; print "
\n"; # Get The Input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Set varibles $gtotal = 0; $cardnumber = ""; $cardtype = ""; $expiredate = ""; # Split The Name-value Pairs @pairs = split(/&/, $buffer); 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; # Uncomment for debugging purposes # print "Setting $name to $value

"; $FORM{$name} = $value; } # -------------------------------------------------- $cardtype = $FORM{'cards'}; $cardnumber = $FORM{'cardno'}; $expiredate = $FORM{'expdate'}; $gtotal = $FORM{'amount'}; $gtotout = sprintf("%8.2f", $gtotal); # --------------------------------------------------- print "

"; 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 "\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 "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; # ------------------------------------------ # Print visible data for user to see print "


"; print "
"; print "Amount charged: $gtotout"; print "
"; print "Card Charged: $cardtype"; print "
"; print "Card number: $cardnumber"; print "
"; print "Experation Date: $expiredate"; print "
"; print "
"; print "
"; print "
"; print ""; print ""; exit;