From 8e7b2ae2dc4197f34a82493c89848e6d0bd8b120 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Tue, 27 Jul 2010 17:21:16 -0300 Subject: Implement gettext() calls on vpn_pppoe_users_edit.php --- usr/local/www/vpn_pppoe_users_edit.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'usr/local/www/vpn_pppoe_users_edit.php') diff --git a/usr/local/www/vpn_pppoe_users_edit.php b/usr/local/www/vpn_pppoe_users_edit.php index 450a593..ad3e6a9 100755 --- a/usr/local/www/vpn_pppoe_users_edit.php +++ b/usr/local/www/vpn_pppoe_users_edit.php @@ -73,32 +73,32 @@ if ($_POST) { /* input validation */ if (isset($id) && ($a_secret[$id])) { $reqdfields = explode(" ", "username"); - $reqdfieldsn = explode(",", "Username"); + $reqdfieldsn = array(gettext("Username")); } else { $reqdfields = explode(" ", "username password"); - $reqdfieldsn = explode(",", "Username,Password"); + $reqdfieldsn = array(gettext("Username,Password")); } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (preg_match("/[^a-zA-Z0-9\.\-\@_]/", $_POST['username'])) - $input_errors[] = "The username contains invalid characters."; + $input_errors[] = gettext("The username contains invalid characters."); if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['password'])) - $input_errors[] = "The password contains invalid characters."; + $input_errors[] = gettext("The password contains invalid characters."); if (($_POST['password']) && ($_POST['password'] != $_POST['password2'])) { - $input_errors[] = "The passwords do not match."; + $input_errors[] = gettext("The passwords do not match."); } if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) { - $input_errors[] = "The IP address entered is not valid."; + $input_errors[] = gettext("The IP address entered is not valid."); } if (!$input_errors && !(isset($id) && $a_secret[$id])) { /* make sure there are no dupes */ foreach ($a_secret as $secretent) { if ($secretent['name'] == $_POST['username']) { - $input_errors[] = "Another entry with the same username already exists."; + $input_errors[] = gettext("Another entry with the same username already exists."); break; } } @@ -130,7 +130,7 @@ if ($_POST) { } } -$pgtitle = array("Services","PPPoE Server","User","Edit"); +$pgtitle = array(gettext("Services"),gettext("PPPoE Server"),gettext("User"),gettext("Edit")); include("head.inc"); ?> @@ -141,29 +141,29 @@ include("head.inc");
- + - + +  ()
+ . - + +
.
Username
Password
-  (confirmation)
- If you want to change the users' password, - enter it here twice.
IP address -
If you want the user to be assigned a specific IP address, enter it here.
  - + "> -- cgit v1.1