diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index b7c72ecba5..58a477e59b 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -163,6 +163,33 @@ $text['title-destination_summary']['zh-cn'] = "目的地概要"; $text['title-destination_summary']['ja-jp'] = "目的地の概要"; $text['title-destination_summary']['ko-kr'] = "목적지 요약"; +$text['title-destination_map']['en-us'] = "Destination Map"; +$text['title-destination_map']['en-gb'] = "Destination Map"; +$text['title-destination_map']['ar-eg'] = "خريطة الوجهات"; +$text['title-destination_map']['de-at'] = "Zielkarte"; +$text['title-destination_map']['de-ch'] = "Zielkarte"; +$text['title-destination_map']['de-de'] = "Zielkarte"; +$text['title-destination_map']['el-gr'] = "Χάρτης Προορισμών"; +$text['title-destination_map']['es-cl'] = "Mapa de Destinos"; +$text['title-destination_map']['es-mx'] = "Mapa de Destinos"; +$text['title-destination_map']['fr-ca'] = "Carte des destinations"; +$text['title-destination_map']['fr-fr'] = "Carte des destinations"; +$text['title-destination_map']['he-il'] = "מפת יעדים"; +$text['title-destination_map']['it-it'] = "Mappa delle destinazioni"; +$text['title-destination_map']['ka-ge'] = "დანიშნულების რუკა"; +$text['title-destination_map']['nl-nl'] = "Bestemmingskaart"; +$text['title-destination_map']['pl-pl'] = "Mapa celów"; +$text['title-destination_map']['pt-br'] = "Mapa de Destinos"; +$text['title-destination_map']['pt-pt'] = "Mapa de Destinos"; +$text['title-destination_map']['ro-ro'] = "Hartă a destinațiilor"; +$text['title-destination_map']['ru-ru'] = "Карта направлений"; +$text['title-destination_map']['sv-se'] = "Målkarta"; +$text['title-destination_map']['uk-ua'] = "Карта напрямків"; +$text['title-destination_map']['tr-tr'] = "Yerler Haritası"; +$text['title-destination_map']['zh-cn'] = "目的地地图"; +$text['title-destination_map']['ja-jp'] = "目的地マップ"; +$text['title-destination_map']['ko-kr'] = "목적지 지도"; + $text['button-outbound']['en-us'] = "Outbound"; $text['button-outbound']['en-gb'] = "Outbound"; $text['button-outbound']['ar-eg'] = "صادر"; @@ -352,6 +379,33 @@ $text['button-local']['zh-cn'] = "当地的"; $text['button-local']['ja-jp'] = "地元"; $text['button-local']['ko-kr'] = "현지의"; +$text['button-map']['en-us'] = "Map"; +$text['button-map']['en-gb'] = "Map"; +$text['button-map']['ar-eg'] = "خريطة"; +$text['button-map']['de-at'] = "Karte"; +$text['button-map']['de-ch'] = "Karte"; +$text['button-map']['de-de'] = "Karte"; +$text['button-map']['el-gr'] = "Χάρτης"; +$text['button-map']['es-cl'] = "Mapa"; +$text['button-map']['es-mx'] = "Mapa"; +$text['button-map']['fr-ca'] = "Carte"; +$text['button-map']['fr-fr'] = "Carte"; +$text['button-map']['he-il'] = "מפה"; +$text['button-map']['it-it'] = "Mappa"; +$text['button-map']['ka-ge'] = "მაპა"; +$text['button-map']['nl-nl'] = "Kaart"; +$text['button-map']['pl-pl'] = "Mapa"; +$text['button-map']['pt-br'] = "Mapa"; +$text['button-map']['pt-pt'] = "Mapa"; +$text['button-map']['ro-ro'] = "Hartă"; +$text['button-map']['ru-ru'] = "Карта"; +$text['button-map']['sv-se'] = "Karta"; +$text['button-map']['uk-ua'] = "Карта"; +$text['button-map']['tr-tr'] = "Harita"; +$text['button-map']['zh-cn'] = "地图"; +$text['button-map']['ja-jp'] = "地図"; +$text['button-map']['ko-kr'] = "지도"; + $text['message-maximum_destinations']['en-us'] = "Maximum Destinations:"; $text['message-maximum_destinations']['en-gb'] = "Maximum Destinations:"; $text['message-maximum_destinations']['ar-eg'] = "الحد الأقصي لجهات الأتصال"; @@ -1758,6 +1812,33 @@ $text['description-destinations']['zh-cn'] = "入站目的地是入站呼叫的 $text['description-destinations']['ja-jp'] = "受信宛先は、受信通話の DID/DDI、DNIS、またはエイリアスです。"; $text['description-destinations']['ko-kr'] = "인바운드 대상은 DID/DDI, DNIS 또는 인바운드 통화의 별칭입니다."; +$text['description-destination_map']['en-us'] = "The destination map is a list of all defined destinations such as Extensions, Voicemails, Ring Group, IVR Menus, Conferences, and more."; +$text['description-destination_map']['en-gb'] = "The destination map is a list of all defined destinations such as Extensions, Voicemails, Ring Group, IVR Menus, Conferences, and more."; +$text['description-destination_map']['ar-eg'] = "خريطة الوجهات هي قائمة بجميع الوجهات المحددة مثل الامتدادات، الرسائل الصوتية، مجموعة الرنين، قوائم IVR، المؤتمرات وأكثر من ذلك."; +$text['description-destination_map']['de-at'] = "Die Zielkarte ist eine Liste aller definierten Ziele wie Erweiterungen, Sprachboxen, Rufgruppen, IVR-Menüs, Konferenzen und mehr."; +$text['description-destination_map']['de-ch'] = "Die Zielkarte ist eine Liste aller definierten Ziele wie Erweiterungen, Sprachboxen, Rufgruppen, IVR-Menüs, Konferenzen und mehr."; +$text['description-destination_map']['de-de'] = "Die Zielkarte ist eine Liste aller definierten Ziele wie Erweiterungen, Sprachboxen, Rufgruppen, IVR-Menüs, Konferenzen und mehr."; +$text['description-destination_map']['el-gr'] = "Ο χάρτης προορισμού είναι μια λίστα με όλους τους ορισμένους προορισμούς όπως Επεκτάσεις, Αποθηκευμένες Μηνύματα, Ομάδες Κλήσης, Μενού IVR, Συνεδρίες και περισσότερα."; +$text['description-destination_map']['es-cl'] = "El mapa de destinos es una lista de todos los destinos definidos como Extensiones, Buzones de Voz, Grupo de Llamadas, Menús IVR, Conferencias y más."; +$text['description-destination_map']['es-mx'] = "El mapa de destinos es una lista de todos los destinos definidos como Extensiones, Buzones de Voz, Grupo de Llamadas, Menús IVR, Conferencias y más."; +$text['description-destination_map']['fr-ca'] = "La carte des destinations est une liste de tous les destinations définies telles que les extensions, les boîtes vocales, le groupe d'appels, les menus IVR, les conférences et plus."; +$text['description-destination_map']['fr-fr'] = "La carte des destinations est une liste de toutes les destinations définies telles que les extensions, les boîtes vocales, le groupe d'appels, les menus IVR, les conférences et plus."; +$text['description-destination_map']['he-il'] = "מפת היעדים היא רשימה של כל היעדים המוגדרים כגון הרחבות, דואר קול, קבוצת קולות, תפריטים IVR, כנסיות ועוד."; +$text['description-destination_map']['it-it'] = "La mappa delle destinazioni è un elenco di tutte le destinazioni definite come Estensioni, Voce Messaggi, Gruppo di Chiamate, Menu IVR, Conferenze e altro."; +$text['description-destination_map']['ka-ge'] = "დანიშნულების რუკაა ყველა განსაზღვრული დანიშნულების სია, როგორიცაა გაფართოებები, ვოისმეილები, რინგ ჯგუფი, IVR მენიუს, კონფერენციები და სხვა."; +$text['description-destination_map']['nl-nl'] = "De bestemmingskaart is een lijst van alle gedefinieerde bestemmingen zoals extensies, voicemails, bellen groep, IVR-menu's, conferenties en meer."; +$text['description-destination_map']['pl-pl'] = "Mapa przeznaczeń to lista wszystkich zdefiniowanych przeznaczeń, takich jak rozszerzenia, skrzynki pocztowe, grupa dzwoniąca, menu IVR, konferencje i wiele więcej."; +$text['description-destination_map']['pt-br'] = "O mapa de destinos é uma lista de todos os destinos definidos como Extensões, Caixas Postais, Grupo de Chamadas, Menus IVR, Conferências e mais."; +$text['description-destination_map']['pt-pt'] = "O mapa de destinos é uma lista de todos os destinos definidos como Extensões, Caixas de Voz, Grupo de Chamadas, Menus IVR, Conferências e mais."; +$text['description-destination_map']['ro-ro'] = "Harta destinațiilor este o listă a tuturor destinațiilor definite, cum ar fi Extensii, Mesaje Vocale, Grup de Apeluri, Meniuri IVR, Conferințe și multe altele."; +$text['description-destination_map']['ru-ru'] = "Карта назначений — это список всех определённых назначений, таких как Расширения, Голосовые почты, Группа вызовов, Меню IVR, Конференции и многое другое."; +$text['description-destination_map']['sv-se'] = "Destinationskartan är en lista över alla definierade destinationer som till exempel extensioner, röstbrevlådor, ringgrupp, IVR-menyer, konferenser och mer."; +$text['description-destination_map']['uk-ua'] = "Карта призначень — це список усіх визначених призначень, таких як розширення, голосові поштові скриньки, група дзвінків, меню IVR, конференції та багато іншого."; +$text['description-destination_map']['tr-tr'] = "Hedef haritası, uzantılar, sesli postalar, arama grubu, IVR menüleri, konferanslar ve daha fazlası gibi tanımlanmış tüm hedeflerin listesidir."; +$text['description-destination_map']['zh-cn'] = "目的地图是所有已定义目的地的列表,例如扩展、语音信箱、呼叫组、IVR菜单、会议和更多。"; +$text['description-destination_map']['ja-jp'] = "目的地マップは、拡張、音声メール、リンググループ、IVRメニュー、会議など、定義されたすべての目的地のリストです。"; +$text['description-destination_map']['ko-kr'] = "목적지 맵은 확장, 음성 메일, 링 그룹, IVR 메뉴, 회의 등 정의된 모든 목적지의 목록입니다."; + $text['description-destination_type']['en-us'] = "Select the type."; $text['description-destination_type']['en-gb'] = "Select the type."; $text['description-destination_type']['ar-eg'] = "اختر النوع"; @@ -2622,4 +2703,3 @@ $text['label-to']['zh-cn'] = "到"; $text['label-to']['ja-jp'] = "に"; $text['label-to']['ko-kr'] = "에게"; -?> diff --git a/app/destinations/destination_map.php b/app/destinations/destination_map.php new file mode 100644 index 0000000000..5acf83504c --- /dev/null +++ b/app/destinations/destination_map.php @@ -0,0 +1,153 @@ + + Portions created by the Initial Developer are Copyright (C) 2026 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes files +require_once dirname(__DIR__, 2) . "/resources/require.php"; +require_once "resources/check_auth.php"; + +//check permissions +if (!(permission_exists('destination_add') || permission_exists('destination_edit'))) { + echo "access denied"; + exit; +} + +//get the search string +$search = $_REQUEST['search'] ?? ''; + +//get the destinations +$destinations = new destinations(); +$array = $destinations->get('dialplan'); + +//get the language +$domain_language = $settings->get('domain', 'language'); + +//add multi-lingual support +$language = new text; +$text = $language->get(); + +//add multi-lingual support +$language2 = new text; + +//count the rows +$num_rows = 0; +foreach($array as $key => $value) { + foreach($value as $row) { + //show only rows that match the search + if (!empty($search) && !empty($row['uuid'])) { + if (stripos($row['label'].$row['extension'], $search) !== false) { + $destination_array[$key][] = $row; + $num_rows++; + } + } + + //count the rows when the search is empty + if (empty($search) && !empty($row['uuid'])) { + $destination_array[$key][] = $row; + $num_rows++; + } + } +} + +//include the header +require_once "resources/header.php"; + +//show the content +echo "
\n"; +echo "
".$text['title-destination_map']."
".number_format($num_rows)."
\n"; +echo "
\n"; +echo "\n"; +echo "
\n"; +echo "
".$text['description-destination_map']."
\n"; +echo "
\n"; + +//loop through the destinations array +if (!empty($destination_array)) { + foreach($destination_array as $key => $value) { + //add multi-lingual support + if (file_exists(dirname(__DIR__, 2)."/app/".$key."/app_languages.php")) { + $text2 = $language2->get($domain_language, 'app/'.$key); + } + + //set the applications php list filename + $app_name_list = $key.'.php'; + if ($key == 'call_centers') { + $app_name_list = 'call_center_queues.php'; + } + + //echo "

