# BrockHTML.pm
# My HTML subroutines
sub start_html
{
my(%params) = @_;
my(%defaults) = (
"title" => "UNTITLED",
"bgcolor" => "#ffffff",
"background" => "",
"text" => "#000000",
"link" => "#0000ff",
"vlink" => "#ff00ff",
"alink" => "#ff00ff",
"border" => "no"
);
foreach $key (keys %defaults)
{
if (!defined $params{$key})
{$params{$key} = $defaults{$key};}
}
print "Content-type: text/html\n\n";
print "\n
\n", $params{"title"}, "\n\n";
print "\n";
}
sub stop_html
{
print "\n\n\n";
}
sub start_block
{
my(%params) = @_;
my(%defaults) = (
"width" => "100%",
"height" => "0",
"bgcolor" => "#ffffff",
"bordercolor" => "#000000"
);
foreach $key (keys %defaults)
{
if (!defined $params{$key})
{$params{$key} = $defaults{$key};}
}
print <<"END_START_BLOCK";
|
END_START_BLOCK
}
sub stop_block
{
print <<"END_STOP_BLOCK";
|
|
END_STOP_BLOCK
}
1 ; # appease psychos who want a true.
# End of BrockHTML.pm