diff options
author | Darren Embry <dse@webonastick.com> | 2012-06-14 12:51:30 -0400 |
---|---|---|
committer | Darren Embry <dse@webonastick.com> | 2012-06-14 12:51:30 -0400 |
commit | f7b6c87a68881f968bec978f29646803758bf614 (patch) | |
tree | 3c5fa13a9d9270f4d5a5fbbd9bb07d6d53913975 /usr/local/www/diag_packet_capture.php | |
parent | a0b379c8d1a9b9c73823dd311166164e45a7b20f (diff) | |
download | pfsense-f7b6c87a68881f968bec978f29646803758bf614.zip pfsense-f7b6c87a68881f968bec978f29646803758bf614.tar.gz |
minor code rearranging
move code that populates $interfaces nearer the top
Diffstat (limited to 'usr/local/www/diag_packet_capture.php')
-rw-r--r-- | usr/local/www/diag_packet_capture.php | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php index c7443f4..998a2ab 100644 --- a/usr/local/www/diag_packet_capture.php +++ b/usr/local/www/diag_packet_capture.php @@ -54,6 +54,19 @@ $protos = array('icmp', 'icmp6', 'tcp', 'udp', 'arp', 'carp', 'esp'); $input_errors = array(); +$interfaces = get_configured_interface_with_descr(); +if (isset($config['ipsec']['enable'])) + $interfaces['ipsec'] = "IPsec"; +foreach (array('server', 'client') as $mode) { + if (is_array($config['openvpn']["openvpn-{$mode}"])) { + foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { + if (!isset($setting['disable'])) { + $interfaces['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); + } + } + } +} + if ($_POST) { $host = $_POST['host']; $selectedif = $_POST['interface']; @@ -136,6 +149,7 @@ if ($_POST) { } else { $do_tcpdump = false; } + include("head.inc"); ?> <body link="#000000" vlink="#0000CC" alink="#0000CC"> @@ -158,18 +172,6 @@ include("fbegin.inc"); <td width="83%" class="vtable"> <select name="interface"> <?php - $interfaces = get_configured_interface_with_descr(); - if (isset($config['ipsec']['enable'])) - $interfaces['ipsec'] = "IPsec"; - foreach (array('server', 'client') as $mode) { - if (is_array($config['openvpn']["openvpn-{$mode}"])) { - foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { - if (!isset($setting['disable'])) { - $interfaces['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); - } - } - } - } ?> <?php foreach ($interfaces as $iface => $ifacename): ?> <option value="<?=$iface;?>" <?php if ($selectedif == $iface) echo "selected"; ?>> |