From f4758c47ef229983b9d01e846ddae2f7941c4ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Thu, 11 Sep 2008 21:44:01 +0000 Subject: Bring the ppp frontend to functionality. Add a more options like max connection attempt, support for static ip setups, username and password configs. --- usr/local/www/interfaces_ppp_edit.php | 92 +++++++++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 21 deletions(-) (limited to 'usr/local/www/interfaces_ppp_edit.php') diff --git a/usr/local/www/interfaces_ppp_edit.php b/usr/local/www/interfaces_ppp_edit.php index b492772..3d06f73 100644 --- a/usr/local/www/interfaces_ppp_edit.php +++ b/usr/local/www/interfaces_ppp_edit.php @@ -53,9 +53,15 @@ if (isset($_POST['id'])) if (isset($id) && $a_ppps[$id]) { $pconfig['port'] = $a_ppps[$id]['port']; + $pconfig['ap'] = $a_ppps[$id]['ap']; $pconfig['pppif'] = $a_ppps[$id]['pppif']; $pconfig['initstr'] = $a_ppps[$id]['initstr']; + $pconfig['username'] = $a_ppps[$id]['username']; + $pconfig['password'] = $a_ppps[$id]['password']; + $pconfig['gateway'] = $a_ppps[$id]['gateway']; + $pconfig['localip'] = $a_ppps[$id]['localip']; $pconfig['phone'] = $a_ppps[$id]['phone']; + $pconfig['connect-max-attempts'] = $a_ppps[$id]['connect-max-attempts']; $pconfig['linespeed'] = $a_ppps[$id]['linespeed']; $pconfig['descr'] = $a_ppps[$id]['descr']; } @@ -85,9 +91,16 @@ if ($_POST) { $ppp = array(); $ppp['port'] = $_POST['port']; $ppp['initstr'] = $_POST['initstr']; + $ppp['ap'] = $_POST['ap']; $ppp['phone'] = $_POST['phone']; + $ppp['username'] = $_POST['username']; + $ppp['password'] = $_POST['password']; + $ppp['localip'] = $_POST['localip']; + $ppp['gateway'] = $_POST['gateway']; $ppp['linespeed'] = $_POST['linespeed']; + $ppp['connect-max-attempts'] = $_POST['connect-max-attempts']; $ppp['descr'] = $_POST['descr']; + $ppp['pppif'] = $_POST['pppif']; $ppp['pppif'] = interface_ppp_configure($ppp); if ($ppp['pppif'] == "" || !stristr($ppp['pppif'], "ppp")) $input_errors[] = "Error occured creating interface, please retry."; @@ -121,54 +134,91 @@ include("head.inc"); Parent interface - "; - echo $port; - echo ""; - } - ?> + $portlist = glob("/dev/cua*"); + foreach ($portlist as $port) { + if(preg_match("/\.(lock|init)$/", $port)) + continue; + echo ""; + } + ?> - + Init String
Enter the modem initialization string here - - Phone Number + + AP Hostname + + + + + + Phone Number + + + + + + Username - + + + + + Password + + + + + + Local IP + + +

Note: This is needed if you connect to a private system and are given a static ip. + + + + Remote IP + + +

Note: This is where the packets will be routed, aka gateway on normal ip routing. Line Speed - + + + + + Maximum connection retry + + - Description - +
You may enter a description here for your reference (not parsed).   - + + + -- cgit v1.1