From 989d117b5d86fa540aa983367b0751c3035f1100 Mon Sep 17 00:00:00 2001 From: Rafael Lucas Date: Tue, 27 Jul 2010 14:52:16 -0300 Subject: Implement gettext() calls on vpn_pptp.php --- usr/local/www/vpn_pptp.php | 135 ++++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 68 deletions(-) (limited to 'usr/local/www/vpn_pptp.php') diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php index 9a7b108..e653671 100755 --- a/usr/local/www/vpn_pptp.php +++ b/usr/local/www/vpn_pptp.php @@ -78,24 +78,24 @@ if ($_POST) { /* input validation */ if ($_POST['mode'] == "server") { $reqdfields = explode(" ", "localip remoteip"); - $reqdfieldsn = explode(",", "Server address,Remote start address"); + $reqdfieldsn = array(gettext("Server address"),gettext("Remote start address")); if ($_POST['radiusenable']) { $reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret")); $reqdfieldsn = array_merge($reqdfieldsn, - explode(",", "RADIUS server address,RADIUS shared secret")); + array(gettext("RADIUS server address"),gettext("RADIUS shared secret"))); } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) { - $input_errors[] = "A valid server address must be specified."; + $input_errors[] = gettext("A valid server address must be specified."); } if (!is_ipaddr($_POST['remoteip'])) { - $input_errors[] = "A valid remote start address must be specified."; + $input_errors[] = gettext("A valid remote start address must be specified."); } if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) { - $input_errors[] = "A valid RADIUS server address must be specified."; + $input_errors[] = gettext("A valid RADIUS server address must be specified."); } if (!$input_errors) { @@ -104,21 +104,21 @@ if ($_POST) { if ((ip2ulong($_POST['localip']) >= $subnet_start) && (ip2ulong($_POST['localip']) <= $subnet_end)) { - $input_errors[] = "The specified server address lies in the remote subnet."; + $input_errors[] = gettext("The specified server address lies in the remote subnet."); } // TODO: Should this check be for any local IP address? if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) { - $input_errors[] = "The specified server address is equal to the LAN interface address."; + $input_errors[] = gettext("The specified server address is equal to the LAN interface address."); } } } else if ($_POST['mode'] == "redir") { $reqdfields = explode(" ", "redir"); - $reqdfieldsn = explode(",", "PPTP redirection target address"); + $reqdfieldsn = array(gettext("PPTP redirection target address")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) { - $input_errors[] = "A valid target address must be specified."; + $input_errors[] = gettext("A valid target address must be specified."); } } else { unset($config['pptpd']['mode']); @@ -187,7 +187,7 @@ if ($_POST) { } } -$pgtitle = array("VPN","VPN PPTP"); +$pgtitle = array(gettext("VPN"),gettext("VPN PPTP")); include("head.inc"); ?> @@ -290,8 +290,8 @@ function enable_change(enable_over) { @@ -303,28 +303,28 @@ function enable_change(enable_over) {   > - Off + > +   - > - Redirect incoming PPTP connections to: + > + - PPTP redirection +
- Enter the IP address of a host which will accept incoming - PPTP connections. +   - > - Enable PPTP server + > + - No. PPTP users + -
Hint: 10 is TEN pptp clients +
- Server address +
- Enter the IP address the PPTP server should use on its side - for all clients. + - Remote address - range +
- Specify the starting address for the client IP subnet.
+
- PPTP DNS Servers +

- primary and secondary DNS servers assigned to PPTP clients
+
- WINS Server - + - RADIUS + > - Use a RADIUS server for authentication
- When set, all users will be authenticated using - the RADIUS server specified below. The local user database - will not be used.
+
+

- > - Enable RADIUS accounting
-
Sends accounting packets to the RADIUS server.
+ > +
+


- > - Secondary RADIUS server for failover authentication
- When set, all requests will go to the secondary server when primary fails
+ > +
+

> - RADIUS issued IPs -
Issue IP addresses via RADIUS server. + +
- RADIUS NAS IP + - RADIUS Accounting Update + - RADIUS Server +
- Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server. + - RADIUS shared secret +
- Enter the shared secret that will be used to authenticate - to the RADIUS server. + - Secondary RADIUS server +
- Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server. + - Secondary RADIUS shared secret +
- Enter the shared secret that will be used to authenticate - to the secondary RADIUS server. + @@ -447,24 +446,24 @@ function enable_change(enable_over) {   - > - Require 128-bit encryption
- When set, only 128-bit encryption will be accepted. Otherwise - 40-bit and 56-bit encryption will be accepted as well. Note that - encryption will always be forced on PPTP connections (i.e. - unencrypted connections will not be accepted). + > +
+   - + " onclick="enable_change(true)">   - Note:
-
don't forget to add a firewall rule to permit - traffic from PPTP clients!
+
+
add a firewall rule
-- cgit v1.1