from Josh and Paul. Added host selection list to restore page.
Tweak CSS and layout.
* Fixed $Conf{HardLinkMax} limit check in BackupPC::Lib; reported
by Ross Skaliotis.
# Version __VERSION__, __RELEASEDATE__
#------------------------------------------------------------------------
+* GFK updated fr.pm from en.pm.
+
+* Various tweaks to recent changes, including additional patches
+ from Josh and Paul. Added host selection list to restore page.
+ Tweak CSS and layout.
+
+* Fixed $Conf{HardLinkMax} limit check in BackupPC::Lib; reported
+ by Ross Skaliotis.
+
* Major changes from Ryan Kucera to add style sheets to the CGI
interface, allowing easy customization. Added new icons and
BackupPC logo. Numerous navigation improvements.
fatal. This is used to catch miscellaneous Xfer errors that
result in no files being backed up. A new config parameter
$Conf{BackupZeroFilesIsFatal} (defaults to 1) and can be set to
- zero to turn off this check. Suggested by Guillaume Filion.
+ zero to turn off this check. Suggested by Guillaume Filion.
+ Additional change: this check only applies to a full dump.
* SMB: now detect NT_STATUS_ACCESS_DENIED on entire share or BackupFilesOnly
(also ERRDOS - ERRnoaccess (Access denied.) for older versions of
}
#
-# If any share had zero files then consider the dump bad
+# If this is a full, and any share had zero files then consider the dump bad
#
-if ( $stat{hostError} eq ""
- && length($noFilesErr) && $Conf{BackupZeroFilesIsFatal} ) {
+if ( $type eq "full" && $stat{hostError} eq ""
+ && length($noFilesErr) && $Conf{BackupZeroFilesIsFatal} ) {
$stat{hostError} = $noFilesErr;
$stat{xferOK} = 0;
}
#
# Maximum number of hardlinks supported by the $TopDir file system
# that BackupPC uses. Most linux or unix file systems should support
-# at least 32000 hardlinks per file, or 64K in other cases. If a pool
+# at least 32000 hardlinks per file, or 64000 in other cases. If a pool
# file already has this number of hardlinks, a new pool file is created
# so that new hardlinks can be accommodated. This limit will only
# be hit if an identical file appears at least this number of times
p {
font-family:arial,sans-serif;
- font-size:.8em
+ font-size:.9em
}
a {
font-size:1em;
color:#3333ff
}
+
+li {
+ font-size:.9em;
+}
a:hover {
color:#cc0000;
a.NavCurrent {
font-weight:bold;
- padding-left:5px;
- padding-right:5px;
}
a.navbar {
padding:3px;
padding-left:10px
}
-
+
.border {
border-bottom:1px solid #000000;
- border-left:1px dotted #666666
+ border-left:1px dotted #666666;
+ font-size:.9em;
}
.tableheader {
+ font-size:.8em;
font-weight:bold;
background-color:#cccccc
}
.fviewheader {
font-weight:bold;
+ font-size:.8em;
color:#ffffff;
background-color:#999999
}
.fviewborder {
border-bottom:1px solid #000000;
border-left:1px dotted #666666;
- background-color:#dddddd
+ background-color:#dddddd;
+ font-size:.9em;
}
.fviewon {
font-size:.8em;
display:block;
margin-left:8px;
- padding:3px;
+ padding:2px;
}
div.NavTitle {
font-weight:bold
}
-div.HostOn {
- width:18%;
- background-color:#ddeeee;
- padding:3px;
- padding-left:10px;
-}
-
-div.HostOnContent {
- background-color:#ddeeee;
- padding:5px;
-}
-
-div.HostOnContent a {
- font-size:.8em;
- display:block;
-}
-
#Content {
float:right;
width:80%;
$fullSizeTot += $fullSize + $incrSizeTot;
$fullSize = sprintf("%.2f", ($fullSize + $incrSizeTot) / 1000);
$str = <<EOF;
-<tr bgcolor="#ffffcc">
-<td><input type="hidden" name="backup$checkBoxCnt" value="$backupnumber"><input type="checkbox" name="fcb$checkBoxCnt" value="$host"> ${HostLink($host)} </td>
-<td align="center"> ${UserLink($Hosts->{$host}{user})} </td>
-<td align="center"> $fullSize </td>
+<tr>
+<td class="border"><input type="hidden" name="backup$checkBoxCnt" value="$backupnumber"><input type="checkbox" name="fcb$checkBoxCnt" value="$host"> ${HostLink($host)} </td>
+<td align="center" class="border"> ${UserLink($Hosts->{$host}{user})} </td>
+<td align="center" class="border"> $fullSize </td>
EOF
$checkBoxCnt++;
if ( @Backups == 0 ) {
$strGood .= <<EOF;
<input type="hidden" name="archivehost" value="$In{'archivehost'}">
EOF
- Header($Lang->{BackupPC__Archive});
- print eval ("qq{$Lang->{BackupPC_Archive}}");
-
+ my $content = eval("qq{$Lang->{BackupPC_Archive}}");
+ Header(eval("qq{$Lang->{BackupPC__Archive}}"),$content);
Trailer();
} else {
# Tell the user what options they have
#
- Header($Lang->{BackupPC__Archive});
- print eval ("qq{$Lang->{BackupPC_Archive2}}");
+ my $content = eval("qq{$Lang->{BackupPC_Archive2}}");
+ Header(eval("qq{$Lang->{BackupPC__Archive}}"),$content);
Trailer();
} elsif ( $In{type} == 2 ) {
my $reqFileName;
$reply = $bpc->ServerMesg("archive $User $archivehost $reqFileName");
$str = eval("qq{$Lang->{Archive_requested}}");
- Header($Lang->{BackupPC__Archive});
- print eval ("qq{$Lang->{BackupPC_Archive_Reply_from_server}}");
+
+ my $content = eval("qq{$Lang->{BackupPC_Archive_Reply_from_server}}");
+ Header(eval("qq{$Lang->{BackupPC__Archive}}"),$content);
Trailer();
}
$counter++;
}
- Header(eval("qq{$Lang->{Archive___num_details_for__host}}"));
- print(eval("qq{$Lang->{Archive___num_details_for__host2 }}"));
+ my $content = eval("qq{$Lang->{Archive___num_details_for__host2 }}");
+ Header(eval("qq{$Lang->{Archive___num_details_for__host}}"),$content);
Trailer();
}
if ( $gotDir ) {
$fileStr .= <<EOF;
<tr><td class="fviewborder">
- <table cellpadding="0" cellspacing="0" border="0"><tr><td>
- <input type="checkbox" name="fcb$checkBoxCnt" value="$path"> $iconStr
- </td><td>
- <a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path">$fDisp</a>
- </td></tr></table>
+ <input type="checkbox" name="fcb$checkBoxCnt" value="$path"> $iconStr <a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path">$fDisp</a>
</td>
$attrStr
</tr>
} else {
$fileStr .= <<EOF;
<tr><td class="fviewborder">
- <table cellpadding="0" cellspacing="0" border="0"><tr><td>
- <input type="checkbox" name="fcb$checkBoxCnt" value="$path"> $iconStr
- </td><td>
- <a href="$MyURL?action=RestoreFile&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path">$fDisp</a>
- </td></tr></table>
+ <input type="checkbox" name="fcb$checkBoxCnt" value="$path"> $iconStr <a href="$MyURL?action=RestoreFile&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path">$fDisp</a>
</td>
$attrStr
</tr>
} else {
$fileStr = eval("qq{$Lang->{The_directory_is_empty}}");
}
- my @otherDirs;
my $pathURI = $dir;
my $shareURI = $share;
$pathURI =~ s/([^\w.\/-])/uc sprintf("%%%02x", ord($1))/eg;
$shareURI =~ s/([^\w.\/-])/uc sprintf("%%%02x", ord($1))/eg;
- foreach my $i ( $view->backupList($share, $dir) ) {
- push(@otherDirs, $i);
- }
- if ( @otherDirs ) {
- my $otherDirs = join(",\n", @otherDirs);
- my $inc = 0;
- foreach my $value (@otherDirs) {
- my $selected = undef;
- my $showDate = timeStamp2($Backups[$inc]{startTime});
- $selected = " selected" if ($value == $num);
- $otherDirs .= "<option value=\"$MyURL?action=browse&host=${EscURI($host)}&num=$value\"$selected>#$value - ($showDate)</option>\n";
- $inc++;
+ if ( my @otherDirs = $view->backupList($share, $dir) ) {
+ my $otherDirs;
+ foreach my $i ( @otherDirs ) {
+ my $selected;
+ my $showDate = timeStamp2($Backups[$i]{startTime});
+ my $backupNum = $Backups[$i]{num};
+ $selected = " selected" if ( $backupNum == $num );
+ $otherDirs .= "<option value=\"$MyURL?action=browse&host=${EscURI($host)}&num=$backupNum&share=$shareURI&dir=$pathURI\"$selected>#$backupNum - ($showDate)</option>\n";
}
$filledBackup .= eval("qq{$Lang->{Visit_this_directory_in_backup}}");
}
ErrorExit($Lang->{Nice_try__but_you_can_t_put});
}
- for ( $i = 0 ; $i < @Backups ; $i++ ) {
+ my @backupList = $view->backupList($share, $dir);
+ foreach $i ( @backupList ) {
my $backupTime = timeStamp2($Backups[$i]{startTime});
my $num = $Backups[$i]{num};
$backupNumStr .= "<td align=center><a href=\"$MyURL?action=browse"
my %inode2name;
my $nameCnt = 0;
(my $fDisp = "${EscHTML($f)}") =~ s/ / /g;
- $fileStr .= "<tr><td align=\"left\" class=\"histView\">$fDisp</td>";\r
- my($colSpan, $url, $inode, $type);\r
- my $tdClass = ' class="histView"';\r
- for ( $i = 0 ; $i < @Backups ; $i++ ) {
+ $fileStr .= "<tr><td align=\"left\" class=\"histView\">$fDisp</td>";
+ my($colSpan, $url, $inode, $type);
+ my $tdClass = ' class="histView"';
+ foreach $i ( @backupList ) {
my($path);
if ( $colSpan > 0 ) {
#
$colSpan++;
next;
}
- $fileStr .= "<td align=center colspan=$colSpan$tdClass>"\r
+ $fileStr .= "<td align=center colspan=$colSpan$tdClass>"
. "$url</td>";
$colSpan = 0;
- $tdClass = ' class="histView"';\r
+ $tdClass = ' class="histView"';
}
if ( !defined($hist->{$f}[$i]) ) {
$colSpan = 1;
$url = " ";
$inode = -3; # special value for missing
- $tdClass = ' class="histViewMis"';\r
+ $tdClass = ' class="histViewMis"';
next;
}
if ( $dir eq "" ) {
$colSpan = 1;
}
if ( $colSpan > 0 ) {
- $fileStr .= "<td align=center colspan=$colSpan$tdClass>$url</td>";\r
+ $fileStr .= "<td align=center colspan=$colSpan$tdClass>$url</td>";
$colSpan = 0;
}
$fileStr .= "</tr>\n";
$dirDisplay =~ s{//+}{/}g;
$dirDisplay =~ s{/+$}{}g;
$dirDisplay = "/" if ( $dirDisplay eq "" );
- my $content = eval("qq{$Lang->{DirHistory_for__host}}");\r
- Header(eval("qq{$Lang->{DirHistory_backup_for__host}}"), $content);\r
+ my $content = eval("qq{$Lang->{DirHistory_for__host}}");
+ Header(eval("qq{$Lang->{DirHistory_backup_for__host}}"), $content);
Trailer();
}
$Cgi = new CGI;
%In = $Cgi->Vars;
+ if ( !defined($bpc) ) {
+ ErrorExit($Lang->{BackupPC__Lib__new_failed__check_apache_error_log})
+ if ( !($bpc = BackupPC::Lib->new(undef, undef, 1)) );
+ $TopDir = $bpc->TopDir();
+ $BinDir = $bpc->BinDir();
+ %Conf = $bpc->Conf();
+ $Lang = $bpc->Lang();
+ $ConfigMTime = $bpc->ConfigMTime();
+ } elsif ( $bpc->ConfigMTime() != $ConfigMTime ) {
+ $bpc->ServerMesg("log Re-read config file because mtime changed");
+ $bpc->ServerMesg("server reload");
+ }
+
#
# Default REMOTE_USER so in a miminal installation the user
# has a sensible default.
#
- $ENV{REMOTE_USER} = $Conf{BackupPCUser} if ( !defined($ENV{REMOTE_USER}) );
+ $ENV{REMOTE_USER} = $Conf{BackupPCUser} if ( $ENV{REMOTE_USER} eq "" );
#
# We require that Apache pass in $ENV{SCRIPT_NAME} and $ENV{REMOTE_USER}.
$MyURL = $ENV{SCRIPT_NAME};
$User = $ENV{REMOTE_USER};
- if ( !defined($bpc) ) {
- ErrorExit($Lang->{BackupPC__Lib__new_failed__check_apache_error_log})
- if ( !($bpc = BackupPC::Lib->new(undef, undef, 1)) );
- $TopDir = $bpc->TopDir();
- $BinDir = $bpc->BinDir();
- %Conf = $bpc->Conf();
- $Lang = $bpc->Lang();
- $ConfigMTime = $bpc->ConfigMTime();
- } elsif ( $bpc->ConfigMTime() != $ConfigMTime ) {
- $bpc->ServerMesg("log Re-read config file because mtime changed");
- $bpc->ServerMesg("server reload");
- }
-
#
# Clean up %ENV for taint checking
#
if ( CheckPermission()
&& -f $Conf{ServerInitdPath}
&& $Conf{ServerInitdStartCmd} ne "" ) {
- Header(eval("qq{$Lang->{Unable_to_connect_to_BackupPC_server}}"));
- print (eval("qq{$Lang->{Admin_Start_Server}}"));
+ my $content = eval("qq{$Lang->{Admin_Start_Server}}");
+ Header(eval("qq{$Lang->{Unable_to_connect_to_BackupPC_server}}"), $content);
Trailer();
exit(1);
} else {
#
# Returns the list of hosts that should appear in the navigation bar
-# for this user. If $Conf{CgiNavBarAdminAllHosts} is set, the admin
-# gets all the hosts. Otherwise, regular users get hosts for which
-# they are the user or are listed in the moreUsers column in the
-# hosts file.
+# for this user. If $getAll is set, the admin gets all the hosts.
+# Otherwise, regular users get hosts for which they are the user or
+# are listed in the moreUsers column in the hosts file.
#
sub GetUserHosts
{
- my($host) = @_;
+ my($host, $getAll) = @_;
my @hosts;
- if ( $Conf{CgiNavBarAdminAllHosts} && CheckPermission() ) {
+ if ( $getAll && CheckPermission() ) {
@hosts = sort keys %$Hosts;
} else {
@hosts = sort grep { $Hosts->{$_}{user} eq $User ||
defined($Hosts->{$_}{moreUsers}{$User}) } keys(%$Hosts);
}
- #
- # return the selected host first (if present)
- #
- return @hosts if ( !defined($host) || !grep(/^$host$/, @hosts) );
- return ($host, grep(!/^$host$/, @hosts));
+ return @hosts;
}
#
{ link => "", name => $Lang->{Status},
priv => 1},
{ link => "?action=adminOpts", name => $Lang->{Admin_Options} },
- { link => "?action=summary", name => $Lang->{PC_Summary} },
+ { link => "?action=summary", name => $Lang->{PC_Summary},
+ priv => 1},
{ link => "?action=view&type=LOG", name => $Lang->{LOG_file} },
{ link => "?action=LOGlist", name => $Lang->{Old_LOGs} },
{ link => "?action=emailSummary", name => $Lang->{Email_summary} },
{ link => "http://backuppc.sourceforge.net", name => "SourceForge",
priv => 1},
);
+ my $host = $In{host};
+
print $Cgi->header();
print <<EOF;
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
</head><body onLoad="document.getElementById('NavMenu').style.height=document.body.scrollHeight">
<img src="$Conf{CgiImageDirURL}/logo.gif" hspace="5" vspace="7"><br>
EOF
- if (!defined($In{host})) {
- print <<EOF;
+
+ if ( defined($Hosts) && defined($host) && defined($Hosts->{$host}) ) {
+ print "<div class=\"NavMenu\">";
+ NavSectionTitle("${EscURI($host)}");
+ print <<EOF;
+</div>
+<div class="NavMenu">
+EOF
+ NavLink("?host=${EscURI($host)}",
+ "$host $Lang->{Home}", " class=\"navbar\"");
+ NavLink("?action=browse&host=${EscURI($host)}",
+ $Lang->{Browse}, " class=\"navbar\"");
+ NavLink("?action=view&type=LOG&host=${EscURI($host)}",
+ $Lang->{LOG_file}, " class=\"navbar\"");
+ NavLink("?action=LOGlist&host=${EscURI($host)}",
+ $Lang->{LOG_files}, " class=\"navbar\"");
+ if ( -f "$TopDir/pc/$host/SmbLOG.bad"
+ || -f "$TopDir/pc/$host/SmbLOG.bad.z"
+ || -f "$TopDir/pc/$host/XferLOG.bad"
+ || -f "$TopDir/pc/$host/XferLOG.bad.z" ) {
+ NavLink("?action=view&type=XferLOGbad&host=${EscURI($host)}",
+ $Lang->{Last_bad_XferLOG}, " class=\"navbar\"");
+ NavLink("?action=view&type=XferErrbad&host=${EscURI($host)}",
+ $Lang->{Last_bad_XferLOG_errors_only},
+ " class=\"navbar\"");
+ }
+ if ( -f "$TopDir/pc/$host/config.pl" ) {
+ NavLink("?action=view&type=config&host=${EscURI($host)}",
+ $Lang->{Config_file}, " class=\"navbar\"");
+ }
+ print <<EOF;
+</div>
<div id="Content">
$content
<br><br><br>
</div>
-<div class="NavMenu" id="NavMenu" style="height:100%">
+<div class="NavMenu" style="height:100%" id="NavMenu">
EOF
} else {
- print "<div class=\"NavMenu\">";
- }
- NavSectionTitle($Lang->{Hosts});
- my $hostSelectbox = "<option value=\"#\">Select a host...</option>";
- my @hosts;
- if ( defined($Hosts) && %$Hosts > 0 ) {
- @hosts = GetUserHosts($In{host});
- foreach my $host ( @hosts ) {
- if ($In{host} eq $host) {
- print <<EOF;
-</div>
-<div class="HostOn"> <a href="?host=${EscURI($host)}">$host</a> <br>
-<div class="HostOnContent">
-EOF
- NavLink("?host=${EscURI($host)}",
- "$host $Lang->{Home}", " class=\"navbar\"");
- NavLink("?action=browse&host=${EscURI($host)}",
- $Lang->{Browse}, " class=\"navbar\"");
- NavLink("?action=view&type=LOG&host=${EscURI($host)}",
- $Lang->{LOG_file}, " class=\"navbar\"");
- NavLink("?action=LOGlist&host=${EscURI($host)}",
- $Lang->{LOG_files}, " class=\"navbar\"");
- if ( -f "$TopDir/pc/$host/SmbLOG.bad"
- || -f "$TopDir/pc/$host/SmbLOG.bad.z"
- || -f "$TopDir/pc/$host/XferLOG.bad"
- || -f "$TopDir/pc/$host/XferLOG.bad.z" ) {
- NavLink("?action=view&type=XferLOGbad&host=${EscURI($host)}",
- $Lang->{Last_bad_XferLOG}, " class=\"navbar\"");
- NavLink("?action=view&type=XferErrbad&host=${EscURI($host)}",
- $Lang->{Last_bad_XferLOG_errors_only},
- " class=\"navbar\"");
- }
- if ( -f "$TopDir/pc/$host/config.pl" ) {
- NavLink("?action=view&type=config&host=${EscURI($host)}",
- $Lang->{Config_file}, " class=\"navbar\"");
- }
- print <<EOF;
-</div></div>
+ print <<EOF;
<div id="Content">
$content
<br><br><br>
</div>
-<div class="NavMenu" style="height:100%" id="NavMenu">
+<div class="NavMenu" id="NavMenu" style="height:100%">
EOF
- } else {
- NavLink("?host=${EscURI($host)}", $host) if ( @hosts < 6 );
- $hostSelectbox .= "<option value=\"?host=${EscURI($host)}\">"
- . "$host</option>";
- }
+ }
+ my $hostSelectbox = "<option value=\"#\">Select a host...</option>";
+ my @hosts = GetUserHosts($In{host}, $Conf{CgiNavBarAdminAllHosts});
+ if ( defined($Hosts) && %$Hosts > 0 && @hosts ) {
+ NavSectionTitle($Lang->{Hosts});
+ foreach my $host ( @hosts ) {
+ NavLink("?host=${EscURI($host)}", $host)
+ if ( @hosts < $Conf{CgiNavBarAdminAllHosts} );
+ my $sel = " selected" if ( $host eq $In{host} );
+ $hostSelectbox .= "<option value=\"?host=${EscURI($host)}\"$sel>"
+ . "$host</option>";
}
}
- if ( @hosts >= 6 ) {
+ if ( @hosts >= $Conf{CgiNavBarAdminAllHosts} ) {
print <<EOF;
<br>
<select onChange="document.location=this.value">
<br><br>
EOF
}
- NavSectionTitle($Lang->{Host_or_User_name});
print <<EOF;
<form action="$MyURL" method="get">
- <input type="text" name="host" size="10" maxlength="64">
+ <input type="text" name="host" size="14" maxlength="64">
<input type="hidden" name="action" value="hostInfo"><input type="submit" value="$Lang->{Go}" name="ignore">
</form>
EOF
{
my($head) = @_;
print <<EOF;
-<div class="NavTitle">
-$head
-</div>
+<div class="NavTitle">$head</div>
EOF
}
@fileList = ( $pathHdr );
}
if ( $In{type} == 0 ) {
+ #
+ # Build list of hosts
+ #
+ my $hostDestSel;
+ foreach my $h ( GetUserHosts() ) {
+ my $sel = " selected" if ( $h eq $In{host} );
+ $hostDestSel .= "<option value=\"$h\"$sel>${EscHTML($h)}</option>";
+ }
+
#
# Tell the user what options they have
#
GetStatusInfo("hosts");
my $Privileged = CheckPermission();
- foreach my $host ( GetUserHosts() ) { ## give access to users hosts only
- ## foreach my $host ( sort(keys(%Status)) ) {
+ foreach my $host ( GetUserHosts(undef, 1) ) {
my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite);
my($shortErr);
my @Backups = $bpc->BackupInfoRead($host);
<input type="hidden" name="fcbMax" value="\$checkBoxCnt">
<input type="hidden" name="type" value="1">
<input type="hidden" name="action" value="Archive">
-<table cellpadding="0" cellspacing="0" bgcolor="#333333"><tr><td>
-<table border="0" width="100%" align="left" cellpadding="2" cellspacing="1">
-<tr bgcolor="#99cc33"><td align=center> Host</td>
+<table cellpadding="3" cellspacing="1">
+<tr class="tableheader"><td align=center> Host</td>
<td align="center"> User </td>
<td align="center"> Backup Size </td>
\$strGood
\$checkAllHosts
+</form>
</table>
-</td></tr></table>
<p>
</table>
<tr>
<td colspan=2><input type="submit" value="Start the Archive" name=""></td>
</tr>
+</form>
</table>
EOF
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
name="hostDest">-->
<select name="hostDest" onChange="document.direct.shareDest.value=''">
- <!-- hostOpt -->
+ \$hostDestSel
</select>
<script language="Javascript">
function myOpen(URL) {
- window.open(URL,'','width=200,height=200');
- }
+ window.open(URL,'','width=500,height=400');
+ }
</script>
- <a href="javascript:myOpen('\$MyURL?action=findShares&host='+document.direct.hostDest.options.value)">Search for available shares</a></td>
+ <a href="javascript:myOpen('\$MyURL?action=findShares&host='+document.direct.hostDest.options.value)">Search for available shares (NOT IMPLEMENTED)</a></td>
</tr><tr>
<td>Restore the files to share</td>
<td><input type="text" size="40" value="\${EscHTML(\$share)}"
EOF
$Lang{checkAllHosts} = <<EOF;
-<tr bgcolor="#ffffcc"><td>
+<tr><td class="fviewborder">
<input type="checkbox" name="allFiles" onClick="return checkAll('allFiles');"> Select all
-</td><td colspan="2" align="center">
+</td><td colspan="2" align="center" class="fviewborder">
<input type="submit" name="Submit" value="Archive selected hosts">
</td></tr>
EOF
<input type="hidden" name="fcbMax" value="\$checkBoxCnt">
<input type="hidden" name="type" value="1">
<input type="hidden" name="action" value="Archive">
-<table cellpadding="0" cellspacing="0" bgcolor="#333333"><tr><td>
-<table border="0" width="100%" align="left" cellpadding="2" cellspacing="1">
-<tr bgcolor="#99cc33"><td align=center> Host</td>
+<table cellpadding="3" cellspacing="1">
+<tr class="tableheader"><td align=center> Host</td>
<td align="center"> Usager </td>
<td align="center"> Taille </td>
\$strGood
\$checkAllHosts
+</form>
</table>
-</td></tr></table>
<p>
</table>
<tr>
<td colspan=2><input type="submit" value="Démarrer l'archivage" name=""></td>
</tr>
+</form>
</table>
EOF
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
name="hostDest">-->
<select name="hostDest" onChange="document.direct.shareDest.value=''">
- <!-- hostOpt -->
+ \$hostDestSel
</select>
<script language="Javascript">
function myOpen(URL) {
- window.open(URL,'','width=200,height=200');
+ window.open(URL,'','width=500,height=400');
}
</script>
- <a href="javascript:myOpen('\$MyURL?action=findShares&host='+document.direct.hostDest.options.value)">Chercher les partitions disponibles</a></td>
+ <a href="javascript:myOpen('\$MyURL?action=findShares&host='+document.direct.hostDest.options.value)">Chercher les partitions disponibles (ENGLISH: NOT IMPLEMENTED)</a></td>
</tr><tr>
<td>Restaurer les fichiers vers le partage</td>
<td><input type="text" size="40" value="\${EscHTML(\$share)}"
EOF
$Lang{checkAllHosts} = <<EOF;
-<tr bgcolor="#ffffcc"><td> (ENGLISH)
+<tr><td class="fviewborder">
<input type="checkbox" name="allFiles" onClick="return checkAll('allFiles');"> Select all
-</td><td colspan="2" align="center">
+</td><td colspan="2" align="center" class="fviewborder">
<input type="submit" name="Submit" value="Archive selected hosts">
</td></tr>
EOF
return -2 if ( !defined($rawFile = $bpc->MD52Path($d, $compress)) );
$rawFile .= "_$i" if ( $i >= 0 );
if ( -f $rawFile ) {
- if ( !compare($name, $rawFile) ) {
+ if ( (stat(_))[3] < $bpc->{Conf}{HardLinkMax}
+ && !compare($name, $rawFile) ) {
unlink($name);
return -3 if ( !link($rawFile, $name) );
return 1;
return $m->{files};
}
+#
+# Return a listref of backup numbers that are merged to create this view
+#
sub mergeNums
{
my($m) = @_;
return $m->{mergeNums};
}
+#
+# Return a list of backup indexes for which the directory exists
+#
sub backupList
{
my($m, $share, $dir) = @_;
}
$path .= $sharePathM;
next if ( !-d $path );
- push(@backupList, $backupNum);
+ push(@backupList, $i);
}
return @backupList;
}