#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.1.0_CVS, released 13 Mar 2004.
#
# See http://backuppc.sourceforge.net.
#
sub Header
{
- my($title, $content) = @_;
+ my($title, $content, $noBrowse, $contentSub, $contentPost) = @_;
my @adminLinks = (
{ link => "", name => $Lang->{Status},
priv => 1},
NavLink("?host=${EscURI($host)}",
"$host $Lang->{Home}", " class=\"navbar\"");
NavLink("?action=browse&host=${EscURI($host)}",
- $Lang->{Browse}, " class=\"navbar\"");
+ $Lang->{Browse}, " class=\"navbar\"") if ( !$noBrowse );
NavLink("?action=view&type=LOG&host=${EscURI($host)}",
$Lang->{LOG_file}, " class=\"navbar\"");
NavLink("?action=LOGlist&host=${EscURI($host)}",
NavLink("?action=view&type=config&host=${EscURI($host)}",
$Lang->{Config_file}, " class=\"navbar\"");
}
- print <<EOF;
-</div>
-<div id="Content">
-$content
-<br><br><br>
-</div>
-<div class="NavMenu" style="height:100%" id="NavMenu">
-EOF
- } else {
- print <<EOF;
-<div id="Content">
-$content
+ print "</div>\n";
+ }
+ print("<div id=\"Content\">\n$content\n");
+ if ( defined($contentSub) && ref($contentSub) eq "CODE" ) {
+ while ( (my $s = &$contentSub()) ne "" ) {
+ print($s);
+ }
+ }
+ print($contentPost) if ( defined($contentPost) );
+ print <<EOF;
<br><br><br>
</div>
<div class="NavMenu" id="NavMenu" style="height:100%">
EOF
- }
- my $hostSelectbox = "<option value=\"#\">Select a host...</option>";
+ my $hostSelectbox = "<option value=\"#\">$Lang->{Select_a_host}</option>";
my @hosts = GetUserHosts($In{host}, $Conf{CgiNavBarAdminAllHosts});
if ( defined($Hosts) && %$Hosts > 0 && @hosts ) {
NavSectionTitle($Lang->{Hosts});