#!/usr/local/bin/perl
# * put your path to perl5 above *
# ========================================================================
# *Membership list display
#
# ========================================================================
MAIN:
{
$url = "http://contesales.fatcow.com/cspics.cgi"; #full Internet URL to standing.cgi
$| = 1; #no buffering of output
&getInput;
if (length($input{url}) > 0) {
&showpic;
}
exit;
}
sub showpic {
$url = $input{url};
$itemno = $input{itemno};
print STDOUT "Content-type: text/html\n\n";
print STDOUT "
Conte Sales :: $itemno\n";
print STDOUT "";
print STDOUT "";
print STDOUT "\n";
print STDOUT "";
print STDOUT "\n";
print STDOUT "Close Window |
\n";
print STDOUT " |
\n";
print STDOUT "
\n\n";
}
sub getInput
{
my($allInput, @allPairs, $pair, $label, $value);
#parse the variable buffer both get and post
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$allInput = $ENV{'QUERY_STRING'};
} else {
read(STDIN,$allInput,$ENV{'CONTENT_LENGTH'});
}
@allPairs = split(/&/,$allInput);
while (@allPairs) {
$pair = shift @allPairs;
($label, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if ($input{$label}) {
$input{$label} .= "\|$value";
} else {
$input{$label} = $value;
}
}
}