From 03220c97540f7674cf9f95ba5ba2d1d36078ed56 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sun, 18 Jan 2015 10:06:08 +0000 Subject: [PATCH] Add the text class to more of the applications. --- app/backup/index.php | 6 +- app/call_block/call_block.php | 6 +- app/call_block/call_block_cdr_add.php | 6 +- app/call_block/call_block_delete.php | 6 +- app/call_block/call_block_edit.php | 6 +- app/call_broadcast/call_broadcast.php | 6 +- app/call_broadcast/call_broadcast_delete.php | 6 +- app/call_broadcast/call_broadcast_edit.php | 6 +- app/call_broadcast/call_broadcast_send.php | 6 +- app/call_broadcast/call_broadcast_stop.php | 6 +- app/call_center/call_center_agent_delete.php | 6 +- app/call_center/call_center_agent_edit.php | 6 +- app/call_center/call_center_agent_status.php | 14 ++- app/call_center/call_center_agents.php | 14 ++- app/call_center/call_center_queue_delete.php | 13 ++- app/call_center/call_center_queue_edit.php | 6 +- app/call_center/call_center_queues.php | 14 ++- app/call_center/call_center_tier_edit.php | 6 +- .../call_center_active_inc.php | 6 +- app/call_center_active/call_center_queue.php | 19 ++-- app/calls/call_edit.php | 6 +- app/calls/calls.php | 7 +- app/calls_active/calls_active.php | 7 +- app/calls_active/calls_active_inc.php | 5 +- app/click_to_call/click_to_call.php | 9 +- .../conference_center_delete.php | 96 +++++++++---------- .../conference_center_edit.php | 6 +- app/conference_centers/conference_centers.php | 6 +- .../conference_room_delete.php | 13 ++- .../conference_room_edit.php | 6 +- app/conference_centers/conference_rooms.php | 6 +- .../conference_session_details.php | 6 +- .../conference_sessions.php | 6 +- app/conferences/conference_delete.php | 6 +- app/conferences/conference_edit.php | 6 +- app/conferences/conferences.php | 13 ++- .../conference_interactive.php | 6 +- .../conference_interactive_inc.php | 6 +- app/conferences_active/conferences_active.php | 7 +- .../conferences_active_inc.php | 6 +- app/contacts/contact_address_delete.php | 39 ++++---- app/contacts/contact_address_edit.php | 6 +- app/contacts/contact_auth.php | 6 +- app/contacts/contact_delete.php | 6 +- app/contacts/contact_edit.php | 6 +- app/contacts/contact_import.php | 6 +- app/contacts/contact_import_google.php | 6 +- app/contacts/contact_note_delete.php | 6 +- app/contacts/contact_note_edit.php | 6 +- app/contacts/contact_phone_delete.php | 39 ++++---- app/contacts/contact_phone_edit.php | 6 +- app/contacts/contact_setting_delete.php | 6 +- app/contacts/contact_setting_edit.php | 10 +- app/contacts/contact_url_delete.php | 6 +- app/contacts/contact_url_edit.php | 6 +- app/contacts/contacts.php | 14 ++- app/contacts/contacts_vcard.php | 8 +- app/content/rss.php | 6 +- app/content/rssadd.php | 6 +- app/content/rssdelete.php | 6 +- app/content/rsslist.php | 6 +- app/content/rssmovedown.php | 6 +- app/content/rssmoveup.php | 6 +- app/content/rsssubadd.php | 7 +- app/content/rsssubcategoryadd.php | 6 +- app/content/rsssubcategorylist.php | 8 +- app/content/rsssubcategoryupdate.php | 6 +- app/content/rsssubdelete.php | 7 +- app/content/rsssublist.php | 6 +- app/content/rsssubsearch.php | 6 +- app/content/rsssubupdate.php | 6 +- app/content/rssupdate.php | 7 +- app/destinations/destination_delete.php | 6 +- app/destinations/destination_edit.php | 6 +- app/destinations/destinations.php | 17 ++-- app/devices/device_copy.php | 6 +- app/devices/device_delete.php | 6 +- app/devices/device_key_delete.php | 6 +- app/devices/device_key_edit.php | 6 +- app/devices/device_line_delete.php | 6 +- app/devices/device_line_edit.php | 6 +- app/devices/device_setting_delete.php | 6 +- app/devices/device_setting_edit.php | 6 +- app/devices/devices.php | 6 +- app/dialplan/dialplan_add.php | 6 +- app/dialplan/dialplan_advanced.php | 6 +- app/dialplan/dialplan_copy.php | 8 +- app/dialplan/dialplan_delete.php | 6 +- app/dialplan/dialplan_detail_delete.php | 6 +- app/dialplan/dialplan_detail_edit.php | 6 +- app/dialplan/dialplan_edit.php | 6 +- app/dialplan/dialplans.php | 6 +- app/dialplan_inbound/dialplan_inbound_add.php | 15 ++- .../dialplan_outbound_add.php | 6 +- app/edit/clipadd.php | 6 +- app/edit/clipdelete.php | 6 +- app/edit/cliplist.php | 7 +- app/edit/clipoptions.php | 7 +- app/edit/clipoptionslist.php | 7 +- app/edit/clipupdate.php | 6 +- app/edit/filedelete.php | 8 +- app/edit/filenew.php | 6 +- app/edit/fileoptionslist.php | 9 +- app/edit/filerename.php | 6 +- app/edit/filesave.php | 6 +- app/edit/foldernew.php | 6 +- app/edit/header.php | 7 +- app/edit/index.php | 6 +- app/edit/list.php | 6 +- app/exec/exec.php | 7 +- app/extensions/extension_copy.php | 6 +- app/extensions/extension_delete.php | 6 +- app/extensions/extension_edit.php | 6 +- app/extensions/extensions.php | 9 +- app/fax/fax.php | 6 +- app/fax/fax_box.php | 6 +- app/fax/fax_box_remote.php | 6 +- app/fax/fax_copy.php | 6 +- app/fax/fax_delete.php | 6 +- app/fax/fax_edit.php | 6 +- app/fax/fax_emails.php | 5 +- app/fax/fax_log_delete.php | 6 +- app/fax/fax_logs.php | 7 +- app/fax/fax_send.php | 6 +- app/fifo/fifo_add.php | 14 ++- app/fifo_list/fifo_interactive.php | 6 +- app/fifo_list/fifo_interactive_inc.php | 6 +- app/fifo_list/fifo_list.php | 6 +- app/fifo_list/fifo_list_inc.php | 6 +- app/gateways/gateway_copy.php | 6 +- app/gateways/gateway_delete.php | 6 +- app/gateways/gateway_edit.php | 6 +- app/gateways/gateways.php | 6 +- app/hot_desking/extension_delete.php | 6 +- app/hot_desking/extension_edit.php | 6 +- app/hot_desking/index.php | 14 ++- app/ivr_menu/ivr_menu_copy.php | 6 +- app/ivr_menu/ivr_menu_delete.php | 6 +- app/ivr_menu/ivr_menu_edit.php | 6 +- app/ivr_menu/ivr_menu_option_delete.php | 6 +- app/ivr_menu/ivr_menu_option_edit.php | 6 +- app/ivr_menu/ivr_menus.php | 7 +- app/log_viewer/log_viewer.php | 6 +- app/modules/module_delete.php | 13 ++- app/modules/module_edit.php | 6 +- app/modules/modules.php | 19 ++-- app/music_on_hold/music_on_hold.php | 6 +- app/operator_panel/index.php | 6 +- app/operator_panel/index_inc.php | 6 +- app/recordings/recording_delete.php | 13 ++- app/recordings/recording_edit.php | 6 +- app/recordings/recordings.php | 6 +- app/registrations/cmd.php | 6 +- app/registrations/status_registrations.php | 6 +- .../status_registrations_inc.php | 8 +- app/ring_groups/ring_group_delete.php | 6 +- .../ring_group_destination_delete.php | 6 +- .../ring_group_destination_edit.php | 6 +- app/ring_groups/ring_group_edit.php | 6 +- app/ring_groups/ring_group_forward.php | 7 +- app/ring_groups/ring_group_forward_edit.php | 6 +- app/ring_groups/ring_groups.php | 6 +- app/schemas/schema_data_delete.php | 6 +- app/schemas/schema_data_edit.php | 6 +- app/schemas/schema_data_view.php | 6 +- app/schemas/schema_delete.php | 6 +- app/schemas/schema_edit.php | 6 +- app/schemas/schema_field_delete.php | 6 +- app/schemas/schema_field_edit.php | 6 +- app/schemas/schema_import.php | 6 +- app/schemas/schema_name_value_delete.php | 6 +- app/schemas/schema_name_value_edit.php | 6 +- app/schemas/schemas.php | 6 +- app/services/service_delete.php | 13 ++- app/services/service_edit.php | 6 +- app/services/services.php | 6 +- 176 files changed, 518 insertions(+), 865 deletions(-) diff --git a/app/backup/index.php b/app/backup/index.php index 1df13834a9..fb31d009c2 100644 --- a/app/backup/index.php +++ b/app/backup/index.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //download the backup if ($_GET['a'] == "download" && permission_exists('backup_download')) { diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php index b36c3c4a44..a489412e2e 100644 --- a/app/call_block/call_block.php +++ b/app/call_block/call_block.php @@ -39,10 +39,8 @@ require_once "resources/require.php"; } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //additional includes require_once "resources/header.php"; diff --git a/app/call_block/call_block_cdr_add.php b/app/call_block/call_block_cdr_add.php index d4067dfe09..4f46cd6af5 100644 --- a/app/call_block/call_block_cdr_add.php +++ b/app/call_block/call_block_cdr_add.php @@ -38,10 +38,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add from cdr if (isset($_REQUEST["cdr_id"])) { diff --git a/app/call_block/call_block_delete.php b/app/call_block/call_block_delete.php index 8eee612c93..a52b56e142 100644 --- a/app/call_block/call_block_delete.php +++ b/app/call_block/call_block_delete.php @@ -37,10 +37,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //set the variable if (count($_GET)>0) { diff --git a/app/call_block/call_block_edit.php b/app/call_block/call_block_edit.php index 0aec8763c1..6c80688e8a 100644 --- a/app/call_block/call_block_edit.php +++ b/app/call_block/call_block_edit.php @@ -39,10 +39,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //define the call_block_get_extensions function function call_block_get_extensions($select_extension) { diff --git a/app/call_broadcast/call_broadcast.php b/app/call_broadcast/call_broadcast.php index 0cfb6652f1..ceffb50b1b 100644 --- a/app/call_broadcast/call_broadcast.php +++ b/app/call_broadcast/call_broadcast.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //add the includes require_once "resources/header.php"; diff --git a/app/call_broadcast/call_broadcast_delete.php b/app/call_broadcast/call_broadcast_delete.php index 914574a686..0f362f42e1 100644 --- a/app/call_broadcast/call_broadcast_delete.php +++ b/app/call_broadcast/call_broadcast_delete.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //get the id if (count($_GET)>0) { diff --git a/app/call_broadcast/call_broadcast_edit.php b/app/call_broadcast/call_broadcast_edit.php index e1987b7c3c..029ab834c4 100644 --- a/app/call_broadcast/call_broadcast_edit.php +++ b/app/call_broadcast/call_broadcast_edit.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //set the action with add or update if (isset($_REQUEST["id"])) { diff --git a/app/call_broadcast/call_broadcast_send.php b/app/call_broadcast/call_broadcast_send.php index 9269dfb26f..4b7df2a84f 100644 --- a/app/call_broadcast/call_broadcast_send.php +++ b/app/call_broadcast/call_broadcast_send.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //set the max execution time to 1 hour ini_set(max_execution_time,3600); diff --git a/app/call_broadcast/call_broadcast_stop.php b/app/call_broadcast/call_broadcast_stop.php index 5945497a55..ab8a4dafbb 100644 --- a/app/call_broadcast/call_broadcast_stop.php +++ b/app/call_broadcast/call_broadcast_stop.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //get the html values and set them as variables if (count($_GET)>0) { diff --git a/app/call_center/call_center_agent_delete.php b/app/call_center/call_center_agent_delete.php index 7e6f0f7180..19714e3d81 100644 --- a/app/call_center/call_center_agent_delete.php +++ b/app/call_center/call_center_agent_delete.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); if (count($_GET)>0) { $id = check_str($_GET["id"]); diff --git a/app/call_center/call_center_agent_edit.php b/app/call_center/call_center_agent_edit.php index 1414a6b1ad..a70813916f 100644 --- a/app/call_center/call_center_agent_edit.php +++ b/app/call_center/call_center_agent_edit.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/call_center/call_center_agent_status.php b/app/call_center/call_center_agent_status.php index bfe61caee3..f966be5c95 100644 --- a/app/call_center/call_center_agent_status.php +++ b/app/call_center/call_center_agent_status.php @@ -35,15 +35,13 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -require_once "resources/header.php"; -$document['title'] = $text['title-call_center_agent_status']; - -require_once "resources/paging.php"; +//includes and title + require_once "resources/header.php"; + $document['title'] = $text['title-call_center_agent_status']; + require_once "resources/paging.php"; //setup the event socket connection $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); diff --git a/app/call_center/call_center_agents.php b/app/call_center/call_center_agents.php index 2c1aa6cb70..ba2db21135 100644 --- a/app/call_center/call_center_agents.php +++ b/app/call_center/call_center_agents.php @@ -35,15 +35,13 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -require_once "resources/header.php"; -$document['title'] = $text['title-call_center_agents']; - -require_once "resources/paging.php"; +//includes and title + require_once "resources/header.php"; + $document['title'] = $text['title-call_center_agents']; + require_once "resources/paging.php"; //get http values and set them to php variables $order_by = $_GET["order_by"]; diff --git a/app/call_center/call_center_queue_delete.php b/app/call_center/call_center_queue_delete.php index 41039759d4..529e8e13a6 100644 --- a/app/call_center/call_center_queue_delete.php +++ b/app/call_center/call_center_queue_delete.php @@ -35,14 +35,13 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -if (count($_GET) > 0) { - $id = check_str($_GET["id"]); -} +//get the id + if (count($_GET) > 0) { + $id = check_str($_GET["id"]); + } if (strlen($id) > 0) { diff --git a/app/call_center/call_center_queue_edit.php b/app/call_center/call_center_queue_edit.php index 110bb3c532..fdb489376d 100644 --- a/app/call_center/call_center_queue_edit.php +++ b/app/call_center/call_center_queue_edit.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/call_center/call_center_queues.php b/app/call_center/call_center_queues.php index 3308405f8f..243399f828 100644 --- a/app/call_center/call_center_queues.php +++ b/app/call_center/call_center_queues.php @@ -35,15 +35,13 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -require_once "resources/header.php"; -$document['title'] = $text['title-call_center_queues']; - -require_once "resources/paging.php"; +//includes and title + require_once "resources/header.php"; + $document['title'] = $text['title-call_center_queues']; + require_once "resources/paging.php"; //get http variables and set as php variables $order_by = $_GET["order_by"]; diff --git a/app/call_center/call_center_tier_edit.php b/app/call_center/call_center_tier_edit.php index 4ab43e3492..248979dfe3 100644 --- a/app/call_center/call_center_tier_edit.php +++ b/app/call_center/call_center_tier_edit.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //set tier uuid $call_center_tier_uuid = check_str($_REQUEST["id"]); diff --git a/app/call_center_active/call_center_active_inc.php b/app/call_center_active/call_center_active_inc.php index 3771ca5781..cf4904454f 100644 --- a/app/call_center_active/call_center_active_inc.php +++ b/app/call_center_active/call_center_active_inc.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //get the queue_name and set it as a variable $queue_name = $_GET[queue_name].'@'. $_SESSION['domains'][$domain_uuid]['domain_name']; diff --git a/app/call_center_active/call_center_queue.php b/app/call_center_active/call_center_queue.php index 8deb4f3ab8..106cc0e555 100644 --- a/app/call_center_active/call_center_queue.php +++ b/app/call_center_active/call_center_queue.php @@ -35,18 +35,17 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -require_once "resources/header.php"; -$document['title'] = $text['title-active_call_center']; +//includes and title + require_once "resources/header.php"; + $document['title'] = $text['title-active_call_center']; + require_once "resources/paging.php"; -require_once "resources/paging.php"; - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; +//get the variables + $order_by = $_GET["order_by"]; + $order = $_GET["order"]; //show the content echo "\n"; diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php index 4e2d7f77fc..44bac7ca3a 100644 --- a/app/calls/call_edit.php +++ b/app/calls/call_edit.php @@ -26,7 +26,6 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; -require_once "app_languages.php"; if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) { //access granted } @@ -36,9 +35,8 @@ else { } //add multi-lingual support - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //define the destination_select function function destination_select($select_name, $select_value, $select_default) { diff --git a/app/calls/calls.php b/app/calls/calls.php index f8777e1b84..87b9cb2e20 100644 --- a/app/calls/calls.php +++ b/app/calls/calls.php @@ -39,11 +39,8 @@ else { $order = check_str($_GET["order"]); //add multi-lingual support - unset($text); - require_once "app/calls/app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //begin the content require_once "resources/header.php"; diff --git a/app/calls_active/calls_active.php b/app/calls_active/calls_active.php index 16876036f0..69e4d661e1 100644 --- a/app/calls_active/calls_active.php +++ b/app/calls_active/calls_active.php @@ -34,16 +34,13 @@ else { echo "access denied"; exit; } - //add multi-lingual support - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); $conference_name = trim($_REQUEST["c"]); $tmp_conference_name = str_replace("_", " ", $conference_name); - require_once "resources/header.php"; $document['title'] = $text['title']; diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php index 1c7cdc76d5..fb260e1322 100644 --- a/app/calls_active/calls_active_inc.php +++ b/app/calls_active/calls_active_inc.php @@ -36,9 +36,8 @@ else { } //add multi-lingual support - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //set the command $switch_cmd = 'show channels as json'; diff --git a/app/click_to_call/click_to_call.php b/app/click_to_call/click_to_call.php index df94e3d487..f0cea66651 100644 --- a/app/click_to_call/click_to_call.php +++ b/app/click_to_call/click_to_call.php @@ -42,12 +42,11 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -require_once "resources/header.php"; +//include the header + require_once "resources/header.php"; if (is_array($_REQUEST) && !empty($_REQUEST['src']) && !empty($_REQUEST['dest'])) { //get the http variables and set them as variables diff --git a/app/conference_centers/conference_center_delete.php b/app/conference_centers/conference_center_delete.php index 000a41e072..e3a41620a4 100644 --- a/app/conference_centers/conference_center_delete.php +++ b/app/conference_centers/conference_center_delete.php @@ -35,63 +35,63 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; + $language = new text; + $text = $language->get(); + +//get the id + if (count($_GET)>0) { + $id = check_str($_GET["id"]); } -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} +//delete the records + if (strlen($id) > 0) { -if (strlen($id)>0) { + //get the dialplan uuid + $sql = "select * from v_conference_centers "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and conference_center_uuid = '$id' "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) { + $dialplan_uuid = $row['dialplan_uuid']; + } - //get the dialplan uuid - $sql = "select * from v_conference_centers "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and conference_center_uuid = '$id' "; - $prep_statement = $db->prepare($sql); - $prep_statement->execute(); - while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) { - $dialplan_uuid = $row['dialplan_uuid']; - } + //delete the conference center + $sql = "delete from v_conference_centers "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and conference_center_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); - //delete the conference center - $sql = "delete from v_conference_centers "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and conference_center_uuid = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); + //delete the dialplan entry + $sql = "delete from v_dialplans "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); - //delete the dialplan entry - $sql = "delete from v_dialplans "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and dialplan_uuid = '$dialplan_uuid' "; - $db->query($sql); - unset($sql); + //delete the dialplan details + $sql = "delete from v_dialplan_details "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); - //delete the dialplan details - $sql = "delete from v_dialplan_details "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and dialplan_uuid = '$dialplan_uuid' "; - $db->query($sql); - unset($sql); + //clear the cache + $cache = new cache; + $cache->delete("dialplan:".$_SESSION["context"]); - //clear the cache - $cache = new cache; - $cache->delete("dialplan:".$_SESSION["context"]); + //syncrhonize configuration + save_dialplan_xml(); - //syncrhonize configuration - save_dialplan_xml(); + //apply settings reminder + $_SESSION["reload_xml"] = true; + } - //apply settings reminder - $_SESSION["reload_xml"] = true; -} - - -$_SESSION["message"] = $text['message-delete']; -header("Location: conference_centers.php"); -return; +//redirect the browser + $_SESSION["message"] = $text['message-delete']; + header("Location: conference_centers.php"); + return; ?> \ No newline at end of file diff --git a/app/conference_centers/conference_center_edit.php b/app/conference_centers/conference_center_edit.php index 3eee468708..352878f959 100644 --- a/app/conference_centers/conference_center_edit.php +++ b/app/conference_centers/conference_center_edit.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/conference_centers/conference_centers.php b/app/conference_centers/conference_centers.php index 9d4e564fc1..c4e77e3b80 100644 --- a/app/conference_centers/conference_centers.php +++ b/app/conference_centers/conference_centers.php @@ -41,10 +41,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //additional includes require_once "resources/header.php"; diff --git a/app/conference_centers/conference_room_delete.php b/app/conference_centers/conference_room_delete.php index fb7b724316..af2a62ba17 100644 --- a/app/conference_centers/conference_room_delete.php +++ b/app/conference_centers/conference_room_delete.php @@ -35,14 +35,13 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} +//get the id + if (count($_GET)>0) { + $id = check_str($_GET["id"]); + } if (strlen($id)>0) { //get the meeting_uuid diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index ee84b42110..a98721c007 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/conference_centers/conference_rooms.php b/app/conference_centers/conference_rooms.php index 211c376532..1efa3d84fc 100644 --- a/app/conference_centers/conference_rooms.php +++ b/app/conference_centers/conference_rooms.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //additional includes require_once "resources/header.php"; diff --git a/app/conference_centers/conference_session_details.php b/app/conference_centers/conference_session_details.php index 1e0bf636b6..136810e291 100644 --- a/app/conference_centers/conference_session_details.php +++ b/app/conference_centers/conference_session_details.php @@ -34,10 +34,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //additional includes require_once "resources/header.php"; diff --git a/app/conference_centers/conference_sessions.php b/app/conference_centers/conference_sessions.php index b61d2ec66e..d16ff58f2b 100644 --- a/app/conference_centers/conference_sessions.php +++ b/app/conference_centers/conference_sessions.php @@ -34,10 +34,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //additional includes require_once "resources/header.php"; diff --git a/app/conferences/conference_delete.php b/app/conferences/conference_delete.php index 52227583b5..2e2b8cf770 100644 --- a/app/conferences/conference_delete.php +++ b/app/conferences/conference_delete.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); if (count($_GET)>0) { $id = check_str($_GET["id"]); diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php index 19c3dd698d..693cec3a56 100644 --- a/app/conferences/conference_edit.php +++ b/app/conferences/conference_edit.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/conferences/conferences.php b/app/conferences/conferences.php index 868dd23b47..ad1f20a2f5 100644 --- a/app/conferences/conferences.php +++ b/app/conferences/conferences.php @@ -35,13 +35,12 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } - -require_once "resources/header.php"; -require_once "resources/paging.php"; + $language = new text; + $text = $language->get(); + +//includes + require_once "resources/header.php"; + require_once "resources/paging.php"; //get variables used to control the order $order_by = $_GET["order_by"]; diff --git a/app/conferences_active/conference_interactive.php b/app/conferences_active/conference_interactive.php index 67d5fa2a75..003033eda0 100644 --- a/app/conferences_active/conference_interactive.php +++ b/app/conferences_active/conference_interactive.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //get and prepare the conference name $conference_name = check_str(trim($_REQUEST["c"])); diff --git a/app/conferences_active/conference_interactive_inc.php b/app/conferences_active/conference_interactive_inc.php index 13fdd2b948..d61b0dad3b 100644 --- a/app/conferences_active/conference_interactive_inc.php +++ b/app/conferences_active/conference_interactive_inc.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //get the http get or post and set it as php variables $conference_uuid = check_str($_REQUEST["c"]); diff --git a/app/conferences_active/conferences_active.php b/app/conferences_active/conferences_active.php index efe9e86557..f9c89b0042 100644 --- a/app/conferences_active/conferences_active.php +++ b/app/conferences_active/conferences_active.php @@ -36,11 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } - + $language = new text; + $text = $language->get(); require_once "resources/header.php"; ?>