/[BackupPC]/trunk/lib/BackupPC/SearchLib.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/BackupPC/SearchLib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 143 by iklaric, Fri Oct 7 09:36:10 2005 UTC revision 149 by dpavlin, Fri Oct 7 12:27:07 2005 UTC
# Line 308  sub getGzipSize($$) Line 308  sub getGzipSize($$)
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}.'/'.
# Line 330  sub getBackupsNotBurned() { Line 331  sub getBackupsNotBurned() {
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
# Line 481  DIV#fixedBox #submitBurner { Line 483  DIV#fixedBox #submitBurner {
483  <!--  <!--
484    
485  var debug_div = null;  var debug_div = null;
486  var media_size = 4400 * 1024;  EOF3
487    
488            # take maximum archive size from configuration
489            $retHTML .= 'var media_size = '. $Conf{MaxArchiveSize} .';';
490    
491            $retHTML .= <<'EOF3';
492    
493  function debug(msg) {  function debug(msg) {
494  //      return; // Disable debugging  //      return; // Disable debugging
# Line 697  EOF3 Line 704  EOF3
704                  }                  }
705                  my $ftype = "";                  my $ftype = "";
706    
707                    my $checkbox_key = $backup->{'hostid'}. '_' .$backup->{'backupnum'} . '_' . $backup->{'id'};
708    
709                  $retHTML .=                  $retHTML .=
710                          '<tr' . $color[$i %2 ] . '>                          '<tr' . $color[$i %2 ] . '>
711                          <td class="fview">';                          <td class="fview">';
712    
713                  # FIXME                  # FIXME
714                  $backup->{'fs_size'} = int($backup->{'size'} * 1024);                  $backup->{'fs_size'} = int($backup->{'size'} * 1024);
715    
716                  if (($backup->{'fs_size'} || 0) > 0) {                  if (($backup->{'fs_size'} || 0) > 0) {
717                          $retHTML .= '                          $retHTML .= '
718                          <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);">';  
719                  }                  }
720    
721                  $retHTML .=                  $retHTML .=
722                          '</td>' .                          '</td>' .
723                          '<td align="right">' . $backup->{'host'} . ':' . $backup->{'share'} . '</td>' .                          '<td align="right">' . $backup->{'host'} . ':' . $backup->{'share'} . '</td>' .
# Line 718  EOF3 Line 727  EOF3
727                          '<td align="center">' . $backup->{'age'} . '</td>' .                          '<td align="center">' . $backup->{'age'} . '</td>' .
728                          '<td align="right">' . $backup->{'size'} . '</td>' .                          '<td align="right">' . $backup->{'size'} . '</td>' .
729                          '<td align="right">' . $backup->{'fs_size'} .                          '<td align="right">' . $backup->{'fs_size'} .
730                          '<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>' .
731    
732                          "</tr>\n";                          "</tr>\n";
733          }          }

Legend:
Removed from v.143  
changed lines
  Added in v.149

  ViewVC Help
Powered by ViewVC 1.1.26