mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Revert "Push all work on mlppp to the interfaces_ppp_edit and interfaces_ppp pages."
This reverts commit 258f1ca439.
Actually, not ready to do this yet.
This commit is contained in:
parent
258f1ca439
commit
047ae6abe6
@ -91,7 +91,7 @@ if (isset($_POST['id']))
|
||||
if (isset($id) && $a_ppps[$id]) {
|
||||
$pconfig['type'] = $a_ppps[$id]['type'];
|
||||
$pconfig['interfaces'] = $a_ppps[$id]['ports'];
|
||||
$pconfig['user'] = $a_ppps[$id]['username'];
|
||||
$pconfig['username'] = $a_ppps[$id]['username'];
|
||||
$pconfig['password'] = $a_ppps[$id]['password'];
|
||||
if (isset($a_ppps[$id]['defaultgw']))
|
||||
$pconfig['defaultgw'] = true;
|
||||
@ -203,20 +203,20 @@ if ($_POST) {
|
||||
break;
|
||||
case "pppoe":
|
||||
if ($_POST['ondemand']) {
|
||||
$reqdfields = explode(" ", "interfaces user password ondemand idletimeout");
|
||||
$reqdfields = explode(" ", "interfaces username password ondemand idletimeout");
|
||||
$reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Dial on demand,Idle timeout value");
|
||||
} else {
|
||||
$reqdfields = explode(" ", "interfaces user password");
|
||||
$reqdfields = explode(" ", "interfaces username password");
|
||||
$reqdfieldsn = explode(",", "Link Interface(s),Username,Password");
|
||||
}
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
||||
break;
|
||||
case "pptp":
|
||||
if ($_POST['ondemand']) {
|
||||
$reqdfields = explode(" ", "interfaces user password localip subnet gateway ondemand idletimeout");
|
||||
$reqdfields = explode(" ", "interfaces username password localip subnet gateway ondemand idletimeout");
|
||||
$reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Local IP address,Subnet,Remote IP address,Dial on demand,Idle timeout value");
|
||||
} else {
|
||||
$reqdfields = explode(" ", "interfaces user password localip subnet gateway");
|
||||
$reqdfields = explode(" ", "interfaces username password localip subnet gateway");
|
||||
$reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Local IP address,Subnet,Remote IP address");
|
||||
}
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
||||
@ -264,7 +264,7 @@ if ($_POST) {
|
||||
$ppp = array();
|
||||
$ppp['type'] = $_POST['type'];
|
||||
$ppp['ports'] = implode(',', $_POST['interfaces']);
|
||||
$ppp['username'] = $_POST['user'];
|
||||
$ppp['username'] = $_POST['username'];
|
||||
$ppp['password'] = $_POST['password'];
|
||||
$ppp['defaultgw'] = $_POST['defaultgw'] ? true : false;
|
||||
$ppp['ondemand'] = $_POST['ondemand'] ? true : false;
|
||||
@ -480,8 +480,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
for(var j=0; j < option_array.length-1; j++){
|
||||
var option = option_array[j].split(",");
|
||||
var selected = Boolean(parseInt(option[2]));
|
||||
select_list.options[j] = new Option(option[0], option[1], false, selected);
|
||||
//this line for debugging the javascript above
|
||||
select_list.options[j] = new Option(" "+option[0]+" ", option[1], false, selected);
|
||||
//select_list.options[option_array.length-1+j] = new Option(option[2].toString() +" "+ selected.toString());
|
||||
}
|
||||
}
|
||||
@ -539,7 +538,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
$('apn').value = "ISP.CINGULAR";
|
||||
$('apnum').value = "1";
|
||||
$('phone').value = "*99#";
|
||||
$('user').value = "att";
|
||||
$('username').value = "att";
|
||||
$('password').value = "att";
|
||||
}
|
||||
function prefill_sprint() {
|
||||
@ -547,7 +546,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
$('apn').value = "";
|
||||
$('apnum').value = "";
|
||||
$('phone').value = "#777";
|
||||
$('user').value = "sprint";
|
||||
$('username').value = "sprint";
|
||||
$('password').value = "sprint";
|
||||
}
|
||||
function prefill_vzw() {
|
||||
@ -555,7 +554,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
$('apn').value = "";
|
||||
$('apnum').value = "";
|
||||
$('phone').value = "#777";
|
||||
$('user').value = "123@vzw3g.com";
|
||||
$('username').value = "123@vzw3g.com";
|
||||
$('password').value = "vzw";
|
||||
}
|
||||
document.observe("dom:loaded", function() { updateType(<?php echo "'{$pconfig['type']}'";?>); });
|
||||
@ -588,13 +587,12 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
<td width="22%" valign="top" class="vncellreq">Link interface(s)</td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="interfaces[]" multiple="true" class="formselect" size="4">
|
||||
<option></option>
|
||||
<option> </option>
|
||||
</select>
|
||||
<br/><span class="vexpl">Select one or more interfaces or ports to participate in the connection. Select more than one
|
||||
interface to create a multilink (MLPPP) connection.</span>
|
||||
<br/><span class="vexpl">Interfaces participating in the multilink connection.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none">
|
||||
<tr style="display:none" name="portlists" id="portlists">
|
||||
<td id="serialports"><?php
|
||||
$serial = glob("/dev/cua*");
|
||||
$modems = glob("/dev/modem*");
|
||||
@ -606,7 +604,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
if (stristr($pconfig['interfaces'], $port))
|
||||
echo ",1|";
|
||||
else
|
||||
echo ",|";
|
||||
echo ",0|";
|
||||
}
|
||||
?></td>
|
||||
<td id="ports"><?php
|
||||
@ -617,14 +615,14 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
if (stristr($pconfig['interfaces'], $ifn))
|
||||
echo ",1|";
|
||||
else
|
||||
echo ",|";
|
||||
echo ",0|";
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">Username</td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="user" type="text" class="formfld usr" id="user" size="20" value="<?=htmlspecialchars($pconfig['user']);?>">
|
||||
<input name="username" type="text" class="formfld usr" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -681,15 +679,6 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic">PPP configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">Default PPP settings</td>
|
||||
<td width="22%" valign="top" class="vtable">
|
||||
<a href='#' onClick='javascript:prefill_att();'>ATT</A>
|
||||
<a href='#' onClick='javascript:prefill_sprint();'>Sprint</A>
|
||||
<a href='#' onClick='javascript:prefill_vzw();'>Verizon</A>
|
||||
<br/><span class="vexpl">Click the links to fill default connection settings for these carriers.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">Init String</td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -857,8 +846,8 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
|
||||
<td width="22%" width="100" valign="top" class="vncell">Bandwidth</td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="bandwidths" type="checkbox" id="bandwidths" value="yes" <?php if (isset($pconfig['bandwidth'])) echo "checked"; ?> onclick="show_more_settings(this,bandwidth_input);" />
|
||||
Set bandwidths for links in multilink connections.
|
||||
<span style="display:none" id="bandwidth_input"><br/><input name="bandwidth[]" type="text" class="formfld unknown" id="bandwidth" size="40" value="<?=htmlspecialchars($pconfig['bandwidth']);?>">
|
||||
Set <bold>unequal</bold> bandwidths for links in this multilink connection.
|
||||
<span style="display:none" id="bandwidth_input"><input name="bandwidth[]" type="text" class="formfld unknown" id="bandwidth" size="40" value="<?=htmlspecialchars($pconfig['bandwidth']);?>">
|
||||
<br/> <span class="vexpl">Set Bandwidth for each link ONLY when links have different bandwidths.</span>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
<?php
|
||||
/* $Id$ */
|
||||
/*
|
||||
interfaces_ppp.php
|
||||
part of m0n0wall (http://m0n0.ch/wall)
|
||||
interfaces_lan.php
|
||||
part of pfSense(http://pfsense.org)
|
||||
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
Originally written by Adam Lebsack <adam at holonyx dot com>
|
||||
Changes by Chris Buechler <cmb at pfsense dot org>
|
||||
|
||||
Copyright (C) 2004-2008 BSD Perimeter LLC.
|
||||
Copyright (C) 2004-2009 Scott Ullrich
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -29,14 +32,14 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
pfSense_BUILDER_BINARIES: /sbin/ifconfig
|
||||
pfSense_BUILDER_BINARIES: /bin/kill /sbin/ifconfig
|
||||
pfSense_MODULE: interfaces
|
||||
*/
|
||||
|
||||
##|+PRIV
|
||||
##|*IDENT=page-interfaces-ppp
|
||||
##|*NAME=Interfaces: ppp page
|
||||
##|*DESCR=Allow access to the 'Interfaces: ppp' page.
|
||||
##|*NAME=Interfaces: PPP page
|
||||
##|*DESCR=Allow access to the 'Interfaces: PPP' page.
|
||||
##|*MATCH=interfaces_ppp.php*
|
||||
##|-PRIV
|
||||
|
||||
@ -60,7 +63,7 @@ function ppp_inuse($num) {
|
||||
if ($_GET['act'] == "del") {
|
||||
/* check if still in use */
|
||||
if (ppp_inuse($_GET['id'])) {
|
||||
$input_errors[] = "This interface cannot be deleted because it is still being used as an interface.";
|
||||
$input_errors[] = "This PPP interface cannot be deleted because it is still being used as an interface.";
|
||||
} else {
|
||||
unset($a_ppps[$_GET['id']]);
|
||||
write_config();
|
||||
@ -86,8 +89,8 @@ include("head.inc");
|
||||
$tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
|
||||
$tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
|
||||
$tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
|
||||
$tab_array[5] = array("PPP", false, "interfaces_ppp.php");
|
||||
$tab_array[6] = array("MLPPP", true, "interfaces_mlppp.php");
|
||||
$tab_array[5] = array("PPP", true, "interfaces_ppp.php");
|
||||
$tab_array[6] = array("MLPPP", false, "interfaces_mlppp.php");
|
||||
$tab_array[7] = array("GRE", false, "interfaces_gre.php");
|
||||
$tab_array[8] = array("GIF", false, "interfaces_gif.php");
|
||||
$tab_array[9] = array("Bridges", false, "interfaces_bridge.php");
|
||||
@ -100,18 +103,14 @@ include("head.inc");
|
||||
<div id="mainarea">
|
||||
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="20%" class="listhdrr">Type</td>
|
||||
<td width="20%" class="listhdrr">Interface(s)/Port(s)</td>
|
||||
<td width="20%" class="listhdrr">Serial Port</td>
|
||||
<td width="40%" class="listhdr">Description</td>
|
||||
<td width="10%" class="list"></td>
|
||||
</tr>
|
||||
<?php $i = 0; foreach ($a_ppps as $id => $ppp): ?>
|
||||
<tr ondblclick="document.location='interfaces_ppp_edit.php?id=<?=$i;?>'">
|
||||
<td class="listr">
|
||||
<?=htmlspecialchars($ppp['type']);?>
|
||||
</td>
|
||||
<td class="listr">
|
||||
<?=htmlspecialchars($ppp['ports']);?>
|
||||
<?=htmlspecialchars($ppp['port']);?>
|
||||
</td>
|
||||
<td class="listbg">
|
||||
<?=htmlspecialchars($ppp['descr']);?>
|
||||
@ -121,7 +120,7 @@ include("head.inc");
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
<tr>
|
||||
<td class="list" colspan="3"> </td>
|
||||
<td class="list" colspan="2"> </td>
|
||||
<td class="list"> <a href="interfaces_ppp_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user