/[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 155 by dpavlin, Mon Oct 10 13:04:48 2005 UTC
# Line 288  sub getGzipName($$$) Line 288  sub getGzipName($$$)
288          $ret =~ s/\\h/$host/ge;          $ret =~ s/\\h/$host/ge;
289          $ret =~ s/\\s/$share/ge;          $ret =~ s/\\s/$share/ge;
290          $ret =~ s/\\n/$backupnum/ge;          $ret =~ s/\\n/$backupnum/ge;
291            
292            $ret =~ s/__+/_/g;
293    
294          return $ret;          return $ret;
295                    
296  }  }
# Line 308  sub getGzipSize($$) Line 310  sub getGzipSize($$)
310                                  WHERE shares.id=backups.shareid AND                                  WHERE shares.id=backups.shareid AND
311                                            hosts.id =backups.hostid AND                                            hosts.id =backups.hostid AND
312                                            hosts.id=? AND                                            hosts.id=? AND
313                                            backups.num=?;                                            backups.num=?
314                          };                          };
315          my $sth = $dbh->prepare($sql);          my $sth = $dbh->prepare($sql);
316          $sth->execute($hostID, $backupNUM);          $sth->execute($hostID, $backupNum);
317          my $row = $res->fetchrow_hashref();  
318            my $row = $sth->fetchrow_hashref();
319                    
320          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) =
321                          stat( $Conf{InstallDir}.'/'.$Conf{GzipTempDir}.'/'.                          stat( $Conf{InstallDir}.'/'.$Conf{GzipTempDir}.'/'.
# Line 330  sub getBackupsNotBurned() { Line 333  sub getBackupsNotBurned() {
333                          backups.hostID AS hostID,                          backups.hostID AS hostID,
334                          hosts.name AS host,                          hosts.name AS host,
335                          shares.name AS share,                          shares.name AS share,
336                          backups.id AS backupnum,                          backups.num AS backupnum,
337                          backups.type AS type,                          backups.type AS type,
338                          backups.date AS date,                          backups.date AS date,
339                          backups.size AS size                          backups.size AS size,
340                            backups.id AS id
341                  FROM backups                  FROM backups
342                  INNER JOIN shares       ON backups.shareID=shares.ID                  INNER JOIN shares       ON backups.shareID=shares.ID
343                  INNER JOIN hosts        ON backups.hostID = hosts.ID                  INNER JOIN hosts        ON backups.hostID = hosts.ID
# Line 481  DIV#fixedBox #submitBurner { Line 485  DIV#fixedBox #submitBurner {
485  <!--  <!--
486    
487  var debug_div = null;  var debug_div = null;
488  var media_size = 4400 * 1024;  EOF3
489    
490            # take maximum archive size from configuration
491            $retHTML .= 'var media_size = '. $Conf{MaxArchiveSize} .';';
492    
493            $retHTML .= <<'EOF3';
494    
495  function debug(msg) {  function debug(msg) {
496  //      return; // Disable debugging  //      return; // Disable debugging
# Line 697  EOF3 Line 706  EOF3
706                  }                  }
707                  my $ftype = "";                  my $ftype = "";
708    
709                    my $checkbox_key = $backup->{'hostid'}. '_' .$backup->{'backupnum'} . '_' . $backup->{'id'};
710    
711                  $retHTML .=                  $retHTML .=
712                          '<tr' . $color[$i %2 ] . '>                          '<tr' . $color[$i %2 ] . '>
713                          <td class="fview">';                          <td class="fview">';
714    
715                  # FIXME                  # FIXME
716                  $backup->{'fs_size'} = int($backup->{'size'} * 1024);                  $backup->{'fs_size'} = int($backup->{'size'} * 1024);
717    
718                  if (($backup->{'fs_size'} || 0) > 0) {                  if (($backup->{'fs_size'} || 0) > 0) {
719                          $retHTML .= '                          $retHTML .= '
720                          <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);">';  
721                  }                  }
722    
723                  $retHTML .=                  $retHTML .=
724                          '</td>' .                          '</td>' .
725                          '<td align="right">' . $backup->{'host'} . ':' . $backup->{'share'} . '</td>' .                          '<td align="right">' . $backup->{'host'} . ':' . $backup->{'share'} . '</td>' .
# Line 718  EOF3 Line 729  EOF3
729                          '<td align="center">' . $backup->{'age'} . '</td>' .                          '<td align="center">' . $backup->{'age'} . '</td>' .
730                          '<td align="right">' . $backup->{'size'} . '</td>' .                          '<td align="right">' . $backup->{'size'} . '</td>' .
731                          '<td align="right">' . $backup->{'fs_size'} .                          '<td align="right">' . $backup->{'fs_size'} .
732                          '<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>' .
733    
734                          "</tr>\n";                          "</tr>\n";
735          }          }

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

  ViewVC Help
Powered by ViewVC 1.1.26