/[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 144 by iklaric, Fri Oct 7 09:36:10 2005 UTC revision 145 by dpavlin, Fri Oct 7 11:15:28 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 697  EOF3 Line 699  EOF3
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>' .
# Line 718  EOF3 Line 722  EOF3
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          }          }

Legend:
Removed from v.144  
changed lines
  Added in v.145

  ViewVC Help
Powered by ViewVC 1.1.26