$type   = "\U$ARGV[0]";

$POST        = $ENV{SERVER_CGI_URL};
$SERVER_HOME = $ENV{SERVER_HOME};
$SERVER_NAME = $ENV{SERVER_NAME};
$BASE_HREF   = $ENV{SERVER_WWW_URL};
$BACKGROUND  = $ENV{BACKGROUND};
chop($TITLE   = `cat $ENV{SERVER_SOLVERS}/$type/TITLE`);
chop($CONTACT = `cat $ENV{SERVER_SOLVERS}/$type/CONTACT`);

$TEMPLATE = `cat $ENV{SERVER_LIB}/html/solver-comment.html`;
$TEMPLATE =~ s/<POST>/$POST/g;
$TEMPLATE =~ s/<TYPE>/$type/g;
$TEMPLATE =~ s/<BASE_HREF>/$BASE_HREF\//g;
$TEMPLATE =~ s/<TITLE>/$TITLE/g;
$TEMPLATE =~ s/<CONTACT>/$CONTACT/g;
$TEMPLATE =~ s/<SERVER_NAME>/$SERVER_NAME/g;
$TEMPLATE =~ s/<SERVER_COMMENTS>/$ENV{SERVER_COMMENTS}/g;
$TEMPLATE =~ s/<ADDRESS>/$CONTACT/g;
$TEMPLATE =~ s/BGCOLOR/$BACKGROUND/;
print "$TEMPLATE\n";