".$text['title-'.$key]."

\n"; + echo "
\n"; + echo "".$text2['title-'.$key]."
\n"; + echo "
\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + //echo " \n"; + echo " \n"; + foreach($value as $row) { + if (!empty($row['uuid'])) { + //set the applications php edit filename + $app_name_edit = database::singular($key).'_edit.php'; + if ($key == 'call_centers') { + $app_name_edit = 'call_center_queue_edit.php'; + } + + //set the row URL + $list_row_url = '/app/'.$key.'/'.$app_name_edit.'?id='.$row['uuid']; + + //show the row + echo " \n"; + echo " \n"; + echo " \n"; + // echo " \n"; + echo " \n"; + echo " \n"; + } + } + echo "
".$text['label-label']."".$text['label-extension']." description
\n"; + echo " ".$row['label']."\n"; + echo " \n"; + echo " ".$row['extension']."\n"; + echo " \n"; + // echo " ".$row['description']."\n"; + // echo " \n"; + echo "  \n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + } +} + +//include the footer +require_once "resources/footer.php"; diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index 1f28bfc4f6..8949bb19ad 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2025 + Portions created by the Initial Developer are Copyright (C) 2008-2026 the Initial Developer. All Rights Reserved. Contributor(s): @@ -288,6 +288,7 @@ if (permission_exists('destination_delete') && $destinations) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$settings->get('theme', 'button_icon_delete'),'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } + echo button::create(['type'=>'button','label'=>$text['button-map'],'icon'=>$settings->get('theme', 'button_icon_map'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'destination_map.php']); echo "