summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-11 05:41:30 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-11 05:41:30 +0000
commita6318c60ccd28ca9193cb7dcc828663a7299e02a (patch)
treec5e136bceaef35c88e3303286d83b65c5948db5e /usr/local/www
parent4ca53d18bde70abd1120a9a0c4bea61beca2d8e9 (diff)
downloadpfsense-a6318c60ccd28ca9193cb7dcc828663a7299e02a.zip
pfsense-a6318c60ccd28ca9193cb7dcc828663a7299e02a.tar.gz
Trigger reload at end of page
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/system_advanced.php130
1 files changed, 125 insertions, 5 deletions
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php
index 78814f73..fefe384 100755
--- a/usr/local/www/system_advanced.php
+++ b/usr/local/www/system_advanced.php
@@ -573,20 +573,140 @@ include("head.inc");
<script language="JavaScript" type="text/javascript">
<!--
enable_change(false);
- //enable_altfirmwareurl(false);
- //enable_altpkgconfigurl(false);
//-->
</script>
<?php include("fend.inc"); ?>
+</body>
+</html>
+
<?php
+if ($_POST) {
+ if (!$input_errors) {
+ if($_POST['disablefilter'] == "yes") {
+ $config['system']['disablefilter'] = "enabled";
+ } else {
+ unset($config['system']['disablefilter']);
+ }
+ if($_POST['enablesshd'] == "yes") {
+ $config['system']['enablesshd'] = "enabled";
+ touch("{$g['tmp_path']}/start_sshd");
+ } else {
+ unset($config['system']['enablesshd']);
+ mwexec("/usr/bin/killall sshd");
+ }
+ $oldsshport = $config['system']['ssh']['port'];
+ $config['system']['ssh']['port'] = $_POST['sshport'];
+
+ if($_POST['polling_enable'] == "yes") {
+ $config['system']['polling'] = true;
+ setup_polling();
+ } else {
+ unset($config['system']['polling']);
+ setup_polling();
+ }
+
+ if($_POST['sharednet'] == "yes") {
+ $config['system']['sharednet'] = true;
+ system_disable_arp_wrong_if();
+ } else {
+ unset($config['system']['sharednet']);
+ system_enable_arp_wrong_if();
+ }
+
+ if($_POST['rfc959workaround'] == "yes")
+ $config['system']['rfc959workaround'] = "enabled";
+ else
+ unset($config['system']['rfc959workaround']);
+
+ if($_POST['ipv6nat_enable'] == "yes") {
+ $config['diag']['ipv6nat']['enable'] = true;
+ $config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
+ } else {
+ unset($config['diag']['ipv6nat']['enable']);
+ unset($config['diag']['ipv6nat']['ipaddr']);
+ }
+ $oldcert = $config['system']['webgui']['certificate'];
+ $oldkey = $config['system']['webgui']['private-key'];
+ $config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
+ $config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
+ if($_POST['disableconsolemenu'] == "yes") {
+ $config['system']['disableconsolemenu'] = true;
+ auto_login(true);
+ } else {
+ unset($config['system']['disableconsolemenu']);
+ auto_login(false);
+ }
+ unset($config['system']['webgui']['expanddiags']);
+ $config['system']['optimization'] = $_POST['optimization'];
+
+ if($_POST['disablefirmwarecheck'] == "yes")
+ $config['system']['disablefirmwarecheck'] = true;
+ else
+ unset($config['system']['disablefirmwarecheck']);
+
+ if ($_POST['enableserial'] == "yes")
+ $config['system']['enableserial'] = true;
+ else
+ unset($config['system']['enableserial']);
+
+ if($_POST['harddiskstandby'] <> "") {
+ $config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
+ system_set_harddisk_standby();
+ } else
+ unset($config['system']['harddiskstandby']);
+
+ if ($_POST['noantilockout'] == "yes")
+ $config['system']['webgui']['noantilockout'] = true;
+ else
+ unset($config['system']['webgui']['noantilockout']);
+
+ /* Firewall and ALTQ options */
+ $config['system']['maximumstates'] = $_POST['maximumstates'];
+
+ if($_POST['enablesshd'] == "yes") {
+ $config['system']['enablesshd'] = $_POST['enablesshd'];
+ } else {
+ unset($config['system']['enablesshd']);
+ }
+
+ if($_POST['disablenatreflection'] == "yes") {
+ $config['system']['disablenatreflection'] = $_POST['disablenatreflection'];
+ } else {
+ unset($config['system']['disablenatreflection']);
+ }
+
+ $config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
+
+ $config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false;
+
+ /* pfSense themes */
+ $config['theme'] = $_POST['theme'];
+
+ write_config();
+
+ $retval = 0;
+ config_lock();
+ $retval = filter_configure();
+ if(stristr($retval, "error") <> true)
+ $savemsg = get_std_save_message($retval);
+ else
+ $savemsg = $retval;
+ $retval |= interfaces_optional_configure();
+ config_unlock();
+
+ setup_serial_port();
+
+ setup_filter_bridge();
+
+ }
+}
+
if (($config['system']['webgui']['certificate'] != $oldcert)
|| ($config['system']['webgui']['private-key'] != $oldkey)) {
touch("/tmp/restart_webgui");
}
-?>
-</body>
-</html>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud