308 |
WHERE shares.id=backups.shareid AND |
WHERE shares.id=backups.shareid AND |
309 |
hosts.id =backups.hostid AND |
hosts.id =backups.hostid AND |
310 |
hosts.id=? AND |
hosts.id=? AND |
311 |
backups.num=?; |
backups.num=? |
312 |
}; |
}; |
313 |
my $sth = $dbh->prepare($sql); |
my $sth = $dbh->prepare($sql); |
314 |
$sth->execute($hostID, $backupNUM); |
$sth->execute($hostID, $backupNum); |
315 |
my $row = $res->fetchrow_hashref(); |
|
316 |
|
my $row = $sth->fetchrow_hashref(); |
317 |
|
|
318 |
my (undef,undef,undef,undef,undef,undef,undef,$ret,undef,undef,undef,undef,undef) = |
my (undef,undef,undef,undef,undef,undef,undef,$ret,undef,undef,undef,undef,undef) = |
319 |
stat( $Conf{InstallDir}.'/'.$Conf{GzipTempDir}.'/'. |
stat( $Conf{InstallDir}.'/'.$Conf{GzipTempDir}.'/'. |
331 |
backups.hostID AS hostID, |
backups.hostID AS hostID, |
332 |
hosts.name AS host, |
hosts.name AS host, |
333 |
shares.name AS share, |
shares.name AS share, |
334 |
backups.id AS backupnum, |
backups.num AS backupnum, |
335 |
backups.type AS type, |
backups.type AS type, |
336 |
backups.date AS date, |
backups.date AS date, |
337 |
backups.size AS size |
backups.size AS size, |
338 |
|
backups.id AS id |
339 |
FROM backups |
FROM backups |
340 |
INNER JOIN shares ON backups.shareID=shares.ID |
INNER JOIN shares ON backups.shareID=shares.ID |
341 |
INNER JOIN hosts ON backups.hostID = hosts.ID |
INNER JOIN hosts ON backups.hostID = hosts.ID |
699 |
} |
} |
700 |
my $ftype = ""; |
my $ftype = ""; |
701 |
|
|
702 |
|
my $checkbox_key = $backup->{'hostid'}. '_' .$backup->{'backupnum'} . '_' . $backup->{'id'}; |
703 |
|
|
704 |
$retHTML .= |
$retHTML .= |
705 |
'<tr' . $color[$i %2 ] . '> |
'<tr' . $color[$i %2 ] . '> |
706 |
<td class="fview">'; |
<td class="fview">'; |
707 |
|
|
708 |
# FIXME |
# FIXME |
709 |
$backup->{'fs_size'} = int($backup->{'size'} * 1024); |
$backup->{'fs_size'} = int($backup->{'size'} * 1024); |
710 |
|
|
711 |
if (($backup->{'fs_size'} || 0) > 0) { |
if (($backup->{'fs_size'} || 0) > 0) { |
712 |
$retHTML .= ' |
$retHTML .= ' |
713 |
<input type="checkbox" name="fcb' . |
<input type="checkbox" name="fcb' . $checkbox_key . '" value="' . $checkbox_key . '" onClick="sumiraj(this);">'; |
|
$backup->{'hostid'}.'_'.$backup->{'backupnum'} . |
|
|
'" value="' . $backup->{'hostid'}.'_'.$backup->{'backupnum'} . |
|
|
'" onClick="sumiraj(this);">'; |
|
714 |
} |
} |
715 |
|
|
716 |
$retHTML .= |
$retHTML .= |
717 |
'</td>' . |
'</td>' . |
718 |
'<td align="right">' . $backup->{'host'} . ':' . $backup->{'share'} . '</td>' . |
'<td align="right">' . $backup->{'host'} . ':' . $backup->{'share'} . '</td>' . |
722 |
'<td align="center">' . $backup->{'age'} . '</td>' . |
'<td align="center">' . $backup->{'age'} . '</td>' . |
723 |
'<td align="right">' . $backup->{'size'} . '</td>' . |
'<td align="right">' . $backup->{'size'} . '</td>' . |
724 |
'<td align="right">' . $backup->{'fs_size'} . |
'<td align="right">' . $backup->{'fs_size'} . |
725 |
'<input type="hidden" iD="fss'.$backup->{'hostid'}.'_'.$backup->{'backupnum'} . '" value="'. $backup->{'fs_size'} .'"></td>' . |
'<input type="hidden" iD="fss'.$checkbox_key .'" value="'. $backup->{'fs_size'} .'"></td>' . |
726 |
|
|
727 |
"</tr>\n"; |
"</tr>\n"; |
728 |
} |
} |