+
+ $bpc->ConfigRead($archHost);
+ %Conf = $bpc->Conf();
+
+use Data::Dump qw(dump);
+
+ my $dbh = DBI->connect($Conf{SearchDSN}, $Conf{SearchUser}, "", { RaiseError => 1, AutoCommit => 0 });
+ my $sth = $dbh->prepare(qq{
+ select
+ backups.num as num,
+ inc_size,
+ size,
+ inc_deleted
+ from backups
+ join hosts on hosts.id = hostid
+ where hosts.name = ?
+ });
+ $sth->execute($host);
+ # and inc_size < 0 and size > 0 and not inc_deleted
+ while( my $row = $sth->fetchrow_hashref ) {
+warn "# row ",dump $row;
+ $all_backup_numbers->{ $row->{num} } =
+ $row->{inc_deleted} ? 0 :
+ $row->{size} == 0 ? 0 :
+ $row->{inc_size} < 0 ? 1 :
+ $row->{size} > 0 ? 1 :
+ 0;
+ }
+
+warn dump($all_backup_numbers);
+ my @backup_nums =
+ sort
+ grep { $all_backup_numbers->{$_} }
+ keys %$all_backup_numbers;
+
+ my $checkboxes;
+ foreach my $backupnumber ( @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