mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
Weiter am Backup gebastelt
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@979 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -177,10 +177,12 @@ END
|
||||
&Header::openbox('100%', 'center', 'addons');
|
||||
|
||||
my @addonincluds = `ls /var/ipfire/backup/addons/includes/ 2>/dev/null`;
|
||||
my %addons = `ls /var/ipfire/backup/addons/backup/ 2>/dev/null`;
|
||||
|
||||
print "<table width='95%' cellspacing='0'>";
|
||||
foreach (@addonincluds){
|
||||
chomp($_);
|
||||
delete($addons{$_."\.ipf\n"});
|
||||
my $Datei = "/var/ipfire/backup/addons/backup/".$_.".ipf";
|
||||
my @Info = stat($Datei);
|
||||
my $Size = $Info[7] / 1024;
|
||||
@@ -206,7 +208,7 @@ END
|
||||
;
|
||||
}
|
||||
else{
|
||||
print "<tr><td align='center'>$Lang::tr{'backup from'} $_ </td><td colspan='2' width='10'></td>";
|
||||
print "<tr><td align='center'>$Lang::tr{'backup from'} $_ </td><td width='5' align='right'></td><td width='5' align='right'></td>";
|
||||
}
|
||||
print <<END
|
||||
<td align='right' width='5'>
|
||||
@@ -219,6 +221,34 @@ print <<END
|
||||
END
|
||||
;
|
||||
}
|
||||
foreach (keys(%addons)){
|
||||
chomp($_);
|
||||
my $Datei = "/var/ipfire/backup/addons/backup/".$_;
|
||||
my @Info = stat($Datei);
|
||||
my $Size = $Info[7] / 1024;
|
||||
$Size = sprintf("%2d", $Size);
|
||||
my $addon=substr($_,0,length($_)-4);
|
||||
print "<tr><td align='center'>$Lang::tr{'backup from'} $addon $Lang::tr{'size'} $Size KB $Lang::tr{'date'} ".localtime($Info[9])."</td>";
|
||||
print <<END
|
||||
<td align='right' width='5'>
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<input type='hidden' name='ACTION' value='downloadaddon' />
|
||||
<input type='hidden' name='FILE' value='$_' />
|
||||
<input type='image' alt='$Lang::tr{'download'}' title='$Lang::tr{'download'}' src='/images/package-x-generic.png' />
|
||||
</form>
|
||||
</td>
|
||||
<td align='right' width='5'>
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<input type='hidden' name='ACTION' value='delete' />
|
||||
<input type='hidden' name='FILE' value='addons/backup/$_' />
|
||||
<input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/user-trash.png' />
|
||||
</form>
|
||||
</td>
|
||||
<td align='right' width='5'></td></tr>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
&Header::closebox();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user