diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-05-22 16:51:57 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-05-22 16:51:57 -0300 |
commit | 626fab04a3cfee9fa918c16a87159f9b6e5ef2f8 (patch) | |
tree | fd7ad0de61d43c7638d9852d257030168d5a2363 | |
parent | cdeae5766e63f83dc19d1c90ff64e71892a752e2 (diff) | |
parent | b7856e585f1b9dc7d2e413131d9938e796c9871d (diff) | |
download | pfsense-626fab04a3cfee9fa918c16a87159f9b6e5ef2f8.zip pfsense-626fab04a3cfee9fa918c16a87159f9b6e5ef2f8.tar.gz |
Merge pull request #1674 from phil-davis/vpn_pppoe
-rw-r--r-- | usr/local/www/vpn_pppoe.php | 142 | ||||
-rw-r--r-- | usr/local/www/vpn_pppoe_edit.php | 148 |
2 files changed, 170 insertions, 120 deletions
diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php index b523c33..082978a 100644 --- a/usr/local/www/vpn_pppoe.php +++ b/usr/local/www/vpn_pppoe.php @@ -41,20 +41,22 @@ require_once("guiconfig.inc"); require_once("filter.inc"); require_once("vpn.inc"); -if (!is_array($config['pppoes']['pppoe'])) +if (!is_array($config['pppoes']['pppoe'])) { $config['pppoes']['pppoe'] = array(); +} $a_pppoes = &$config['pppoes']['pppoe']; if ($_POST) { - $pconfig = $_POST; + $pconfig = $_POST; - if ($_POST['apply']) { - if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) { - $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.vpn_pppoe.apply")); - foreach ($toapplylist as $pppoeid) { - if (!is_numeric($pppoeid)) + if ($_POST['apply']) { + if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.vpn_pppoe.apply")); + foreach ($toapplylist as $pppoeid) { + if (!is_numeric($pppoeid)) { continue; + } if (is_array($config['pppoes']['pppoe'])) { foreach ($config['pppoes']['pppoe'] as $pppoe) { if ($pppoe['pppoeid'] == $pppoeid) { @@ -63,22 +65,24 @@ if ($_POST) { } } } - } - @unlink("{$g['tmp_path']}/.vpn_pppoe.apply"); - } - $retval = 0; - $retval |= filter_configure(); - $savemsg = get_std_save_message($retval); - clear_subsystem_dirty('vpnpppoe'); - } + } + @unlink("{$g['tmp_path']}/.vpn_pppoe.apply"); + } + $retval = 0; + $retval |= filter_configure(); + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('vpnpppoe'); + } } if ($_GET['act'] == "del") { if ($a_pppoes[$_GET['id']]) { - if ("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid") + if ("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid") { killbypid("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid"); - if (is_dir("{$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'])) + } + if (is_dir("{$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'])) { mwexec("/bin/rm -r {$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid']); + } unset($a_pppoes[$_GET['id']]); write_config(); header("Location: vpn_pppoe.php"); @@ -101,55 +105,61 @@ include("head.inc"); <?php endif; ?> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> -<tr> - <td width="15%" class="listhdrr"><?=gettext("Interface");?></td> - <td width="10%" class="listhdrr"><?=gettext("Local IP");?></td> - <td width="25%" class="listhdrr"><?=gettext("Number of users");?></td> - <td width="25%" class="listhdr"><?=gettext("Description");?></td> - <td width="5%" class="list"> - <table border="0" cellspacing="0" cellpadding="1" summary="pppoe server"> - <tr> - <td valign="middle" width="17"> </td> - <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>" alt="add" /></a></td> - </tr> - </table> - </td> -</tr> - <?php $i = 0; foreach ($a_pppoes as $pppoe): ?> -<tr> - <td class="listlr" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($pppoe['interface']));?> - </td> - <td class="listlr" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars($pppoe['localip']);?> - </td> - <td class="listr" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars($pppoe['n_pppoe_units']);?> - </td> - <td class="listbg" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars($pppoe['descr']);?> - </td> - <td valign="middle" class="list nowrap"> - <table border="0" cellspacing="0" cellpadding="1" summary="icons"> - <tr> - <td valign="middle"><a href="vpn_pppoe_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit PPPoE instance"); ?>" alt="edit" /></a></td> - <td><a href="vpn_pppoe.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete pppoe instance");?>" alt="delete" /></a></td> - </tr> - </table> - </td> -</tr> - <?php $i++; endforeach; ?> -<tr> - <td class="list" colspan="4"></td> - <td class="list"> - <table border="0" cellspacing="0" cellpadding="1" summary="add"> - <tr> - <td valign="middle" width="17"> </td> - <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>" alt="add" /></a></td> - </tr> - </table> - </td> -</tr> + <tr> + <td width="15%" class="listhdrr"><?=gettext("Interface");?></td> + <td width="10%" class="listhdrr"><?=gettext("Local IP");?></td> + <td width="25%" class="listhdrr"><?=gettext("Number of users");?></td> + <td width="25%" class="listhdr"><?=gettext("Description");?></td> + <td width="5%" class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="pppoe server"> + <tr> + <td valign="middle" width="17"> </td> + <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>" alt="add" /></a></td> + </tr> + </table> + </td> + </tr> +<?php + $i = 0; + foreach ($a_pppoes as $pppoe): +?> + <tr> + <td class="listlr" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($pppoe['interface']));?> + </td> + <td class="listlr" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars($pppoe['localip']);?> + </td> + <td class="listr" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars($pppoe['n_pppoe_units']);?> + </td> + <td class="listbg" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars($pppoe['descr']);?> + </td> + <td valign="middle" class="list nowrap"> + <table border="0" cellspacing="0" cellpadding="1" summary="icons"> + <tr> + <td valign="middle"><a href="vpn_pppoe_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit PPPoE instance"); ?>" alt="edit" /></a></td> + <td><a href="vpn_pppoe.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete pppoe instance");?>" alt="delete" /></a></td> + </tr> + </table> + </td> + </tr> +<?php + $i++; + endforeach; +?> + <tr> + <td class="list" colspan="4"></td> + <td class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="add"> + <tr> + <td valign="middle" width="17"> </td> + <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>" alt="add" /></a></td> + </tr> + </table> + </td> + </tr> </table> </form> <?php include("fend.inc"); ?> diff --git a/usr/local/www/vpn_pppoe_edit.php b/usr/local/www/vpn_pppoe_edit.php index f81f16b..e0cc036 100644 --- a/usr/local/www/vpn_pppoe_edit.php +++ b/usr/local/www/vpn_pppoe_edit.php @@ -46,10 +46,11 @@ function vpn_pppoe_get_id() { $vpnid = 1; if (is_array($config['pppoes']['pppoe'])) { foreach ($config['pppoes']['pppoe'] as $pppoe) { - if ($vpnid == $pppoe['pppoeid']) + if ($vpnid == $pppoe['pppoeid']) { $vpnid++; - else + } else { return $vpnid; + } } } @@ -61,10 +62,12 @@ if (!is_array($config['pppoes']['pppoe'])) { } $a_pppoes = &$config['pppoes']['pppoe']; -if (is_numericint($_GET['id'])) +if (is_numericint($_GET['id'])) { $id = $_GET['id']; -if (isset($_POST['id']) && is_numericint($_POST['id'])) +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { $id = $_POST['id']; +} if (isset($id) && $a_pppoes[$id]) { $pppoecfg =& $a_pppoes[$id]; @@ -121,34 +124,42 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); - if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) + if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) { $input_errors[] = gettext("A valid server address must be specified."); - if (($_POST['pppoe_subnet'] && !is_ipaddr($_POST['remoteip']))) + } + if (($_POST['pppoe_subnet'] && !is_ipaddr($_POST['remoteip']))) { $input_errors[] = gettext("A valid remote start address must be specified."); - if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) + } + if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) { $input_errors[] = gettext("A valid RADIUS server address must be specified."); + } $_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']); $subnet_start = ip2ulong($_POST['remoteip']); $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['pppoe_subnet'] - 1; if ((ip2ulong($_POST['localip']) >= $subnet_start) && - (ip2ulong($_POST['localip']) <= $subnet_end)) + (ip2ulong($_POST['localip']) <= $subnet_end)) { $input_errors[] = gettext("The specified server address lies in the remote subnet."); - if ($_POST['localip'] == get_interface_ip($_POST['interface'])) + } + if ($_POST['localip'] == get_interface_ip($_POST['interface'])) { $input_errors[] = gettext("The specified server address is equal to an interface ip address."); + } - for($x=0; $x<4999; $x++) { + for ($x = 0; $x < 4999; $x++) { if ($_POST["username{$x}"]) { - if (empty($_POST["password{$x}"])) - $input_errors[] = sprintf(gettext("No password specified for username %s"),$_POST["username{$x}"]); - if ($_POST["ip{$x}"] <> "" && !is_ipaddr($_POST["ip{$x}"])) - $input_errors[] = sprintf(gettext("Incorrect ip address specified for username %s"),$_POST["username{$x}"]); + if (empty($_POST["password{$x}"])) { + $input_errors[] = sprintf(gettext("No password specified for username %s"), $_POST["username{$x}"]); + } + if ($_POST["ip{$x}"] <> "" && !is_ipaddr($_POST["ip{$x}"])) { + $input_errors[] = sprintf(gettext("Incorrect ip address specified for username %s"), $_POST["username{$x}"]); + } } } } - if ($_POST['pppoeid'] && !is_numeric($_POST['pppoeid'])) + if ($_POST['pppoeid'] && !is_numeric($_POST['pppoeid'])) { $input_errors[] = gettext("Wrong data submitted"); + } if (!$input_errors) { $pppoecfg = array(); @@ -183,47 +194,58 @@ if ($_POST) { $pppoecfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport']; } - if ($_POST['pppoe_dns1'] <> "") + if ($_POST['pppoe_dns1'] <> "") { $pppoecfg['dns1'] = $_POST['pppoe_dns1']; + } - if ($_POST['pppoe_dns2'] <> "") + if ($_POST['pppoe_dns2'] <> "") { $pppoecfg['dns2'] = $_POST['pppoe_dns2']; + } - if($_POST['radiusenable'] == "yes") + if ($_POST['radiusenable'] == "yes") { $pppoecfg['radius']['server']['enable'] = true; + } - if($_POST['radiussecenable'] == "yes") + if ($_POST['radiussecenable'] == "yes") { $pppoecfg['radius']['server2']['enable'] = true; + } - if($_POST['radacct_enable'] == "yes") + if ($_POST['radacct_enable'] == "yes") { $pppoecfg['radius']['accounting'] = true; + } - if($_POST['radiusissueips'] == "yes") + if ($_POST['radiusissueips'] == "yes") { $pppoecfg['radius']['radiusissueips'] = true; + } - if($_POST['pppoeid']) + if ($_POST['pppoeid']) { $pppoecfg['pppoeid'] = $_POST['pppoeid']; - else + } else { $pppoecfg['pppoeid'] = vpn_pppoe_get_id(); + } $users = array(); - for($x=0; $x<4999; $x++) { + for ($x = 0; $x < 4999; $x++) { if ($_POST["username{$x}"]) { $usernam = $_POST["username{$x}"] . ":" . base64_encode($_POST["password{$x}"]); - if ($_POST["ip{$x}"]) + if ($_POST["ip{$x}"]) { $usernam .= ":" . $_POST["ip{$x}"]; + } $users[] = $usernam; } } - if (count($users) > 0) + if (count($users) > 0) { $pppoecfg['username'] = implode(" ", $users); + } - if (!isset($id)) + if (!isset($id)) { $id = count($a_pppoes); - if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) + } + if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) { $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.vpn_pppoe.apply")); - else + } else { $toapplylist = array(); + } $toapplylist[] = $pppoecfg['pppoeid']; $a_pppoes[$id] = $pppoecfg; @@ -236,7 +258,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Services"),gettext("PPPoE Server"), gettext("Edit")); +$pgtitle = array(gettext("Services"), gettext("PPPoE Server"), gettext("Edit")); $shortcut_section = "pppoes"; include("head.inc"); @@ -271,8 +293,9 @@ include("head.inc"); function get_radio_value(obj) { for (i = 0; i < obj.length; i++) { - if (obj[i].checked) + if (obj[i].checked) { return obj[i].value; + } } return null; } @@ -352,10 +375,12 @@ function enable_change(enable_over) { </script> <form action="vpn_pppoe_edit.php" method="post" name="iform" id="iform"> <?php -if ($input_errors) +if ($input_errors) { print_input_errors($input_errors); -if ($savemsg) +} +if ($savemsg) { print_info_box($savemsg); +} ?> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="pppoe edit"> <tr> @@ -376,7 +401,8 @@ if ($savemsg) <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""; ?> /> - <?=gettext("Enable PPPoE server"); ?></td> + <?=gettext("Enable PPPoE server"); ?> + </td> </tr> <tr> @@ -403,11 +429,12 @@ if ($savemsg) <td width="78%" class="vtable"> <select id="pppoe_subnet" name="pppoe_subnet"> <?php - for($x=0; $x<33; $x++) { - if($x == $pconfig['pppoe_subnet']) + for ($x = 0; $x < 33; $x++) { + if ($x == $pconfig['pppoe_subnet']) { $selected = "selected=\"selected\""; - else + } else { $selected = ""; + } echo "<option value=\"{$x}\" {$selected}>{$x}</option>\n"; } ?> @@ -420,11 +447,12 @@ if ($savemsg) <td width="78%" class="vtable"> <select id="n_pppoe_units" name="n_pppoe_units"> <?php - for($x=0; $x<255; $x++) { - if($x == $pconfig['n_pppoe_units']) + for ($x = 0; $x < 255; $x++) { + if ($x == $pconfig['n_pppoe_units']) { $selected = "selected=\"selected\""; - else + } else { $selected = ""; + } echo "<option value=\"{$x}\" {$selected}>{$x}</option>\n"; } ?> @@ -442,7 +470,8 @@ if ($savemsg) <?=gettext("Typically this is set to an unused IP just outside of the client range"); ?>. <br /> <br /> - <?=gettext("NOTE: This should NOT be set to any IP address currently in use on this firewall"); ?>.</td> + <?=gettext("NOTE: This should NOT be set to any IP address currently in use on this firewall"); ?>. + </td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address range"); ?></td> @@ -480,11 +509,12 @@ if ($savemsg) <br /> <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked=\"checked\""; ?> /> <strong><?=gettext("Enable RADIUS accounting"); ?> <br /> - <br /> + <br /> </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br /> <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked=\"checked\""; ?> /> <strong><?=gettext("Use Backup RADIUS Server"); ?></strong><br /> - <?=gettext("When set, if primary server fails all requests will be sent via backup server"); ?></td> + <?=gettext("When set, if primary server fails all requests will be sent via backup server"); ?> + </td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("NAS IP Address"); ?></td> @@ -504,7 +534,8 @@ if ($savemsg) <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS issued IPs"); ?></td> <td width="78%" valign="top" class="vtable"> <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips" <?php if($pconfig['radiusissueips']) echo "checked=\"checked\""; ?> /> - <br /><?=gettext("Issue IP Addresses via RADIUS server"); ?>.</td> + <br /><?=gettext("Issue IP Addresses via RADIUS server"); ?>. + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS server Primary"); ?></td> @@ -513,14 +544,16 @@ if ($savemsg) <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>" /> <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>" /> <br /><?=gettext("Enter the IP address, authentication port and accounting port (optional) of the RADIUS server."); ?><br /> - <br /> <?=gettext("standard port 1812 and 1813 accounting"); ?></td> + <br /> <?=gettext("standard port 1812 and 1813 accounting"); ?> + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS primary shared secret"); ?></td> <td width="78%" valign="top" class="vtable"> <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>" /> <br /><?=gettext("Enter the shared secret that will be used to authenticate " . - "to the RADIUS server"); ?>.</td> + "to the RADIUS server"); ?>. + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS server Secondary"); ?></td> @@ -529,7 +562,8 @@ if ($savemsg) <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>" /> <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>" /> <br /><?=gettext("Enter the IP address, authentication port and accounting port (optional) of the backup RADIUS server."); ?><br /> - <br /> <?=gettext("standard port 1812 and 1813 accounting"); ?></td> + <br /> <?=gettext("standard port 1812 and 1813 accounting"); ?> + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS secondary shared secret"); ?></td> @@ -537,7 +571,8 @@ if ($savemsg) <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>" /> <br /> <?=gettext("Enter the shared secret that will be used to authenticate " . - "to the RADIUS server"); ?>.</td> + "to the RADIUS server"); ?>. + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><div id="addressnetworkport"><?=gettext("User (s)");?></div></td> @@ -554,7 +589,7 @@ if ($savemsg) $usernames = $pconfig['username']; if ($usernames <> ""): $item = explode(" ", $usernames); - foreach($item as $ww): + foreach ($item as $ww): $wws = explode(":", $ww); $user = $wws[0]; $passwd = base64_decode($wws[1]); @@ -594,12 +629,14 @@ if ($savemsg) <td width="22%" valign="top"> </td> <td width="78%"> <?php - if (isset($id)) + if (isset($id)) { echo "<input type=\"hidden\" name=\"id\" id=\"id\" value=\"" . htmlspecialchars($id, ENT_QUOTES | ENT_HTML401) . "\" />"; + } ?> <?php - if (isset($pconfig['pppoeid'])) + if (isset($pconfig['pppoeid'])) { echo "<input type=\"hidden\" name=\"pppoeid\" id=\"pppoeid\" value=\"{$pppoeid}\" />"; + } ?> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)" /> <a href="vpn_pppoe.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" /></a> @@ -607,9 +644,12 @@ if ($savemsg) </tr> <tr> <td width="22%" valign="top"> </td> - <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br /> - </strong></span><?=gettext("don't forget to add a firewall rule to permit " . - "traffic from PPPoE clients"); ?>!</span></td> + <td width="78%"> + <span class="vexpl"> + <span class="red"><strong><?=gettext("Note"); ?>:<br /></strong></span> + <?=gettext("don't forget to add a firewall rule to permit traffic from PPPoE clients"); ?>! + </span> + </td> </tr> </table> </div> |