Browse Source

Multilinguified User Manager & Group Manager

Nate Jones 12 years ago
parent
commit
b1b372a604

+ 83 - 0
core/users/app_languages.php

@@ -0,0 +1,83 @@
+<?php
+
+	// user / group manager
+
+	$text['title-user_manager']['en-us'] = 'User Manager';
+	$text['title-user_add']['en-us'] = 'User Add';
+	$text['title-user_edit']['en-us'] = 'User Edit';
+	$text['title-group_manager']['en-us'] = 'Group Manager';
+	$text['title-group_add']['en-us'] = 'Group Add';
+	$text['title-group_permissions']['en-us'] = 'Group Permissions';
+	$text['title-group_members']['en-us'] = 'Group Members';
+
+	$text['header-user_manager']['en-us'] = 'User Manager';
+	$text['header-user_add']['en-us'] = 'User Add';
+	$text['header-user_edit']['en-us'] = 'User Edit';
+	$text['header-group_manager']['en-us'] = 'Group Manager';
+	$text['header-group_add']['en-us'] = 'Group Add';
+	$text['header-group_permissions']['en-us'] = 'Group Permissions: ';
+	$text['header-group_members']['en-us'] = 'Group Members: ';
+
+	$text['description-user_manager']['en-us'] = 'Add, edit, delete, and search users. ';
+	$text['description-user_add']['en-us'] = 'To add a user, please fill out this form completely. All fields are required. ';
+	$text['description-user_edit']['en-us'] = 'Edit user information and group membership. ';
+	$text['description-group_add']['en-us'] = 'Please choose a group name.';
+	$text['description-group_permissions']['en-us'] = 'Assign permissions for this group.';
+
+	$text['label-search_by']['en-us'] = 'Search by';
+	$text['label-username']['en-us'] = 'Username';
+	$text['label-password']['en-us'] = 'Password';
+	$text['label-confirm_password']['en-us'] = 'Confirm Password';
+	$text['label-email']['en-us'] = 'Email';
+	$text['label-first_name']['en-us'] = 'First Name';
+	$text['label-last_name']['en-us'] = 'Last Name';
+	$text['label-company_name']['en-us'] = 'Company Name';
+	$text['label-user_info']['en-us'] = 'User Info';
+	$text['label-groups']['en-us'] = 'Groups';
+	$text['label-additional_info']['en-us'] = 'Additional Info';
+	$text['label-contact']['en-us'] = 'Contact';
+	$text['label-status']['en-us'] = 'Status';
+	$text['label-time_zone']['en-us'] = 'Time Zone';
+	$text['label-enabled']['en-us'] = 'Enabled';
+	$text['label-group_name']['en-us'] = 'Name';
+	$text['label-group_description']['en-us'] = 'Description';
+	$text['label-group_permissions']['en-us'] = 'Permissions';
+	$text['label-group_members']['en-us'] = 'Members';
+	$text['label-permission_permissions']['en-us'] = 'Permissions';
+	$text['label-permission_description']['en-us'] = 'Description';
+
+	$text['description-contact']['en-us'] = 'Assign a contact to this user account.';
+	$text['description-contact_view']['en-us'] = 'View';
+	$text['description-status']['en-us'] = 'Set the user\'s presence.';
+	$text['description-time_zone']['en-us'] = 'Select the default time zone.';
+	$text['description-enabled']['en-us'] = 'Set the status of this account.';
+
+	$text['option-true']['en-us'] = 'True';
+	$text['option-false']['en-us'] = 'False';
+	$text['option-available']['en-us'] = 'Available';
+	$text['option-available_on_demand']['en-us'] = 'Available (On Demand)';
+	$text['option-logged_out']['en-us'] = 'Logged Out';
+	$text['option-on_break']['en-us'] = 'On Break';
+	$text['option-do_not_disturb']['en-us'] = 'Do Not Disturb';
+
+	$text['button-search']['en-us'] = 'Search';
+	$text['button-create_account']['en-us'] = 'Create Account';
+	$text['button-add']['en-us'] = 'Add';
+	$text['button-edit']['en-us'] = 'Edit';
+	$text['button-delete']['en-us'] = 'Delete';
+	$text['button-back']['en-us'] = 'Back';
+	$text['button-save']['en-us'] = 'Save';
+	$text['button-restore']['en-us'] = 'Restore Default';
+	$text['button-add_member']['en-us'] = 'Add Member';
+
+	$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
+
+	$text['message-add']['en-us'] = 'Add Completed';
+	$text['message-update']['en-us'] = 'Update Completed';
+	$text['message-delete']['en-us'] = 'Delete Completed';
+	$text['message-restore']['en-us'] = 'Restore Completed';
+	$text['message-required']['en-us'] = 'Please provide: ';
+	$text['message-password_blank']['en-us'] = 'Password cannot be blank.';
+	$text['message-password_mismatch']['en-us'] = 'Passwords did not match.';
+
+?>

+ 19 - 13
core/users/group_permissions.php

@@ -33,7 +33,16 @@ else {
 	echo "access denied";
 	exit;
 }
+
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 require_once "includes/header.php";
+$page["title"] = $text['title-group_permissions'];
+
 require_once "includes/paging.php";
 
 //get the list of installed apps from the core and mod directories
@@ -84,7 +93,7 @@ require_once "includes/paging.php";
 
 //get the http values and set them as php variables
 	$group_name = $_REQUEST['group_name'];
-	
+
 //get the permissions assigned to this group
 	$sql = "";
 	$sql .= " select * from v_group_permissions ";
@@ -139,7 +148,7 @@ require_once "includes/paging.php";
 			//echo "<pre>";
 			//print_r($permissions_form_checklist);
 			//echo "</pre>";
