diff --git a/app/call_block/app_languages.php b/app/call_block/app_languages.php
index 812728aabc..986f766032 100644
--- a/app/call_block/app_languages.php
+++ b/app/call_block/app_languages.php
@@ -127,10 +127,15 @@
$text['label-edit-note']['pt-pt'] = "Bloquear chamadas a partir de um número. Edite o nome e active/desactive.";
$text['label-edit-note']['fr-fr'] = "Bloquer les appels à partir d'un numéro. Editer le nom et activer/désactiver ci-dessous.";
- $text['label-exact-number']['en-us'] = "Enter the exact number.";
- $text['label-exact-number']['es-cl'] = "Ingrese el nú exacto.";
- $text['label-exact-number']['pt-pt'] = "Introduza o número exacto.";
- $text['label-exact-number']['fr-fr'] = "Entrer le numéro exact.";
+ $text['description-number']['en-us'] = "Enter the exact number.";
+ $text['description-number']['es-cl'] = "Ingrese el nú exacto.";
+ $text['description-number']['pt-pt'] = "Introduza o número exacto.";
+ $text['description-number']['fr-fr'] = "Entrer le numéro exact.";
+
+ $text['description-name']['en-us'] = "Enter the name.";
+ $text['description-name']['es-cl'] = "Introduzca el nombre.";
+ $text['description-name']['pt-pt'] = "Digite o nome.";
+ $text['description-name']['fr-fr'] = "Entrez le nom.";
$text['label-reject']['en-us'] = "Reject";
$text['label-reject']['es-cl'] = "Rechazar";
@@ -142,10 +147,10 @@
$text['label-busy']['pt-pt'] = "Ocupado";
$text['label-busy']['fr-fr'] = "Occupé";
- $text['label-action-message']['en-us'] = "Set an action for calls from this number.";
- $text['label-action-message']['es-cl'] = "Configurar una acción para llamadas desde este número.";
- $text['label-action-message']['pt-pt'] = "Escolha uma acção para chamadas com origem neste número.";
- $text['label-action-message']['fr-fr'] = "Choisir une action pour les appels venant de ce numéro.";
+ $text['description-action']['en-us'] = "Set an action for calls from this number.";
+ $text['description-action']['es-cl'] = "Configurar una acción para llamadas desde este número.";
+ $text['description-action']['pt-pt'] = "Escolha uma acção para chamadas com origem neste número.";
+ $text['description-action']['fr-fr'] = "Choisir une action pour les appels venant de ce numéro.";
$text['label-true']['en-us'] = "True";
$text['label-true']['es-cl'] = "Verdadero";
@@ -157,10 +162,10 @@
$text['label-false']['pt-pt'] = "Não";
$text['label-false']['fr-fr'] = "Non";
- $text['label-enable-message']['en-us'] = "Set to true to enable call blocking for this number.";
- $text['label-enable-message']['es-cl'] = "Seleccione verdadero para activar el bloqueo de llamadas desde este número.";
- $text['label-enable-message']['pt-pt'] = "Escolha 'sim' para activar o bloqueio de chamadas para este número.";
- $text['label-enable-message']['fr-fr'] = "Choisir Oui pour activer le bloquage d'appel. ";
+ $text['description-enable']['en-us'] = "Set to true to enable call blocking for this number.";
+ $text['description-enable']['es-cl'] = "Seleccione verdadero para activar el bloqueo de llamadas desde este número.";
+ $text['description-enable']['pt-pt'] = "Escolha 'sim' para activar o bloqueio de chamadas para este número.";
+ $text['description-enable']['fr-fr'] = "Choisir Oui pour activer le bloquage d'appel. ";
$text['button-save']['en-us'] = "Save";
$text['button-save']['es-cl'] = "Guardar";
diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php
index 3d46b50abb..4358d2d70b 100644
--- a/app/call_block/call_block.php
+++ b/app/call_block/call_block.php
@@ -112,7 +112,7 @@ else {
echo "
\n";
echo th_order_by('call_block_number', $text['label-number'], $order_by, $order);
echo th_order_by('call_block_name', $text['label-name'], $order_by, $order);
- echo th_order_by('call_block_count', $text['label-count'], $order_by, $order);
+ echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "style='text-align: center;'");
echo th_order_by('date_added', $text['label-date-added'], $order_by, $order);
echo th_order_by('call_block_action', $text['label-action'], $order_by, $order);
echo th_order_by('call_block_enabled', $text['label-enabled'], $order_by, $order);
@@ -125,18 +125,25 @@ else {
if ($result_count > 0) {
foreach($result as $row) {
- echo " \n";
- echo " ".$row['call_block_number']." \n";
- echo " ".$row['call_block_name']." \n";
- echo " ".$row['call_block_count']." \n";
+ echo " \n";
+ echo " ";
+ if (permission_exists('call_block_edit')) {
+ echo "".$row['call_block_number']." ";
+ }
+ else {
+ echo $row['call_block_number'];
+ }
+ echo " \n";
+ echo " ".$row['call_block_name']." \n";
+ echo " ".$row['call_block_count']." \n";
if (defined('TIME_24HR') && TIME_24HR == 1) {
$tmp_date_added = date("j M Y H:i:s", $row['date_added']);
} else {
$tmp_date_added = date("j M Y h:i:sa", $row['date_added']);
}
- echo " ".$tmp_date_added." \n";
- echo " ".$row['call_block_action']." \n";
- echo " ".$row['call_block_enabled']." \n";
+ echo " ".$tmp_date_added." \n";
+ echo " ".$row['call_block_action']." \n";
+ echo " ".ucwords($row['call_block_enabled'])." \n";
echo " ";
if (permission_exists('call_block_edit')) {
echo "$v_link_label_edit ";
diff --git a/app/call_block/call_block_edit.php b/app/call_block/call_block_edit.php
index 19db3e59d5..0571792ecf 100644
--- a/app/call_block/call_block_edit.php
+++ b/app/call_block/call_block_edit.php
@@ -147,7 +147,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") {
$sql = "update v_call_block set ";
$sql .= "call_block_name = '$call_block_name', ";
- //$sql .= "call_block_number = '$call_block_number', ";
+ $sql .= "call_block_number = '$call_block_number', ";
$sql .= "call_block_action = '$call_block_action', ";
$sql .= "call_block_enabled = '$call_block_enabled' ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
@@ -221,40 +221,34 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
- echo "\n";
- echo " Number:\n";
+ echo " \n";
+ echo " ".$text['label-number'].":\n";
echo " \n";
echo "\n";
- if ($action == "add") {
- echo " \n";
- echo " \n";
- echo $text['label-exact-number']."\n";
- }
- else {
- echo $call_block_number;
- }
+ echo " \n";
+ echo " \n";
+ echo $text['description-number']."\n";
echo " \n";
echo " \n";
echo " \n";
echo "\n";
- echo "\n";
- echo " Name:\n";
+ echo " \n";
+ echo " ".$text['label-name'].":\n";
echo " \n";
echo "\n";
echo " \n";
echo " \n";
- echo "Enter the name.\n";
+ echo $text['description-name']."\n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Action:\n";
+ echo " ".$text['label-action'].":\n";
echo " \n";
echo "\n";
echo " \n";
- echo " \n";
$pieces = explode(" ", $call_block_action);
$action = $pieces[0];
$extension = $pieces[2];
@@ -273,14 +267,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
call_block_get_extensions($extension);
echo " \n";
echo " \n";
- echo $text['label-action-message']."\n";
+ echo $text['description-action']."\n";
echo "\n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Enabled:\n";
+ echo " ".$text['label-enabled'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -288,7 +282,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$text['label-false']." \n";
echo " \n";
echo " \n";
- echo $text['label-enable-message']."\n";
+ echo $text['description-enable']."\n";
echo "\n";
echo " \n";
echo " \n";
diff --git a/app/content/rsslist.php b/app/content/rsslist.php
index 4dc61e3cdc..c8c9b6163c 100644
--- a/app/content/rsslist.php
+++ b/app/content/rsslist.php
@@ -114,8 +114,8 @@ $order = $_GET["order"];
//echo "".$row[rss_uuid]." ";
//echo "".$row[rss_category]." ";
- echo " ".$row[rss_title]." ";
- echo " ".$row[rss_link]." ";
+ echo "".$row[rss_title]." ";
+ echo "".$row[rss_link]." ";
//echo "".$row[rss_sub_category]." ";
if (strlen($row[rss_group]) > 0) {
echo "".$row[rss_group]." ";
@@ -140,7 +140,7 @@ $order = $_GET["order"];
//echo "".$row[rss_optional_3]." ";
//echo "".$row[rss_optional_4]." ";
//echo "".$row[rss_optional_5]." ";
- echo "".$row[rss_order]." ";
+ echo "".$row[rss_order]." ";
//echo "";
//echo " ";
diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php
index d9e640a8d4..793e2c4107 100644
--- a/app/destinations/destination_edit.php
+++ b/app/destinations/destination_edit.php
@@ -379,7 +379,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo " \n";
- echo "\n";
+ echo " \n";
echo " ".$text['label-destination_number'].":\n";
echo " \n";
echo "\n";
diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php
index 494a37fc8a..4244223816 100644
--- a/app/destinations/destinations.php
+++ b/app/destinations/destinations.php
@@ -148,11 +148,11 @@ require_once "resources/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
echo " \n";
- echo " ".$row['destination_type']." \n";
- echo " ".$row['destination_number']." \n";
- echo " ".$row['destination_context']." \n";
- echo " ".$row['destination_enabled']." \n";
- echo " ".$row['destination_description']." \n";
+ echo " ".ucwords($row['destination_type'])." \n";
+ echo " ".$row['destination_number']." \n";
+ echo " ".$row['destination_context']." \n";
+ echo " ".ucwords($row['destination_enabled'])." \n";
+ echo " ".$row['destination_description']." \n";
echo " ";
echo "$v_link_label_edit ";
echo "$v_link_label_delete ";
diff --git a/app/devices/devices.php b/app/devices/devices.php
index 747406a7ab..56ede3e22e 100644
--- a/app/devices/devices.php
+++ b/app/devices/devices.php
@@ -166,7 +166,14 @@ else {
echo " \n";
//echo " ".$row['device_uuid']." \n";
- echo " ".$row['device_mac_address']." \n";
+ echo " ";
+ if (permission_exists('device_edit')) {
+ echo "".$row['device_mac_address']." ";
+ }
+ else {
+ echo $row['device_mac_address'];
+ }
+ echo " \n";
echo " ".$row['device_label']." \n";
echo " ".$row['device_vendor']." \n";
//echo " ".$row['device_model']." \n";
diff --git a/app/dialplan/dialplans.php b/app/dialplan/dialplans.php
index b9b5142de8..bec2efe193 100644
--- a/app/dialplan/dialplans.php
+++ b/app/dialplan/dialplans.php
@@ -198,30 +198,20 @@ else {
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid);
echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid);
echo "";
- if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
- if (permission_exists('inbound_route_add')) {
- echo "$v_link_label_add ";
- }
+ if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_add')) {
+ echo "$v_link_label_add ";
}
- elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
- if (permission_exists('outbound_route_add')) {
- echo "$v_link_label_add ";
- }
+ elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_add')) {
+ echo "$v_link_label_add ";
}
- elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7") {
- if (permission_exists('fifo_add')) {
- echo "$v_link_label_add ";
- }
+ elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_add')) {
+ echo "$v_link_label_add ";
}
- elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
- if (permission_exists('time_condition_add')) {
- echo "$v_link_label_add ";
- }
+ elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_add')) {
+ echo "$v_link_label_add ";
}
- else {
- if (permission_exists('dialplan_add')) {
- echo "$v_link_label_add ";
- }
+ elseif (permission_exists('dialplan_add')) {
+ echo "$v_link_label_add ";
}
echo " \n";
echo " \n";
@@ -255,54 +245,45 @@ else {
unset ($prep_statement);
}
echo "\n";
- echo " ".$row['dialplan_name']." \n";
- echo " ".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : " ")." \n";
- echo " ".$row['dialplan_context']." \n";
- echo " ".$row['dialplan_order']." \n";
- echo " ".$row['dialplan_enabled']." \n";
- echo " ".((strlen($row['dialplan_description']) > 0) ? $row['dialplan_description'] : " ")." \n";
- echo " \n";
- if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
- if (permission_exists('inbound_route_edit')) {
- echo "$v_link_label_edit ";
- }
- if (permission_exists('inbound_route_delete')) {
- echo "$v_link_label_delete ";
- }
- }
- elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
- if (permission_exists('outbound_route_edit')) {
- echo "$v_link_label_edit ";
- }
- if (permission_exists('outbound_route_delete')) {
- echo "$v_link_label_delete ";
- }
- }
- elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7") {
- if (permission_exists('fifo_edit')) {
- echo "$v_link_label_edit ";
- }
- if (permission_exists('fifo_delete')) {
- echo "$v_link_label_delete ";
- }
- }
- elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
- if (permission_exists('time_condition_edit')) {
- echo "$v_link_label_edit ";
- }
- if (permission_exists('time_condition_delete')) {
- echo "$v_link_label_delete ";
- }
+ echo " ";
+ if (
+ ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
+ ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
+ ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
+ ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
+ permission_exists('dialplan_edit')
+ ) {
+ echo "".$row['dialplan_name']." ";
}
else {
- if (permission_exists('dialplan_edit')) {
- echo "$v_link_label_edit ";
- }
- if (permission_exists('dialplan_delete')) {
- echo "$v_link_label_delete ";
- }
+ echo $row['dialplan_name'];
}
- echo " \n";
+ echo " \n";
+ echo " ".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : " ")." \n";
+ echo " ".$row['dialplan_context']." \n";
+ echo " ".$row['dialplan_order']." \n";
+ echo " ".$row['dialplan_enabled']." \n";
+ echo " ".((strlen($row['dialplan_description']) > 0) ? $row['dialplan_description'] : " ")." \n";
+ echo " \n";
+ if (
+ ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
+ ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
+ ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
+ ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
+ permission_exists('dialplan_edit')
+ ) {
+ echo "$v_link_label_edit ";
+ }
+ if (
+ ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_delete')) ||
+ ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_delete')) ||
+ ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_delete')) ||
+ ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_delete')) ||
+ permission_exists('dialplan_delete')
+ ) {
+ echo "$v_link_label_delete ";
+ }
+ echo " \n";
echo " \n";
if ($c==0) { $c=1; } else { $c=0; }
} //end foreach
@@ -316,32 +297,21 @@ else {
echo " \n";
echo " ".$paging_controls." \n";
echo " ";
- if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
- if (permission_exists('inbound_route_add')) {
- echo "$v_link_label_add ";
- }
+ if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_add')) {
+ echo "$v_link_label_add ";
}
- elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
- if (permission_exists('outbound_route_add')) {
- echo "$v_link_label_add ";
- }
+ elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_add')) {
+ echo "$v_link_label_add ";
}
- elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7") {
- if (permission_exists('fifo_add')) {
- echo "$v_link_label_add ";
- }
+ elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_add')) {
+ echo "$v_link_label_add ";
}
- elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
- if (permission_exists('time_condition_add')) {
- echo "$v_link_label_add ";
- }
+ elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_add')) {
+ echo "$v_link_label_add ";
}
- else {
- if (permission_exists('dialplan_add')) {
- echo "$v_link_label_add ";
- }
+ elseif (permission_exists('dialplan_add')) {
+ echo "$v_link_label_add ";
}
-
echo " \n";
echo " \n";
echo " \n";
diff --git a/app/extensions/extensions.php b/app/extensions/extensions.php
index 81fce0eb94..20bbccd720 100644
--- a/app/extensions/extensions.php
+++ b/app/extensions/extensions.php
@@ -152,8 +152,16 @@ require_once "resources/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
- echo "\n";
- echo " ".$row['extension']." \n";
+ $tr_link = (permission_exists('extension_edit')) ? "style='cursor: pointer;' onclick=\"document.location.href='extension_edit.php?id=".$row['extension_uuid']."';\"" : null;
+ echo " \n";
+ echo " ";
+ if (permission_exists('extension_edit')) {
+ echo "".$row['extension']." ";
+ }
+ else {
+ echo $row['extension'];
+ }
+ echo " \n";
echo " ".$row['call_group']." \n";
//echo " ".$row['voicemail_mail_to']." \n";
echo " ".$row['enabled']." \n";
diff --git a/app/gateways/gateways.php b/app/gateways/gateways.php
index 952c16eaa9..381804923f 100644
--- a/app/gateways/gateways.php
+++ b/app/gateways/gateways.php
@@ -165,7 +165,14 @@ else {
if ($num_rows > 0) {
foreach($result as $row) {
echo " \n";
- echo " ".$row["gateway"]." \n";
+ echo " ";
+ if (permission_exists('gateway_edit')) {
+ echo "".$row["gateway"]." ";
+ }
+ else {
+ echo $row["gateway"];
+ }
+ echo " \n";
echo " ".$row["context"]." \n";
if ($fp) {
if ($row["enabled"] == "true") {
diff --git a/app/modules/modules.php b/app/modules/modules.php
index 4f7f0cc51a..cabb66f9cb 100644
--- a/app/modules/modules.php
+++ b/app/modules/modules.php
@@ -157,8 +157,15 @@ if (strlen($_GET["a"]) > 0) {
}
echo " \n";
- echo " ".$row["module_label"]." \n";
- echo " ".$row["module_description"]." \n";
+ echo " ";
+ if (permission_exists('module_edit')) {
+ echo "".$row["module_label"]." ";
+ }
+ else {
+ echo $row["module_label"];
+ }
+ echo " \n";
+ echo " ".$row["module_description"]." \n";
if ($mod->active($row["module_name"])) {
echo " ".$text['label-running']." \n";
echo " ".$text['label-stop']." \n";
diff --git a/app/vars/vars.php b/app/vars/vars.php
index bc9de63b18..12bc03f313 100644
--- a/app/vars/vars.php
+++ b/app/vars/vars.php
@@ -128,8 +128,15 @@ else {
}
echo " \n";
- echo " ".substr($row['var_name'],0,32)." \n";
- echo " ".substr($var_value,0,30)." \n";
+ echo " ";
+ if (permission_exists('var_edit')) {
+ echo "".substr($row['var_name'],0,32)." ";
+ }
+ else {
+ echo substr($row['var_name'],0,32);
+ }
+ echo " \n";
+ echo " ".substr($var_value,0,30)." \n";
echo " ";
if ($row['var_enabled'] == "true") {
echo $text['option-true'];
diff --git a/core/menu/menu.php b/core/menu/menu.php
index ca379ca991..4168862135 100644
--- a/core/menu/menu.php
+++ b/core/menu/menu.php
@@ -118,9 +118,9 @@ require_once "resources/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
echo " \n";
- echo " ".$row['menu_name']." \n";
- echo " ".$row['menu_language']." \n";
- echo " ".$row['menu_description']." \n";
+ echo " ".$row['menu_name']." \n";
+ echo " ".$row['menu_language']." \n";
+ echo " ".$row['menu_description']." \n";
echo " ";
echo "$v_link_label_edit ";
echo "$v_link_label_delete ";
diff --git a/core/users/users.php b/core/users/users.php
index a8d0a01ca3..cad464d42a 100644
--- a/core/users/users.php
+++ b/core/users/users.php
@@ -150,7 +150,14 @@ echo " \n";
//hide
} else {
echo " \n";
- echo " ".$row['username']." \n";
+ echo " ";
+ if (permission_exists('user_edit')) {
+ echo "".$row['username']." ";
+ }
+ else {
+ echo $row['username'];
+ }
+ echo " \n";
echo " ";
if ($row['user_enabled'] == 'true') {
echo $text['option-true'];