diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-02-09 05:06:41 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-02-09 05:06:41 +0000 |
commit | 612bb4f3db8fd261e918470880c457a744384bf5 (patch) | |
tree | 797ad379302fdb644b6fb12fe3c484609519b665 /usr/local/www | |
parent | af98cced4420801095daf39003c29e33cc1d8474 (diff) | |
download | pfsense-612bb4f3db8fd261e918470880c457a744384bf5.zip pfsense-612bb4f3db8fd261e918470880c457a744384bf5.tar.gz |
Do not show LAN related items when the interfafe does not exist.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/diag_dhcp_leases.php | 2 | ||||
-rwxr-xr-x | usr/local/www/services_proxyarp_edit.php | 6 | ||||
-rwxr-xr-x | usr/local/www/services_snmp.php | 32 | ||||
-rwxr-xr-x | usr/local/www/system_advanced.php | 5 |
4 files changed, 27 insertions, 18 deletions
diff --git a/usr/local/www/diag_dhcp_leases.php b/usr/local/www/diag_dhcp_leases.php index a25f046..7af62dc 100755 --- a/usr/local/www/diag_dhcp_leases.php +++ b/usr/local/www/diag_dhcp_leases.php @@ -303,7 +303,7 @@ foreach ($leases as $data) { break; } } else { - foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) { + foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) { if (($lip >= ip2long($dhcpifconf['range']['from'])) && ($lip <= ip2long($dhcpifconf['range']['to']))) { $data['if'] = $dhcpif; break; diff --git a/usr/local/www/services_proxyarp_edit.php b/usr/local/www/services_proxyarp_edit.php index 99bc0c0..36697dc 100755 --- a/usr/local/www/services_proxyarp_edit.php +++ b/usr/local/www/services_proxyarp_edit.php @@ -172,7 +172,11 @@ function typesel_change() { <td width="22%" valign="top" class="vncellreq">Interface</td> <td width="78%" class="vtable"> <select name="interface" class="formselect"> - <?php $interfaces = array('wan' => 'WAN', 'lan' => 'LAN'); + <?php + if($config['interfaces']['lan']) + $interfaces = array('wan' => 'WAN', 'lan' => 'LAN'); + else + $interfaces = array('wan' => 'WAN'); for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr']; } diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php index f9d1167..91a63cf 100755 --- a/usr/local/www/services_snmp.php +++ b/usr/local/www/services_snmp.php @@ -366,21 +366,23 @@ function enable_change(whichone) { <input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> >Host Resources </td> </tr> - <tr> - <td width="22%" valign="top" class="vtable"></td> - <td width="78%" class="vtable"> - <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong> - <br> - This option can be useful when trying to access the SNMP agent - by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td> - </tr> - <tr> - <td width="22%" valign="top"> </td> - <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)"> - </td> - </tr> - </table> +<?php if(!$config['interfaces']['lan']): ?> + <tr> + <td width="22%" valign="top" class="vtable"></td> + <td width="78%" class="vtable"> + <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong> + <br> + This option can be useful when trying to access the SNMP agent + by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td> + </tr> +<?php endif; ?> + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"> + <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)"> + </td> + </tr> + </table> </form> <script language="JavaScript"> <!-- diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index 728148e..d6e161c 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -635,12 +635,13 @@ include("head.inc"); <td width="22%" valign="top"> </td> <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td> </tr> + <?php if($config['interfaces']['lan']): ?> <tr> <td colspan="2" class="list" height="12"> </td> </tr> <tr> <td colspan="2" valign="top" class="listtopic">Network Address Translation</td> - </tr> + </tr> <tr> <td width="22%" valign="top" class="vncell">Disable NAT Reflection</td> <td width="78%" class="vtable"> @@ -659,6 +660,8 @@ include("head.inc"); <td width="22%" valign="top"> </td> <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td> </tr> +<?php endif; ?> + <tr> <td colspan="2" class="list" height="12"> </td> </tr> |