diff options
author | gnhb <gnoahb@gmail.com> | 2010-06-03 23:01:34 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-06-03 23:01:34 +0700 |
commit | 4749cccb32c4709c032ce5631ea11cbd157c6548 (patch) | |
tree | b5946c7a168e09d494ed29e5237608a07e1a6f8f /usr | |
parent | 1a5f6ddf191db009ae5f798f9e63108216ed3330 (diff) | |
parent | b72eb6c8cc0aa927ee79d4c389429eef1a648433 (diff) | |
download | pfsense-4749cccb32c4709c032ce5631ea11cbd157c6548.zip pfsense-4749cccb32c4709c032ce5631ea11cbd157c6548.tar.gz |
Merge branch 'master' of http://gitweb.pfsense.org/pfsense/mainline into mlppp
Diffstat (limited to 'usr')
65 files changed, 305 insertions, 180 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 5990ec1..32c8853 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -37,6 +37,8 @@ require_once("auth.inc"); require_once("functions.inc"); require_once("captiveportal.inc"); +$errormsg = "Invalid credentials specified."; + header("Expires: 0"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); @@ -140,14 +142,14 @@ exit; // YES: user is good for $timecredit minutes. captiveportal_logportalauth($voucher,$clientmac,$clientip,"Voucher login good for $timecredit min."); } else { - portal_reply_page($redirurl, "error", $config['voucher']['msgexpired']); + portal_reply_page($redirurl, "error", $config['voucher']['msgexpired'] ? $config['voucher']['msgexpired']: $errormsg); } } else if (-1 == $timecredit) { // valid but expired captiveportal_logportalauth($voucher,$clientmac,$clientip,"FAILURE","voucher expired"); - portal_reply_page($redirurl, "error", $config['voucher']['msgexpired']); + portal_reply_page($redirurl, "error", $config['voucher']['msgexpired'] ? $config['voucher']['msgexpired']: $errormsg); } else { captiveportal_logportalauth($voucher,$clientmac,$clientip,"FAILURE"); - portal_reply_page($redirurl, "error", $config['voucher']['msgnoaccess']); + portal_reply_page($redirurl, "error", $config['voucher']['msgnoaccess'] ? $config['voucher']['msgnoaccess'] : $errormsg); } } else if ($_POST['accept'] && $radius_enable) { @@ -162,15 +164,15 @@ exit; if ($auth_list['auth_val'] == 1) { captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"ERROR",$auth_list['error']); - portal_reply_page($redirurl, $type, $auth_list['error']); + portal_reply_page($redirurl, $type, $auth_list['error'] ? $auth_list['error'] : $errormsg); } else if ($auth_list['auth_val'] == 3) { captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE",$auth_list['reply_message']); - portal_reply_page($redirurl, $type, $auth_list['reply_message']); + portal_reply_page($redirurl, $type, $auth_list['reply_message'] ? $auth_list['reply_message'] : $errormsg); } } else { captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"ERROR"); - portal_reply_page($redirurl, "error", "Invalid username/password specified."); + portal_reply_page($redirurl, "error", $errormsg); } } else if ($_POST['accept'] && $config['captiveportal']['auth_method'] == "local") { @@ -182,7 +184,7 @@ exit; portal_allow($clientip, $clientmac,$_POST['auth_user']); } else { captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE"); - portal_reply_page($redirurl, "error"); + portal_reply_page($redirurl, "error", $errormsg); } } else if ($_POST['accept'] && $clientip) { captiveportal_logportalauth("unauthenticated",$clientmac,$clientip,"ACCEPT"); @@ -294,12 +296,20 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut $mac = captiveportal_passthrumac_findbyname($username); if (!empty($mac)) { if ($_POST['replacemacpassthru']) { - foreach ($a_passthrumacs as $idx => $macent) { + foreach ($config['captiveportal']['passthrumac'] as $idx => $macent) { if ($macent['mac'] == $mac['mac']) { + $macrules = ""; + $ruleno = captiveportal_get_ipfw_passthru_ruleno($mac['mac']); + if ($ruleno) { + captiveportal_free_ipfw_ruleno($ruleno, true); + $macrules .= "delete {$ruleno}\n"; + ++$ruleno; + $macrules .= "delete {$ruleno}\n"; + } unset($config['captiveportal']['passthrumac'][$idx]); $mac['mac'] = $clientmac; $config['captiveportal']['passthrumac'][] = $mac; - $macrules = captiveportal_passthrumac_configure_entry($mac); + $macrules .= captiveportal_passthrumac_configure_entry($mac); file_put_contents("{$g['tmp_path']}/macentry.rules.tmp", $macrules); mwexec("/sbin/ipfw -q {$g['tmp_path']}/macentry.rules.tmp"); $writecfg = true; diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc index 5f02b69..acdd9b8 100755 --- a/usr/local/www/fbegin.inc +++ b/usr/local/www/fbegin.inc @@ -408,9 +408,17 @@ function add_to_menu($url, $name) { <div> <span class="pgtitle"><?=genhtmltitle($pgtitle);?></font></span> +<span style="float:right; margin: 0 0 20px 20px;"> +<?php if(! empty($statusurl)): ?> +<a href="<?php echo $statusurl; ?>" target="_new" title="Status of items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a> +<?php endif; ?> +<?php if(! empty($logurl)): ?> +<a href="<?php echo $logurl; ?>" target="_new" title="Log entries for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a> +<?php endif; ?> <?php if(! $g['disablehelpicon']): ?> -<span style="float:right; margin: 0 0 20px 20px;"><a href="<?php echo $helpurl; ?>" target="_new" title="Help for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a></span> +<a href="<?php echo $helpurl; ?>" target="_new" title="Help for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a> <?php endif; ?> +</span> </div> <br /> diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 0edba70..b9888e6 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -42,6 +42,9 @@ ##|-PRIV $pgtitle = array("Firewall", "Rules"); +$statusurl = "status_filter_reload.php"; +$logurl = "diag_logs_filter.php"; + require("guiconfig.inc"); require_once("functions.inc"); require_once("filter.inc"); diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 2baaef0..342b689 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -549,6 +549,9 @@ read_layer7_config(); $l7clist =& get_l7_unique_list(); $pgtitle = array("Firewall","Rules","Edit"); +$statusurl = "status_filter_reload.php"; +$logurl = "diag_logs_filter.php"; + $closehead = false; $page_filename = "firewall_rules_edit.php"; diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php index 6b6824f..6618389 100755 --- a/usr/local/www/firewall_shaper.php +++ b/usr/local/www/firewall_shaper.php @@ -52,6 +52,7 @@ if($_GET['reset'] <> "") { } $pgtitle = array("Firewall","Traffic Shaper"); +$statusurl = "status_queues.php"; $shaperIFlist = get_configured_interface_with_descr(); read_altq_config(); diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php index 1fe4ead..3e2dc22 100755 --- a/usr/local/www/firewall_shaper_layer7.php +++ b/usr/local/www/firewall_shaper_layer7.php @@ -57,6 +57,7 @@ $show_proto_form = false; //More variables $pgtitle = array("Firewall","Traffic Shaper", "Layer7"); +$statusurl = "status_queues.php"; $output_form = ""; diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php index 1072d72..35b6f21 100755 --- a/usr/local/www/firewall_shaper_queues.php +++ b/usr/local/www/firewall_shaper_queues.php @@ -170,6 +170,7 @@ if ($_POST['apply']) { } $pgtitle = "Firewall: Shaper: By Queues View"; +$statusurl = "status_queues.php"; include("head.inc"); ?> diff --git a/usr/local/www/firewall_shaper_vinterface.php b/usr/local/www/firewall_shaper_vinterface.php index 45ec5cc..b6c8c76 100644 --- a/usr/local/www/firewall_shaper_vinterface.php +++ b/usr/local/www/firewall_shaper_vinterface.php @@ -52,6 +52,7 @@ if($_GET['reset'] <> "") { } $pgtitle = array("Firewall","Traffic Shaper", "Limiter"); +$statusurl = "status_queues.php"; read_dummynet_config(); /* diff --git a/usr/local/www/firewall_shaper_wizards.php b/usr/local/www/firewall_shaper_wizards.php index 1557242..acd744c 100755 --- a/usr/local/www/firewall_shaper_wizards.php +++ b/usr/local/www/firewall_shaper_wizards.php @@ -71,6 +71,7 @@ if ($_POST['apply']) { } $pgtitle = array("Firewall", "Traffic Shaper", "Wizards"); +$statusurl = "status_queues.php"; $wizards = array("Single Lan multi Wan" => "traffic_shaper_wizard.xml", "Single Wan multi Lan" => "traffic_shaper_wizard_multi_lan.xml", diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 4125b51..0463750 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -165,7 +165,7 @@ EOF; if ($fd) { while (!feof($fd)) { $dmesgl = fgets($fd); - if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches) or preg_match("/^safe.: (.*?),/", $dmesgl, $matches) or preg_match("/^ubsec.: (.*?),/", $dmesgl, $matches) or preg_match("/^padlock.: <(.*?)>,/", $dmesgl, $matches) or preg_match("/^glxsb.: (.*?),/", $dmesgl, $matches)) { + if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches) or preg_match("/.*(VIA Padlock)/", $dmesgl, $matches) or preg_match("/^safe.: (.*?),/", $dmesgl, $matches) or preg_match("/^ubsec.: (.*?),/", $dmesgl, $matches) or preg_match("/^padlock.: <(.*?)>,/", $dmesgl, $matches) or preg_match("/^glxsb.: (.*?),/", $dmesgl, $matches)) { $hwcrypto = $matches[1]; break; } diff --git a/usr/local/www/installer.php b/usr/local/www/installer.php index 534ff63..f988d02 100644 --- a/usr/local/www/installer.php +++ b/usr/local/www/installer.php @@ -29,6 +29,25 @@ require("guiconfig.inc"); +if($g['platform'] == "pfSense" or $g['platform'] == "nanobsd") { + Header("Location: /index.php"); + exit; +} + +// Main switch dispatcher +switch ($_REQUEST['state']) { + case "quickeasyinstall": + quickeasyinstall_gui(); + break; + case "update_installer_status": + update_installer_status(); + exit; + case "quickeasyinstall": + begin_quick_easy_install(); + default: + installer_main(); +} + function write_out_pc_sysinstaller_config($disk) { $fd = fopen("/PCBSD/pc-sysinstall/examples/pfSense-install.cfg", "w"); if(!$fd) { @@ -73,6 +92,10 @@ EOF; function start_installation() { $fd = fopen("/tmp/installer.sh", "w"); + if(!$fd) { + die("Could not open /tmp/installer.sh for writing"); + exit; + } fwrite($fd, "/PCBSD/pc-sysinstall/pc-sysinstall -c /PCBSD/pc-sysinstall/examples/pfSense-install.cfg && touch /tmp/install_complete"); fclose($fd); exec("chmod a+rx /tmp/installer.sh"); @@ -115,166 +138,139 @@ function begin_quick_easy_install() { start_installation(); } -if($_REQUEST['state'] == "update_installer_status") { - update_installer_status(); - exit; -} - -if($_REQUEST['step1_post']) { - -} - -if($_REQUEST['step2_post']) { - -} +function body_html() { + $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); + if(strstr($pfSversion, "1.2")) + $one_two = true; + $pgtitle = "pfSense: Installer"; + include("head.inc"); + echo <<<EOF + <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> + <script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script> + <script type="text/javascript"> + function getinstallerprogress() { + url = 'installer.php'; + pars = 'state=update_installer_status'; + callajax(url, pars, installcallback); + } + function callajax(url, pars, activitycallback) { + var myAjax = new Ajax.Request( + url, + { + method: 'post', + parameters: pars, + onComplete: activitycallback + }); + } + function installcallback(transport) { + this.document.forms[0].installeroutput.value=transport.responseText; + setTimeout('getinstallerprogress()', 1000); + } + </script> +EOF; + include("fbegin.inc"); -if($_REQUEST['step3_post']) { - -} + if($one_two) + echo "<p class=\"pgtitle\">{$pgtitle}</font></p>"; -if($_REQUEST['step4_post']) { - + if ($savemsg) print_info_box($savemsg); } -$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -if(strstr($pfSversion, "1.2")) - $one_two = true; - -$pgtitle = "pfSense: Installer"; -include("head.inc"); - -?> -<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> -<script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script> - <script type="text/javascript"> - function getinstallerprogress() { - url = 'installer.php'; - pars = 'state=update_installer_status'; - callajax(url, pars, installcallback); - } - function callajax(url, pars, activitycallback) { - var myAjax = new Ajax.Request( - url, - { - method: 'post', - parameters: pars, - onComplete: activitycallback - }); - } - function installcallback(transport) { - this.document.forms[0].installeroutput.value=transport.responseText; - setTimeout('getinstallerprogress()', 1000); - } -</script> -<?php include("fbegin.inc"); ?> - -<?php if($one_two): ?> -<p class="pgtitle"><?=$pgtitle?></font></p> -<?php endif; ?> - -<?php if ($savemsg) print_info_box($savemsg); ?> - -<?php -if($_REQUEST['state'] == "quickeasyinstall") { - quickeasyinstall_gui(); -} else { - installer_main(); +function end_html() { + echo "</form>"; + include("fend.inc"); + echo "</body>"; + echo "</html>"; } function template() { -echo <<<EOF -<div id="mainlevel"> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <div id="mainarea"> - <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td class="tabcont" > - <form action="installer.php" method="post"> - <div id="pfsensetemplate"> - - - </div> - </td> - </tr> - </table> - </div> - </td> - </tr> - </table> -</div> + body_html(); + echo <<<EOF + <div id="mainlevel"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tabcont" > + <form action="installer.php" method="post"> + <div id="pfsensetemplate"> + + + </div> + </td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </div> EOF; - + end_html(); } function quickeasyinstall_gui() { + body_html(); echo <<<EOF -<div id="mainlevel"> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <div id="mainarea"> - <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td class="tabcont" > - <form action="installer.php" method="post" state="step1_post"> - <div id="pfsenseinstaller"> - Starting Installer... Please wait...<p/> - {{ Insert progressbar here }}<p/> - <textarea name='installeroutput' id='installeroutput' rows="20" cols="80"> - </textarea> - </div> - </td> - </tr> - </table> - </div> - </td> - </tr> - </table> -</div> -<script type="text/javascript">setTimeout('getinstallerprogress()', 250);</script> + <div id="mainlevel"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tabcont" > + <form action="installer.php" method="post" state="step1_post"> + <div id="pfsenseinstaller"> + Starting Installer... Please wait...<p/> + {{ Insert progressbar here }}<p/> + <textarea name='installeroutput' id='installeroutput' rows="20" cols="80"> + </textarea> + </div> + </td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </div> + <script type="text/javascript">setTimeout('getinstallerprogress()', 250);</script> EOF; - + end_html(); } - function installer_main() { -echo <<<EOF -<div id="mainlevel"> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <div id="mainarea"> - <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td class="tabcont" > - <form action="installer.php" method="post" state="step1_post"> - <div id="pfsenseinstaller"> - <a href='installer.php?state=quickeasyinstall'>Quick/Easy installation</a> - </p> - </div> - </td> - </tr> - </table> - </div> - </td> - </tr> - </table> -</div> + body_html(); + $disk = installer_find_first_disk(); + if(!$disk) + echo "WARNING: Could not find any suitable disks for installation."; + echo <<<EOF + <div id="mainlevel"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tabcont" > + <form action="installer.php" method="post" state="step1_post"> + <div id="pfsenseinstaller"> + <a onclick="return confirm('Are you sure you want to install pfSense to $disk?')"> href='installer.php?state=quickeasyinstall'>Quick/Easy installation</a> + </p> + </div> + </td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </div> EOF; - + end_html(); } -?> - -</form> -<?php include("fend.inc"); ?> -</body> -</html> - -<?php - if($_REQUEST['state'] == "quickeasyinstall") { - begin_quick_easy_install(); - } -?> +?>
\ No newline at end of file diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index d215871..d01008c 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -869,6 +869,8 @@ function check_wireless_mode() { } $pgtitle = array("Interfaces", $pconfig['descr']); +$statusurl = "status_interfaces.php"; + $closehead = false; include("head.inc"); $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP" /* , "carpdev-dhcp" => "CarpDev"*/); diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 36aa469..a3f2ce9 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -41,6 +41,8 @@ ##|-PRIV $pgtitle = array("Interfaces", "Assign network ports"); +$statusurl = "status_interfaces.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php index ebb6406..2f0f372 100755 --- a/usr/local/www/load_balancer_monitor.php +++ b/usr/local/www/load_balancer_monitor.php @@ -86,6 +86,10 @@ if ($_GET['act'] == "del") { } $pgtitle = array("Services", "Load Balancer","Monitor"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php index 320a54f..c3b269f 100755 --- a/usr/local/www/load_balancer_monitor_edit.php +++ b/usr/local/www/load_balancer_monitor_edit.php @@ -188,6 +188,10 @@ if ($_POST) { } $pgtitle = array("Services", "Load Balancer","Monitor","Edit"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); $types = array("icmp" => "ICMP", "tcp" => "TCP", "http" => "HTTP", "https" => "HTTPS", "send" => "Send/Expect"); diff --git a/usr/local/www/load_balancer_pool.php b/usr/local/www/load_balancer_pool.php index c320683..4742ab1 100755 --- a/usr/local/www/load_balancer_pool.php +++ b/usr/local/www/load_balancer_pool.php @@ -95,6 +95,10 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { } $pgtitle = array("Services", "Load Balancer","Pool"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index a81faa3..5936d35 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -138,6 +138,10 @@ if ($_POST) { } $pgtitle = array("Services", "Load Balancer","Pool","Edit"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/load_balancer_relay_action.php b/usr/local/www/load_balancer_relay_action.php index 8926f65..36b4b8f 100755 --- a/usr/local/www/load_balancer_relay_action.php +++ b/usr/local/www/load_balancer_relay_action.php @@ -102,6 +102,10 @@ if ($_GET['act'] == "del") { */ $pgtitle = array("Services", "Load Balancer","Relay Action"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php index 218c49d..dc47e45 100755 --- a/usr/local/www/load_balancer_relay_action_edit.php +++ b/usr/local/www/load_balancer_relay_action_edit.php @@ -176,6 +176,10 @@ if ($_POST) { } $pgtitle = array("Services", "Load Balancer","Relay Action","Edit"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); $types = array("http" => "HTTP", "tcp" => "TCP", "dns" => "DNS"); ?> diff --git a/usr/local/www/load_balancer_relay_protocol.php b/usr/local/www/load_balancer_relay_protocol.php index 767e962..f854041 100755 --- a/usr/local/www/load_balancer_relay_protocol.php +++ b/usr/local/www/load_balancer_relay_protocol.php @@ -98,6 +98,10 @@ if ($_GET['act'] == "del") { */ $pgtitle = array("Services", "Load Balancer","Relay Protocol"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php index eac04c1..4575aeb 100755 --- a/usr/local/www/load_balancer_relay_protocol_edit.php +++ b/usr/local/www/load_balancer_relay_protocol_edit.php @@ -132,6 +132,10 @@ if ($_POST) { } $pgtitle = array("Services", "Load Balancer","Relay Protocol","Edit"); +#$statusurl = "status_slbd_vs.php"; +$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); $types = array("http" => "HTTP", "tcp" => "TCP", "dns" => "DNS"); diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php index 772cbf8..9114dc9 100755 --- a/usr/local/www/load_balancer_virtual_server.php +++ b/usr/local/www/load_balancer_virtual_server.php @@ -94,6 +94,10 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { } $pgtitle = array("Services","Load Balancer","Virtual Servers"); +$statusurl = "status_slbd_vs.php"; +#$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php index 6eb49bd..dda2c71 100755 --- a/usr/local/www/load_balancer_virtual_server_edit.php +++ b/usr/local/www/load_balancer_virtual_server_edit.php @@ -129,6 +129,10 @@ if ($_POST) { } $pgtitle = array("Services", "Load Balancer","Virtual Server","Edit"); +$statusurl = "status_slbd_vs.php"; +#$statusurl = "status_slbd_pool.php"; +$logurl = "diag_logs_relayd.php"; + include("head.inc"); ?> diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index 331708a..5206535 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -39,6 +39,9 @@ ##|-PRIV $pgtitle = array("Services","Captive portal"); +$statusurl = "status_captiveportal.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); @@ -288,7 +291,6 @@ function enable_change(enable_change) { $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php"); $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php"); $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php"); - $tab_array[] = array("Auth Logs", false, "diag_logs_auth.php"); display_top_tabs($tab_array); ?> </td></tr> <tr> diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php index 2c8d815..efef6b7 100755 --- a/usr/local/www/services_captiveportal_filemanager.php +++ b/usr/local/www/services_captiveportal_filemanager.php @@ -50,6 +50,9 @@ function cpelements_sort() { } $pgtitle = array("Services","Captive portal"); +$statusurl = "status_captiveportal.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); @@ -137,7 +140,6 @@ include("head.inc"); $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php"); $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php"); $tab_array[] = array("File Manager", true, "services_captiveportal_filemanager.php"); - $tab_array[] = array("Auth Logs", false, "diag_logs_auth.php"); display_top_tabs($tab_array); ?> </td></tr> <tr> diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php index 61e05e5..29acb1c 100755 --- a/usr/local/www/services_captiveportal_ip.php +++ b/usr/local/www/services_captiveportal_ip.php @@ -40,6 +40,9 @@ ##|-PRIV $pgtitle = array("Services","Captive portal"); +$statusurl = "status_captiveportal.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); @@ -85,7 +88,6 @@ include("head.inc"); $tab_array[] = array("Allowed IP addresses", true, "services_captiveportal_ip.php"); $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php"); $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php"); - $tab_array[] = array("Auth Logs", false, "diag_logs_auth.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php index 57e8476..419327d 100755 --- a/usr/local/www/services_captiveportal_ip_edit.php +++ b/usr/local/www/services_captiveportal_ip_edit.php @@ -50,6 +50,9 @@ function allowedips_sort() { } $pgtitle = array("Services","Captive portal","Edit allowed IP address"); +$statusurl = "status_captiveportal.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php index 3e459f4..8e64fd8 100755 --- a/usr/local/www/services_captiveportal_mac.php +++ b/usr/local/www/services_captiveportal_mac.php @@ -39,6 +39,9 @@ ##|-PRIV $pgtitle = array("Services","Captive portal"); +$statusurl = "status_captiveportal.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); @@ -83,6 +86,7 @@ if ($_POST) { if ($found == true) { $ruleno = captiveportal_get_ipfw_passthru_ruleno($_POST['delmac']); if ($ruleno) { + captiveportal_free_ipfw_ruleno($ruleno, true); mwexec("/sbin/ipfw delete {$ruleno}; /sbin/ipfw delete " . ++$ruleno); } unset($a_passthrumacs[$idx]); @@ -125,7 +129,6 @@ include("head.inc"); $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php"); $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php"); $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php"); - $tab_array[] = array("Auth Logs", false, "diag_logs_auth.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index bc397b7..b55e750 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -49,6 +49,9 @@ function passthrumacs_sort() { } $pgtitle = array("Services","Captive portal","Edit pass-through MAC address"); +$statusurl = "status_captiveportal.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php index de305b7..f6c4577 100644 --- a/usr/local/www/services_captiveportal_vouchers.php +++ b/usr/local/www/services_captiveportal_vouchers.php @@ -37,6 +37,9 @@ ##|-PRIV $pgtitle = array("Services", "Captive portal", "Vouchers"); +$statusurl = "status_captiveportal_vouchers.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); @@ -244,7 +247,6 @@ function enable_change(enable_change) { $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php"); $tab_array[] = array("Vouchers", true, "services_captiveportal_vouchers.php"); $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php"); - $tab_array[] = array("Auth Logs", false, "diag_logs_auth.php"); display_top_tabs($tab_array); ?> </ul> diff --git a/usr/local/www/services_captiveportal_vouchers_edit.php b/usr/local/www/services_captiveportal_vouchers_edit.php index ee95927..cacbb61 100644 --- a/usr/local/www/services_captiveportal_vouchers_edit.php +++ b/usr/local/www/services_captiveportal_vouchers_edit.php @@ -36,6 +36,9 @@ ##|-PRIV $pgtitle = array("Services", "Captive portal", "Edit Voucher Rolls"); +$statusurl = "status_captiveportal_vouchers.php"; +$logurl = "diag_logs_auth.php"; + require("guiconfig.inc"); require("functions.inc"); require("filter.inc"); diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 0bbb3bc..d4259ed 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -373,6 +373,9 @@ if ($_GET['act'] == "del") { } $pgtitle = array("Services","DHCP server"); +$statusurl = "diag_dhcp_leases.php"; +$logurl = "diag_logs_dhcp.php"; + include("head.inc"); ?> diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php index 86fefe3..e7bc745 100755 --- a/usr/local/www/services_dhcp_edit.php +++ b/usr/local/www/services_dhcp_edit.php @@ -177,6 +177,9 @@ if ($_POST) { } $pgtitle = array("Services","DHCP","Edit static mapping"); +$statusurl = "diag_dhcp_leases.php"; +$logurl = "diag_logs_dhcp.php"; + include("head.inc"); ?> diff --git a/usr/local/www/system_gateway_groups.php b/usr/local/www/system_gateway_groups.php index d79627f..43dfea7 100755 --- a/usr/local/www/system_gateway_groups.php +++ b/usr/local/www/system_gateway_groups.php @@ -86,6 +86,8 @@ if ($_GET['act'] == "del") { } $pgtitle = array(gettext("System"),gettext("Gateway Groups")); +$statusurl = "status_gateway_groups.php"; + include("head.inc"); ?> diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index d5076c1..1a504c5 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -141,6 +141,8 @@ if ($_POST) { } $pgtitle = array(gettext("System"),gettext("Gateways"),gettext("Edit gateway")); +$statusurl = "status_gateway_groups.php"; + include("head.inc"); ?> diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php index 6f38012..82004a7 100755 --- a/usr/local/www/system_gateways.php +++ b/usr/local/www/system_gateways.php @@ -118,6 +118,8 @@ if ($_GET['act'] == "del") { $pgtitle = array(gettext("System"),gettext("Gateways")); +$statusurl = "status_gateways.php"; + include("head.inc"); ?> diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 5c14f17..69cc405 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -76,7 +76,7 @@ if (isset($id) && $a_gateways[$id]) { $pconfig['down'] = $a_gateway_item[$id]['down']; if (isset($a_gateways[$id]['dynamic'])) $pconfig['dynamic'] = true; - if($a_gateways[$id]['monitor'] <> "") { + if(($a_gateways[$id]['monitor'] <> "") && ($a_gateways[$id]['attribute'] != "system") && ($a_gateways[$id]['gateway'] != "dynamic")) { $pconfig['monitor'] = $a_gateways[$id]['monitor']; } else { $pconfig['monitor'] == ""; @@ -279,6 +279,8 @@ if ($_POST) { $pgtitle = array(gettext("System"),gettext("Gateways"),gettext("Edit gateway")); +$statusurl = "status_gateways.php"; + include("head.inc"); ?> @@ -346,7 +348,7 @@ function show_advanced_gateway() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway"); ?></td> <td width="78%" class="vtable"> - <input name="gateway" type="text" class="formfld host" id="gateway" size="40" value="<?php echo $pconfig['gateway']; ?>" <?php if ($pconfig['dynamic'] == true && $pconfig['attribute'] == "system") echo "disabled"; ?>> + <input name="gateway" type="text" class="formfld host" id="gateway" size="40" value="<?php if ($pconfig['dynamic']) echo "dynamic"; else echo $pconfig['gateway']; ?>" <?php if ($pconfig['dynamic'] && $pconfig['attribute'] == "system") echo "disabled"; ?>> <br> <span class="vexpl"><?=gettext("Gateway IP address"); ?></span></td> </tr> <tr> @@ -361,7 +363,7 @@ function show_advanced_gateway() { <td width="22%" valign="top" class="vncell"><?=gettext("Monitor IP"); ?></td> <td width="78%" class="vtable"> <?php - if(is_numeric($pconfig['attribute']) && ($pconfig['gateway'] == dynamic) && ($pconfig['monitor'] == "")) { + if(($pconfig['attribute'] == "system") && ($pconfig['gateway'] == "dynamic") && ($pconfig['monitor'] == "")) { $monitor = ""; } else { $monitor = htmlspecialchars($pconfig['monitor']); diff --git a/usr/local/www/system_routes.php b/usr/local/www/system_routes.php index df80023..032a5c2 100755 --- a/usr/local/www/system_routes.php +++ b/usr/local/www/system_routes.php @@ -99,6 +99,8 @@ if ($_GET['act'] == "del") { } $pgtitle = array(gettext("System"),gettext("Static Routes")); +$statusurl = "diag_routes.php"; + include("head.inc"); ?> diff --git a/usr/local/www/themes/_corporate/images/log.png b/usr/local/www/themes/_corporate/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/_corporate/images/log.png diff --git a/usr/local/www/themes/_corporate/images/status.png b/usr/local/www/themes/_corporate/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/_corporate/images/status.png diff --git a/usr/local/www/themes/code-red/images/help.png b/usr/local/www/themes/code-red/images/help.png Binary files differnew file mode 100644 index 0000000..3c71cab --- /dev/null +++ b/usr/local/www/themes/code-red/images/help.png diff --git a/usr/local/www/themes/code-red/images/log.png b/usr/local/www/themes/code-red/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/code-red/images/log.png diff --git a/usr/local/www/themes/code-red/images/status.png b/usr/local/www/themes/code-red/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/code-red/images/status.png diff --git a/usr/local/www/themes/metallic/images/log.png b/usr/local/www/themes/metallic/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/metallic/images/log.png diff --git a/usr/local/www/themes/metallic/images/status.png b/usr/local/www/themes/metallic/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/metallic/images/status.png diff --git a/usr/local/www/themes/nervecenter/images/log.png b/usr/local/www/themes/nervecenter/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/nervecenter/images/log.png diff --git a/usr/local/www/themes/nervecenter/images/status.png b/usr/local/www/themes/nervecenter/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/nervecenter/images/status.png diff --git a/usr/local/www/themes/pfsense-dropdown/images/log.png b/usr/local/www/themes/pfsense-dropdown/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/pfsense-dropdown/images/log.png diff --git a/usr/local/www/themes/pfsense-dropdown/images/status.png b/usr/local/www/themes/pfsense-dropdown/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/pfsense-dropdown/images/status.png diff --git a/usr/local/www/themes/pfsense/images/log.png b/usr/local/www/themes/pfsense/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/pfsense/images/log.png diff --git a/usr/local/www/themes/pfsense/images/status.png b/usr/local/www/themes/pfsense/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/pfsense/images/status.png diff --git a/usr/local/www/themes/pfsense_ng/images/log.png b/usr/local/www/themes/pfsense_ng/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/pfsense_ng/images/log.png diff --git a/usr/local/www/themes/pfsense_ng/images/status.png b/usr/local/www/themes/pfsense_ng/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/pfsense_ng/images/status.png diff --git a/usr/local/www/themes/the_wall/images/log.png b/usr/local/www/themes/the_wall/images/log.png Binary files differnew file mode 100644 index 0000000..ba0b397 --- /dev/null +++ b/usr/local/www/themes/the_wall/images/log.png diff --git a/usr/local/www/themes/the_wall/images/status.png b/usr/local/www/themes/the_wall/images/status.png Binary files differnew file mode 100644 index 0000000..2578518 --- /dev/null +++ b/usr/local/www/themes/the_wall/images/status.png diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php index 7d6e0db..0fdecc8 100755 --- a/usr/local/www/vpn_ipsec.php +++ b/usr/local/www/vpn_ipsec.php @@ -124,6 +124,9 @@ if ($_GET['act'] == "delph2") } $pgtitle = array("VPN","IPsec"); +$statusurl = "diag_ipsec.php"; +$logurl = "diag_logs_ipsec.php"; + include("head.inc"); ?> @@ -145,7 +148,6 @@ include("head.inc"); $tab_array[0] = array("Tunnels", true, "vpn_ipsec.php"); $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php"); $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php"); - $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td> diff --git a/usr/local/www/vpn_ipsec_keys.php b/usr/local/www/vpn_ipsec_keys.php index 2a232f3..c446e05 100644 --- a/usr/local/www/vpn_ipsec_keys.php +++ b/usr/local/www/vpn_ipsec_keys.php @@ -69,6 +69,9 @@ if ($_GET['act'] == "del") { } $pgtitle = "VPN: IPsec: Keys"; +$statusurl = "diag_ipsec.php"; +$logurl = "diag_logs_ipsec.php"; + include("head.inc"); ?> @@ -90,7 +93,6 @@ if (is_subsystem_dirty('ipsec')) $tab_array[0] = array("Tunnels", false, "vpn_ipsec.php"); $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php"); $tab_array[2] = array("Pre-shared keys", true, "vpn_ipsec_keys.php"); - $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/usr/local/www/vpn_ipsec_keys_edit.php b/usr/local/www/vpn_ipsec_keys_edit.php index 20ac6c0..ff1ef9a 100644 --- a/usr/local/www/vpn_ipsec_keys_edit.php +++ b/usr/local/www/vpn_ipsec_keys_edit.php @@ -112,6 +112,9 @@ if ($_POST) { } $pgtitle = "VPN: IPsec: Edit pre-shared key"; +$statusurl = "diag_ipsec.php"; +$logurl = "diag_logs_ipsec.php"; + include("head.inc"); ?> diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php index 4bf8d61..379cf15 100755 --- a/usr/local/www/vpn_ipsec_mobile.php +++ b/usr/local/www/vpn_ipsec_mobile.php @@ -211,6 +211,9 @@ if ($_POST['submit']) { } $pgtitle = array("VPN","IPsec","Mobile"); +$statusurl = "diag_ipsec.php"; +$logurl = "diag_logs_ipsec.php"; + include("head.inc"); ?> @@ -308,7 +311,6 @@ function login_banner_change() { $tab_array[0] = array("Tunnels", false, "vpn_ipsec.php"); $tab_array[1] = array("Mobile clients", true, "vpn_ipsec_mobile.php"); $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php"); - $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td> diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php index be3414c..71ea6d8 100644 --- a/usr/local/www/vpn_ipsec_phase1.php +++ b/usr/local/www/vpn_ipsec_phase1.php @@ -333,6 +333,9 @@ if ($pconfig['mobile']) $pgtitle = array("VPN","IPsec","Edit Phase 1", "Mobile Client"); else $pgtitle = array("VPN","IPsec","Edit Phase 1"); +$statusurl = "diag_ipsec.php"; +$logurl = "diag_logs_ipsec.php"; + include("head.inc"); @@ -457,7 +460,6 @@ function dpdchkbox_change() { $tab_array[0] = array("Tunnels", true, "vpn_ipsec.php"); $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php"); $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php"); - $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td> diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php index 5be729c..e00535e 100644 --- a/usr/local/www/vpn_ipsec_phase2.php +++ b/usr/local/www/vpn_ipsec_phase2.php @@ -199,6 +199,9 @@ if ($pconfig['mobile']) $pgtitle = array("VPN","IPsec","Edit Phase 2", "Mobile Client"); else $pgtitle = array("VPN","IPsec","Edit Phase 2"); +$statusurl = "diag_ipsec.php"; +$logurl = "diag_logs_ipsec.php"; + include("head.inc"); @@ -314,7 +317,6 @@ function change_protocol() { $tab_array[0] = array("Tunnels", true, "vpn_ipsec.php"); $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php"); $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php"); - $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td> diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php index 70f5cd1..a52a739 100644 --- a/usr/local/www/vpn_openvpn_client.php +++ b/usr/local/www/vpn_openvpn_client.php @@ -38,6 +38,8 @@ require("guiconfig.inc"); require_once("openvpn.inc"); $pgtitle = array("OpenVPN", "Client"); +$statusurl = "status_openvpn.php"; +$logurl = "diag_logs_openvpn.php"; if (!is_array($config['openvpn']['openvpn-client'])) $config['openvpn']['openvpn-client'] = array(); @@ -344,7 +346,6 @@ function autotls_change() { $tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php"); $tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php"); $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml"); - $tab_array[] = array(gettext("Logs"), false, "diag_logs_openvpn.php"); add_package_tabs("OpenVPN", $tab_array); display_top_tabs($tab_array); ?> diff --git a/usr/local/www/vpn_openvpn_csc.php b/usr/local/www/vpn_openvpn_csc.php index b70404f..5a71121 100644 --- a/usr/local/www/vpn_openvpn_csc.php +++ b/usr/local/www/vpn_openvpn_csc.php @@ -38,6 +38,8 @@ require("guiconfig.inc"); require_once("openvpn.inc"); $pgtitle = array("OpenVPN", "Client Specific Override"); +$statusurl = "status_openvpn.php"; +$logurl = "diag_logs_openvpn.php"; if (!is_array($config['openvpn']['openvpn-csc'])) $config['openvpn']['openvpn-csc'] = array(); @@ -69,7 +71,7 @@ if($_GET['act']=="edit"){ if (isset($id) && $a_csc[$id]) { $pconfig['custom_options'] = $a_csc[$id]['custom_options']; - $pconfig['disable'] = $a_csc[$id]['disable']; + $pconfig['disable'] = isset($a_csc[$id]['disable']); $pconfig['common_name'] = $a_csc[$id]['common_name']; $pconfig['block'] = $a_csc[$id]['block']; $pconfig['description'] = $a_csc[$id]['description']; @@ -168,7 +170,8 @@ if ($_POST) { $csc = array(); $csc['custom_options'] = $pconfig['custom_options']; - $csc['disable'] = $pconfig['disable']; + if ($_POST['disable'] == "yes") + $csc['disable'] = true; $csc['common_name'] = $pconfig['common_name']; $csc['block'] = $pconfig['block']; $csc['description'] = $pconfig['description']; @@ -291,7 +294,6 @@ function netbios_change() { $tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php"); $tab_array[] = array(gettext("Client Specific Overrides"), true, "vpn_openvpn_csc.php"); $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml"); - $tab_array[] = array(gettext("Logs"), false, "diag_logs_openvpn.php"); add_package_tabs("OpenVPN", $tab_array); display_top_tabs($tab_array); ?> @@ -314,7 +316,7 @@ function netbios_change() { <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> - <?php set_checked($pconfig['disable'],$chk); ?> + <?php set_checked(isset($pconfig['disable']),$chk); ?> <input name="disable" type="checkbox" value="yes" <?=$chk;?>/> </td> <td> @@ -676,7 +678,7 @@ function netbios_change() { $i = 0; foreach($a_csc as $csc): $disabled = "NO"; - if ($csc['disable']) + if (isset($csc['disable'])) $disabled = "YES"; ?> <tr> diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php index f221b6b..b213c6f 100644 --- a/usr/local/www/vpn_openvpn_server.php +++ b/usr/local/www/vpn_openvpn_server.php @@ -38,6 +38,8 @@ require("guiconfig.inc"); require_once("openvpn.inc"); $pgtitle = array("OpenVPN", "Server"); +$statusurl = "status_openvpn.php"; +$logurl = "diag_logs_openvpn.php"; if (!is_array($config['openvpn']['openvpn-server'])) $config['openvpn']['openvpn-server'] = array(); @@ -514,7 +516,6 @@ function netbios_change() { $tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php"); $tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php"); $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml"); - $tab_array[] = array(gettext("Logs"), false, "diag_logs_openvpn.php"); add_package_tabs("OpenVPN", $tab_array); display_top_tabs($tab_array); ?> diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index 08d2716..8c2ae36 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -201,7 +201,7 @@ function enablechange() { $enablefields = explode(',', $field['enablefields']); foreach($enablefields as $enablefield) { $enablefield = strtolower($enablefield); - print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 1;' . "\n"; + print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 0;' . "\n"; } } if(isset($field['checkenablefields'])) { @@ -216,7 +216,7 @@ function enablechange() { $enablefields = explode(',', $field['enablefields']); foreach($enablefields as $enablefield) { $enablefield = strtolower($enablefield); - print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 0;' . "\n"; + print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 1;' . "\n"; } } if(isset($field['checkenablefields'])) { @@ -248,7 +248,7 @@ function disablechange() { $checkenablefields = explode(',', $field['checkdisablefields']); foreach($checkenablefields as $checkenablefield) { $checkenablefield = strtolower($checkenablefield); - print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 0;' . "\n"; + print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 1;' . "\n"; } } print "\t" . '} else {' . "\n"; @@ -263,7 +263,7 @@ function disablechange() { $checkenablefields = explode(',', $field['checkdisablefields']); foreach($checkenablefields as $checkenablefield) { $checkenablefield = strtolower($checkenablefield); - print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 1;' . "\n"; + print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 0;' . "\n"; } } print "\t" . '}' . "\n"; @@ -365,7 +365,10 @@ function showchange() { $arraynum = "[" . $field['arraynum'] . "]"; foreach ($field_split as $f) $field_conv .= "['" . $f . "']"; - $toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) { \$value = \$config" . $field_conv . $arraynum . "; if (empty(\$value)) \$value = true; }"; + if($field['type'] == "checkbox") + $toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) { \$value = \$config" . $field_conv . $arraynum . "; if (empty(\$value)) \$value = true; }"; + else + $toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) \$value = \$config" . $field_conv . $arraynum . ";"; eval($toeval); } |