";
diff --git a/core/users/permissions_default.php b/core/users/permissions_default.php
index efd55a68fe..3279841090 100644
--- a/core/users/permissions_default.php
+++ b/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 "
\n";
echo "
\n";
- echo "Restore Complete\n";
+ echo $text['message-restore']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
diff --git a/core/users/signup.php b/core/users/signup.php
index f0d0148eaa..c1f2cbb066 100644
--- a/core/users/signup.php
+++ b/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.
\n";
+ $msgerror .= $text['message-required'].$text['label-username']."
\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.
\n"; }
- if ($password != $confirmpassword) { $msgerror .= "Passwords did not match.
\n"; }
- //if (strlen($contact_organization) == 0) { $msgerror .= "Please provide a organization name.
\n"; }
- //if (strlen($contact_name_given) == 0) { $msgerror .= "Please provide a first name.
\n"; }
- //if (strlen($contact_name_family) == 0) { $msgerror .= "Please provide a last name $user_last_name.
\n"; }
- if (strlen($user_email) == 0) { $msgerror .= "Please provide an email.
\n"; }
+ if (strlen($password) == 0) { $msgerror .= $text['message-password_blank']."
\n"; }
+ if ($password != $confirmpassword) { $msgerror .= $text['message-password_mismatch']."
\n"; }
+ //if (strlen($contact_organization) == 0) { $msgerror .= $text['message-required'].$text['label-company_name']."
\n"; }
+ //if (strlen($contact_name_given) == 0) { $msgerror .= $text['message-required'].$text['label-first_name']."
\n"; }
+ //if (strlen($contact_name_family) == 0) { $msgerror .= $text['message-required'].$text['label-last_name']."
\n"; }
+ if (strlen($user_email) == 0) { $msgerror .= $text['message-required'].$text['label-email']."
\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 "
\n";
- echo "
Add Complete
";
+ echo "
".$text['message-add']."
";
require_once "includes/footer.php";
return;
}
//show the header
require_once "includes/header.php";
+ $page["title"] = $text['title-user_add'];
//show the content
echo "
";
- echo "
\n";
- echo "\n";
- echo " \n";
- echo " ";
$tablewidth ='width="100%"';
echo "";
- echo " | ";
- echo "
";
- echo "
";
echo "
";
//show the footer
diff --git a/core/users/userlist.php b/core/users/userlist.php
index 90c2f64607..a8b15bd914 100644
--- a/core/users/userlist.php
+++ b/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 "
\n";
echo "\n";
echo "";
echo "\n";
echo "\n";
- echo "Add, edit, delete, and search for users. \n";
+ echo $text['description-user_manager']."\n";
echo " \n";
echo " \n";
echo " | \n";
@@ -99,17 +93,17 @@ echo " \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 " | \n";
echo "\n";
echo "\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 "| Enabled | \n";
+ echo th_order_by('username', $text['label-username'], $order_by, $order);
+ echo "".$text['label-enabled']." | \n";
echo "\n";
if (permission_exists('user_add')) {
- echo " $v_link_label_add\n";
+ echo " $v_link_label_add\n";
}
echo " | \n";
echo " \n";
@@ -146,14 +138,20 @@ echo " | \n";
foreach($result as $row) {
echo " | \n";
echo " | ".$row['username']." | \n";
- //echo " ".$row['user_email']." | \n";
- echo " ".$row['user_enabled']." | \n";
+ echo " ";
+ if ($row['user_enabled'] == 'true') {
+ echo $text['option-true'];
+ }
+ else {
+ echo $text['option-false'];
+ }
+ echo " | \n";
echo " \n";
if (permission_exists('user_edit')) {
- echo " $v_link_label_edit\n";
+ echo " $v_link_label_edit\n";
}
if (permission_exists('user_delete')) {
- echo " $v_link_label_delete\n";
+ echo " $v_link_label_delete\n";
}
echo " | \n";
echo " \n";
@@ -170,7 +168,7 @@ echo " \n";
echo " | $paging_controls | \n";
echo " \n";
if (permission_exists('user_add')) {
- echo " $v_link_label_add\n";
+ echo " $v_link_label_add\n";
}
echo " | \n";
echo " \n";
diff --git a/core/users/usersupdate.php b/core/users/usersupdate.php
index d972b7002c..b8cc637ca5 100644
--- a/core/users/usersupdate.php
+++ b/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 "\n";
- echo "Update Complete ";
+ echo "".$text['message-update']." ";
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. \n"; }
- //if (strlen($username) == 0) { $msg_error .= "Please provide the username. \n"; }
- if ($password != $confirm_password) { $msg_error .= "Passwords did not match. \n"; }
- //if (strlen($contact_uuid) == 0) { $msg_error .= "Please provide an email. \n"; }
- //if (strlen($user_time_zone) == 0) { $msg_error .= "Please provide an time zone. \n"; }
- if (strlen($user_enabled) == 0) { $msg_error .= "Please provide an enable or disable the user. \n"; }
+ if ($password != $confirm_password) { $msg_error .= $text['message-password_mismatch']." \n"; }
+ //if (strlen($contact_uuid) == 0) { $msg_error .= $text['message-required'].$text['label-email']." \n"; }
+ //if (strlen($user_time_zone) == 0) { $msg_error .= $text['message-required'].$text['label-time_zone']." \n"; }
+ if (strlen($user_enabled) == 0) { $msg_error .= $text['message-required'].$text['label-enabled']." \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 "\n";
}
- echo "Update Complete ";
+ echo "".$text['message-update']." ";
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 " | |