diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index 6d4dfe1508..0d3c1183a6 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -128,10 +128,10 @@ if (is_array($config['qinqs']['qinqentry']) && count($config['qinqs']['qinqentry
/* add PPP interfaces */
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
- $portname = basename($ppp['port']);
+ $portname = $ppp['type'].$ppp['pppid'];
$portlist[$portname] = $ppp;
$portlist[$portname]['isppp'] = true;
- $portlist[$portname]['descr'] = "PPP " . basename($ppp['port']);
+ $portlist[$portname]['descr'] = strtoupper($ppp['type']) . $ppp['pppid']." - ".$ppp['descr'];
}
}
@@ -403,45 +403,45 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
|
- =htmlspecialchars($ppp['type']);?>
+ =htmlspecialchars($ppp['pppid']);?>-=htmlspecialchars($ppp['type']);?>
|
=htmlspecialchars($ppp['ports']);?>
diff --git a/usr/local/www/interfaces_mlppp_edit.php b/usr/local/www/interfaces_mlppp_edit.php
index 22266d88a1..576fd3f461 100644
--- a/usr/local/www/interfaces_mlppp_edit.php
+++ b/usr/local/www/interfaces_mlppp_edit.php
@@ -92,7 +92,7 @@ if (isset($id) && $a_ppps[$id]) {
$pconfig['type'] = $a_ppps[$id]['type'];
$pconfig['interfaces'] = $a_ppps[$id]['ports'];
$pconfig['username'] = $a_ppps[$id]['username'];
- $pconfig['password'] = $a_ppps[$id]['password'];
+ $pconfig['password'] = base64_decode($a_ppps[$id]['password']);
if (isset($a_ppps[$id]['defaultgw']))
$pconfig['defaultgw'] = true;
if (isset($a_ppps[$id]['ondemand']))
@@ -262,10 +262,21 @@ if ($_POST) {
if (!$input_errors) {
$ppp = array();
+
+
+ $j=0;
+ foreach ($a_ppps as $p){
+ $a_ppps[$j]['pppid'] = $j;
+ $j++;
+ }
+ if (isset($id))
+ $ppp['pppid'] = $id;
+ else
+ $ppp['pppid'] = $j;
$ppp['type'] = $_POST['type'];
$ppp['ports'] = implode(',', $_POST['interfaces']);
$ppp['username'] = $_POST['username'];
- $ppp['password'] = $_POST['password'];
+ $ppp['password'] = base64_encode($_POST['password']);
$ppp['defaultgw'] = $_POST['defaultgw'] ? true : false;
$ppp['ondemand'] = $_POST['ondemand'] ? true : false;
if (!empty($_POST['idletimeout']))
@@ -480,7 +491,8 @@ $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);
+ select_list.options[j] = new Option(option[0], option[1], false, selected);
+ //this line for debugging the javascript above
//select_list.options[option_array.length-1+j] = new Option(option[2].toString() +" "+ selected.toString());
}
}
@@ -496,7 +508,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
var select_list = document.iform["interfaces[]"];
switch(t) {
case "select": {
- $('ppp','pppoe','pptp','ipfields').invoke('hide');
+ $('ppp','pppoe','pptp','ipfields','prefil_ppp').invoke('hide');
select_list.options.length = 0;
select_list.options[0] = new Option("Select Link Type First","");
break;
@@ -504,18 +516,18 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
case "ppp": {
update_select_list(serialports, select_list);
$('select','pppoe','pptp','subnet').invoke('hide');
- $('ipfields').show();
+ $('ipfields','prefil_ppp').invoke('show');
break;
}
case "pppoe": {
update_select_list(ports, select_list);
- $('select','ppp','pptp','ipfields').invoke('hide');
+ $('select','ppp','pptp','ipfields','prefil_ppp').invoke('hide');
break;
}
case "pptp": {
update_select_list(ports, select_list);
- $('select','ppp','pppoe').invoke('hide');
+ $('select','ppp','pppoe','prefil_ppp').invoke('hide');
$('ipfields','subnet').invoke('show');
break;
}
@@ -563,360 +575,368 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
- |