29 |
# |
# |
30 |
#======================================================================== |
#======================================================================== |
31 |
# |
# |
32 |
# Version 2.1.0, released 20 Jun 2004. |
# Version 2.1.2, released 5 Sep 2005. |
33 |
# |
# |
34 |
# See http://backuppc.sourceforge.net. |
# See http://backuppc.sourceforge.net. |
35 |
# |
# |
102 |
$Lang = $bpc->Lang(); |
$Lang = $bpc->Lang(); |
103 |
$ConfigMTime = $bpc->ConfigMTime(); |
$ConfigMTime = $bpc->ConfigMTime(); |
104 |
} elsif ( $bpc->ConfigMTime() != $ConfigMTime ) { |
} elsif ( $bpc->ConfigMTime() != $ConfigMTime ) { |
105 |
$bpc->ServerMesg("log Re-read config file because mtime changed"); |
$bpc->ConfigRead(); |
106 |
$bpc->ServerMesg("server reload"); |
%Conf = $bpc->Conf(); |
107 |
|
$Lang = $bpc->Lang(); |
108 |
|
$ConfigMTime = $bpc->ConfigMTime(); |
109 |
} |
} |
110 |
|
|
111 |
# |
# |
156 |
{map {$_, 1} split(",", $Hosts->{$host}{moreUsers}) } |
{map {$_, 1} split(",", $Hosts->{$host}{moreUsers}) } |
157 |
} |
} |
158 |
} |
} |
159 |
|
|
160 |
|
# |
161 |
|
# Untaint the host name |
162 |
|
# |
163 |
|
if ( $In{host} =~ /^([\w.\s-]+)$/ ) { |
164 |
|
$In{host} = $1; |
165 |
|
} else { |
166 |
|
delete($In{host}); |
167 |
|
} |
168 |
} |
} |
169 |
|
|
170 |
sub timeStamp2 |
sub timeStamp2 |
289 |
{ |
{ |
290 |
my($status) = @_; |
my($status) = @_; |
291 |
ServerConnect(); |
ServerConnect(); |
292 |
|
%Status = () if ( $status =~ /\bhosts\b/ ); |
293 |
|
%StatusHost = () if ( $status =~ /\bhost\(/ ); |
294 |
my $reply = $bpc->ServerMesg("status $status"); |
my $reply = $bpc->ServerMesg("status $status"); |
295 |
$reply = $1 if ( $reply =~ /(.*)/s ); |
$reply = $1 if ( $reply =~ /(.*)/s ); |
296 |
eval($reply); |
eval($reply); |
468 |
$Lang->{Last_bad_XferLOG_errors_only}, |
$Lang->{Last_bad_XferLOG_errors_only}, |
469 |
" class=\"navbar\""); |
" class=\"navbar\""); |
470 |
} |
} |
471 |
if ( -f "$TopDir/pc/$host/config.pl" ) { |
if ( -f "$TopDir/pc/$host/config.pl" |
472 |
|
|| ($host ne "config" && -f "$TopDir/conf/$host.pl") ) { |
473 |
NavLink("?action=view&type=config&host=${EscURI($host)}", |
NavLink("?action=view&type=config&host=${EscURI($host)}", |
474 |
$Lang->{Config_file}, " class=\"navbar\""); |
$Lang->{Config_file}, " class=\"navbar\""); |
475 |
} |
} |
519 |
NavSectionTitle($Lang->{NavSectionTitle_}); |
NavSectionTitle($Lang->{NavSectionTitle_}); |
520 |
foreach my $l ( @adminLinks ) { |
foreach my $l ( @adminLinks ) { |
521 |
if ( $PrivAdmin || !$l->{priv} ) { |
if ( $PrivAdmin || !$l->{priv} ) { |
522 |
my $txt = defined($l->{lname}) ? $Lang->{$l->{lname}} : $l->{name}; |
my $txt = $l->{lname} ne "" ? $Lang->{$l->{lname}} : $l->{name}; |
523 |
NavLink($l->{link}, $txt); |
NavLink($l->{link}, $txt); |
524 |
} |
} |
525 |
} |
} |