Remove backup/restore and factory reset; add APRS/POCSAG custom settings
- Remove admin/config_backup.php (backup/restore page) and all nav links to it across the admin pages and the expert-mode shared header. - Remove factory reset: the full-device version in configure.php (JS confirm, POST handler that reset three git repos + wiped /etc config, and the hidden form) and the CSS-only version in expert/edit_dashboard.php. - Remove the PiStar-Remote and BM API full editors (admin/expert/fulledit_pistar-remote.php, fulledit_bmapikey.php) and their links from the expert-mode menu. - Add a "custom" option to the APRS server dropdown in configure.php so operators can type their own server + port instead of picking from APRSHosts.txt; wires the port through to ircDDBGateway, YSFGateway/YSF2DMR/YSF2NXDN/YSF2P25, and APRSGateway (previously only the hostname was ever configurable, port was hardcoded 14580). - Extend the POCSAG frequency band validator (functions.js) to also treat 150-160MHz as a valid/green range.
This commit is contained in:
@@ -25,16 +25,6 @@ require_once('../config/version.php');
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<title>CDN - Digital Voice Dashboard - Expert Editor</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/pistar-css.php" />
|
||||
<script type="text/javascript">
|
||||
function factoryReset()
|
||||
{
|
||||
if (confirm('WARNING: This will set these settings back to factory defaults.\n\nAre you SURE you want to do this?\n\nPress OK to restore the factory configuration\nPress Cancel to go back.')) {
|
||||
document.getElementById("factoryReset").submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -74,24 +64,8 @@ $filepath = '/tmp/bW1kd4jg6b3N0DQo.tmp';
|
||||
//after the form submit
|
||||
if($_POST) {
|
||||
$data = $_POST;
|
||||
// Factory Reset Handler Here
|
||||
if (empty($_POST['factoryReset']) != TRUE ) {
|
||||
echo "<br />\n";
|
||||
echo "<div class=\"settings-card\">\n";
|
||||
echo "<h3>Factory Reset Config</h3>\n";
|
||||
echo "<div>Loading fresh configuration file(s)...</div>\n";
|
||||
echo "</div>\n";
|
||||
unset($_POST);
|
||||
//Reset the config
|
||||
exec('sudo mount -o remount,rw /'); // Make rootfs writable
|
||||
exec('sudo rm -rf /etc/pistar-css.ini'); // Delete the Config
|
||||
exec('sudo mount -o remount,ro /'); // Make rootfs read-only
|
||||
echo '<script type="text/javascript">setTimeout(function() { window.location=window.location;},0);</script>';
|
||||
die();
|
||||
} else {
|
||||
//update ini file, call function
|
||||
update_ini_file($data, $filepath);
|
||||
}
|
||||
//update ini file, call function
|
||||
update_ini_file($data, $filepath);
|
||||
}
|
||||
|
||||
//this is the function going to update your ini file
|
||||
@@ -174,12 +148,6 @@ echo '<form action="" method="post">'."\n";
|
||||
echo '<div class="field-actions"><input type="submit" value="'.$lang['apply'].'" /></div>'."\n";
|
||||
}
|
||||
echo "</form>";
|
||||
echo "<br />\n";
|
||||
echo 'if you took it all too far and now it makes you feel sick, click below to reset the changes made on this page, this will ONLY reset the CSS settings above and will not change any other settings or configuration.'."\n";
|
||||
echo '<form id="factoryReset" action="" method="post">'."\n";
|
||||
echo ' <div><input type="hidden" name="factoryReset" value="1" /></div>'."\n";
|
||||
echo '</form>'."\n";
|
||||
echo '<input type="button" onclick="javascript:factoryReset();" value="'.$lang['factory_reset'].'" />'."\n";
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user