diff --git a/app/hot_desking/app_languages.php b/app/hot_desking/app_languages.php
new file mode 100644
index 0000000000..571c8158b9
--- /dev/null
+++ b/app/hot_desking/app_languages.php
@@ -0,0 +1,40 @@
+
\ No newline at end of file
diff --git a/app/hot_desking/extension_delete.php b/app/hot_desking/extension_delete.php
index bfb20da86b..9391330161 100644
--- a/app/hot_desking/extension_delete.php
+++ b/app/hot_desking/extension_delete.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
if (count($_GET)>0) {
$id = check_str($_GET["id"]);
}
@@ -78,10 +84,10 @@ if (count($_GET)>0) {
echo "
\n";
echo "
\n";
echo " \n";
- echo " Message \n";
+ echo " ".$text['header-message']." \n";
echo " \n";
echo " \n";
- echo " Delete Complete \n";
+ echo " ".$text['message-delete']." \n";
echo " \n";
echo "
\n";
echo "
\n";
diff --git a/app/hot_desking/extension_edit.php b/app/hot_desking/extension_edit.php
index aa7f8b89f5..9efd5675a1 100644
--- a/app/hot_desking/extension_edit.php
+++ b/app/hot_desking/extension_edit.php
@@ -33,6 +33,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
//set the action as an add or an update
if (isset($_REQUEST["id"])) {
$action = "update";
@@ -54,18 +60,18 @@ else {
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//check for all required data
- //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; }
- if (strlen($extension_uuid) == 0) { $msg .= "Please provide the extension
\n"; }
- if (strlen($unique_id) == 0) { $msg .= "Please provide the unique ID.
\n"; }
- //get the number of rows in v_extensions
+ if (strlen($extension_uuid) == 0) { $msg .= $text['message-required'].$text['label-extension']."
\n"; }
+ if (strlen($unique_id) == 0) { $msg .= $text['message-required'].$text['label-unique_id']."
\n"; }
+ //get the number of rows in v_extensions
$sql = "select count(*) as num_rows from v_extensions ";
- $sql .= "where unique_id = '".$unique_id."' ";
+ $sql .= "where unique_id = '".$unique_id."' and ";
+ $sql .= "extension_uuid <> '".$extension_uuid."'";
$prep_statement = $db->prepare(check_sql($sql));
if ($prep_statement) {
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
if ($row['num_rows'] > 0) {
- $msg .= "The ID is not unqiue please provide a unique ID.
\n";
+ $msg .= $text['message-unique']."
\n";
}
}
unset($prep_statement, $result);
@@ -88,7 +94,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
else {
//if the user_context was not set then set the default value
- if (strlen($user_context) == 0) {
+ if (strlen($user_context) == 0) {
if (count($_SESSION["domains"]) > 1) {
$user_context = $_SESSION['domain_name'];
}
@@ -152,14 +158,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "
\n";
echo " \n";
- echo " Message \n";
+ echo " ".$text['header-message']." \n";
echo " \n";
echo " \n";
if ($action == "add") {
- echo " Add Complete \n";
+ echo " ".$text['message-add']." \n";
}
if ($action == "update") {
- echo " Update Complete \n";
+ echo " ".$text['message-update']." \n";
}
echo " \n";
echo "
\n";
@@ -230,17 +236,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "\n";
echo " \n";
- echo " Hot Desking \n";
+ echo " ".$text['header-hot_desking']." \n";
echo " \n";
echo " \n";
- echo " \n";
- echo " \n";
+ echo " \n";
+ echo " \n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Extension:\n";
+ echo " ".$text['label-extension'].":\n";
echo " \n";
echo "\n";
if ($action == "add") {
@@ -265,48 +271,48 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
unset($sql, $result, $result_count);
echo " \n";
- echo "Select the extension number.\n";
+ echo $text['description-extension-add']."\n";
}
if ($action == "update") {
echo " $extension \n";
- echo "Extension number.\n";
+ echo $text['description-extension-edit']."\n";
}
echo " \n";
-
+
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Unique ID:\n";
+ echo " ".$text['label-unique_id'].":\n";
echo " \n";
echo "\n";
echo " \n";
echo " \n";
- echo "A unique ID to identify the extension and domain.\n";
+ echo $text['description-unique_id']."\n";
echo " \n";
echo " \n";
if ($action == "update") {
echo "\n";
echo "\n";
- echo " Voicemail Password:\n";
+ echo " ".$text['label-voicemail_password'].":\n";
echo " \n";
echo "\n";
- echo " \n";
+ echo " \n";
echo " \n";
- echo "Enter the voicemail password here. \n";
+ echo "".$text['description-voicemail_password']." \n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Dial String:\n";
+ echo " ".$text['label-dial_string'].":\n";
echo " \n";
echo "\n";
echo " \n";
echo " \n";
- echo "Location of the endpoint.\n";
+ echo $text['description-dial_string']."\n";
echo " \n";
echo " \n";
diff --git a/app/hot_desking/index.php b/app/hot_desking/index.php
index 68e432652b..e0c188af17 100644
--- a/app/hot_desking/index.php
+++ b/app/hot_desking/index.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-hot_desking'];
+
require_once "includes/paging.php";
//get the http values and set them as variables
@@ -52,14 +61,14 @@ require_once "includes/paging.php";
//show the content header
echo "\n";
echo " \n";
- echo " Hot Desking \n";
- echo " Login into hot desking with an ID and your voicemail password to direct your calls to a remote extension. Then make and receive calls as if you were at your extension.\n";
+ echo " ".$text['header-hot_desking']." \n";
+ echo " ".$text['description-hot_desking']."\n";
echo " \n";
echo " \n";
echo "
\n";
echo " ";
- //get the number of rows in v_extensions
+ //get the number of rows in v_extensions
$sql = "select count(*) as num_rows from v_extensions ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and unique_id is not null ";
@@ -81,8 +90,8 @@ require_once "includes/paging.php";
$param = "";
if (!isset($_GET['page'])) { $_GET['page'] = 0; }
$_GET['page'] = check_str($_GET['page']);
- list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
- $offset = $rows_per_page * $_GET['page'];
+ list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
+ $offset = $rows_per_page * $_GET['page'];
//get the extension list
$sql = "select * from v_extensions ";
@@ -108,15 +117,13 @@ require_once "includes/paging.php";
echo "\n";
echo "
\n";
echo "\n";
- echo th_order_by('extension', 'Extension', $order_by, $order);
- echo th_order_by('unique_id', 'Unique ID', $order_by, $order);
- echo th_order_by('dial_user', 'Forward To', $order_by, $order);
- //echo th_order_by('dial_domain', 'Domain', $order_by, $order);
- //echo th_order_by('call_group', 'Domain', $order_by, $order);
- echo th_order_by('description', 'Description', $order_by, $order);
+ echo th_order_by('extension', $text['label-extension'], $order_by, $order);
+ echo th_order_by('unique_id', $text['label-unique_id'], $order_by, $order);
+ echo th_order_by('dial_user', $text['label-forward_to'], $order_by, $order);
+ echo th_order_by('description', $text['label-description'], $order_by, $order);
echo "\n";
if (permission_exists('extension_add')) {
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
}
echo " \n";
echo " \n";
@@ -132,15 +139,13 @@ require_once "includes/paging.php";
else {
echo " \n";
}
- //echo " ".$row['dial_domain']." \n";
- //echo " ".$row['domain_uuid']." \n";
echo " ".$row['description']." \n";
echo " \n";
if (permission_exists('extension_edit')) {
- echo " $v_link_label_edit \n";
+ echo " $v_link_label_edit \n";
}
if (permission_exists('extension_delete')) {
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_delete \n";
}
echo " \n";
echo " \n";
@@ -157,7 +162,7 @@ require_once "includes/paging.php";
echo " $paging_controls \n";
echo " \n";
if (permission_exists('extension_add')) {
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
}
echo " \n";
echo " \n";