use strict;
use BackupPC::CGI::Lib qw(:all);
use Data::Dumper;
+use DBI;
sub action
{
}
$fullSizeTot += $fullSize + $incrSizeTot;
$fullSize = sprintf("%.2f", ($fullSize + $incrSizeTot) / 1000);
+
+ $bpc->ConfigRead($archHost);
+ %Conf = $bpc->Conf();
+
+ my $dbh = DBI->connect($Conf{SearchDSN}, $Conf{SearchUser}, "", { RaiseError => 1, AutoCommit => 0 });
+ my $backup_nums = $dbh->selectcol_arrayref(qq{
+ select
+ backups.num as num
+ from backups
+ join hosts on hosts.id = hostid
+ where hosts.name = ? and inc_size < 0 and size > 0 and not inc_deleted
+ }, {}, $host);
+
+ my $checkboxes;
+ foreach my $backupnumber ( sort @$backup_nums ) {
+ $checkboxes .= qq|
+<input type="hidden" name="fcb$checkBoxCnt" value="$host">
+<input type="checkbox" name="backup$checkBoxCnt" value="$backupnumber">$backupnumber
+ |;
+ $checkBoxCnt++;
+ }
+
+=for ASA extension removed this
$str = <<EOF;
<tr>
<td class="border"><input type="hidden" name="backup$checkBoxCnt" value="$backupnumber"><input type="checkbox" name="fcb$checkBoxCnt" value="$host"> ${HostLink($host)} </td>
<td align="center" class="border"> $fullSize </td>
EOF
$checkBoxCnt++;
+=cut
+
+ $str = <<EOF;
+<tr>
+<td class="border">
+${HostLink($host)}
+$checkboxes
+</td>
+<td align="center" class="border">
+${UserLink($Hosts->{$host}{user})}
+</td>
+<td align="center" class="border"> $fullSize </td>
+EOF
+
if ( @Backups == 0 ) {
$hostCntNone++;
$strNone .= $str;
<input type="hidden" name="backup$i" value="$In{'backup' . $i}">
EOF
$HostListStr .= <<EOF;
-<li> ${EscHTML($name)}
+<li> ${EscHTML($name)} $i
EOF
}
$hiddenStr .= <<EOF;