--- backup-stock-image-20100320/www/interfaces_ppp_edit.php 2010-03-23 13:43:07.000000000 +0700 +++ interfaces_ppp_edit.php.new 2010-03-24 11:06:27.000000000 +0700 @@ -56,7 +56,8 @@ if (isset($id) && $a_ppps[$id]) { $pconfig['port'] = $a_ppps[$id]['port']; - $pconfig['ap'] = $a_ppps[$id]['ap']; + $pconfig['apn'] = $a_ppps[$id]['apn']; + $pconfig['apnum'] = $a_ppps[$id]['apnum']; $pconfig['initstr'] = $a_ppps[$id]['initstr']; $pconfig['username'] = $a_ppps[$id]['username']; $pconfig['password'] = $a_ppps[$id]['password']; @@ -65,9 +66,9 @@ if (isset($a_ppps[$id]['defaultgw'])) $pconfig['defaultgw'] = true; $pconfig['phone'] = $a_ppps[$id]['phone']; - $pconfig['dialcmd'] = base64_decode($a_ppps[$id]['dialcmd']); - $pconfig['connect-max-attempts'] = $a_ppps[$id]['connect-max-attempts']; - $pconfig['linespeed'] = $a_ppps[$id]['linespeed']; + //$pconfig['dialcmd'] = base64_decode($a_ppps[$id]['dialcmd']); + //$pconfig['connect-max-attempts'] = $a_ppps[$id]['connect-max-attempts']; + //$pconfig['linespeed'] = $a_ppps[$id]['linespeed']; $pconfig['descr'] = $a_ppps[$id]['descr']; } @@ -94,11 +95,21 @@ if (!$input_errors) { $ppp = array(); + if (isset($id)) { + $ppp['pppid'] = $id; + } else + $ppp['pppid'] = count($a_ppps); $ppp['port'] = $_POST['port']; $ppp['initstr'] = $_POST['initstr']; - $ppp['ap'] = $_POST['ap']; + $ppp['apn'] = $_POST['apn']; + if ($_POST['apn'] <> ""){ + if ($_POST['apnum'] <> ""){ + $ppp['apnum'] = $_POST['apnum']; + } else + $ppp['apnum'] = "1"; + } $ppp['phone'] = $_POST['phone']; - $ppp['dialcmd'] = base64_encode($_POST['dialcmd']); + //$ppp['dialcmd'] = base64_encode($_POST['dialcmd']); $ppp['username'] = $_POST['username']; $ppp['password'] = $_POST['password']; $ppp['localip'] = $_POST['localip']; @@ -107,8 +118,8 @@ $ppp['defaultgw'] = true; else unset($ppp['defaultgw']); - $ppp['linespeed'] = $_POST['linespeed']; - $ppp['connect-max-attempts'] = $_POST['connect-max-attempts']; + //$ppp['linespeed'] = $_POST['linespeed']; + //$ppp['connect-max-attempts'] = $_POST['connect-max-attempts']; $ppp['descr'] = $_POST['descr']; @@ -119,7 +130,7 @@ write_config(); - interfaces_ppp_configure(); + interface_ppp_configure(-1,true); header("Location: interfaces_ppp.php"); exit; @@ -139,25 +150,27 @@ @@ -199,25 +212,27 @@ - + - + + +
Note: Defaults to 1 if you set APN above. Ignored if you set no APN above. + @@ -240,22 +255,10 @@ - + - - - - - - - -
Init String -
Enter the modem initialization string here +
Note: Enter the modem initialization string here. Typically left blank.
AP HostnameAccess Point Name (APN) - +
Dial commandAPN number (optional) - -
Phone Number +
Note: Typically (*99# or *99***# or *99***1#) for GSM networks and *777 for CDMA networks
Remote IPRemote IP (Gateway) -

Note: Enter the remote IP here if not automatically assigned. This is where the packets will be routed, equivalent to the gateway. -

Line Speed - -
Maximum connection retry - +

Note: Enter the remote IP here if not automatically assigned. This is where the packets will be routed.