#! /usr/bin/perl # As with normal MLJ scripts, we need to source in the parameters. The # path must be hard-coded as this is a CGI script require "./parms.cgi"; # Now, see where we get our arguments from. if (defined($ENV{"REQUEST_METHOD"})) { # HTML request if ($ENV{'REQUEST_METHOD'} eq "POST") { # Get the input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Split the name-value pairs } elsif ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{"QUERY_STRING"}; } else { $buffer = ""; } @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; $FORM{$name} = $value; } } &mlj_scj_page_headers("MLJ/SCJ Autoresponder Request Form", "Autoresponder Request Form"); print qq!
\n"; &mlj_scj_page_closing(); sub to_html { local($str) = @_; $str =~ s/\&/\&\#38;/g; $str =~ s/\"/\"/g; $str =~ s/\'/\&\#39;/g; $str =~ s/\\&\#60;/g; $str =~ s/\>/\&\#62;/g; $str =~ s/\\/\&\#92;/g; $str =~ s/\~/\&\#126;/g; return($str); }