if ($_GET['diff'] == 'Diff' && isset($_GET['oldtime']) && isset($_GET['newtime']) && is_numeric($_GET['oldtime']) && (is_numeric($_GET['newtime']) || $_GET['newtime'] == 'current')) { $diff = ""; $oldfile = $g['conf_path'] . '/backup/config-' . $_GET['oldtime'] . '.xml'; $oldtime = $_GET['oldtime']; if ($_GET['newtime'] == 'current') { $newfile = $g['conf_path'] . '/config.xml'; $newtime = $config['revision']['time']; } else { $newfile = $g['conf_path'] . '/backup/config-' . $_GET['newtime'] . '.xml'; $newtime = $_GET['newtime']; } if (file_exists($oldfile) && file_exists($newfile)) { exec("/usr/bin/diff -u " . escapeshellarg($oldfile) . " " . escapeshellarg($newfile), $diff); } } cleanup_backupcache(false); $confvers = get_backups(); unset($confvers['versions']); $pgtitle = array(gettext("Diagnostics"), gettext("Configuration History")); include "head.inc"; if ($savemsg) { print_info_box($savemsg, 'success'); } if ($diff) { ?> <div class="panel panel-default"> <div class="panel-heading"><?php echo gettext("Configuration diff from "); echo date(gettext("n/j/y H:i:s"), $oldtime); echo gettext(" to "); echo date(gettext("n/j/y H:i:s"), $newtime);
*/ require "guiconfig.inc"; if ($_GET['newver'] != "") { $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); if (config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) { $savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\"."; } else { $savemsg = "Unable to revert to the selected configuration."; } } if ($_GET['rmver'] != "") { $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); $savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\"."; } cleanup_backupcache(); $confvers = get_backups(); unset($confvers['versions']); $pgtitle = "Tanımlama: Ayarlar Geçmişi"; include "head.inc"; ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include "fbegin.inc"; ?> <p class="pgtitle"><?php echo $pgtitle; ?> </p> <?php