#!/usr/bin/perl
&parse_form_data (*report_form);
$orf = $report_form{'orf'};
$orf = uc($orf);
# If the ORF is not in the database, first try to remove
# any trailing characters and give it another shot
print "Content-type: text/html", "\n\n\n";
print "";
print "
";
print "GeneCensus Yeast Report";
print "";
print "";
print ("";
print "";
print "";
sub parse_form_data {
local (*FORM_DATA) = @_;
local ($request_method, $query_string, @key_value_pairs, $key_value, $key, $value);
$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
}
@key_value_pairs = split (/&/, $query_string);
foreach $key_value (@key_value_pairs) {
($key, $value) = split (/=/, $key_value);
$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;
if (defined($FORM_DATA{$key})) {
$FORM_DATA{$key} = join ("\0", $FORM_DATA{$key}, $value);
}
else {
$FORM_DATA{$key} = $value;
}
}
}