# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2003 Craig Barratt
+# Copyright (C) 2003-2009 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0beta1, released 9 Apr 2004.
+# Version 3.2.0, released 31 Jul 2010.
#
# See http://backuppc.sourceforge.net.
#
$host =~ s/^\s+//;
$host =~ s/\s+$//;
- return Action_GeneralInfo() if ( $host eq "" );
+ if ( $host eq "" ) {
+ ErrorExit(eval("qq{$Lang->{Unknown_host_or_user}}"));
+ }
$host = lc($host)
- if ( !-d "$TopDir/pc/$host" && -d "$TopDir/pc/" . lc($host) );
+ if ( !-d "$TopDir/pc/$host" && -d "$TopDir/pc/" . lc($host) );
if ( $host =~ /\.\./ || !-d "$TopDir/pc/$host" ) {
#
# try to lookup by user name
#
- if ( !defined($Hosts->{$host}) ) {
+ if ( $host eq "" || !defined($Hosts->{$host}) ) {
foreach my $h ( keys(%$Hosts) ) {
if ( $Hosts->{$h}{user} eq $host
|| lc($Hosts->{$h}{user}) eq lc($host) ) {
}
CheckPermission();
ErrorExit(eval("qq{$Lang->{Unknown_host_or_user}}"))
- if ( !defined($Hosts->{$host}) );
+ if ( !defined($Hosts->{$host}) );
}
$In{host} = $host;
}
}
my $age = sprintf("%.1f", (time - $Backups[$i]{startTime}) / (24*3600));
my $browseURL = "$MyURL?action=browse&host=${EscURI($host)}&num=$Backups[$i]{num}";
+ my $level = $Backups[$i]{level};
my $filled = $Backups[$i]{noFill} ? $Lang->{No} : $Lang->{Yes};
$filled .= " ($Backups[$i]{fillFromNum}) "
if ( $Backups[$i]{fillFromNum} ne "" );
<tr><td align="center" class="border"> <a href="$browseURL">$Backups[$i]{num}</a> </td>
<td align="center" class="border"> $ltype </td>
<td align="center" class="border"> $filled </td>
+ <td align="center" class="border"> $level </td>
<td align="right" class="border"> $startTime </td>
<td align="right" class="border"> $duration </td>
<td align="right" class="border"> $age </td>
if ( $user ne "" ) {
$statusStr .= eval("qq{$Lang->{This_PC_is_used_by}$moreUserStr}");
}
- if ( defined($UserEmailInfo{$user})
+ if ( defined($UserEmailInfo{$user}) && defined($UserEmailInfo{$user}{$host}) ) {
+ my $mailTime = timeStamp2($UserEmailInfo{$user}{$host}{lastTime});
+ my $subj = $UserEmailInfo{$user}{$host}{lastSubj};
+ $statusStr .= eval("qq{$Lang->{Last_email_sent_to__was_at___subject}}");
+ } elsif ( defined($UserEmailInfo{$user})
&& $UserEmailInfo{$user}{lastHost} eq $host ) {
+ #
+ # Old format %UserEmailInfo - pre 3.2.0.
+ #
my $mailTime = timeStamp2($UserEmailInfo{$user}{lastTime});
my $subj = $UserEmailInfo{$user}{lastSubj};
$statusStr .= eval("qq{$Lang->{Last_email_sent_to__was_at___subject}}");
if ( $StatusHost{aliveCnt} > 0 ) {
$statusStr .= eval("qq{$Lang->{priorStr_to_host_have_succeeded_StatusHostaliveCnt_consecutive_times}}");
- if ( $StatusHost{aliveCnt} >= $Conf{BlackoutGoodCnt}
+ if ( (@{$Conf{BlackoutPeriods}} || defined($Conf{BlackoutHourBegin}))
+ && $StatusHost{aliveCnt} >= $Conf{BlackoutGoodCnt}
&& $Conf{BlackoutGoodCnt} >= 0 ) {
#
# Handle backward compatibility with original separate scalar
if ( @Backups ) {
# only allow incremental if there are already some backups
$startIncrStr = <<EOF;
-<input type="submit" value="\$Lang->{Start_Incr_Backup}" name="action">
+<input type="button" value="$Lang->{Start_Incr_Backup}"
+ onClick="document.StartStopForm.action.value='Start_Incr_Backup';
+ document.StartStopForm.submit();">
EOF
}
- $startIncrStr = eval ("qq{$startIncrStr}");
+ $startIncrStr = eval("qq{$startIncrStr}");
my $content = eval("qq{$Lang->{Host__host_Backup_Summary2}}");
Header(eval("qq{$Lang->{Host__host_Backup_Summary}}"), $content);
Trailer();