-		
+
 		//list all the permissions
 			foreach($apps as $app) {
 				foreach ($app['permissions'] as $row) {
@@ -192,21 +201,20 @@ require_once "includes/paging.php";
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
 	echo "<tr class='border'>\n";
 	echo "	<td align=\"center\">\n";
-	echo "		<br>";
 
 	echo "<table width='100%' border='0'>\n";
 	echo "<tr>\n";
-	echo "<td width='50%' align=\"left\" nowrap=\"nowrap\"><b>Group Permissions for $group_name</b></td>\n";
+	echo "<td width='50%' align=\"left\" nowrap=\"nowrap\"><b>".$text['header-group_permissions'].$group_name."</b></td>\n";
 	echo "<td width='50%' align=\"right\">\n";
 	if (permission_exists('group_edit')) {
-		echo "	<input type='button' class='btn' alt='Restore Default Permissions' onclick=\"window.location='permissions_default.php'\" value='Restore Default'>";
+		echo "	<input type='button' class='btn' alt='".$text['button-restore']."' onclick=\"window.location='permissions_default.php'\" value='".$text['button-restore']."'>";
 	}
-	echo "	<input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='Back'> ";
+	echo "	<input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
 	echo "</td>\n";
 	echo "</tr>\n";
 	echo "<tr>\n";
 	echo "<td align=\"left\" colspan='2'>\n";
-	echo "	Assign permissions to groups.<br /><br />\n";
+	echo "	".$text['description-group_permissions']."<br /><br />\n";
 	echo "</td>\n";
 	echo "</tr>\n";
 	echo "</tr></table>\n";
@@ -228,8 +236,8 @@ require_once "includes/paging.php";
 			echo "".$description."<br /><br />";
 			echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 			echo "<tr>\n";
-			echo "<th>Permissions</th>\n";
-			echo "<th>Description</th>\n";
+			echo "<th>".$text['label-permission_permissions']."</th>\n";
+			echo "<th>".$text['label-permission_description']."</th>\n";
 			echo "<tr>\n";
 
 			foreach ($app['permissions'] as $row) {
@@ -249,10 +257,10 @@ require_once "includes/paging.php";
 				echo "</tr>\n";
 				if ($c==0) { $c=1; } else { $c=0; }
 			}
-			
+
 			echo "<tr>\n";
 			echo "	<td colspan='3' align='right'>\n";
-			echo "		<input type='submit' name='submit' class='btn' value='Save'>\n";
+			echo "		<input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
 			echo "	</td>\n";
 			echo "</tr>\n";
 			echo "</table>";
@@ -270,8 +278,6 @@ require_once "includes/paging.php";
 	echo "</div>";
 	echo "<form>\n";
 
-	echo "<br><br>";
-
 //show the footer
 	require_once "includes/footer.php";
 

+ 15 - 7
core/users/groupadd.php

@@ -34,6 +34,12 @@ else {
 	return;
 }
 
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 //get the http values and set them as variables
 	$path = check_str($_GET["path"]);
 	$msg = check_str($_GET["msg"]);
@@ -68,7 +74,7 @@ if (strlen($group_name) > 0) {
 		require_once "includes/header.php";
 		echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n";
 		echo "<div align='center'>\n";
-		echo "Group Added\n";
+		echo $text['message-add']."\n";
 		echo "</div>\n";
 		require_once "includes/footer.php";
 		return;
@@ -76,18 +82,20 @@ if (strlen($group_name) > 0) {
 
 //include the header
 	include "includes/header.php";
+	$page["title"] = $text['title-group_add'];
 
 //show the content
-	echo "<br><br>";
 	echo "<div align='center'>";
 
 	echo "<table width='100%' cellpadding='6' cellspacing='0'>\n";
 	echo "	<tr>\n";
 	echo "		<td align='left'>\n";
-	echo "			Please choose a group name. ";
+	echo "			<b>".$text['header-group_add']."</b>\n";
+	echo "			<br><br>\n";
+	echo "			".$text['description-group_add']."\n";
 	echo "		</td>\n";
 	echo "		<td align='right'>\n";
-	echo "			<input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='Back'> ";
+	echo "			<input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
 	echo "		</td>\n";
 	echo "	</tr>\n";
 	echo "</table>\n";
@@ -97,7 +105,7 @@ if (strlen($group_name) > 0) {
 	echo "<table width='100%' cellpadding='6' cellspacing='0'>\n";
 	echo "<tr>\n";
 	echo "<td width='30%' class='vncellreq'>\n";
-	echo "Group Name:\n";
+	echo $text['label-group_name'].":\n";
 	echo "</td>\n";
 	echo "<td width='70%' align='left' class='vtable'>\n";
 	echo "  <input type=\"text\" class='formfld' name=\"group_name\">\n";
@@ -106,7 +114,7 @@ if (strlen($group_name) > 0) {
 
 	echo "<tr>\n";
 	echo "<td class='vncellreq'>\n";
-	echo "Description:\n";
+	echo $text['label-group_description'].":\n";
 	echo "</td>\n";
 	echo "<td align='left' class='vtable'>\n";
 	echo "<textarea name='group_description' class='formfld'></textarea>\n";
@@ -118,7 +126,7 @@ if (strlen($group_name) > 0) {
 	echo "</td>\n";
 	echo "<td align=\"right\">\n";
 	echo "  <input type=\"hidden\" name=\"path\" value=\"$path\">\n";
-	echo "  <input type=\"submit\" class='btn' value=\"Save\">\n";
+	echo "  <input type=\"submit\" class='btn' value=\"".$text['button-save']."\">\n";
 	echo "</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";

+ 12 - 10
core/users/groupmembers.php

@@ -40,6 +40,12 @@ else {
 		return;
 	}
 
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 //get the http value and set as a variable
 	$group_name = $_GET["group_name"];
 
@@ -58,6 +64,7 @@ else {
 
 //include the header
 	require_once "includes/header.php";
+	$page["title"] = $text['title-group_members'];
 
 //show the content
 	$c = 0;
@@ -65,16 +72,14 @@ else {
 	$row_style["1"] = "row_style1";
 
 	echo "<div align='center'>\n";
-	echo "<table width='90%' border='0'><tr><td align='left'>\n";
-	echo "\n";
 
 	echo "<table width='100%' cellpadding='6' cellspacing='1'>\n";
 	echo "	<tr>\n";
 	echo "		<td align='left'>\n";
-	echo "			<span  class=\"\" height='50'>Member list for <b>$group_name</b></span>";
+	echo "			<span  class=\"\" height='50'><b>".$text['header-group_members'].$group_name."</b></span>";
 	echo "		</td>\n";
 	echo "		<td align='right' nowrap='nowrap'>\n";
-	echo "			<input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='Back'>";
+	echo "			<input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'>";
 	echo "			&nbsp;&nbsp;&nbsp;\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
@@ -89,7 +94,7 @@ else {
 
 	$strlist = "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 	$strlist .= "<tr>\n";
-	$strlist .= "	<th align=\"left\" nowrap> &nbsp; Username &nbsp; </th>\n";
+	$strlist .= "	<th align=\"left\" nowrap> &nbsp; ".$text['label-username']." &nbsp; </th>\n";
 	$strlist .= "	<th align=\"left\" nowrap> &nbsp; &nbsp; </th>\n";
 	$strlist .= "	<td width='22' align=\"right\" nowrap>\n";
 	$strlist .= "		&nbsp;\n";
@@ -107,7 +112,7 @@ else {
 		$strlist .= "<td align=\"left\"  class='".$row_style[$c]."' nowrap> &nbsp; </td>\n";
 		$strlist .= "<td align=\"right\" nowrap>\n";
 		if (permission_exists('group_member_delete')) {
-			$strlist .= "	<a href='groupmemberdelete.php?user_uuid=$user_uuid&group_name=$group_name' onclick=\"return confirm('Do you really want to delete this?')\" alt='delete'>$v_link_label_delete</a>\n";
+			$strlist .= "	<a href='groupmemberdelete.php?user_uuid=$user_uuid&group_name=$group_name' onclick=\"return confirm('".$text['confirm-delete']."')\" alt='".$text['button-delete']."'>$v_link_label_delete</a>\n";
 		}
 		$strlist .= "</td>\n";
 		$strlist .= "</tr>\n";
@@ -119,9 +124,6 @@ else {
 	$strlist .= "</table>\n";
 	echo $strlist;
 
-	echo "</td>";
-	echo "</tr>";
-	echo "</table>";
 	echo "<br>";
 
 	echo "  <div align='center'>";
@@ -152,7 +154,7 @@ else {
 	echo "		<td align='right'>";
 	if (permission_exists('group_member_add')) {
 		echo "          <input type='hidden' name='group_name' value='$group_name'>";
-		echo "          <input type='submit' class='btn' value='Add Member'>";
+		echo "          <input type='submit' class='btn' value='".$text['button-add_member']."'>";
 	}
 	echo "      </td>";
 	echo "	</tr>";

+ 24 - 17
core/users/groups.php

@@ -27,17 +27,24 @@ include "root.php";
 require_once "includes/require.php";
 
 //check the permissions
-	require_once "includes/checkauth.php";
-	if (if_group("admin") || if_group("superadmin")) {
-		//access allowed
-	}
-	else {
-		echo "access denied";
-		return;
+require_once "includes/checkauth.php";
+if (if_group("admin") || if_group("superadmin")) {
+	//access allowed
+}
+else {
+	echo "access denied";
+	return;
+}
+
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
 	}
 
 //show the header
 	require_once "includes/header.php";
+	$page["title"] = $text['title-group_manager'];
 
 //show the content
 	echo "<div class='' style='padding:0px;'>\n";
@@ -45,10 +52,10 @@ require_once "includes/require.php";
 	echo "<td>";
 
 	echo "<table width='100%' border='0'><tr>";
-	echo "<td width='50%'><b>Groups</b></td>";
+	echo "<td width='50%'><b>".$text['header-group_manager']."</b><br><br></td>";
 	echo "<td width='50%' align='right'>";
 	if (permission_exists('user_view')) {
-		echo "  <input type='button' class='btn' onclick=\"window.location='index.php'\" value='User Manager'>";
+		echo "  <input type='button' class='btn' onclick=\"window.location='index.php'\" value='".$text['header-user_manager']."'>";
 	}
 	echo "</td>\n";
 	echo "</tr></table>";
@@ -64,13 +71,13 @@ require_once "includes/require.php";
 
 	$strlist = "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 	$strlist .= "<tr class='border'>\n";
-	$strlist .= "	<th align=\"left\" nowrap> &nbsp; Group Name &nbsp; </th>\n";
-	$strlist .= "	<th align=\"left\" nowrap> &nbsp; Group Description &nbsp; </th>\n";
+	$strlist .= "	<th align=\"left\" nowrap> &nbsp; ".$text['label-group_name']." &nbsp; </th>\n";
+	$strlist .= "	<th align=\"left\" nowrap> &nbsp; ".$text['label-group_description']." &nbsp; </th>\n";
 	$strlist .= "	<th align=\"center\" nowrap>&nbsp;</th>\n";
 
 	$strlist .= "	<td width='22px' align=\"right\" nowrap>\n";
 	if (permission_exists('group_add')) {
-		$strlist .= "	<a href='groupadd.php' alt='add'>$v_link_label_add</a>\n";
+		$strlist .= "	<a href='groupadd.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
 	}
 	$strlist .= "	</td>\n";
 	$strlist .= "</tr>\n";
@@ -91,19 +98,19 @@ require_once "includes/require.php";
 		else {
 			$strlist .= "<tr>";
 			$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> &nbsp; $group_name &nbsp; </td>\n";
-			$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> &nbsp;  $group_description &nbsp; </td>\n";
+			$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> &nbsp; $group_description &nbsp; </td>\n";
 
 			$strlist .= "<td class='".$row_style[$c]."' align=\"center\" nowrap>\n";
 			if (permission_exists('group_add') || if_group("superadmin")) {
-				$strlist .= "&nbsp;<a class='' href='group_permissions.php?group_name=$group_name' title='Group Permissions'>Permissions</a>&nbsp;&nbsp;";
+				$strlist .= "&nbsp;<a class='' href='group_permissions.php?group_name=$group_name' title='".$text['label-group_permissions']."'>".$text['label-group_permissions']."</a>&nbsp;&nbsp;";
 			}
 			if (permission_exists('group_member_view') || if_group("superadmin")) {
-				$strlist .= "&nbsp;<a class='' href='groupmembers.php?group_name=$group_name' title='Group Members'>Members</a>&nbsp;";
+				$strlist .= "&nbsp;<a class='' href='groupmembers.php?group_name=$group_name' title='".$text['label-group_members']."'>".$text['label-group_members']."</a>&nbsp;";
 			}
 			$strlist .= "</td>\n";
 
 			$strlist .= "<td align=\"right\" nowrap>\n";
-			$strlist .= "<a href='groupdelete.php?id=$group_uuid' onclick=\"return confirm('Do you really want to delete this?')\" alt='delete'>$v_link_label_delete</a>\n";
+			$strlist .= "<a href='groupdelete.php?id=$group_uuid' onclick=\"return confirm('".$text['confirm-delete']."')\" alt='".$text['button-delete']."'>$v_link_label_delete</a>\n";
 
 			$strlist .= "</td>\n";
 			$strlist .= "</tr>\n";
@@ -115,7 +122,7 @@ require_once "includes/require.php";
 	$strlist .= "<tr>\n";
 	$strlist .= "<td colspan='4' align='right' height='20'>\n";
 	if (permission_exists('group_add')) {
-		$strlist .= "	<a href='groupadd.php' alt='add'>$v_link_label_add</a>\n";
+		$strlist .= "	<a href='groupadd.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
 	}
 	$strlist .= "</td>\n";
 	$strlist .= "</tr>\n";

+ 7 - 0
core/users/index.php

@@ -34,8 +34,15 @@ else {
 	return;
 }
 
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 //include the header
 	require_once "includes/header.php";
+	$page["title"] = $text['title-user_manager'];
 
 //show the user list
 	echo "<div align='center'>";

+ 7 - 1
core/users/permissions_default.php

@@ -34,6 +34,12 @@ else {
 	return;
 }
 
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 //permission restore default
 	require_once "core/users/resources/classes/permission.php";
 	$permission = new permission;
@@ -44,7 +50,7 @@ else {
 	require_once "includes/header.php";
 	echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n";
 	echo "<div align='center'>\n";
-	echo "Restore Complete\n";
+	echo $text['message-restore']."\n";
 	echo "</div>\n";
 	require_once "includes/footer.php";
 	return;

+ 27 - 25
core/users/signup.php

@@ -35,6 +35,12 @@ else {
 	return;
 }
 
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 $username = check_str($_POST["username"]);
 $password = check_str($_POST["password"]);
 $confirmpassword = check_str($_POST["confirmpassword"]);
@@ -59,7 +65,7 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
 
 	//username is already used.
 	if (strlen($username) == 0) {
-		$msgerror .= "Please provide a Username.<br>\n";
+		$msgerror .= $text['message-required'].$text['label-username']."<br>\n";
 	}
 	else {
 		$sql = "SELECT * FROM v_users ";
@@ -73,12 +79,12 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
 		}
 	}
 
-	if (strlen($password) == 0) { $msgerror .= "Password cannot be blank.<br>\n"; }
-	if ($password != $confirmpassword) { $msgerror .= "Passwords did not match.<br>\n"; }
-	//if (strlen($contact_organization) == 0) { $msgerror .= "Please provide a organization name.<br>\n"; }
-	//if (strlen($contact_name_given) == 0) { $msgerror .= "Please provide a first name.<br>\n"; }
-	//if (strlen($contact_name_family) == 0) { $msgerror .= "Please provide a last name $user_last_name.<br>\n"; }
-	if (strlen($user_email) == 0) { $msgerror .= "Please provide an email.<br>\n"; }
+	if (strlen($password) == 0) { $msgerror .= $text['message-password_blank']."<br>\n"; }
+	if ($password != $confirmpassword) { $msgerror .= $text['message-password_mismatch']."<br>\n"; }
+	//if (strlen($contact_organization) == 0) { $msgerror .= $text['message-required'].$text['label-company_name']."<br>\n"; }
+	//if (strlen($contact_name_given) == 0) { $msgerror .= $text['message-required'].$text['label-first_name']."<br>\n"; }
+	//if (strlen($contact_name_family) == 0) { $msgerror .= $text['message-required'].$text['label-last_name']."<br>\n"; }
+	if (strlen($user_email) == 0) { $msgerror .= $text['message-required'].$text['label-email']."<br>\n"; }
 
 	if (strlen($msgerror) > 0) {
 		require_once "includes/header.php";
@@ -178,20 +184,17 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
 
 	require_once "includes/header.php";
 	echo "<meta http-equiv=\"refresh\" content=\"3;url=index.php\">\n";
-	echo "<div align='center'>Add Complete</div>";
+	echo "<div align='center'>".$text['message-add']."</div>";
 	require_once "includes/footer.php";
 	return;
 }
 
 //show the header
 	require_once "includes/header.php";
+	$page["title"] = $text['title-user_add'];
 
 //show the content
 	echo "<div align='center'>";
-	echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
-	echo "<tr>\n";
-	echo "	<td align=\"left\">\n";
-	echo "      <br>";
 
 	$tablewidth ='width="100%"';
 	echo "<form method='post' action=''>";
@@ -200,42 +203,44 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
 	echo "<table border='0' $tablewidth cellpadding='6' cellspacing='0'>";
 	echo "	<tr>\n";
 	echo "		<td width='80%'>\n";
-	echo "			<b>To add a user, please fill out this form completely. All fields are required. </b><br>";
+	echo "			<b>".$text['header-user_add']."</b>\n";
+	echo "			<br><br>\n";
+	echo "			".$text['description-user_add']."\n";
 	echo "		</td>\n";
 	echo "		<td width='20%' align='right'>\n";
-	echo "			<input type='button' class='btn' name='back' alt='back' onclick=\"window.history.back()\" value='Back'>\n";
+	echo "			<input type='button' class='btn' name='back' alt='".$text['button-back']."' onclick=\"window.history.back()\" value='".$text['button-back']."'>\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
 	echo "</table>\n";
 
 	echo "<table border='0' $tablewidth cellpadding='6' cellspacing='0'>";
 	echo "	<tr>";
-	echo "		<td class='vncellreq' width='40%'>Username:</td>";
+	echo "		<td class='vncellreq' width='40%'>".$text['label-username'].":</td>";
 	echo "		<td class='vtable' width='60%'><input type='text' class='formfld' autocomplete='off' name='username' value='$username'></td>";
 	echo "	</tr>";
 
 	echo "	<tr>";
-	echo "		<td class='vncellreq'>Password:</td>";
+	echo "		<td class='vncellreq'>".$text['label-password'].":</td>";
 	echo "		<td class='vtable'><input type='password' class='formfld' autocomplete='off' name='password' value='$password'></td>";
 	echo "	</tr>";
 	echo "	<tr>";
-	echo "		<td class='vncellreq'>Confirm Password:</td>";
+	echo "		<td class='vncellreq'>".$text['label-confirm_password'].":</td>";
 	echo "		<td class='vtable'><input type='password' class='formfld' autocomplete='off' name='confirmpassword' value='$confirmpassword'></td>";
 	echo "	</tr>";
 	echo "	<tr>";
-	echo "		<td class='vncellreq'>Email:</td>";
+	echo "		<td class='vncellreq'>".$text['label-email'].":</td>";
 	echo "		<td class='vtable'><input type='text' class='formfld' name='user_email' value='$user_email'></td>";
 	echo "	</tr>";
 	echo "	<tr>";
-	echo "		<td class='vncell'>First Name:</td>";
+	echo "		<td class='vncell'>".$text['label-first_name'].":</td>";
 	echo "		<td class='vtable'><input type='text' class='formfld' name='contact_name_given' value='$contact_name_given'></td>";
 	echo "	</tr>";
 	echo "	<tr>";
-	echo "		<td class='vncell'>Last Name:</td>";
+	echo "		<td class='vncell'>".$text['label-last_name'].":</td>";
 	echo "		<td class='vtable'><input type='text' class='formfld' name='contact_name_family' value='$contact_name_family'></td>";
 	echo "	</tr>";
 	echo "	<tr>";
-	echo "		<td class='vncell'>Company Name:</td>";
+	echo "		<td class='vncell'>".$text['label-company_name'].":</td>";
 	echo "		<td class='vtable'><input type='text' class='formfld' name='contact_organization' value='$contact_organization'></td>";
 	echo "	</tr>";
 	echo "</table>";
@@ -245,15 +250,12 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
 	echo "<table $tablewidth>";
 	echo "	<tr>";
 	echo "		<td colspan='2' align='right'>";
-	echo "       <input type='submit' name='submit' class='btn' value='Create Account'>";
+	echo "       <input type='submit' name='submit' class='btn' value='".$text['button-create_account']."'>";
 	echo "		</td>";
 	echo "	</tr>";
 	echo "</table>";
 	echo "</form>";
 
-	echo "	</td>";
-	echo "	</tr>";
-	echo "</table>";
 	echo "</div>";
 
 //show the footer

+ 26 - 28
core/users/userlist.php

@@ -33,6 +33,7 @@ else {
 	echo "access denied";
 	exit;
 }
+
 //require_once "includes/header.php";
 	require_once "includes/paging.php";
 
@@ -50,35 +51,28 @@ echo "	<td align=\"center\">\n";
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 	echo "<form method='post' action=''>";
 	echo "<tr>\n";
-	echo "<td align='left' width='90%' nowrap><b>User Manager</b></td>\n";
-	echo "<td align='right' nowrap='nowrap'>Search by:&nbsp;</td>";
+	echo "<td align='left' width='90%' nowrap><b>".$text['header-user_manager']."</b></td>\n";
+	echo "<td align='right' nowrap='nowrap'>".$text['label-search_by'].":&nbsp;</td>";
 	echo "<td align='left'>\n";
 	echo "	<select name='field_name' style='width:150px' class='frm'>\n";
 	echo "	<option value=''></option>\n";
 	if ($field_name == "username") {
-		echo "	<option value='username' selected='selected'>Username</option>\n";
+		echo "	<option value='username' selected='selected'>".$text['label-username']."</option>\n";
 	}
 	else {
-		echo "	<option value='username'>Username</option>\n";
+		echo "	<option value='username'>".$text['label-username']."</option>\n";
 	}
-	//if ($field_name == "user_email") {
-	//	echo "	<option value='user_email' selected='selected'>Email</option>\n";
-	//}
-	//else {
-	//	echo "	<option value='user_email'>Email</option>\n";
-	//}
 	echo "	</select>\n";
 	echo "</td>\n";
 	echo "<td align='left' width='3px'>&nbsp;</td>";
 	echo "<td align='left'><input type='text' class='txt' style='width: 150px' name='field_value' value='$field_value'></td>";
-	echo "<td align='left' width='60px'><input type='submit' class='btn' name='submit' value='search'></td>";
-	//echo "	<input type='button' class='btn' name='' alt='view' onclick=\"window.location='user_search.php'\" value='advanced'>&nbsp;\n";
+	echo "<td align='left' width='60px'><input type='submit' class='btn' name='submit' value='".$text['button-search']."'></td>";
 	echo "</tr>\n";
 	echo "</form>";
 
 	echo "<tr>\n";
 	echo "<td align='left' colspan='4'>\n";
-	echo "Add, edit, delete, and search for users. \n";
+	echo $text['description-user_manager']."\n";
 	echo "<br />\n";
 	echo "<br />\n";
 	echo "</td>\n";
@@ -99,17 +93,17 @@ echo "	<td align=\"center\">\n";
 	$rows_per_page = 200;
 	$param = "";
 	$page = $_GET['page'];
-	if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } 
-	list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); 
-	$offset = $rows_per_page * $page; 
+	if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
+	list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
+	$offset = $rows_per_page * $page;
 
 	$sql = "select * from v_users ";
 	$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
 	if (strlen($field_name) > 0 && strlen($field_value) > 0) {
 		$sql .= "and $field_name like '%$field_value%' ";
 	}
-	if (strlen($order_by)> 0) { 
-		$sql .= "order by $order_by $order "; 
+	if (strlen($order_by)> 0) {
+		$sql .= "order by $order_by $order ";
 	}
 	else {
 		$sql .= "order by username ";
@@ -131,13 +125,11 @@ echo "	<td align=\"center\">\n";
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 
 	echo "<tr>\n";
-	echo th_order_by('username', 'Username', $order_by, $order);
-	//echo th_order_by('user_email', 'Email', $order_by, $order);
-	//echo th_order_by('user_template_name', 'Template', $order_by, $order);
-	echo "<th>Enabled</th>\n";
+	echo th_order_by('username', $text['label-username'], $order_by, $order);
+	echo "<th>".$text['label-enabled']."</th>\n";
 	echo "<td align='right' width='42'>\n";
 	if (permission_exists('user_add')) {
-		echo "	<a href='signup.php' alt='add'>$v_link_label_add</a>\n";
+		echo "	<a href='signup.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
 	}
 	echo "</td>\n";
 	echo "<tr>\n";
@@ -146,14 +138,20 @@ echo "	<td align=\"center\">\n";
 		foreach($result as $row) {
 			echo "<tr >\n";
 			echo "	<td valign='top' class='".$row_style[$c]."'>".$row['username']."&nbsp;</td>\n";
-			//echo "	<td valign='top' class='".$row_style[$c]."'>".$row['user_email']."&nbsp;</td>\n";
-			echo "	<td valign='top' class='".$row_style[$c]."'>".$row['user_enabled']."&nbsp;</td>\n";
+			echo "	<td valign='top' class='".$row_style[$c]."'>";
+			if ($row['user_enabled'] == 'true') {
+				echo $text['option-true'];
+			}
+			else {
+				echo $text['option-false'];
+			}
+			echo "&nbsp;</td>\n";
 			echo "	<td valign='top' align='right'>\n";
 			if (permission_exists('user_edit')) {
-				echo "		<a href='usersupdate.php?id=".$row['user_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
+				echo "		<a href='usersupdate.php?id=".$row['user_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
 			}
 			if (permission_exists('user_delete')) {
-				echo "		<a href='userdelete.php?id=".$row['user_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
+				echo "		<a href='userdelete.php?id=".$row['user_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
 			}
 			echo "	</td>\n";
 			echo "</tr>\n";
@@ -170,7 +168,7 @@ echo "	<td align=\"center\">\n";
 	echo "		<td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
 	echo "		<td width='33.3%' align='right'>\n";
 	if (permission_exists('user_add')) {
-		echo "			<a href='signup.php' alt='add'>$v_link_label_add</a>\n";
+		echo "			<a href='signup.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
 	}
 	echo "		</td>\n";
 	echo "	</tr>\n";

+ 55 - 51
core/users/usersupdate.php

@@ -27,7 +27,7 @@ include "root.php";
 require_once "includes/require.php";
 require_once "includes/checkauth.php";
 if (permission_exists("user_add") ||
-	permission_exists("user_edit") || 
+	permission_exists("user_edit") ||
 	permission_exists("user_delete") ||
 	if_group("superadmin")) {
 	//access allowed
@@ -37,6 +37,12 @@ else {
 	return;
 }
 
+//add multi-lingual support
+	require_once "app_languages.php";
+	foreach($text as $key => $value) {
+		$text[$key] = $value[$_SESSION['domain']['language']['code']];
+	}
+
 //get data from the db
 	if (strlen($_REQUEST["id"])> 0) {
 		$user_uuid = $_REQUEST["id"];
@@ -64,7 +70,7 @@ else {
 //required to be a superadmin to update an account that is a member of the superadmin group
 	$superadmin_list = superadmin_list($db);
 	if (if_superadmin($superadmin_list, $_SESSION['user_uuid'])) {
-		if (!if_group("superadmin")) { 
+		if (!if_group("superadmin")) {
 			echo "access denied";
 			return;
 		}
@@ -83,7 +89,7 @@ else {
 		//redirect the user
 			require_once "includes/header.php";
 			echo "<meta http-equiv=\"refresh\" content=\"2;url=usersupdate.php?id=$user_uuid\">\n";
-			echo "<div align='center'>Update Complete</div>";
+			echo "<div align='center'>".$text['message-update']."</div>";
 			require_once "includes/footer.php";
 			return;
 	}
@@ -121,12 +127,10 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
 	$group_member = check_str($_POST["group_member"]);
 	$user_enabled = check_str($_POST["user_enabled"]);
 
-	//if (strlen($password) == 0) { $msg_error .= "Password cannot be blank.<br>\n"; }
-	//if (strlen($username) == 0) { $msg_error .= "Please provide the username.<br>\n"; }
-	if ($password != $confirm_password) { $msg_error .= "Passwords did not match.<br>\n"; }
-	//if (strlen($contact_uuid) == 0) { $msg_error .= "Please provide an email.<br>\n"; }
-	//if (strlen($user_time_zone) == 0) { $msg_error .= "Please provide an time zone.<br>\n"; }
-	if (strlen($user_enabled) == 0) { $msg_error .= "Please provide an enable or disable the user.<br>\n"; }
+	if ($password != $confirm_password) { $msg_error .= $text['message-password_mismatch']."<br>\n"; }
+	//if (strlen($contact_uuid) == 0) { $msg_error .= $text['message-required'].$text['label-email']."<br>\n"; }
+	//if (strlen($user_time_zone) == 0) { $msg_error .= $text['message-required'].$text['label-time_zone']."<br>\n"; }
+	if (strlen($user_enabled) == 0) { $msg_error .= $text['message-required'].$text['label-enabled']."<br>\n"; }
 
 	if ($msg_error) {
 		require_once "includes/header.php";
@@ -142,7 +146,7 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
 		return;
 	}
 
-	//get the number of rows in v_user_settings 
+	//get the number of rows in v_user_settings
 		$sql = "select count(*) as num_rows from v_user_settings ";
 		$sql .= "where user_setting_category = 'domain' ";
 		$sql .= "and user_setting_subcategory = 'time_zone' ";
@@ -283,7 +287,7 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
 		else {
 			echo "<meta http-equiv=\"refresh\" content=\"2;url=usersupdate.php?id=$user_uuid\">\n";
 		}
-		echo "<div align='center'>Update Complete</div>";
+		echo "<div align='center'>".$text['message-update']."</div>";
 		require_once "includes/footer.php";
 		return;
 }
@@ -326,11 +330,11 @@ else {
 
 //include the header
 	require_once "includes/header.php";
+	$page["title"] = $text['title-user_edit'];
 
 //show the content
 	$table_width ='width="100%"';
 	echo "<form method='post' action=''>";
-	echo "<br />\n";
 
 	echo "<div align='center'>";
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
@@ -338,15 +342,15 @@ else {
 	echo "<td>\n";
 
 	echo "<table $table_width cellpadding='3' cellspacing='0' border='0'>";
-	echo "<td align='left' width='90%' nowrap><b>User Manager</b></td>\n";
+	echo "<td align='left' width='90%' nowrap><b>".$text['header-user_edit']."</b></td>\n";
 	echo "<td nowrap='nowrap'>\n";
-	echo "	<input type='submit' name='submit' class='btn' value='Save'>";
-	echo "	<input type='button' class='btn' onclick=\"window.location='index.php'\" value='Back'>";
+	echo "	<input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
+	echo "	<input type='button' class='btn' onclick=\"window.location='index.php'\" value='".$text['button-back']."'>";
 	echo "</td>\n";
 	echo "</tr>\n";
 	echo "<tr>\n";
 	echo "<td align='left' colspan='2'>\n";
-	echo "	Edit user information and group membership. \n";
+	echo "	".$text['description-user_edit']."\n";
 	echo "</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";
@@ -355,25 +359,25 @@ else {
 
 	echo "<table $table_width cellpadding='6' cellspacing='0' border='0'>";
 	echo "<tr>\n";
-	echo "	<th class='th' colspan='2' align='left'>User Info</th>\n";
+	echo "	<th class='th' colspan='2' align='left'>".$text['label-user_info']."</th>\n";
 	echo "</tr>\n";
 
 	echo "	<tr>";
-	echo "		<td width='30%' class='vncellreq'>Username:</td>";
+	echo "		<td width='30%' class='vncellreq'>".$text['label-username'].":</td>";
 	echo "		<td width='70%' class='vtable'>$username</td>";
 	echo "	</tr>";
 
 	echo "	<tr>";
-	echo "		<td class='vncell'>Password:</td>";
+	echo "		<td class='vncell'>".$text['label-password'].":</td>";
 	echo "		<td class='vtable'><input type='password' autocomplete='off' class='formfld' name='password' value=\"\"></td>";
 	echo "	</tr>";
 	echo "	<tr>";
-	echo "		<td class='vncell'>Confirm Password:</td>";
+	echo "		<td class='vncell'>".$text['label-confirm_password'].":</td>";
 	echo "		<td class='vtable'><input type='password' autocomplete='off' class='formfld' name='confirm_password' value=\"\"></td>";
 	echo "	</tr>";
 
 	echo "	<tr>";
-	echo "		<td class='vncell' valign='top'>Groups:</td>";
+	echo "		<td class='vncell' valign='top'>".$text['label-groups'].":</td>";
 	echo "		<td class='vtable'>";
 
 	echo "<table width='52%'>\n";
@@ -392,7 +396,7 @@ else {
 			echo "	<td class='vtable'>".$field['group_name']."</td>\n";
 			echo "	<td>\n";
 			if (permission_exists('group_member_delete') || if_group("superadmin")) {
-				echo "		<a href='usersupdate.php?id=".$user_uuid."&domain_uuid=".$domain_uuid."&group_name=".$field['group_name']."&a=delete' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
+				echo "		<a href='usersupdate.php?id=".$user_uuid."&domain_uuid=".$domain_uuid."&group_name=".$field['group_name']."&a=delete' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
 			}
 			echo "	</td>\n";
 			echo "</tr>\n";
@@ -420,7 +424,7 @@ else {
 		}
 	}
 	echo "</select>";
-	echo "<input type=\"submit\" class='btn' value=\"Add\">\n";
+	echo "<input type=\"submit\" class='btn' value=\"".$text['button-add']."\">\n";
 	unset($sql, $result);
 	echo "		</td>";
 	echo "	</tr>";
@@ -431,11 +435,11 @@ else {
 
 	echo "<table $table_width cellpadding='6' cellspacing='0'>";
 	echo "	<tr>\n";
-	echo "	<th class='th' colspan='2' align='left'>Additional Info</th>\n";
+	echo "	<th class='th' colspan='2' align='left'>".$text['label-additional_info']."</th>\n";
 	echo "	</tr>\n";
 
 	echo "	<tr>";
-	echo "		<td width='30%' class='vncell'>Contact:</td>";
+	echo "		<td width='30%' class='vncell'>".$text['label-contact'].":</td>";
 	echo "		<td width='70%' class='vtable'>\n";
 	$sql = " select contact_uuid, contact_organization, contact_name_given, contact_name_family from v_contacts ";
 	$sql .= " where domain_uuid = '".$_SESSION['domain_uuid']."' ";
@@ -469,9 +473,9 @@ else {
 	unset($sql, $result, $row_count);
 	echo "</select>\n";
 	echo "<br />\n";
-	echo "Assign a contact to this user account.\n";
+	echo $text['description-contact']."\n";
 	if (strlen($contact_uuid) > 0) {
-		echo "			<a href=\"/app/contacts/contacts_edit.php?id=$contact_uuid\">View</a>\n";
+		echo "			<a href=\"/app/contacts/contacts_edit.php?id=$contact_uuid\">".$text['description-contact_view']."</a>\n";
 	}
 	echo "		</td>";
 	echo "	</tr>";
@@ -482,45 +486,45 @@ else {
 	else {
 		echo "	<tr>\n";
 		echo "	<td width='20%' class=\"vncell\" style='text-align: left;'>\n";
-		echo "		Status:\n";
+		echo "		".$text['label-status'].":\n";
 		echo "	</td>\n";
 		echo "	<td class=\"vtable\">\n";
 		$cmd = "'".PROJECT_PATH."/app/calls_active/v_calls_exec.php?cmd=callcenter_config+agent+set+status+".$_SESSION['username']."@".$_SESSION['domain_name']."+'+this.value";
 		echo "		<select id='user_status' name='user_status' class='formfld' style='' onchange=\"send_cmd($cmd);\">\n";
 		echo "		<option value=''></option>\n";
 		if ($user_status == "Available") {
-			echo "		<option value='Available' selected='selected'>Available</option>\n";
+			echo "		<option value='Available' selected='selected'>".$text['option-available']."</option>\n";
 		}
 		else {
-			echo "		<option value='Available'>Available</option>\n";
+			echo "		<option value='Available'>".$text['option-available']."</option>\n";
 		}
 		if ($user_status == "Available (On Demand)") {
-			echo "		<option value='Available (On Demand)' selected='selected'>Available (On Demand)</option>\n";
+			echo "		<option value='Available (On Demand)' selected='selected'>".$text['option-available_on_demand']."</option>\n";
 		}
 		else {
-			echo "		<option value='Available (On Demand)'>Available (On Demand)</option>\n";
+			echo "		<option value='Available (On Demand)'>".$text['option-available_on_demand']."</option>\n";
 		}
 		if ($user_status == "Logged Out") {
-			echo "		<option value='Logged Out' selected='selected'>Logged Out</option>\n";
+			echo "		<option value='Logged Out' selected='selected'>".$text['option-logged_out']."</option>\n";
 		}
 		else {
-			echo "		<option value='Logged Out'>Logged Out</option>\n";
+			echo "		<option value='Logged Out'>".$text['option-logged_out']."</option>\n";
 		}
 		if ($user_status == "On Break") {
-			echo "		<option value='On Break' selected='selected'>On Break</option>\n";
+			echo "		<option value='On Break' selected='selected'>".$text['option-on_break']."</option>\n";
 		}
 		else {
-			echo "		<option value='On Break'>On Break</option>\n";
+			echo "		<option value='On Break'>".$text['option-on_break']."</option>\n";
 		}
 		if ($user_status == "Do Not Disturb") {
-			echo "		<option value='Do Not Disturb' selected='selected'>Do Not Disturb</option>\n";
+			echo "		<option value='Do Not Disturb' selected='selected'>".$text['option-do_not_disturb']."</option>\n";
 		}
 		else {
-			echo "		<option value='Do Not Disturb'>Do Not Disturb</option>\n";
+			echo "		<option value='Do Not Disturb'>".$text['option-do_not_disturb']."</option>\n";
 		}
 		echo "		</select>\n";
 		echo "		<br />\n";
-		echo "		Select a the user status.<br />\n";
+		echo "		".$text['description-status']."<br />\n";
 		echo "	</td>\n";
 		echo "	</tr>\n";
 	}
@@ -561,7 +565,7 @@ else {
 
 	echo "	<tr>\n";
 	echo "	<td width='20%' class=\"vncell\" style='text-align: left;'>\n";
-	echo "		Time Zone: \n";
+	echo "		".$text['label-time_zone'].": \n";
 	echo "	</td>\n";
 	echo "	<td class=\"vtable\" align='left'>\n";
 	echo "		<select id='user_time_zone' name='user_time_zone' class='formfld' style=''>\n";
@@ -590,34 +594,34 @@ else {
 	}
 	echo "		</select>\n";
 	echo "		<br />\n";
-	echo "		Select the default time zone.<br />\n";
+	echo "		".$text['description-time_zone']."<br />\n";
 	echo "	</td>\n";
 	echo "	</tr>\n";
 
 	echo "<tr>\n";
 	echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
-	echo "    Enabled:\n";
+	echo "    ".$text['label-enabled'].":\n";
 	echo "</td>\n";
 	echo "<td class='vtable' align='left'>\n";
 	echo "    <select class='formfld' name='user_enabled'>\n";
 	echo "    <option value=''></option>\n";
-	if ($user_enabled == "true" || $user_enabled == "") { 
-		echo "    <option value='true' selected='selected'>true</option>\n";
+	if ($user_enabled == "true" || $user_enabled == "") {
+		echo "    <option value='true' selected='selected'>".$text['option-true']."</option>\n";
 	}
 	else {
-		echo "    <option value='true'>true</option>\n";
+		echo "    <option value='true'>".$text['option-true']."</option>\n";
 	}
-	if ($user_enabled == "false") { 
-		echo "    <option value='false' selected='selected'>false</option>\n";
+	if ($user_enabled == "false") {
+		echo "    <option value='false' selected='selected'>".$text['option-false']."</option>\n";
 	}
 	else {
-		echo "    <option value='false'>false</option>\n";
+		echo "    <option value='false'>".$text['option-false']."</option>\n";
 	}
 	echo "    </select>\n";
 	echo "<br />\n";
-	echo "Enable/disable this user.\n";
+	echo $text['description-enabled']."\n";
 	echo "</td>\n";
-	echo "</tr>\n";	
+	echo "</tr>\n";
 
 	echo "	</table>";
 	echo "<br>";
@@ -628,7 +632,7 @@ else {
 	echo "		<td colspan='2' align='right'>";
 	echo "			<input type='hidden' name='id' value=\"$user_uuid\">";
 	echo "			<input type='hidden' name='username' value=\"$username\">";
-	echo "			<input type='submit' name='submit' class='btn' value='Save'>";
+	echo "			<input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
 	echo "		</td>";
 	echo "	</tr>";
 	echo "</table>";