if( $reload == 1 && &can_reload() ) {
print "<meta http-equiv=\"REFRESH\" content=\"$main::SPONGSLEEP\">\n"; }
- &show( "header" ) if -f "$main::WWWHTML/header.html";
+ &show( "header", 1 ) if -f "$main::WWWHTML/header.html";
}
sub footer {
- &show( "footer" ) if -f "$main::WWWHTML/footer.html"; }
+ if ($main::footer_printer == 1 ) { return; }
+ $main::footer_printer = 1;
+ &show( "footer", 1 ) if -f "$main::WWWHTML/footer.html"; }
# This just takes a HTML template with a given name, and sends it to STDOUT.
# This is used primarily for the help documentation.
sub show {
- my $file = shift;
+ my ($file, $hf) = @_;
my $show = $main::WWWSPONG . "/help";
if( -f "$main::WWWHTML/$file.html" ) {
- &header( '', "Help", '', 0 );
+ &header( '', "Help", '', 0 ) unless $hf;
open( FILE, "$main::WWWHTML/$file.html" );
while( <FILE> ) { s/!!WWWSHOW!!/$show/g; print $_; }
close( FILE );
- &footer();
+ &footer() unless $hf;
} else {
- &header( '', "Help", '', 0 );
+ &header( '', "Help", '', 0 ) unless $hf;
print "<h1>Help Not Available</h1>\n";
print "Sorry, but no help has been provided for that topic.\n";
- &footer();
+ &footer() unless $hf;
}
}