diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-11-22 23:01:43 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-11-22 23:01:43 +0000 |
commit | 095836579eb80a9feb7e23a9ff40c43dbb4778bb (patch) | |
tree | 395e8031208aa1344b812f67e55bb2bbbc7a5bd0 /usr/local/www/interfaces.php | |
parent | 98f43e13d346100c60dee3c14de7ddf1edf2b308 (diff) | |
download | pfsense-095836579eb80a9feb7e23a9ff40c43dbb4778bb.zip pfsense-095836579eb80a9feb7e23a9ff40c43dbb4778bb.tar.gz |
Formatting part II. No functional changes.
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-x | usr/local/www/interfaces.php | 1269 |
1 files changed, 636 insertions, 633 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index fd415ba..6af849c 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -689,22 +689,22 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe" <!-- function updateType(t){ - switch(t) { + switch(t) { <?php - /* OK, so this is sick using php to generate javascript, but it needed to be done */ - foreach ($types as $key => $val) { - echo " case \"{$key}\": {\n"; - $t = $types; - foreach ($t as $k => $v) { - if ($k != $key) { - echo " $('{$k}').hide();\n"; - } - } - echo " }\n"; - } + /* OK, so this is sick using php to generate javascript, but it needed to be done */ + foreach ($types as $key => $val) { + echo " case \"{$key}\": {\n"; + $t = $types; + foreach ($t as $k => $v) { + if ($k != $key) { + echo " $('{$k}').hide();\n"; + } + } + echo " }\n"; + } ?> - } - $(t).appear(); + } + $(t).appear(); } function show_allcfg(obj) { @@ -740,639 +740,642 @@ function openwindow(url) { <?php endif; ?> <?php if ($savemsg) print_info_box($savemsg); ?> <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">General configuration</td> + <tr> + <td colspan="2" valign="top" class="listtopic">General configuration</td> </tr> <?php if ($if != "wan" && $if != "lan"): ?> - <tr> - <td width="22%" valign="top" class="vtable"> </td> - <td width="78%" class="vtable"> - <input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable'] == true) echo "checked"; ?> onClick="show_allcfg(this);"> - <strong>Enable Interface</strong> - </td> - </tr> - <?php endif; ?> - <tr style="display:none;" name="allcfg" id="allcfg"> - <td colspan="2"> <tr> - <td width="22%" valign="top" class="vncell">Description</td> + <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> - <input name="descr" type="text" class="formfld unknown" id="descr" size="30" value="<?=htmlspecialchars($pconfig['descr']);?>"> - <br><span class="vexpl">Enter a description (name) for the interface here.</span> + <input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable'] == true) echo "checked"; ?> onClick="show_allcfg(this);"> + <strong>Enable Interface</strong> </td> </tr> - <tr> - <td valign="middle" class="vncell"><strong>Type</strong></td> - <td class="vtable"> - <select name="type" onChange="updateType(this.value);" class="formselect" id="type"> - <?php - foreach ($types as $key => $opt) { - echo "<option onClick=\"updateType('{$key}');\""; - if ($key == $pconfig['type']) - echo " selected"; - echo " value=\"{$key}\" >" . htmlspecialchars($opt); - echo "</option>"; - } - ?> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncell">MAC address</td> - <td class="vtable"> - <input name="spoofmac" type="text" class="formfld unknown" id="spoofmac" size="30" value="<?=htmlspecialchars($pconfig['spoofmac']);?>"> - <?php - $ip = getenv('REMOTE_ADDR'); - $mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`; - $mac = str_replace("\n","",$mac); - ?> - <a OnClick="document.forms[0].spoofmac.value='<?=$mac?>';" href="#">Copy my MAC address</a> - <br> - This field can be used to modify ("spoof") the MAC - address of the WAN interface<br> - (may be required with some cable connections)<br> - Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx - or leave blank - </td> - </tr> - <tr> - <td valign="top" class="vncell">MTU</td> - <td class="vtable"> - <input name="mtu" type="text" class="formfld unknown" id="mtu" size="8" value="<?=htmlspecialchars($pconfig['mtu']);?>"> - <br> - If you enter a value in this field, then MSS clamping for - TCP connections to the value entered above minus 40 (TCP/IP - header size) will be in effect. If you leave this field blank, - an MTU of 1500 bytes will be assumed. - </td> - </tr> - <tr style="display:none;" name="none" id="none"> - </tr> - <tr style="display:none;" name="static" id="static"> - <td colspan="2"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">Static IP configuration</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">IP address</td> - <td width="78%" class="vtable"> - <input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>"> - / - <select name="subnet" class="formselect" id="subnet"> - <?php - for ($i = 32; $i > 0; $i--) { - if($i <> 31) { - echo "<option value=\"{$i}\" "; - if ($i == $pconfig['subnet']) echo "selected"; - echo ">" . $i . "</option>"; - } - } - ?> - </select> - </td> - </tr> - <?php if (isset($wancfg['ispointtopoint'])): ?> - <tr> - <td width="22%" valign="top" class="vncellreq">Point-to-point IP address </td> - <td width"78%" class="vtable"> - <input name="pointtopoint" type="text" class="formfld unknown" id="pointtopoint" size="20" value="<?=htmlspecialchars($pconfig['pointtopoint']);?>"> - </td> - </tr> - <?php endif; ?> - <tr> - <td width="22%" valign="top" class="vncellreq">Gateway</td> - <td width="78%" class="vtable"> - <select name="gateway" class="formselect" id="gateway"> - <option value="none" selected>None</option> - <?php - if(count($a_gateways) > 0) { - foreach ($a_gateways as $gateway) { - if($gateway['interface'] == $if) { - ?> - <option value="<?=$gateway['name'];?>" <?php if ($gateway['name'] == $pconfig['gateway']) echo "selected"; ?>> - <?=htmlspecialchars($gateway['name']);?> - </option> - <?php - } - } - } - ?> - </select> - <br/> - Select a existing Gateway from the list or add one on the <a href="/system_gateways.php">Gateways</a> page<br> - </td> - </tr> - </table> - </td> - </tr> - <tr style="display:none;" name="dhcp" id="dhcp"> - <td colspan="2"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">DHCP client configuration</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Hostname</td> - <td width="78%" class="vtable"> - <input name="dhcphostname" type="text" class="formfld unknown" id="dhcphostname" size="40" value="<?=htmlspecialchars($pconfig['dhcphostname']);?>"> - <br> - The value in this field is sent as the DHCP client identifier - and hostname when requesting a DHCP lease. Some ISPs may require - this (for client identification). - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Alias IP address</td> - <td width="78%" class="vtable"> - <input name="alias-address" type="text" class="formfld unknown" id="alias-address" size="20" value="<?=htmlspecialchars($pconfig['alias-address']);?>"> - <select name="alias-subnet" class="formselect" id="alias-subnet"> - <?php - for ($i = 32; $i > 0; $i--) { - if($i <> 31) { - echo "<option value=\"{$i}\" "; - if ($i == $pconfig['alias-subnet']) echo "selected"; - echo ">" . $i . "</option>"; - } - } - ?> - </select> - The value in this field is used as a fixed alias IP address by the - DHCP client. - </td> - </tr> - </table> - </td> - </tr> - <tr style="display:none;" name="pppoe" id="pppoe"> - <td colspan="2"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">PPPoE configuration</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Username</td> - <td width="78%" class="vtable"><input name="pppoe_username" type="text" class="formfld user" id="pppoe_username" size="20" value="<?=htmlspecialchars($pconfig['pppoe_username']);?>"> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Password</td> - <td width="78%" class="vtable"> - <input name="pppoe_password" type="password" class="formfld pwd" id="pppoe_password" size="20" value="<?=htmlspecialchars($pconfig['pppoe_password']);?>"> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Service name</td> - <td width="78%" class="vtable"><input name="provider" type="text" class="formfld unknown" id="provider" size="20" value="<?=htmlspecialchars($pconfig['provider']);?>"> - <br> <span class="vexpl">Hint: this field can usually be left empty</span> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Dial on demand</td> - <td width="78%" class="vtable"> - <input name="pppoe_dialondemand" type="checkbox" id="pppoe_dialondemand" value="enable" <?php if ($pconfig['pppoe_dialondemand']) echo "checked"; ?>" > - <strong>Enable Dial-On-Demand mode</strong><br> - This option causes the interface to operate in dial-on-demand mode, allowing you to have a <i>virtual full time</i> connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Idle timeout</td> - <td width="78%" class="vtable"> - <input name="pppoe_idletimeout" type="text" class="formfld unknown" id="pppoe_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pppoe_idletimeout']);?>"> seconds<br>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Periodic reset");?></td> - <td width="78%" class="vtable"> - <input name="pppoe_preset" type="checkbox" id="pppoe_preset" value="yes" <?php if ($pconfig['pppoe_preset']) echo "checked=\"checked\""; ?> onclick="Effect.toggle('presetwrap', 'appear', { duration: 1.0 });" /> - <?= gettext("enable periodic PPPoE resets"); ?> - <br /> - <?php if ($pconfig['pppoe_preset']): ?> - <table id="presetwrap" cellspacing="0" cellpadding="0" width="100%"> - <?php else: ?> - <table id="presetwrap" cellspacing="0" cellpadding="0" width="100%" style="display: none;"> + <?php endif; ?> + <tr style="display:none;" name="allcfg" id="allcfg"> + <td colspan="2"> + <tr> + <td width="22%" valign="top" class="vncell">Description</td> + <td width="78%" class="vtable"> + <input name="descr" type="text" class="formfld unknown" id="descr" size="30" value="<?=htmlspecialchars($pconfig['descr']);?>"> + <br><span class="vexpl">Enter a description (name) for the interface here.</span> + </td> + </tr> + <tr> + <td valign="middle" class="vncell"><strong>Type</strong></td> + <td class="vtable"> + <select name="type" onChange="updateType(this.value);" class="formselect" id="type"> + <?php + foreach ($types as $key => $opt) { + echo "<option onClick=\"updateType('{$key}');\""; + if ($key == $pconfig['type']) + echo " selected"; + echo " value=\"{$key}\" >" . htmlspecialchars($opt); + echo "</option>"; + } + ?> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncell">MAC address</td> + <td class="vtable"> + <input name="spoofmac" type="text" class="formfld unknown" id="spoofmac" size="30" value="<?=htmlspecialchars($pconfig['spoofmac']);?>"> + <?php + $ip = getenv('REMOTE_ADDR'); + $mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`; + $mac = str_replace("\n","",$mac); + ?> + <a OnClick="document.forms[0].spoofmac.value='<?=$mac?>';" href="#">Copy my MAC address</a> + <br> + This field can be used to modify ("spoof") the MAC + address of the WAN interface<br> + (may be required with some cable connections)<br> + Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx + or leave blank + </td> + </tr> + <tr> + <td valign="top" class="vncell">MTU</td> + <td class="vtable"> + <input name="mtu" type="text" class="formfld unknown" id="mtu" size="8" value="<?=htmlspecialchars($pconfig['mtu']);?>"> + <br> + If you enter a value in this field, then MSS clamping for + TCP connections to the value entered above minus 40 (TCP/IP + header size) will be in effect. If you leave this field blank, + an MTU of 1500 bytes will be assumed. + </td> + </tr> + <tr style="display:none;" name="none" id="none"> + </tr> + <tr style="display:none;" name="static" id="static"> + <td colspan="2"> + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">Static IP configuration</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">IP address</td> + <td width="78%" class="vtable"> + <input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>"> + / + <select name="subnet" class="formselect" id="subnet"> + <?php + for ($i = 32; $i > 0; $i--) { + if($i <> 31) { + echo "<option value=\"{$i}\" "; + if ($i == $pconfig['subnet']) echo "selected"; + echo ">" . $i . "</option>"; + } + } + ?> + </select> + </td> + </tr> + <?php if (isset($wancfg['ispointtopoint'])): ?> + <tr> + <td width="22%" valign="top" class="vncellreq">Point-to-point IP address </td> + <td width"78%" class="vtable"> + <input name="pointtopoint" type="text" class="formfld unknown" id="pointtopoint" size="20" value="<?=htmlspecialchars($pconfig['pointtopoint']);?>"> + </td> + </tr> <?php endif; ?> - <tr> - <td align="left" valign="top"> - <p style="margin: 4px; padding: 4px 0 4px 0; width: 94%;"> - <input name="pppoe_pr_type" type="radio" id="pppoe_pr_custom" value="custom" <?php if ($pconfig['pppoe_pr_custom']) echo "checked=\"checked\""; ?> onclick="if (this.checked) { Effect.Appear('pppoecustomwrap', { duration: 1.0 }); Effect.Fade('pppoepresetwrap', { duration: 1.0 }); }" /> - <?= gettext("provide a custom reset time"); ?> - <br /> - <input name="pppoe_pr_type" type="radio" id="pppoe_pr_preset" value="preset" <?php if ($pconfig['pppoe_pr_preset']) echo "checked=\"checked\""; ?> onclick="if (this.checked) { Effect.Appear('pppoepresetwrap', { duration: 1.0 }); Effect.Fade('pppoecustomwrap', { duration: 1.0 }); }" /> - <?= gettext("select reset time from a preset"); ?> - </p> - <?php if ($pconfig['pppoe_pr_custom']): ?> - <p style="margin: 2px; padding: 4px; width: 94%;" id="pppoecustomwrap"> - <?php else: ?> - <p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoecustomwrap"> - <?php endif; ?> - <input type="text" name="pppoe_resethour" class="fd_incremental_inp_range_0_23 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resethour" value="<?= $pconfig['pppoe_resethour']; ?>" size="3" /> - <?= gettext("hour (0-23)"); ?><br /> - <input type="text" name="pppoe_resetminute" class="fd_incremental_inp_range_0_59 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resetminute" value="<?= $pconfig['pppoe_resetminute']; ?>" size="3" /> - <?= gettext("minute (0-59)"); ?><br /> - <input name="pppoe_resetdate" type="text" class="w8em format-m-d-y highlight-days-67" id="pppoe_resetdate" maxlength="10" size="10" value="<?=htmlspecialchars($pconfig['pppoe_resetdate']);?>" /> - <?= gettext("reset at a specific date (mm/dd/yyyy)"); ?> - <br /> <br /> - <span class="red"><strong>Note: </strong></span> - If you leave the date field empty, the reset will be executed each day at the time you did specify using the minutes and hour field. - </p> - <?php if ($pconfig['pppoe_pr_preset']): ?> - <p style="margin: 2px; padding: 4px; width: 94%;" id="pppoepresetwrap"> - <?php else: ?> - <p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoepresetwrap"> - <?php endif; ?> - <input name="pppoe_pr_preset_val" type="radio" id="pppoe_monthly" value="monthly" <?php if ($pconfig['pppoe_monthly']) echo "checked=\"checked\""; ?> /> - <?= gettext("reset at each month ('0 0 1 * *')"); ?> - <br /> - <input name="pppoe_pr_preset_val" type="radio" id="pppoe_weekly" value="weekly" <?php if ($pconfig['pppoe_weekly']) echo "checked=\"checked\""; ?> /> - <?= gettext("reset at each week ('0 0 * * 0')"); ?> - <br /> - <input name="pppoe_pr_preset_val" type="radio" id="pppoe_daily" value="daily" <?php if ($pconfig['pppoe_daily']) echo "checked=\"checked\""; ?> /> - <?= gettext("reset at each day ('0 0 * * *')"); ?> - <br /> - <input name="pppoe_pr_preset_val" type="radio" id="pppoe_hourly" value="hourly" <?php if ($pconfig['pppoe_hourly']) echo "checked=\"checked\""; ?> /> - <?= gettext("reset at each hour ('0 * * * *')"); ?> - </p> + <tr> + <td width="22%" valign="top" class="vncellreq">Gateway</td> + <td width="78%" class="vtable"> + <select name="gateway" class="formselect" id="gateway"> + <option value="none" selected>None</option> + <?php + if(count($a_gateways) > 0) { + foreach ($a_gateways as $gateway) { + if($gateway['interface'] == $if) { + ?> + <option value="<?=$gateway['name'];?>" <?php if ($gateway['name'] == $pconfig['gateway']) echo "selected"; ?>> + <?=htmlspecialchars($gateway['name']);?> + </option> + <?php + } + } + } + ?> + </select> + <br/> + Select a existing Gateway from the list or add one on the <a href="/system_gateways.php">Gateways</a> page<br> </td> </tr> </table> </td> - </tr> - </table> - </td> - </tr> - <tr style="display:none;" name="pptp" id="pptp"> - <td colspan="2"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">PPTP configuration</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Username</td> - <td width="78%" class="vtable"><input name="pptp_username" type="text" class="formfld user" id="pptp_username" size="20" value="<?=htmlspecialchars($pconfig['pptp_username']);?>"> - </td> </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Password</td> - <td width="78%" class="vtable"> - <input name="pptp_password" type="text" class="formfld pwd" id="pptp_password" size="20" value="<?=htmlspecialchars($pconfig['pptp_password']);?>"> + <tr style="display:none;" name="dhcp" id="dhcp"> + <td colspan="2"> + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">DHCP client configuration</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Hostname</td> + <td width="78%" class="vtable"> + <input name="dhcphostname" type="text" class="formfld unknown" id="dhcphostname" size="40" value="<?=htmlspecialchars($pconfig['dhcphostname']);?>"> + <br> + The value in this field is sent as the DHCP client identifier + and hostname when requesting a DHCP lease. Some ISPs may require + this (for client identification). + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Alias IP address</td> + <td width="78%" class="vtable"> + <input name="alias-address" type="text" class="formfld unknown" id="alias-address" size="20" value="<?=htmlspecialchars($pconfig['alias-address']);?>"> + <select name="alias-subnet" class="formselect" id="alias-subnet"> + <?php + for ($i = 32; $i > 0; $i--) { + if($i <> 31) { + echo "<option value=\"{$i}\" "; + if ($i == $pconfig['alias-subnet']) echo "selected"; + echo ">" . $i . "</option>"; + } + } + ?> + </select> + The value in this field is used as a fixed alias IP address by the + DHCP client. + </td> + </tr> + </table> </td> </tr> - <tr> - <td width="22%" width="100" valign="top" class="vncellreq">Local IP address</td> - <td width="78%" class="vtable"> - <input name="pptp_local" type="text" class="formfld unknown" id="pptp_local" size="20" value="<?=htmlspecialchars($pconfig['pptp_local']);?>"> - / - <select name="pptp_subnet" class="formselect" id="pptp_subnet"> - <?php for ($i = 31; $i > 0; $i--): ?> - <option value="<?=$i;?>" <?php if ($i == $pconfig['pptp_subnet']) echo "selected"; ?>> - <?=$i;?> - </option> - <?php endfor; ?> - </select> - </td> - </tr> - <tr> - <td width="22%" width="100" valign="top" class="vncellreq">Remote IP address</td> - <td width="78%" class="vtable"> <input name="pptp_remote" type="text" class="formfld unknown" id="pptp_remote" size="20" value="<?=htmlspecialchars($pconfig['pptp_remote']);?>"> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Dial on demand</td> - <td width="78%" class="vtable"> - <input name="pptp_dialondemand" type="checkbox" id="pptp_dialondemand" value="enable" <?php if ($pconfig['pptp_dialondemand']) echo "checked"; ?>" > - <strong>Enable Dial-On-Demand mode</strong><br> - This option causes the interface to operate in dial-on-demand mode, allowing you to have a <i>virtual full time</i> connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Idle timeout</td> - <td width="78%" class="vtable"> - <input name="pptp_idletimeout" type="text" class="formfld unknown" id="pptp_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pptp_idletimeout']);?>"> seconds<br>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100" valign="top"></td> - <td> - <br/> - <input name="Submit" type="submit" class="formbtn" value="Save"> - </td> - </tr> - <?php - /* Wireless interface? */ - if (isset($wancfg['wireless'])): - ?> - <tr> - <td colspan="2" valign="top" height="16"></td> - </tr> - <tr> - <td colspan="2" valign="top" class="listtopic">Wireless configuration</td> - </tr> - <tr> - <td valign="top" class="vncellreq">Standard</td> - <td class="vtable"> - <select name="standard" class="formselect" id="standard"> + <tr style="display:none;" name="pppoe" id="pppoe"> + <td colspan="2"> + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">PPPoE configuration</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Username</td> + <td width="78%" class="vtable"> + <input name="pppoe_username" type="text" class="formfld user" id="pppoe_username" size="20" value="<?=htmlspecialchars($pconfig['pppoe_username']);?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Password</td> + <td width="78%" class="vtable"> + <input name="pppoe_password" type="password" class="formfld pwd" id="pppoe_password" size="20" value="<?=htmlspecialchars($pconfig['pppoe_password']);?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Service name</td> + <td width="78%" class="vtable"><input name="provider" type="text" class="formfld unknown" id="provider" size="20" value="<?=htmlspecialchars($pconfig['provider']);?>"> + <br> <span class="vexpl">Hint: this field can usually be left empty</span> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Dial on demand</td> + <td width="78%" class="vtable"> + <input name="pppoe_dialondemand" type="checkbox" id="pppoe_dialondemand" value="enable" <?php if ($pconfig['pppoe_dialondemand']) echo "checked"; ?>" > + <strong>Enable Dial-On-Demand mode</strong><br> + This option causes the interface to operate in dial-on-demand mode, allowing you to have a <i>virtual full time</i> connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Idle timeout</td> + <td width="78%" class="vtable"> + <input name="pppoe_idletimeout" type="text" class="formfld unknown" id="pppoe_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pppoe_idletimeout']);?>"> seconds<br>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Periodic reset");?></td> + <td width="78%" class="vtable"> + <input name="pppoe_preset" type="checkbox" id="pppoe_preset" value="yes" <?php if ($pconfig['pppoe_preset']) echo "checked=\"checked\""; ?> onclick="Effect.toggle('presetwrap', 'appear', { duration: 1.0 });" /> + <?= gettext("enable periodic PPPoE resets"); ?> + <br /> + <?php if ($pconfig['pppoe_preset']): ?> + <table id="presetwrap" cellspacing="0" cellpadding="0" width="100%"> + <?php else: ?> + <table id="presetwrap" cellspacing="0" cellpadding="0" width="100%" style="display: none;"> + <?php endif; ?> + <tr> + <td align="left" valign="top"> + <p style="margin: 4px; padding: 4px 0 4px 0; width: 94%;"> + <input name="pppoe_pr_type" type="radio" id="pppoe_pr_custom" value="custom" <?php if ($pconfig['pppoe_pr_custom']) echo "checked=\"checked\""; ?> onclick="if (this.checked) { Effect.Appear('pppoecustomwrap', { duration: 1.0 }); Effect.Fade('pppoepresetwrap', { duration: 1.0 }); }" /> + <?= gettext("provide a custom reset time"); ?> + <br /> + <input name="pppoe_pr_type" type="radio" id="pppoe_pr_preset" value="preset" <?php if ($pconfig['pppoe_pr_preset']) echo "checked=\"checked\""; ?> onclick="if (this.checked) { Effect.Appear('pppoepresetwrap', { duration: 1.0 }); Effect.Fade('pppoecustomwrap', { duration: 1.0 }); }" /> + <?= gettext("select reset time from a preset"); ?> + </p> + <?php if ($pconfig['pppoe_pr_custom']): ?> + <p style="margin: 2px; padding: 4px; width: 94%;" id="pppoecustomwrap"> + <?php else: ?> + <p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoecustomwrap"> + <?php endif; ?> + <input type="text" name="pppoe_resethour" class="fd_incremental_inp_range_0_23 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resethour" value="<?= $pconfig['pppoe_resethour']; ?>" size="3" /> + <?= gettext("hour (0-23)"); ?><br /> + <input type="text" name="pppoe_resetminute" class="fd_incremental_inp_range_0_59 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resetminute" value="<?= $pconfig['pppoe_resetminute']; ?>" size="3" /> + <?= gettext("minute (0-59)"); ?><br /> + <input name="pppoe_resetdate" type="text" class="w8em format-m-d-y highlight-days-67" id="pppoe_resetdate" maxlength="10" size="10" value="<?=htmlspecialchars($pconfig['pppoe_resetdate']);?>" /> + <?= gettext("reset at a specific date (mm/dd/yyyy)"); ?> + <br /> <br /> + <span class="red"><strong>Note: </strong></span> + If you leave the date field empty, the reset will be executed each day at the time you did specify using the minutes and hour field. + </p> + <?php if ($pconfig['pppoe_pr_preset']): ?> + <p style="margin: 2px; padding: 4px; width: 94%;" id="pppoepresetwrap"> + <?php else: ?> + <p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoepresetwrap"> + <?php endif; ?> + <input name="pppoe_pr_preset_val" type="radio" id="pppoe_monthly" value="monthly" <?php if ($pconfig['pppoe_monthly']) echo "checked=\"checked\""; ?> /> + <?= gettext("reset at each month ('0 0 1 * *')"); ?> + <br /> + <input name="pppoe_pr_preset_val" type="radio" id="pppoe_weekly" value="weekly" <?php if ($pconfig['pppoe_weekly']) echo "checked=\"checked\""; ?> /> + <?= gettext("reset at each week ('0 0 * * 0')"); ?> + <br /> + <input name="pppoe_pr_preset_val" type="radio" id="pppoe_daily" value="daily" <?php if ($pconfig['pppoe_daily']) echo "checked=\"checked\""; ?> /> + <?= gettext("reset at each day ('0 0 * * *')"); ?> + <br /> + <input name="pppoe_pr_preset_val" type="radio" id="pppoe_hourly" value="hourly" <?php if ($pconfig['pppoe_hourly']) echo "checked=\"checked\""; ?> /> + <?= gettext("reset at each hour ('0 * * * *')"); ?> + </p> + </td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + <tr style="display:none;" name="pptp" id="pptp"> + <td colspan="2"> + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">PPTP configuration</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Username</td> + <td width="78%" class="vtable"><input name="pptp_username" type="text" class="formfld user" id="pptp_username" size="20" value="<?=htmlspecialchars($pconfig['pptp_username']);?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Password</td> + <td width="78%" class="vtable"> + <input name="pptp_password" type="text" class="formfld pwd" id="pptp_password" size="20" value="<?=htmlspecialchars($pconfig['pptp_password']);?>"> + </td> + </tr> + <tr> + <td width="22%" width="100" valign="top" class="vncellreq">Local IP address</td> + <td width="78%" class="vtable"> + <input name="pptp_local" type="text" class="formfld unknown" id="pptp_local" size="20" value="<?=htmlspecialchars($pconfig['pptp_local']);?>"> + / + <select name="pptp_subnet" class="formselect" id="pptp_subnet"> + <?php for ($i = 31; $i > 0; $i--): ?> + <option value="<?=$i;?>" <?php if ($i == $pconfig['pptp_subnet']) echo "selected"; ?>> + <?=$i;?> + </option> + <?php endfor; ?> + </select> + </td> + </tr> + <tr> + <td width="22%" width="100" valign="top" class="vncellreq">Remote IP address</td> + <td width="78%" class="vtable"> <input name="pptp_remote" type="text" class="formfld unknown" id="pptp_remote" size="20" value="<?=htmlspecialchars($pconfig['pptp_remote']);?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Dial on demand</td> + <td width="78%" class="vtable"> + <input name="pptp_dialondemand" type="checkbox" id="pptp_dialondemand" value="enable" <?php if ($pconfig['pptp_dialondemand']) echo "checked"; ?>" > + <strong>Enable Dial-On-Demand mode</strong><br> + This option causes the interface to operate in dial-on-demand mode, allowing you to have a <i>virtual full time</i> connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Idle timeout</td> + <td width="78%" class="vtable"> + <input name="pptp_idletimeout" type="text" class="formfld unknown" id="pptp_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pptp_idletimeout']);?>"> seconds<br>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="100" valign="top"></td> + <td> + <br/> + <input name="Submit" type="submit" class="formbtn" value="Save"> + </td> + </tr> + <?php + /* Wireless interface? */ + if (isset($wancfg['wireless'])): + ?> + <tr> + <td colspan="2" valign="top" height="16"></td> + </tr> + <tr> + <td colspan="2" valign="top" class="listtopic">Wireless configuration</td> + </tr> + <tr> + <td valign="top" class="vncellreq">Standard</td> + <td class="vtable"> + <select name="standard" class="formselect" id="standard"> + <?php + foreach($wl_modes as $wl_standard => $wl_channels) { + echo "<option "; + if ($pconfig['standard'] == "$wl_standard") + echo "selected "; + echo "value=\"$wl_standard\">802.$wl_standard</option>\n"; + } + ?> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncellreq">Mode</td> + <td class="vtable"> + <select name="mode" class="formselect" id="mode"> + <option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss">Infrastructure (BSS)</option> + <option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc">Ad-hoc (IBSS)</option> + <option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap">Access Point</option> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncellreq">802.11g OFDM Protection Mode</td> + <td class="vtable"> + <select name="protmode" class="formselect" id="protmode"> + <option <? if ($pconfig['protmode'] == 'off') echo "selected";?> value="off">Protection mode off</option> + <option <? if ($pconfig['protmode'] == 'cts') echo "selected";?> value="cts">Protection mode CTS to self</option> + <option <? if ($pconfig['protmode'] == 'rtscts') echo "selected";?> value="rtscts">Protection mode RTS and CTS</option> + </select> + <br/> + For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network. + <br/> + </td> + </tr> + <tr> + <td valign="top" class="vncellreq">SSID</td> + <td class="vtable"><input name="ssid" type="text" class="formfld unknown" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']); ?>"> + </td> + </tr> + <tr> + <td valign="top" class="vncell">802.11g only</td> + <td class="vtable"><input name="pureg_enable" type="checkbox" value="yes" class="formfld" id="pureg_enable" <? if ($pconfig['pureg_enable']) echo "checked";?>> + <br/>When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate). + </td> + </tr> + <tr> + <td valign="top" class="vncell">Allow intra-BSS communication</td> + <td class="vtable"><input name="apbridge_enable" type="checkbox" value="yes" class="formfld" id="apbridge_enable" <? if ($pconfig['apbridge_enable']) echo "checked";?>> + <br/> + When operating as an access point, enable this if you want to pass packets between wireless clients directly. + <br/> + Disabling the internal bridging is useful when traffic is to be processed with packet filtering. + </td> + </tr> + <tr> + <td valign="top" class="vncell">Enable WME</td> + <td class="vtable"><input name="wme_enable" type="checkbox" class="formfld" id="wme_enable" value="yes" <? if ($pconfig['wme_enable']) echo "checked";?>> + <br/>Setting this option will force the card to use WME (wireless QoS). + </td> + </tr> + <tr> + <td valign="top" class="vncell">Enable Hide SSID</td> + <td class="vtable"><input name="hidessid_enable" type="checkbox" class="formfld" id="hidessid_enable" value="yes" <? if ($pconfig['hidessid_enable']) echo "checked";?>> + <br/> + Setting this option will force the card to NOT broadcast its SSID + <br/> + (this might create problems for some clients). </td> + </tr> + <tr> + <td valign="top" class="vncellreq">Transmit power</td> + <td class="vtable"> + <select name="txpower" class="formselect" id="txpower"> + <? + for($x = 99; $x > 0; $x--) { + if($pconfig["txpower"] == $x) + $SELECTED = " SELECTED"; + else + $SELECTED = ""; + echo "<option {$SELECTED}>{$x}</option>\n"; + } + ?> + </select><br/> + Note: Typically only a few discreet power settings are available and the driver will use the setting closest to the specified value. Not all adaptors support changing the transmit power setting. + </td> + </tr> + <tr> + <td valign="top" class="vncellreq">Channel</td> + <td class="vtable"> + <select name="channel" class="formselect" id="channel"> + <option <? if ($pconfig['channel'] == 0) echo "selected"; ?> value="0">Auto</option> + <?php + foreach($wl_modes as $wl_standard => $wl_channels) { + if($wl_standard == "11g") { $wl_standard = "11b/g"; } + foreach($wl_channels as $wl_channel) { + echo "<option "; + if ($pconfig['channel'] == "$wl_channel") { + echo "selected "; + } + echo "value=\"$wl_channel\">$wl_standard - $wl_channel</option>\n"; + } + } + ?> + </select> + <br/> + Note: Not all channels may be supported by your card + </td> + </tr> + <tr> + <td valign="top" class="vncell">Distance setting</td> + <td class="vtable"><input name="distance" type="text" class="formfld unknown" id="distance" size="5" value="<?=htmlspecialchars($pconfig['distance']);?>"> + <br/> + Note: This field can be used to tune ACK/CTS timers to fit the distance between AP and Client<br/> + (measured in Meters and works only for Atheros based cards !) + </td> + </tr> + <tr> + <td valign="top" class="vncell">WEP</td> + <td class="vtable"> <input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <? if ($pconfig['wep_enable']) echo "checked"; ?>> + <strong>Enable WEP</strong> + <table border="0" cellspacing="0" cellpadding="0"> + <tr> + <td> </td> + <td> </td> + <td> TX key </td> + </tr> + <tr> + <td>Key 1: </td> + <td> <input name="key1" type="text" class="formfld unknown" id="key1" size="30" value="<?=htmlspecialchars($pconfig['key1']);?>"></td> + <td align="center"> <input name="txkey" type="radio" value="1" <? if ($pconfig['txkey'] == 1) echo "checked";?>></td> + </tr> + <tr> + <td>Key 2: </td> + <td><input name="key2" type="text" class="formfld unknown" id="key2" size="30" value="<?=htmlspecialchars($pconfig['key2']);?>"></td> + <td align="center"> <input name="txkey" type="radio" value="2" <? if ($pconfig['txkey'] == 2) echo "checked";?>></td> + </tr> + <tr> + <td>Key 3: </td> + <td> <input name="key3" type="text" class="formfld unknown" id="key3" size="30" value="<?=htmlspecialchars($pconfig['key3']);?>"></td> + <td align="center"> <input name="txkey" type="radio" value="3" <? if ($pconfig['txkey'] == 3) echo "checked";?>></td> + </tr> + <tr> + <td>Key 4: </td> + <td><input name="key4" type="text" class="formfld unknown" id="key4" size="30" value="<?=htmlspecialchars($pconfig['key4']);?>"></td> + <td align="center"> <input name="txkey" type="radio" value="4" <? if ($pconfig['txkey'] == 4) echo "checked";?>></td> + </tr> + </table> + <br/> + 40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by '0x'.<br/> + 104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by '0x'. + </td> + </tr> + <tr> + <td valign="top" class="vncell">WPA</td> + <td class="vtable"><input name="wpa_enable" type="checkbox" class="formfld" id="wpa_enable" value="yes" <? if ($pconfig['wpa_enable']) echo "checked"; ?>> + <strong>Enable WPA</strong> + <br/><br/> + <table border="0" cellspacing="0" cellpadding="0"> + <tr> + <td> </td> + <td> WPA Pre Shared Key </td> + </tr> + <tr> + <td>PSK: </td> + <td><input name="passphrase" type="text" class="formfld unknown" id="passphrase" size="66" value="<?=htmlspecialchars($pconfig['passphrase']);?>"></td> + </tr> + </table> + <br/>Passphrase must be from 8 to 63 chars. + </td> + </tr> + <tr> + <td valign="top" class="vncell">WPA Mode</td> + <td class="vtable"> + <select name="wpa_mode" class="formselect" id="wpa_mode"> + <option <? if ($pconfig['wpa_mode'] == '1') echo "selected";?> value="1">WPA</option> + <option <? if ($pconfig['wpa_mode'] == '2') echo "selected";?> value="2">WPA2</option> + <option <? if ($pconfig['wpa_mode'] == '3') echo "selected";?> value="3">Both</option> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncell">WPA Key Management Mode</td> + <td class="vtable"> + <select name="wpa_key_mgmt" class="formselect" id="wpa_key_mgmt"> + <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK">Pre Shared Key</option> + <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP">Extensible Authentication Protocol</option> + <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK WPA-EAP') echo "selected";?> value="WPA-PSK WPA-EAP">Both</option> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncell">Authentication</td> + <td class="vtable"> + <select name="auth_algs" class="formselect" id="auth_algs"> + <option <? if ($pconfig['auth_algs'] == '1') echo "selected";?> value="1">Open System Authentication</option> + <option <? if ($pconfig['auth_algs'] == '2') echo "selected";?> value="2">Shared Key Authentication</option> + <option <? if ($pconfig['auth_algs'] == '3') echo "selected";?> value="3">Both</option> + </select> + <br/>Note: Shared Key Authentication requires WEP.</br> + </td> + </tr> + <tr> + <td valign="top" class="vncell">WPA Pairwise</td> + <td class="vtable"> + <select name="wpa_pairwise" class="formselect" id="wpa_pairwise"> + <option <? if ($pconfig['wpa_pairwise'] == 'CCMP TKIP') echo "selected";?> value="CCMP TKIP">Both</option> + <option <? if ($pconfig['wpa_pairwise'] == 'CCMP') echo "selected";?> value="CCMP">AES</option> + <option <? if ($pconfig['wpa_pairwise'] == 'TKIP') echo "selected";?> value="TKIP">TKIP</option> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncell">Key Rotation</td> + <td class="vtable"><input name="wpa_group_rekey" type="text" class="formfld unknown" id="wpa_group_rekey" size="30" value="<? echo $pconfig['wpa_group_rekey'] ? $pconfig['wpa_group_rekey'] : "60";?>"> + <br/>Allowed values are 1-9999 but should not be longer than Master Key Regeneration time. + </td> + </tr> + <tr> + <td valign="top" class="vncell">Master Key Regeneration</td> + <td class="vtable"><input name="wpa_gmk_rekey" type="text" class="formfld" id="wpa_gmk_rekey" size="30" value="<? echo $pconfig['wpa_gmk_rekey'] ? $pconfig['wpa_gmk_rekey'] : "3600";?>"> + <br/>Allowed values are 1-9999 but should not be shorter than Key Rotation time. + </td> + </tr> + <tr> + <td valign="top" class="vncell">Strict Key Regeneration</td> + <td class="vtable"><input name="wpa_strict_rekey" type="checkbox" value="yes" class="formfld" id="wpa_strict_rekey" <? if ($pconfig['wpa_strict_rekey']) echo "checked"; ?>> + <br/>Setting this option will force the AP to rekey whenever a client disassociates. + </td> + </tr> + <tr> + <td valign="top" class="vncell">Enable IEEE802.1X</td> + <td class="vtable"><input name="ieee8021x" type="checkbox" value="yes" class="formfld" id="ieee8021x" <? if ($pconfig['ieee8021x']) echo "checked";?>> + <br/>Setting this option will enable 802.1x authentication. + </td> + </tr> + <? endif; ?> + <tr> + <td colspan="2" valign="top" height="10"></td> + </tr> + <tr> + <td colspan="2" valign="top" class="listtopic">Other</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">FTP Helper</td> + <td width="78%" class="vtable"> + <input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if ($pconfig['disableftpproxy']) echo "checked"; ?> /> + <strong>Disable the userland FTP-Proxy application</strong> + <br /> + </td> + </tr> + <tr> + <td height="16" colspan="2" valign="top"></td> + </tr> + <tr> + <td valign="middle"> </td> + <td class="vtable"><a name="rfc1918"></a> <input name="blockpriv" type="checkbox" id="blockpriv" value="yes" <?php if ($pconfig['blockpriv']) echo "checked"; ?>> + <strong>Block private networks</strong><br> + When set, this option blocks traffic from IP addresses that + are reserved for private<br> + networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as + well as loopback addresses<br> + (127/8). You should generally leave this option turned on, + unless your WAN network<br> + lies in such a private address space, too. + </td> + </tr> + <tr> + <td valign="middle"> </td> + <td class="vtable"> <input name="blockbogons" type="checkbox" id="blockbogons" value="yes" <?php if ($pconfig['blockbogons']) echo "checked"; ?>> + <strong>Block bogon networks</strong><br> + When set, this option blocks traffic from IP addresses that + are reserved (but not RFC 1918) or not yet assigned by IANA.<br> + Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive. + </td> + </tr> + </tr> + <tr> + <td width="100" valign="top"> + + </td> + <td> + <br/> + <input name="Submit" type="submit" class="formbtn" value="Save"> + <input name="if" type="hidden" id="if" value="<?=$if;?>"> + </td> + </tr> + </table> + </td> + </table> + </form> + <script language="JavaScript"> + <!-- <?php - foreach($wl_modes as $wl_standard => $wl_channels) { - echo "<option "; - if ($pconfig['standard'] == "$wl_standard") - echo "selected "; - echo "value=\"$wl_standard\">802.$wl_standard</option>\n"; - } + if ($if == "wan" || $if == "lan") + echo "\$('allcfg').appear();"; + else + echo "show_allcfg(document.iform.enable);"; + echo "updateType('{$pconfig['type']}')"; ?> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncellreq">Mode</td> - <td class="vtable"> - <select name="mode" class="formselect" id="mode"> - <option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss">Infrastructure (BSS)</option> - <option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc">Ad-hoc (IBSS)</option> - <option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap">Access Point</option> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncellreq">802.11g OFDM Protection Mode</td> - <td class="vtable"> - <select name="protmode" class="formselect" id="protmode"> - <option <? if ($pconfig['protmode'] == 'off') echo "selected";?> value="off">Protection mode off</option> - <option <? if ($pconfig['protmode'] == 'cts') echo "selected";?> value="cts">Protection mode CTS to self</option> - <option <? if ($pconfig['protmode'] == 'rtscts') echo "selected";?> value="rtscts">Protection mode RTS and CTS</option> - </select> - <br/> - For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network. - <br/> - </td> - </tr> - <tr> - <td valign="top" class="vncellreq">SSID</td> - <td class="vtable"><input name="ssid" type="text" class="formfld unknown" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']); ?>"> - </td> - </tr> - <tr> - <td valign="top" class="vncell">802.11g only</td> - <td class="vtable"><input name="pureg_enable" type="checkbox" value="yes" class="formfld" id="pureg_enable" <? if ($pconfig['pureg_enable']) echo "checked";?>> - <br/>When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate). - </td> - </tr> - <tr> - <td valign="top" class="vncell">Allow intra-BSS communication</td> - <td class="vtable"><input name="apbridge_enable" type="checkbox" value="yes" class="formfld" id="apbridge_enable" <? if ($pconfig['apbridge_enable']) echo "checked";?>> - <br/> - When operating as an access point, enable this if you want to pass packets between wireless clients directly. - <br/> - Disabling the internal bridging is useful when traffic is to be processed with packet filtering. - </td> - </tr> - <tr> - <td valign="top" class="vncell">Enable WME</td> - <td class="vtable"><input name="wme_enable" type="checkbox" class="formfld" id="wme_enable" value="yes" <? if ($pconfig['wme_enable']) echo "checked";?>> - <br/>Setting this option will force the card to use WME (wireless QoS). - </td> - </tr> - <tr> - <td valign="top" class="vncell">Enable Hide SSID</td> - <td class="vtable"><input name="hidessid_enable" type="checkbox" class="formfld" id="hidessid_enable" value="yes" <? if ($pconfig['hidessid_enable']) echo "checked";?>> - <br/> - Setting this option will force the card to NOT broadcast its SSID - <br/> - (this might create problems for some clients). </td> - </tr> - <tr> - <td valign="top" class="vncellreq">Transmit power</td> - <td class="vtable"> - <select name="txpower" class="formselect" id="txpower"> - <? - for($x = 99; $x > 0; $x--) { - if($pconfig["txpower"] == $x) - $SELECTED = " SELECTED"; - else - $SELECTED = ""; - echo "<option {$SELECTED}>{$x}</option>\n"; - } - ?> - </select><br/> - Note: Typically only a few discreet power settings are available and the driver will use the setting closest to the specified value. Not all adaptors support changing the transmit power setting. - </td> - </tr> - <tr> - <td valign="top" class="vncellreq">Channel</td> - <td class="vtable"> - <select name="channel" class="formselect" id="channel"> - <option <? if ($pconfig['channel'] == 0) echo "selected"; ?> value="0">Auto</option> - <?php - foreach($wl_modes as $wl_standard => $wl_channels) { - if($wl_standard == "11g") { $wl_standard = "11b/g"; } - foreach($wl_channels as $wl_channel) { - echo "<option "; - if ($pconfig['channel'] == "$wl_channel") { - echo "selected "; - } - echo "value=\"$wl_channel\">$wl_standard - $wl_channel</option>\n"; - } - } - ?> - </select> - <br/> - Note: Not all channels may be supported by your card - </td> - </tr> - <tr> - <td valign="top" class="vncell">Distance setting</td> - <td class="vtable"><input name="distance" type="text" class="formfld unknown" id="distance" size="5" value="<?=htmlspecialchars($pconfig['distance']);?>"> - <br/> - Note: This field can be used to tune ACK/CTS timers to fit the distance between AP and Client<br/> - (measured in Meters and works only for Atheros based cards !) - </td> - </tr> - <tr> - <td valign="top" class="vncell">WEP</td> - <td class="vtable"> <input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <? if ($pconfig['wep_enable']) echo "checked"; ?>> - <strong>Enable WEP</strong> - <table border="0" cellspacing="0" cellpadding="0"> - <tr> - <td> </td> - <td> </td> - <td> TX key </td> - </tr> - <tr> - <td>Key 1: </td> - <td> <input name="key1" type="text" class="formfld unknown" id="key1" size="30" value="<?=htmlspecialchars($pconfig['key1']);?>"></td> - <td align="center"> <input name="txkey" type="radio" value="1" <? if ($pconfig['txkey'] == 1) echo "checked";?>></td> - </tr> - <tr> - <td>Key 2: </td> - <td><input name="key2" type="text" class="formfld unknown" id="key2" size="30" value="<?=htmlspecialchars($pconfig['key2']);?>"></td> - <td align="center"> <input name="txkey" type="radio" value="2" <? if ($pconfig['txkey'] == 2) echo "checked";?>></td> - </tr> - <tr> - <td>Key 3: </td> - <td> <input name="key3" type="text" class="formfld unknown" id="key3" size="30" value="<?=htmlspecialchars($pconfig['key3']);?>"></td> - <td align="center"> <input name="txkey" type="radio" value="3" <? if ($pconfig['txkey'] == 3) echo "checked";?>></td> - </tr> - <tr> - <td>Key 4: </td> - <td><input name="key4" type="text" class="formfld unknown" id="key4" size="30" value="<?=htmlspecialchars($pconfig['key4']);?>"></td> - <td align="center"> <input name="txkey" type="radio" value="4" <? if ($pconfig['txkey'] == 4) echo "checked";?>></td> - </tr> - </table> - <br/> - 40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by '0x'.<br/> - 104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by '0x'. - </td> - </tr> - <tr> - <td valign="top" class="vncell">WPA</td> - <td class="vtable"><input name="wpa_enable" type="checkbox" class="formfld" id="wpa_enable" value="yes" <? if ($pconfig['wpa_enable']) echo "checked"; ?>> - <strong>Enable WPA</strong> - <br/><br/> - <table border="0" cellspacing="0" cellpadding="0"> - <tr> - <td> </td> - <td> WPA Pre Shared Key </td> - </tr> - <tr> - <td>PSK: </td> - <td><input name="passphrase" type="text" class="formfld unknown" id="passphrase" size="66" value="<?=htmlspecialchars($pconfig['passphrase']);?>"></td> - </tr> - </table> - <br/>Passphrase must be from 8 to 63 chars. - </td> - </tr> - <tr> - <td valign="top" class="vncell">WPA Mode</td> - <td class="vtable"> - <select name="wpa_mode" class="formselect" id="wpa_mode"> - <option <? if ($pconfig['wpa_mode'] == '1') echo "selected";?> value="1">WPA</option> - <option <? if ($pconfig['wpa_mode'] == '2') echo "selected";?> value="2">WPA2</option> - <option <? if ($pconfig['wpa_mode'] == '3') echo "selected";?> value="3">Both</option> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncell">WPA Key Management Mode</td> - <td class="vtable"> - <select name="wpa_key_mgmt" class="formselect" id="wpa_key_mgmt"> - <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK">Pre Shared Key</option> - <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP">Extensible Authentication Protocol</option> - <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK WPA-EAP') echo "selected";?> value="WPA-PSK WPA-EAP">Both</option> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncell">Authentication</td> - <td class="vtable"> - <select name="auth_algs" class="formselect" id="auth_algs"> - <option <? if ($pconfig['auth_algs'] == '1') echo "selected";?> value="1">Open System Authentication</option> - <option <? if ($pconfig['auth_algs'] == '2') echo "selected";?> value="2">Shared Key Authentication</option> - <option <? if ($pconfig['auth_algs'] == '3') echo "selected";?> value="3">Both</option> - </select> - <br/>Note: Shared Key Authentication requires WEP.</br> - </td> - </tr> - <tr> - <td valign="top" class="vncell">WPA Pairwise</td> - <td class="vtable"> - <select name="wpa_pairwise" class="formselect" id="wpa_pairwise"> - <option <? if ($pconfig['wpa_pairwise'] == 'CCMP TKIP') echo "selected";?> value="CCMP TKIP">Both</option> - <option <? if ($pconfig['wpa_pairwise'] == 'CCMP') echo "selected";?> value="CCMP">AES</option> - <option <? if ($pconfig['wpa_pairwise'] == 'TKIP') echo "selected";?> value="TKIP">TKIP</option> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncell">Key Rotation</td> - <td class="vtable"><input name="wpa_group_rekey" type="text" class="formfld unknown" id="wpa_group_rekey" size="30" value="<? echo $pconfig['wpa_group_rekey'] ? $pconfig['wpa_group_rekey'] : "60";?>"> - <br/>Allowed values are 1-9999 but should not be longer than Master Key Regeneration time. - </td> - </tr> - <tr> - <td valign="top" class="vncell">Master Key Regeneration</td> - <td class="vtable"><input name="wpa_gmk_rekey" type="text" class="formfld" id="wpa_gmk_rekey" size="30" value="<? echo $pconfig['wpa_gmk_rekey'] ? $pconfig['wpa_gmk_rekey'] : "3600";?>"> - <br/>Allowed values are 1-9999 but should not be shorter than Key Rotation time. - </td> - </tr> - <tr> - <td valign="top" class="vncell">Strict Key Regeneration</td> - <td class="vtable"><input name="wpa_strict_rekey" type="checkbox" value="yes" class="formfld" id="wpa_strict_rekey" <? if ($pconfig['wpa_strict_rekey']) echo "checked"; ?>> - <br/>Setting this option will force the AP to rekey whenever a client disassociates. - </td> - </tr> - <tr> - <td valign="top" class="vncell">Enable IEEE802.1X</td> - <td class="vtable"><input name="ieee8021x" type="checkbox" value="yes" class="formfld" id="ieee8021x" <? if ($pconfig['ieee8021x']) echo "checked";?>> - <br/>Setting this option will enable 802.1x authentication. - </td> - </tr> - <? endif; ?> - <tr> - <td colspan="2" valign="top" height="10"></td> - </tr> - <tr> - <td colspan="2" valign="top" class="listtopic">Other</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">FTP Helper</td> - <td width="78%" class="vtable"> - <input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if ($pconfig['disableftpproxy']) echo "checked"; ?> /> - <strong>Disable the userland FTP-Proxy application</strong> - <br /> - </td> - </tr> - <tr> - <td height="16" colspan="2" valign="top"></td> - </tr> - <tr> - <td valign="middle"> </td> - <td class="vtable"><a name="rfc1918"></a> <input name="blockpriv" type="checkbox" id="blockpriv" value="yes" <?php if ($pconfig['blockpriv']) echo "checked"; ?>> - <strong>Block private networks</strong><br> - When set, this option blocks traffic from IP addresses that - are reserved for private<br> - networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as - well as loopback addresses<br> - (127/8). You should generally leave this option turned on, - unless your WAN network<br> - lies in such a private address space, too.</td> - </tr> - <tr> - <td valign="middle"> </td> - <td class="vtable"> <input name="blockbogons" type="checkbox" id="blockbogons" value="yes" <?php if ($pconfig['blockbogons']) echo "checked"; ?>> - <strong>Block bogon networks</strong><br> - When set, this option blocks traffic from IP addresses that - are reserved (but not RFC 1918) or not yet assigned by IANA.<br> - Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive.</td> - </tr> - </tr> - <tr> - <td width="100" valign="top"> - - </td> - <td> - <br/> - <input name="Submit" type="submit" class="formbtn" value="Save"> - <input name="if" type="hidden" id="if" value="<?=$if;?>"> - </td> - </tr> - </table> - </td> -</table> -</form> -<script language="JavaScript"> -<!-- -<?php -if ($if == "wan" || $if == "lan") - echo "\$('allcfg').appear();"; -else - echo "show_allcfg(document.iform.enable);"; -echo "updateType('{$pconfig['type']}')"; -?> -//--> -</script> -<?php include("fend.inc"); ?> -</body> + //--> + </script> + <?php include("fend.inc"); ?> + </body> </html> |