From 047ae6abe6da3f667c59251e33bbe480debf64e6 Mon Sep 17 00:00:00 2001 From: gnhb Date: Tue, 27 Apr 2010 16:32:35 +0700 Subject: [PATCH] Revert "Push all work on mlppp to the interfaces_ppp_edit and interfaces_ppp pages." This reverts commit 258f1ca439af24026849e15f8dbfc558be0e1ef3. Actually, not ready to do this yet. --- usr/local/www/interfaces_mlppp_edit.php | 47 +- usr/local/www/interfaces_ppp.php | 33 +- usr/local/www/interfaces_ppp_edit.php | 1021 +++++------------------ 3 files changed, 241 insertions(+), 860 deletions(-) diff --git a/usr/local/www/interfaces_mlppp_edit.php b/usr/local/www/interfaces_mlppp_edit.php index 7fb99425e2..22266d88a1 100644 --- a/usr/local/www/interfaces_mlppp_edit.php +++ b/usr/local/www/interfaces_mlppp_edit.php @@ -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(); }); @@ -588,13 +587,12 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" Link interface(s) -
Select one or more interfaces or ports to participate in the connection. Select more than one - interface to create a multilink (MLPPP) connection. +
Interfaces participating in the multilink connection. - + "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" if (stristr($pconfig['interfaces'], $port)) echo ",1|"; else - echo ",|"; + echo ",0|"; } ?> "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" if (stristr($pconfig['interfaces'], $ifn)) echo ",1|"; else - echo ",|"; + echo ",0|"; } ?> Username - + @@ -681,15 +679,6 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" PPP configuration - - Default PPP settings - - ATT  - Sprint  - Verizon -
Click the links to fill default connection settings for these carriers. - - Init String @@ -857,8 +846,8 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" Bandwidth onclick="show_more_settings(this,bandwidth_input);" /> - Set bandwidths for links in multilink connections. -