#!/usr/bin/perl # interaction.cgi - handles interaction responses # ------------------------------------------------------------ # Inspired by Form-mail.pl, by Reuven M. Lerner # ------------------------------------------------------------ # Copyright 1995 by One Click Systems. All Rights Reserved. # Portions Copyright 1994 by The Tech. # Define fairly-constants $mailprog = '/usr/sbin/sendmail'; $recipient = 'oneclick@best.com,info@accesscom.com'; # print "Content-type: text/html\n\n"; # Get input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); $buffer =~ s/\000//g; # Split the name-value pairs @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; $FORM{$name} = $value; } # if any response box checked, but no phone or email or fax, say so. if ($FORM{'callme'}. $FORM{'meetme'} . $FORM{'hireyou'} . $FORM{'interest'} . $FORM{'website'} . $FORM{'1stclass'} . $FORM{'consult'} ne '') { &blank_response unless length($FORM{'emailaddr'})>6 || length($FORM{'fax'})>5 || length($FORM{'phone'})>6; } # Send mail to $recipient open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n"; print MAIL "Reply-to: $FORM{'emailaddr'} ($FORM{'realname'})\n"; print MAIL "Subject: Web Interaction Response\n\n\n\n"; print MAIL "An interactive response has been entered by:\n"; print MAIL "------------------------------------------------------------\n"; print MAIL "Name: $FORM{'realname'}\n"; print MAIL "Title: $FORM{'title'}\n"; print MAIL "Email: $FORM{'emailaddr'}\n"; print MAIL "Phone: $FORM{'phone'}\n"; print MAIL "Fax: $FORM{'fax'}\n"; print MAIL "------------------------------------------------------------\n"; print MAIL "Checkboxes:\n"; print MAIL " Call me/questions: ",$FORM{'callme'},"\n"; print MAIL "Schedule a meeting: ",$FORM{'meetme'},"\n"; print MAIL " Ready to hire: ",$FORM{'hireyou'},"\n"; print MAIL " Interested.in: ",$FORM{'interest'},"\n"; print MAIL " Web/Elec. Pub.: ",$FORM{'website'},"\n"; print MAIL " FirstClass: ",$FORM{'1stclass'},"\n"; print MAIL " Network install: ",$FORM{'network'},"\n"; print MAIL " Consult/train: ",$FORM{'consult'},"\n"; print MAIL "------------------------------------------------------------\n"; print MAIL "Comments:\n"; print MAIL "$FORM{'comments'}"; print MAIL "\n-------\n"; print MAIL "$FORM{'comment2'}"; print MAIL "\n------------------------------------------------------------\n\n"; print MAIL "Technical info:\n"; print MAIL "Server protocol: $ENV{'SERVER_PROTOCOL'}\n"; print MAIL "Host browsed from: $ENV{'REMOTE_HOST'}\n"; print MAIL "IP browsed from: $ENV{'REMOTE_ADDR'}\n"; close (MAIL); print "
";
print "
Please use the \"Back\" command in your web browser program to return "; print "to the interaction form. Then, type in your number or address. Or, uncheck the boxes.
"; print "Or, click on the images below to move on without sending your response:
"; print "