summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware_restorefullbackup.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2011-09-25 22:07:18 -0400
committerScott Ullrich <sullrich@gmail.com>2011-09-25 22:07:18 -0400
commitf0f8bee2ce911621c3ce6a516ff9603b3e3439c6 (patch)
tree14d984bfda1253cbaa9c8757fa528ea7d46577e9 /usr/local/www/system_firmware_restorefullbackup.php
parent7d86e6a8b700afa173914ca14f48e791216036c5 (diff)
downloadpfsense-f0f8bee2ce911621c3ce6a516ff9603b3e3439c6.zip
pfsense-f0f8bee2ce911621c3ce6a516ff9603b3e3439c6.tar.gz
Add delete full backup feature
Diffstat (limited to 'usr/local/www/system_firmware_restorefullbackup.php')
-rwxr-xr-xusr/local/www/system_firmware_restorefullbackup.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/local/www/system_firmware_restorefullbackup.php b/usr/local/www/system_firmware_restorefullbackup.php
index c488e18..dfb372f 100755
--- a/usr/local/www/system_firmware_restorefullbackup.php
+++ b/usr/local/www/system_firmware_restorefullbackup.php
@@ -58,6 +58,14 @@ require_once("shaper.inc");
if($_POST['overwriteconfigxml'])
touch("/tmp/do_not_restore_config.xml");
+if ($_GET['deletefile']) {
+ $filename = $_GET['deletefile'];
+ if(file_exists("/root/{$filename}")) {
+ unlink("/root/" . $filename);
+ $savemsg = gettext("$filename has been deleted.");
+ }
+}
+
if ($_POST['restorefile']) {
$filename = $_POST['restorefile'];
if(file_exists("/root/{$filename}")) {
@@ -103,6 +111,7 @@ include("head.inc");
<td colspan="1" class="listtopic"><?=gettext("Filename"); ?></td>
<td colspan="1" class="listtopic"><?=gettext("Date"); ?></td>
<td colspan="1" class="listtopic"><?=gettext("Size"); ?></td>
+ <td colspan="1" class="listtopic"><?=gettext(""); ?></td>
</tr>
<?php
chdir("/root");
@@ -115,12 +124,16 @@ include("head.inc");
echo "<td class='listlr' width='60%' colspan='1'>";
echo "<input type='radio' name='restorefile' value='$arf'> $arf";
echo "</td>";
- echo "<td class='listr' width='40%' colspan='1'>";
+ echo "<td class='listr' width='30%' colspan='1'>";
echo date ("F d Y H:i:s.", filemtime($arf));
echo "</td>";
echo "<td class='listr' width='40%' colspan='1'>";
echo $size;
echo "</td>";
+ echo "<td class='listr' width='10%' colspan='1'>";
+ echo "<a onclick=\"return confirm('" . gettext("Do you really want to delete this item?") . "')\" href='system_firmware_restorefullbackup.php?deletefile=" . htmlspecialchars($arf) . "'>";
+ echo gettext("Delete");
+ echo "</td>";
echo "</tr>";
}
if($counter == 0) {
OpenPOWER on IntegriCloud