#!/usr/bin/perl # req-quote.cgi - handles online service requests $0=~s/.*\///; $next="dsl-req2.cgi"; # This line prepares the server to parse HTML style output print "Content-type: text/html\n\n"; print "
"; print join('',`cat $ENV{'DOCUMENT_ROOT'}/stdhdr.html`)."";
# Get input from the form
if($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
} else {
$buffer=$ENV{'QUERY_STRING'};
}
$buffer =~ s/\000//g;
# Split the buffer into 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($FORM{'Service'} ne "" and !exists($PRICE{$FORM{'Service'}})) {
# print <
#EOF
# print join('',`cat $ENV{'DOCUMENT_ROOT'}/stdftr.html`);
# print "";
# exit;
#}
if(scalar keys %FORM < 2) {
print <
To determine if your location qualifies for $FORM{Service} DSL service and if so what levels of that service, please complete the following web-based form.
Note: Exact information is needed. If the phone number does not correspond to the street address provided, you will not get the proper results.
EOF
print join('',`cat $ENV{'DOCUMENT_ROOT'}/stdftr.html`);
print "$FORM{Service} DSL Pre-Qualification Form: