Revision cdc0ed31
Added by Colin Smith over 20 years ago
usr/local/www/diag_confbak.php | ||
---|---|---|
31 | 31 |
require("guiconfig.inc"); |
32 | 32 |
|
33 | 33 |
if($_GET['newver'] != "") { |
34 |
$confvers = get_backups(); |
|
34 | 35 |
if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) { |
35 |
$savemsg = "Successfully reverted to " . $_GET['newver'];
|
|
36 |
$savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\".";
|
|
36 | 37 |
} else { |
37 |
$savemsg = "Unable to revert to " . $_GET['newver'];
|
|
38 |
$savemsg = "Unable to revert to the selected configuration.";
|
|
38 | 39 |
} |
39 | 40 |
} |
40 | 41 |
|
41 | 42 |
if($_GET['rmver'] != "") { |
43 |
$confvers = get_backups(); |
|
42 | 44 |
unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); |
43 |
$savemsg = "Deleted " . $_GET['rmver'];
|
|
45 |
$savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\".";
|
|
44 | 46 |
} |
45 | 47 |
|
46 | 48 |
cleanup_backupcache(); |
... | ... | |
52 | 54 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
53 | 55 |
<html> |
54 | 56 |
<head> |
55 |
<title><?=gentitle("Diagnostics: Configuration Restore");?></title>
|
|
57 |
<title><?=gentitle("Diagnostics: Configuration History");?></title>
|
|
56 | 58 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
57 | 59 |
<link href="gui.css" rel="stylesheet" type="text/css"> |
58 | 60 |
</head> |
... | ... | |
61 | 63 |
include("fbegin.inc"); |
62 | 64 |
if($savemsg) print_info_box($savemsg); |
63 | 65 |
?> |
64 |
<p class="pgtitle">Diagnostics: Local Restore</p>
|
|
66 |
<p class="pgtitle">Diagnostics: Configuration History</p>
|
|
65 | 67 |
<br> |
66 | 68 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td> |
67 | 69 |
<ul id="tabnav"> |
68 | 70 |
<li class="tabinact"><a href="diag_backup.php">Remote</a></li> |
69 |
<li class="tabact">Local</a></li>
|
|
71 |
<li class="tabact">Config History</a></li>
|
|
70 | 72 |
</ul> |
71 | 73 |
</td></tr> |
72 | 74 |
<tr> |
Also available in: Unified diff
Print out configuration information upon restore and deletion.