diff --git a/app/calls/app_languages.php b/app/calls/app_languages.php index f7340eaa7a..6b0b685eec 100644 --- a/app/calls/app_languages.php +++ b/app/calls/app_languages.php @@ -286,6 +286,20 @@ $text['label-call-forward']['sv-se'] = "Vidarekoppling "; $text['label-call-forward']['uk'] = "Переадресація"; $text['label-call-forward']['de-at'] = "Rufumleitung"; +$text['header-call_routing']['en-us'] = "Call Routing"; +$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas"; +$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas"; +$text['header-call_routing']['fr-fr'] = "Routage des Appels"; +$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas"; +$text['header-call_routing']['pl'] = "Trasy połączeń"; +$text['header-call_routing']['he'] = "ניתוב שיחות"; +$text['header-call_routing']['uk'] = "маршрутизація викликів"; +$text['header-call_routing']['sv-se'] = "samtals Rutter"; +$text['header-call_routing']['de-at'] = "Anrufrouten"; +$text['header-call_routing']['ro'] = "Маршрутизация вызовов"; +$text['header-call_routing']['fa'] = ""; +$text['header-call_routing']['ar-eg'] = "توجيه الدعوة"; + $text['description-on-busy']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension."; $text['description-on-busy']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión."; $text['description-on-busy']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão."; @@ -349,25 +363,15 @@ $text['description-call-prompt']['sv-se'] = "Kräv verifiering för att ta emot $text['description-call-prompt']['uk'] = ""; $text['description-call-prompt']['de-at'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll."; -$text['description-3']['en-us'] = "The following list the extensions that have been assigned to this user account."; -$text['description-3']['es-cl'] = "El siguiente listado muestra las extensiones que han sido asignadas a esta cuenta de usuario."; -$text['description-3']['pt-pt'] = "A tabela seguinte lista as extensões que foram atribuídas a esta conta de utilizador."; -$text['description-3']['fr-fr'] = "Ici la liste des extensions assignées à cet usager."; -$text['description-3']['pt-br'] = "Utilize os campos para filtrar a informação sobre os registos de chamadas desejados."; -$text['description-3']['pl'] = "Widoczne są numery wewnętrzne przypisane to danego konta użytkownika."; -$text['description-3']['sv-se'] = "Följande listar anknytningar som har knytets mot användarkontot. "; -$text['description-3']['uk'] = ""; -$text['description-3']['de-at'] = "Nachfolgend werden alle Nebenstellen aufgelistet, die diesem Benutzerkonto zugeordnet sind."; - -$text['description-2']['en-us'] = "Use the links to configure call forward follow me, or do not disturb."; -$text['description-2']['es-cl'] = "Utilice los links para configurar reenvio de llamada, sígueme o no Molestar."; -$text['description-2']['pt-pt'] = "Utilizar os links para definir as funcinalidades de encaminhamento de chamada, seguimento ou de não perturbar."; -$text['description-2']['fr-fr'] = "Utiliser les liens afin de configurer le renvoi 'follow me', ou ne pas déranger."; -$text['description-2']['pt-br'] = "A informação contem a origem, destino, duração e outros detalhes úteis da chamada."; -$text['description-2']['pl'] = "Za pomocą poniższych linków można skonfigurować przekierowania, usługę „Podążaj z mną” lub „Nie przeszkadzać” (DnD)."; -$text['description-2']['sv-se'] = "Använd länkarna för att konfigurera Vidarekoppling, Följ Mig och Stör Ej. "; -$text['description-2']['uk'] = ""; -$text['description-2']['de-at'] = "Benutzen Sie die Funktionen um Rufumleitung, Anrufweiterschaltung oder Nicht stören zu konfigurieren."; +$text['description-call_routing']['en-us'] = "Define alternate inbound call handling for the following extensions."; +$text['description-call_routing']['es-cl'] = "Definir alternativa para el manejo de las siguientes extensiones de llamadas entrantes."; +$text['description-call_routing']['pt-pt'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões."; +$text['description-call_routing']['fr-fr'] = "Définir la manipulation pour les extensions suivantes alternent appel entrant."; +$text['description-call_routing']['pt-br'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões."; +$text['description-call_routing']['pl'] = "Definiowanie alternatywnego połączenia przychodzącego obsługi dla następujących rozszerzeń."; +$text['description-call_routing']['sv-se'] = "Definiera alternativa inkommande samtalshantering för följande tillägg."; +$text['description-call_routing']['uk'] = "Визначити обробку для наступних розширень альтернативного вхідного дзвінка."; +$text['description-call_routing']['de-at'] = "Definieren Sie alternative eingehende Anruf für die folgenden Erweiterungen der Handhabung."; $text['description']['en-us'] = "Directs incoming calls for extension:"; $text['description']['es-cl'] = "Dirige las llamadas entrantes hacia una extensión:"; @@ -457,4 +461,4 @@ $text['check-false']['uk'] = "Ні"; $text['check-false']['fr-fr'] = ""; $text['check-false']['de-at'] = "Aus"; -?> +?> \ No newline at end of file diff --git a/app/calls/calls.php b/app/calls/calls.php index 3cfea3b85f..76b5bfdcd2 100644 --- a/app/calls/calls.php +++ b/app/calls/calls.php @@ -84,11 +84,8 @@ else { $result_count = $row['count']; unset ($prep_statement, $row); - if ($is_included == 'true') { + if ($is_included) { $rows_per_page = 10; - if ($result_count > 10) { - echo "\n"; - } } else { $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; @@ -115,61 +112,102 @@ else { $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; - if ($is_included != "true") { - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo "
".$text['title']."
\n"; - echo " ".$text['description-2']."\n"; - echo " ".$text['description-3']."\n"; - echo "
\n"; + echo "
"; + echo " ".$text['header-call_routing']."
"; + if (!$is_included) { + echo $text['description-call_routing']."
"; + } + echo "
"; + echo "
\n"; + + echo "
"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; + if ($result_count > 10 && $is_included) { + echo " "; + } + if (!$is_included) { echo " "; echo " "; if ($paging_controls_mini != '') { echo "".$paging_controls_mini."\n"; } - echo "
\n"; - echo "
"; } + echo "
\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; + if (permission_exists('call_forward')) { echo "\n"; } + if (permission_exists('follow_me')) { echo "\n"; } + if (permission_exists('do_not_disturb')) { echo "\n"; } + if (!$is_included) { + echo "\n"; + } + echo "\n"; echo "\n"; if ($result_count > 0) { foreach($result as $row) { - $tr_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']; + $tr_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&return_url=".urlencode($_SERVER['REQUEST_URI']); $tr_link = (permission_exists('call_forward') || permission_exists('follow_me') || permission_exists('do_not_disturb')) ? "href='".$tr_url."'" : null; echo "\n"; echo " \n"; - echo " \n"; - echo " \n"; + if (permission_exists('call_forward')) { + echo ""; + } + if (permission_exists('follow_me')) { + if ($row['follow_me_uuid'] != '') { + //check if follow me is enabled + $sql = "select follow_me_enabled from v_follow_me where follow_me_uuid = '".$row['follow_me_uuid']."' and domain_uuid = '".$domain_uuid."'"; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $row_x = $prep_statement->fetch(PDO::FETCH_NAMED); + $follow_me_enabled = ($row_x['follow_me_enabled'] == 'true') ? true : false; + unset($sql, $prep_statement, $row_x); + //get destination count if enabled + if ($follow_me_enabled) { + $sql = "select count(follow_me_destination_uuid) as destination_count from v_follow_me_destinations where follow_me_uuid = '".$row['follow_me_uuid']."' and domain_uuid = '".$domain_uuid."'"; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $row_x = $prep_statement->fetch(PDO::FETCH_NAMED); + $follow_me_destination_count = $row_x['destination_count']; + unset($sql, $prep_statement, $row_x); + } + } + else { + $follow_me_enabled = false; + } + echo ""; + } + if (permission_exists('do_not_disturb')) { + echo ""; + } + if (!$is_included) { + echo "\n"; + } + echo " \n"; echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } + $c = ($c) ? 0 : 1; } //end foreach unset($sql, $result, $row_count); } //end if results echo "
".$text['table-extension']."".$text['table-tools']."".$text['table-description']."".$text['label-call-forward']."".$text['label-follow-me']."".$text['label-dnd']." 
".$row['extension']."\n"; - if (permission_exists('call_forward')) { echo "".$text['label-call-forward']."   "; } - if (permission_exists('follow_me')) { echo "".$text['label-follow-me']."   "; } - if (permission_exists('do_not_disturb')) { echo "".$text['label-dnd'].""; } - echo " ".$row['description']." ".(($row['forward_all_enabled'] == 'true') ? format_phone($row['forward_all_destination']) : ' ')."".(($follow_me_enabled) ? $text['label-enabled']." (".$follow_me_destination_count.")" : ' ')."".(($row['do_not_disturb'] == 'true') ? $text['label-enabled'] : ' ')."".$v_link_label_edit."
"; - echo "
"; + echo "
"; - if (strlen($paging_controls) > 0 && ($is_included != "true")) { + if (strlen($paging_controls) > 0 && (!$is_included)) { echo "
".$paging_controls."
\n"; - echo "

\n"; + echo "

\n"; } - if ($is_included != "true") { + if (!$is_included) { + echo "
"; require_once "resources/footer.php"; } diff --git a/app/ring_groups/ring_group_forward.php b/app/ring_groups/ring_group_forward.php index c9bd3bddcb..4cebac797f 100644 --- a/app/ring_groups/ring_group_forward.php +++ b/app/ring_groups/ring_group_forward.php @@ -98,7 +98,7 @@ require_once "resources/paging.php"; } //prepare to page the results - if ($is_included == 'true') { + if ($is_included) { $rows_per_page = 10; } else { diff --git a/core/user_settings/app_languages.php b/core/user_settings/app_languages.php index 5b6c2d2674..9d89c9099a 100644 --- a/core/user_settings/app_languages.php +++ b/core/user_settings/app_languages.php @@ -1078,20 +1078,6 @@ $text['header-user_dashboard']['ro'] = "Panou control utilizator"; $text['header-user_dashboard']['fa'] = ""; $text['header-user_dashboard']['ar-eg'] = "الصفحه الرئيسيه للمستخدم"; -$text['header-call_routing']['en-us'] = "Call Routing"; -$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas"; -$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas"; -$text['header-call_routing']['fr-fr'] = "Routage des Appels"; -$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas"; -$text['header-call_routing']['pl'] = "Trasy połączeń"; -$text['header-call_routing']['he'] = "ניתוב שיחות"; -$text['header-call_routing']['uk'] = "маршрутизація викликів"; -$text['header-call_routing']['sv-se'] = "samtals Rutter"; -$text['header-call_routing']['de-at'] = "Anrufrouten"; -$text['header-call_routing']['ro'] = "Маршрутизация вызовов"; -$text['header-call_routing']['fa'] = ""; -$text['header-call_routing']['ar-eg'] = "توجيه الدعوة"; - $text['description-user_language']['en-us'] = "Select the language."; $text['description-user_language']['es-cl'] = "Seleccione el idioma."; $text['description-user_language']['pt-pt'] = "Selecione o idioma."; @@ -1282,4 +1268,4 @@ $text['button-view_all']['ro'] = ""; $text['button-view_all']['de-at'] = "Alle anzeigen"; $text['button-view_all']['he'] = "הצג הכל"; -?> \ No newline at end of file +?> \ No newline at end of file diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 8a1ebbe938..ec6a435e3f 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -1185,10 +1185,8 @@ if (!is_array($selected_blocks) || in_array('routing', $selected_blocks) || in_a //call routing if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/calls/calls.php")) { if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) { - $is_included = "true"; - echo "
\n"; - echo "
\n"; - echo "
".$text['header-call_routing']."

\n"; + $is_included = true; + echo "
\n"; require_once "app/calls/calls.php"; echo "
\n"; } @@ -1203,7 +1201,7 @@ if (!is_array($selected_blocks) || in_array('routing', $selected_blocks) || in_a //ring group forward if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ring_groups/ring_group_forward.php")) { if (permission_exists('ring_group_forward')) { - $is_included = "true"; + $is_included = true; echo "
\n"; require_once "app/ring_groups/ring_group_forward.php"; echo "
";