diff --git a/app/access_controls/app_defaults.php b/app/access_controls/app_defaults.php index 43ad0a448a..e400eaa42b 100644 --- a/app/access_controls/app_defaults.php +++ b/app/access_controls/app_defaults.php @@ -74,7 +74,7 @@ $array['access_controls'][0]['access_control_name'] = $access_control_name; $array['access_controls'][0]['access_control_default'] = $access_control_default; - $p = new permissions; + $p = permissions::new(); $p->add('access_control_add', 'temp'); $database->app_name = 'access_controls'; @@ -106,7 +106,7 @@ $array['access_control_nodes'][0]['node_cidr'] = $node_cidr; $array['access_control_nodes'][0]['node_description'] = $node_description; - $p = new permissions; + $p = permissions::new(); $p->add('access_control_node_add', 'temp'); $database->app_name = 'access_controls'; diff --git a/app/access_controls/resources/classes/access_controls.php b/app/access_controls/resources/classes/access_controls.php index ca3b3fda18..4d8efd2add 100644 --- a/app/access_controls/resources/classes/access_controls.php +++ b/app/access_controls/resources/classes/access_controls.php @@ -69,7 +69,7 @@ if (!class_exists('access_controls')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('access_control_node_delete', 'temp'); //execute delete @@ -236,7 +236,7 @@ if (!class_exists('access_controls')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('access_control_node_add', 'temp'); //save the array diff --git a/app/basic_operator_panel/index.php b/app/basic_operator_panel/index.php index 9502b0cfe1..93ea0eb073 100644 --- a/app/basic_operator_panel/index.php +++ b/app/basic_operator_panel/index.php @@ -65,7 +65,7 @@ //update the status if (permission_exists("user_setting_edit")) { //add the user_edit permission - $p = new permissions; + $p = permissions::new(); $p->add("user_edit", "temp"); //update the database user_status @@ -153,7 +153,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); //execute update diff --git a/app/call_block/call_block_edit.php b/app/call_block/call_block_edit.php index 2d03266db5..669a1f6c57 100644 --- a/app/call_block/call_block_edit.php +++ b/app/call_block/call_block_edit.php @@ -166,7 +166,7 @@ $array['dialplans'][$index]['dialplan_enabled'] = 'true'; } - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); $database->save($array); diff --git a/app/call_block/resources/classes/call_block.php b/app/call_block/resources/classes/call_block.php index b3f5b9fec8..1d1fc8ef2b 100644 --- a/app/call_block/resources/classes/call_block.php +++ b/app/call_block/resources/classes/call_block.php @@ -435,7 +435,7 @@ if (!class_exists('call_block')) { unset($rows, $parameters); //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array diff --git a/app/call_block/resources/dashboard/config.php b/app/call_block/resources/dashboard/config.php index d220ccc517..96bd82114e 100644 --- a/app/call_block/resources/dashboard/config.php +++ b/app/call_block/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c $array['dashboard'][$x]['dashboard_name'] = 'Call Block'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-ban'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#EA4C46'; $array['dashboard'][$x]['dashboard_url'] = '/app/call_block/call_block.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -17,9 +18,9 @@ $array['dashboard'][$x]['dashboard_heading_text_color'] = ''; $array['dashboard'][$x]['dashboard_heading_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_heading_background_color'] = ''; $array['dashboard'][$x]['dashboard_heading_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#EA4C46'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; @@ -44,3 +45,4 @@ $array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $y++; ?> + diff --git a/app/call_centers/app_defaults.php b/app/call_centers/app_defaults.php index 7cd7080c2b..6265e9e756 100644 --- a/app/call_centers/app_defaults.php +++ b/app/call_centers/app_defaults.php @@ -58,7 +58,7 @@ if ($domains_processed == 1) { } if (!empty($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('call_center_tier_edit', 'temp'); $database->app_name = 'call_centers'; @@ -168,7 +168,7 @@ if ($domains_processed == 1) { //save the array to the database if (!empty($array)) { //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/call_centers/call_center_agent_status.php b/app/call_centers/call_center_agent_status.php index a8785bf991..4491f93de5 100644 --- a/app/call_centers/call_center_agent_status.php +++ b/app/call_centers/call_center_agent_status.php @@ -172,7 +172,7 @@ $array['users'][0]['user_status'] = $row['agent_status']; $array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; - $p = new permissions; + $p = permissions::new(); $p->add('user_edit', 'temp'); $database = new database; diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index 42489006f9..3db04a2404 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -178,7 +178,7 @@ $array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid; $array['call_center_tiers'][0]['domain_uuid'] = $domain_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('call_center_tier_delete', 'temp'); $database = new database; @@ -434,7 +434,7 @@ $array['dialplans'][0]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370"; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/call_centers/resources/classes/call_center.php b/app/call_centers/resources/classes/call_center.php index 3985c9ce59..f84b6e1014 100644 --- a/app/call_centers/resources/classes/call_center.php +++ b/app/call_centers/resources/classes/call_center.php @@ -78,7 +78,7 @@ $array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); @@ -216,7 +216,7 @@ $array["dialplans"][0] = $dialplan; //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", 'temp'); $p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_edit", 'temp'); @@ -242,7 +242,7 @@ $array['call_center_queues'][0]['dialplan_uuid'] = $this->dialplan_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('call_center_queue_edit', 'temp'); //execute update @@ -349,7 +349,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('call_center_tier_delete', 'temp'); $p->add('dialplan_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); @@ -446,7 +446,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('call_center_tier_delete', 'temp'); //execute delete @@ -578,7 +578,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('call_center_tier_add', 'temp'); $p->add('dialplan_add', 'temp'); diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index 061da31a33..daebd6e94f 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -237,7 +237,7 @@ $array["call_flows"][$i]["call_flow_description"] = $call_flow_description; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/call_flows/resources/classes/call_flows.php b/app/call_flows/resources/classes/call_flows.php index 1113548e7b..c9a54f66e2 100644 --- a/app/call_flows/resources/classes/call_flows.php +++ b/app/call_flows/resources/classes/call_flows.php @@ -121,7 +121,7 @@ if (!class_exists('call_flows')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); @@ -223,7 +223,7 @@ if (!class_exists('call_flows')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array @@ -374,7 +374,7 @@ if (!class_exists('call_flows')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); //save the array diff --git a/app/call_forward/call_forward.php b/app/call_forward/call_forward.php index e95fa55f1e..cdb478d034 100644 --- a/app/call_forward/call_forward.php +++ b/app/call_forward/call_forward.php @@ -209,6 +209,9 @@ } require_once "resources/header.php"; +//set the back button + $_SESSION['call_forward_back'] = $_SERVER['PHP_SELF']; + //show the content if ($is_included) { echo "
\n"; diff --git a/app/call_forward/call_forward_edit.php b/app/call_forward/call_forward_edit.php index bdaffc3a75..a1b2bc6e72 100644 --- a/app/call_forward/call_forward_edit.php +++ b/app/call_forward/call_forward_edit.php @@ -248,7 +248,7 @@ } //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("extension_edit", "temp"); //save the data @@ -533,13 +533,16 @@ $object = new token; $token = $object->create($_SERVER['PHP_SELF']); +//save the back button location using referer + $back_destination = "window.location.href='" . ($_SESSION['call_forward_back'] ?? "/app/call_forward/call_forward.php") . "'"; + //show the content echo "
\n"; echo "
\n"; echo "
".$text['title-call_forward']."
\n"; echo "
\n"; - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','onclick'=>'history.back();']); + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','onclick'=>$back_destination]); echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']); echo "
\n"; echo "
\n"; diff --git a/app/call_forward/resources/classes/call_forward.php b/app/call_forward/resources/classes/call_forward.php index 746286dced..8b7ef70ebd 100644 --- a/app/call_forward/resources/classes/call_forward.php +++ b/app/call_forward/resources/classes/call_forward.php @@ -89,7 +89,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_add', 'temp'); //execute update @@ -214,7 +214,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); //save the array diff --git a/app/call_forward/resources/classes/do_not_disturb.php b/app/call_forward/resources/classes/do_not_disturb.php index 9d75dc1b48..b597437c6f 100644 --- a/app/call_forward/resources/classes/do_not_disturb.php +++ b/app/call_forward/resources/classes/do_not_disturb.php @@ -95,7 +95,7 @@ $array['extensions'][0]['do_not_disturb'] = $this->enabled; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); //execute update @@ -226,7 +226,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); //save the array diff --git a/app/call_forward/resources/classes/follow_me.php b/app/call_forward/resources/classes/follow_me.php index 4a0c848c55..97a66625cb 100644 --- a/app/call_forward/resources/classes/follow_me.php +++ b/app/call_forward/resources/classes/follow_me.php @@ -91,7 +91,7 @@ $array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled; $array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('follow_me_add', 'temp'); //execute insert $database = new database; @@ -115,7 +115,7 @@ $array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled; $array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('follow_me_add', 'temp'); //execute update $database = new database; @@ -135,7 +135,7 @@ //delete related follow me destinations $array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('follow_me_destination_delete', 'temp'); //execute delete $database = new database; @@ -210,7 +210,7 @@ } if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('follow_me_destination_add', 'temp'); //execute insert $database = new database; @@ -234,7 +234,7 @@ $extension_uuid = $result[0]['extension_uuid']; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("follow_me_edit", 'temp'); $p->add("extension_edit", 'temp'); @@ -389,7 +389,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); $p->add('follow_me_edit', 'temp'); diff --git a/app/call_forward/resources/dashboard/config.php b/app/call_forward/resources/dashboard/config.php index 29f7122a91..edc3f0c0a7 100644 --- a/app/call_forward/resources/dashboard/config.php +++ b/app/call_forward/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692f $array['dashboard'][$x]['dashboard_name'] = 'Call Forward'; $array['dashboard'][$x]['dashboard_path'] = 'call_forward/call_forward'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-forward'; +$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/call_recordings/resources/classes/call_recordings.php b/app/call_recordings/resources/classes/call_recordings.php index 0029970748..614a51c577 100644 --- a/app/call_recordings/resources/classes/call_recordings.php +++ b/app/call_recordings/resources/classes/call_recordings.php @@ -110,7 +110,7 @@ if (!class_exists('call_recordings')) { if (is_array($array) && @sizeof($array) != 0) { //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('xml_cdr_edit', 'temp'); //remove record_path, record_name and record_length @@ -200,7 +200,7 @@ if (!class_exists('call_recordings')) { if (is_array($array) && @sizeof($array) != 0) { //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('xml_cdr_edit', 'temp'); //remove record_path, record_name and record_length diff --git a/app/calls_active/app_languages.php b/app/calls_active/app_languages.php index f87811d1fc..83d93f15a6 100644 --- a/app/calls_active/app_languages.php +++ b/app/calls_active/app_languages.php @@ -468,8 +468,8 @@ $text['label-domain']['zh-cn'] = "领域"; $text['label-domain']['ja-jp'] = "ドメイン"; $text['label-domain']['ko-kr'] = "도메인"; -$text['label-destination']['en-us'] = "Dest"; -$text['label-destination']['en-gb'] = "Dest"; +$text['label-destination']['en-us'] = "Destination"; +$text['label-destination']['en-gb'] = "Destination"; $text['label-destination']['ar-eg'] = "الوجهة"; $text['label-destination']['de-at'] = "Ziel"; $text['label-destination']['de-ch'] = "Ziel"; @@ -546,8 +546,8 @@ $text['label-codec']['zh-cn'] = "读/写编解码器"; $text['label-codec']['ja-jp'] = "読み取り/書き込みコーデック"; $text['label-codec']['ko-kr'] = "읽기/쓰기 코덱"; -$text['label-cid-number']['en-us'] = "CID Number"; -$text['label-cid-number']['en-gb'] = "CID Number"; +$text['label-cid-number']['en-us'] = "Caller Number"; +$text['label-cid-number']['en-gb'] = "Caller Number"; $text['label-cid-number']['ar-eg'] = "رقم CID"; $text['label-cid-number']['de-at'] = "Anrufer Nummer"; $text['label-cid-number']['de-ch'] = "Anrufer Nummer"; @@ -572,8 +572,8 @@ $text['label-cid-number']['zh-cn'] = "来电号码"; $text['label-cid-number']['ja-jp'] = "CID番号"; $text['label-cid-number']['ko-kr'] = "CID 번호"; -$text['label-cid-name']['en-us'] = "CID Name"; -$text['label-cid-name']['en-gb'] = "CID Name"; +$text['label-cid-name']['en-us'] = "Caller Name"; +$text['label-cid-name']['en-gb'] = "Caller Name"; $text['label-cid-name']['ar-eg'] = "اسم CID"; $text['label-cid-name']['de-at'] = "Anrufer Name"; $text['label-cid-name']['de-ch'] = "Anrufer Name"; @@ -650,6 +650,33 @@ $text['label-eavesdrop']['zh-cn'] = "窃听"; $text['label-eavesdrop']['ja-jp'] = "盗聴"; $text['label-eavesdrop']['ko-kr'] = "엿듣다"; +$text['label-duration']['en-us'] = "Duration"; +$text['label-duration']['en-gb'] = "Duration"; +$text['label-duration']['ar-eg'] = "المدة"; +$text['label-duration']['de-at'] = "Dauer"; +$text['label-duration']['de-ch'] = "Dauer"; +$text['label-duration']['de-de'] = "Dauer"; +$text['label-duration']['el-gr'] = "Διάρκεια"; +$text['label-duration']['es-cl'] = "Duración"; +$text['label-duration']['es-mx'] = "Duración"; +$text['label-duration']['fr-ca'] = "Durée"; +$text['label-duration']['fr-fr'] = "Durée"; +$text['label-duration']['he-il'] = "משך השיחה"; +$text['label-duration']['it-it'] = "Durata"; +$text['label-duration']['ka-ge'] = "ხანგრძლივობა"; +$text['label-duration']['nl-nl'] = "Duur"; +$text['label-duration']['pl-pl'] = "Czas trwania"; +$text['label-duration']['pt-br'] = "Duração"; +$text['label-duration']['pt-pt'] = "Duração"; +$text['label-duration']['ro-ro'] = "Durată"; +$text['label-duration']['ru-ru'] = "Продолжительность"; +$text['label-duration']['sv-se'] = "Samtalstid"; +$text['label-duration']['uk-ua'] = "Тривалість"; +$text['label-duration']['tr-tr'] = "Süre"; +$text['label-duration']['zh-cn'] = "期间"; +$text['label-duration']['ja-jp'] = "間隔"; +$text['label-duration']['ko-kr'] = "지속"; + $text['description-2']['en-us'] = "Use this to view all extensions and monitor and interact with active calls."; $text['description-2']['en-gb'] = "Use this to view all extensions and monitor and interact with active calls."; $text['description-2']['ar-eg'] = "استخدم هذا لعرض جميع الملحقات ومراقبة المكالمات النشطة والتفاعل معها."; diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php index ffa00988c4..567951aa52 100644 --- a/app/calls_active/calls_active_inc.php +++ b/app/calls_active/calls_active_inc.php @@ -88,10 +88,8 @@ } $num_rows = @sizeof($rows); - //if the connnection is available then run it and return the results if (!$event_socket) { - $msg = "
".$text['confirm-socket']."
"; echo "
\n"; echo "\n"; @@ -103,172 +101,203 @@ echo "\n"; echo "
\n"; echo "
\n"; - + return; } - else { - //create token - $object = new token; - $token = $object->create('/app/calls_active/calls_active_inc.php'); +//create token + $object = new token; + $token = $object->create('/app/calls_active/calls_active_inc.php'); - //show content - echo "
\n"; - echo "
".$text['title']."
".number_format($num_rows)."
\n"; - echo "
\n"; - echo " ".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()']).""; - if (permission_exists('call_active_eavesdrop') && !empty($_SESSION['user']['extensions'])) { - if (sizeof($_SESSION['user']['extensions']) > 1) { - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + } + else if (sizeof($_SESSION['user']['extensions']) == 1) { + echo " \n"; + } + } + if (permission_exists('call_active_hangup') && $rows) { + echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','id'=>'btn_delete','onclick'=>"refresh_stop(); modal_open('modal-hangup','btn_hangup');"]); + } + if (permission_exists('call_active_all')) { + if ($show == "all") { + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'calls_active.php','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); + } + else { + echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'calls_active.php?show=all','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); + } + } + echo "
\n"; + echo "
\n"; + echo "
\n"; + + if (permission_exists('call_active_hangup') && $rows) { + echo modal::create(['id'=>'modal-hangup','type'=>'general','message'=>$text['confirm-hangups'],'actions'=>button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'check','id'=>'btn_hangup','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('hangup'); list_form_submit('form_list');"])]); + } + + echo $text['description']."\n"; + echo "

\n"; + +//show the results + echo "
\n"; + + echo "\n"; + echo "\n"; + + echo "
\n"; + echo " \n"; + echo " \n"; + if (permission_exists('call_active_hangup')) { + echo " \n"; + } + echo " \n"; + //echo" \n"; + echo " \n"; + if ($show == 'all') { + echo " \n"; + } + //echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) { + echo " \n"; + } + echo " \n"; + + if (is_array($rows)) { + $x = 0; + foreach ($rows as $row) { + + //set the php variables + foreach ($row as $key => $value) { + $$key = $value; + } + + //get the sip profile + $name_array = explode("/", $name); + $sip_profile = $name_array[1]; + $sip_uri = $name_array[2]; + + //get the number + //$temp_array = explode("@", $sip_uri); + //$tmp_number = $temp_array[0]; + //$tmp_number = str_replace("sip:", "", $tmp_number); + + //remove the '+' because it breaks the call recording + $cid_num = str_replace("+", "", $cid_num); + + //replace gateway uuid with name + if (is_array($_SESSION['gateways']) && sizeof($_SESSION['gateways']) > 0) { + foreach ($_SESSION['gateways'] as $gateway_uuid => $gateway_name) { + $application_data = str_replace($gateway_uuid, $gateway_name, $application_data); } - echo " \n"; } - else if (sizeof($_SESSION['user']['extensions']) == 1) { - echo " \n"; + + //convert $created to a UNIX timestamp + $created_timestamp = strtotime($created); + + //get the current timestamp + $now = time(); + + //calculate elapsed seconds + $elapsed_seconds = $now - $created_timestamp; + + //convert seconds to hours, minutes, and seconds + $hours = floor($elapsed_seconds / 3600); + $minutes = floor(($elapsed_seconds % 3600) / 60); + $seconds = $elapsed_seconds % 60; + + //format the elapsed time as HH:MM:SS + $elapsed_time = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); + + //reduce too long app data + if(strlen($application_data) > 80) { + $application_data = substr($application_data, 0, 80) . '...'; } - } - if (permission_exists('call_active_hangup') && $rows) { - echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','id'=>'btn_delete','onclick'=>"refresh_stop(); modal_open('modal-hangup','btn_hangup');"]); - } - if (permission_exists('call_active_all')) { - if ($show == "all") { - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'calls_active.php','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); + + //send the html + echo " \n"; + if (permission_exists('call_active_hangup')) { + echo " \n"; } - else { - echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'calls_active.php?show=all','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); + echo " \n"; + //echo " \n"; + echo " \n"; + if ($show == 'all') { + echo " \n"; } - } - echo " \n"; - echo "
\n"; - echo "\n"; - - if (permission_exists('call_active_hangup') && $rows) { - echo modal::create(['id'=>'modal-hangup','type'=>'general','message'=>$text['confirm-hangups'],'actions'=>button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'check','id'=>'btn_hangup','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('hangup'); list_form_submit('form_list');"])]); - } - - echo $text['description']."\n"; - echo "

\n"; - - //show the results - echo "
\n"; - - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "
\n"; + echo " \n"; + echo " ".$text['label-profile']."".$text['label-created']."".$text['label-duration']."".$text['label-domain']."".$text['label-number']."".$text['label-cid-name']."".$text['label-cid-number']."".$text['label-destination']."".$text['label-app']."".$text['label-codec']."".$text['label-secure']." 
\n"; + echo " \n"; + echo " \n"; + echo " ".escape($sip_profile)." ".escape($created)." ".escape($elapsed_time)."".escape($domain_name)." 
\n"; - echo "\n"; - if (permission_exists('call_active_hangup')) { - echo " \n"; - } - echo " \n"; - echo " \n"; - if ($show == 'all') { - echo " \n"; - } - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) { - echo " \n"; - } - echo "\n"; - - if (is_array($rows)) { - $x = 0; - foreach ($rows as $row) { - - //set the php variables - foreach ($row as $key => $value) { - $$key = $value; - } - - //get the sip profile - $name_array = explode("/", $name); - $sip_profile = $name_array[1]; - $sip_uri = $name_array[2]; - - //get the number - $temp_array = explode("@", $sip_uri); - $tmp_number = $temp_array[0]; - $tmp_number = str_replace("sip:", "", $tmp_number); - - //remove the '+' because it breaks the call recording - $cid_num = str_replace("+", "", $cid_num); - - //replace gateway uuid with name - if (is_array($_SESSION['gateways']) && sizeof($_SESSION['gateways']) > 0) { - foreach ($_SESSION['gateways'] as $gateway_uuid => $gateway_name) { - $application_data = str_replace($gateway_uuid, $gateway_name, $application_data); - } - } - - // reduce too long app data - if(strlen($application_data) > 512) { - $application_data = substr($application_data, 0, 512) . '...'; - } - - //send the html - echo "\n"; - if (permission_exists('call_active_hangup')) { - echo " \n"; - } - echo " \n"; - echo " \n"; - if ($show == 'all') { - echo " \n"; - } - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) { - echo " \n"; - } - echo "\n"; - - //unset the domain name - unset($domain_name); - - //increment counter - $x++; + //echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) { + echo " \n"; } - unset($rows); - } + echo " \n"; - echo "
\n"; - echo " \n"; - echo " ".$text['label-profile']."".$text['label-created']."".$text['label-domain']."".$text['label-number']."".$text['label-cid-name']."".$text['label-cid-number']."".$text['label-destination']."".$text['label-app']."".$text['label-codec']."".$text['label-secure']." 
\n"; - echo " \n"; - echo " \n"; - echo " ".escape($sip_profile)." ".escape($created)." ".escape($domain_name)." ".escape($tmp_number)." ".escape($cid_name)." ".escape($cid_num)." ".escape($dest)." ".(!empty($application) ? escape($application).":".escape($application_data) : null)." ".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)." ".escape($secure)." \n"; - //eavesdrop - if (permission_exists('call_active_eavesdrop') && $callstate == 'ACTIVE' && !empty($_SESSION['user']['extensions']) && !in_array($cid_num, $_SESSION['user']['extensions'])) { - echo button::create(['type'=>'button','label'=>$text['label-eavesdrop'],'icon'=>'headphones','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-eavesdrop']."')) { eavesdrop_call('".escape($cid_num)."','".escape($uuid)."'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); - } - //hangup - if (permission_exists('call_active_hangup')) { - echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-hangup']."')) { list_self_check('checkbox_".$x."'); list_action_set('hangup'); list_form_submit('form_list'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); - } - echo "
".escape($tmp_number)." ".escape($cid_name)." ".escape($cid_num)." ".escape($dest)." ".(!empty($application) ? escape($application).":".escape($application_data) : null)." ".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)." ".escape($secure)." \n"; + //eavesdrop + if (permission_exists('call_active_eavesdrop') && $callstate == 'ACTIVE' && !empty($_SESSION['user']['extensions']) && !in_array($cid_num, $_SESSION['user']['extensions'])) { + echo button::create(['type'=>'button','label'=>$text['label-eavesdrop'],'icon'=>'headphones','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-eavesdrop']."')) { eavesdrop_call('".escape($cid_num)."','".escape($uuid)."'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); + } + //hangup + if (permission_exists('call_active_hangup')) { + echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-hangup']."')) { list_self_check('checkbox_".$x."'); list_action_set('hangup'); list_form_submit('form_list'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); + } + echo "
\n"; - echo "
\n"; - - echo "\n"; - - echo "\n"; + //unset the domain name + unset($domain_name); + //increment counter + $x++; + } } + echo " \n"; + echo "
\n"; + echo "\n"; + echo "\n"; + ?> diff --git a/app/cisco/app_config.php b/app/cisco/app_config.php index 34017ad789..442aa4ca55 100644 --- a/app/cisco/app_config.php +++ b/app/cisco/app_config.php @@ -176,5 +176,13 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA PC VLAN ID. Options 0 to 4094."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "78637de4-ec12-4d41-8c65-39afe50d2b02"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_router_mode"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: 0:Bridge, 1:NAT."; + $y++; ?> diff --git a/app/conference_centers/conference_center_edit.php b/app/conference_centers/conference_center_edit.php index ecc7ce743f..953765ceee 100644 --- a/app/conference_centers/conference_center_edit.php +++ b/app/conference_centers/conference_center_edit.php @@ -164,7 +164,7 @@ $array['dialplans'][0]["app_uuid"] = "b81412e8-7253-91f4-e48e-42fc2c9a38d9"; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index 03576d2231..65ef0b89b5 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -188,7 +188,7 @@ $array['conference_room_users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; //un-assigne the users from the conference room - $p = new permissions; + $p = permissions::new(); $p->add('conference_room_user_delete', 'temp'); $database->app_name = 'conference_centers'; @@ -358,7 +358,7 @@ $array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid; $array['conference_room_users'][0]['user_uuid'] = $_SESSION["user_uuid"]; - $p = new permissions; + $p = permissions::new(); $p->add('conference_room_user_add', 'temp'); $database->app_name = 'conference_centers'; @@ -440,7 +440,7 @@ $array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid; $array['conference_room_users'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('conference_room_user_add', 'temp'); $database->app_name = 'conference_centers'; diff --git a/app/conference_centers/resources/classes/conference_centers.php b/app/conference_centers/resources/classes/conference_centers.php index f65bfcb291..b9fea85e4f 100644 --- a/app/conference_centers/resources/classes/conference_centers.php +++ b/app/conference_centers/resources/classes/conference_centers.php @@ -349,7 +349,7 @@ if (!class_exists('conference_centers')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_delete', 'temp'); @@ -425,7 +425,7 @@ if (!class_exists('conference_centers')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_room_user_delete', 'temp'); $p->add('conference_room_delete', 'temp'); @@ -489,7 +489,7 @@ if (!class_exists('conference_centers')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_session_detail_delete', 'temp'); $p->add('conference_user_delete', 'temp'); @@ -578,7 +578,7 @@ if (!class_exists('conference_centers')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_edit", "temp"); //save the array diff --git a/app/conference_centers/resources/dashboard/config.php b/app/conference_centers/resources/dashboard/config.php index f9fd79b610..273b533abc 100644 --- a/app/conference_centers/resources/dashboard/config.php +++ b/app/conference_centers/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab $array['dashboard'][$x]['dashboard_name'] = 'Conference Centers'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-hotel'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#5D5CE3'; $array['dashboard'][$x]['dashboard_url'] = '/app/conference_centers/conference_rooms.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#5d5ce3'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/conference_controls/app_defaults.php b/app/conference_controls/app_defaults.php index 6c0f1c0a0d..edefd36e7b 100644 --- a/app/conference_controls/app_defaults.php +++ b/app/conference_controls/app_defaults.php @@ -65,7 +65,7 @@ $array['conference_controls'][0]['control_name'] = $control_name; $array['conference_controls'][0]['control_enabled'] = 'true'; - $p = new permissions; + $p = permissions::new(); $p->add('conference_control_add', 'temp'); $database->app_name = 'conference_controls'; @@ -96,7 +96,7 @@ } $array['conference_control_details'][0]['control_enabled'] = $control_enabled; - $p = new permissions; + $p = permissions::new(); $p->add('conference_control_detail_add', 'temp'); $database->app_name = 'conference_controls'; diff --git a/app/conference_controls/resources/classes/conference_controls.php b/app/conference_controls/resources/classes/conference_controls.php index 478781b0c9..13120b560a 100644 --- a/app/conference_controls/resources/classes/conference_controls.php +++ b/app/conference_controls/resources/classes/conference_controls.php @@ -103,7 +103,7 @@ if (!class_exists('conference_controls')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_control_detail_delete', 'temp'); //execute delete diff --git a/app/conference_profiles/app_defaults.php b/app/conference_profiles/app_defaults.php index 2ed206bdab..3ddccfc0ab 100644 --- a/app/conference_profiles/app_defaults.php +++ b/app/conference_profiles/app_defaults.php @@ -65,7 +65,7 @@ $array['conference_profiles'][0]['profile_name'] = $profile_name; $array['conference_profiles'][0]['profile_enabled'] = 'true'; - $p = new permissions; + $p = permissions::new(); $p->add('conference_profile_add', 'temp'); $database->app_name = 'conference_profiles'; @@ -91,7 +91,7 @@ $array['conference_profile_params'][0]['profile_param_value'] = $profile_param_value; $array['conference_profile_params'][0]['profile_param_enabled'] = $profile_param_enabled; - $p = new permissions; + $p = permissions::new(); $p->add('conference_profile_param_add', 'temp'); $database->app_name = 'conference_profiles'; diff --git a/app/conference_profiles/resources/classes/conference_profiles.php b/app/conference_profiles/resources/classes/conference_profiles.php index 831dcaa0e7..d92a0c01e3 100644 --- a/app/conference_profiles/resources/classes/conference_profiles.php +++ b/app/conference_profiles/resources/classes/conference_profiles.php @@ -103,7 +103,7 @@ if (!class_exists('conference_profiles')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_profile_param_delete', 'temp'); //execute delete @@ -410,7 +410,7 @@ if (!class_exists('conference_profiles')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_profile_param_add', 'temp'); //save the array diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php index 1b89a57793..92fd9888e3 100644 --- a/app/conferences/conference_edit.php +++ b/app/conferences/conference_edit.php @@ -91,7 +91,7 @@ $user_uuid = $_REQUEST["user_uuid"]; $conference_uuid = $_REQUEST["id"]; - $p = new permissions; + $p = permissions::new(); $p->add('conference_user_delete', 'temp'); $array['conference_users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; @@ -124,7 +124,7 @@ $array['conference_users'][0]['conference_uuid'] = $conference_uuid; $array['conference_users'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('conference_user_add', 'temp'); $database = new database; @@ -239,7 +239,7 @@ $array['dialplans'][0]['dialplan_enabled'] = $conference_enabled; $array['dialplans'][0]['dialplan_description'] = $conference_description; - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); $p->add('dialplan_edit', 'temp'); diff --git a/app/conferences/resources/classes/conferences.php b/app/conferences/resources/classes/conferences.php index 7589eb9bd4..c9a14f8140 100644 --- a/app/conferences/resources/classes/conferences.php +++ b/app/conferences/resources/classes/conferences.php @@ -108,7 +108,7 @@ if (!class_exists('conferences')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_user_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_delete', 'temp'); @@ -203,7 +203,7 @@ if (!class_exists('conferences')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array @@ -341,7 +341,7 @@ if (!class_exists('conferences')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('conference_user_add', 'temp'); $p->add('dialplan_add', 'temp'); diff --git a/app/conferences/resources/dashboard/config.php b/app/conferences/resources/dashboard/config.php index cb9d3cbaf7..d9cd3e9a37 100644 --- a/app/conferences/resources/dashboard/config.php +++ b/app/conferences/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db4 $array['dashboard'][$x]['dashboard_name'] = 'Conferences'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-comments'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/conferences/conferences.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292FF'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/destinations/app_config.php b/app/destinations/app_config.php index 3e9b0f81f2..6f47d1103a 100644 --- a/app/destinations/app_config.php +++ b/app/destinations/app_config.php @@ -167,6 +167,10 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "destination_local"; $y++; + $apps[$x]['permissions'][$y]['name'] = "destination_email"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; //default settings $y = 0; @@ -397,6 +401,10 @@ $apps[$x]['db'][$y]['fields'][$z]['search'] = 'true'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_email"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select whether to send email notifications of incoming SMS/MMS messages"; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz'; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date'; diff --git a/app/destinations/app_defaults.php b/app/destinations/app_defaults.php index 7c12382a94..411bbd5760 100644 --- a/app/destinations/app_defaults.php +++ b/app/destinations/app_defaults.php @@ -83,7 +83,7 @@ if ($domains_processed == 1) { //save to the data if (!empty($array)) { //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('destination_edit', 'temp'); //create the database object and save the data @@ -109,7 +109,7 @@ if ($domains_processed == 1) { if (!empty($array)) { //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('destination_edit', 'temp'); //create the database object and save the data diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index 56cd95c73e..b7c72ecba5 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -1162,6 +1162,33 @@ $text['label-destination_conditions']['zh-cn'] = "状况"; $text['label-destination_conditions']['ja-jp'] = "条件"; $text['label-destination_conditions']['ko-kr'] = "정황"; +$text['label-destination_email']['en-us'] = "Email Notifications"; +$text['label-destination_email']['en-gb'] = "Email Notifications"; +$text['label-destination_email']['ar-eg'] = "إشعارات البريد الإلكتروني"; +$text['label-destination_email']['de-at'] = "E-Mail-Benachrichtigungen"; +$text['label-destination_email']['de-ch'] = "E-Mail-Benachrichtigungen"; +$text['label-destination_email']['de-de'] = "E-Mail-Benachrichtigungen"; +$text['label-destination_email']['el-gr'] = "Ειδοποιήσεις μέσω ηλεκτρονικού ταχυδρομείου"; +$text['label-destination_email']['es-cl'] = "Notificaciones por correo electrónico"; +$text['label-destination_email']['es-mx'] = "Notificaciones por correo electrónico"; +$text['label-destination_email']['fr-ca'] = "Notifications par courriel"; +$text['label-destination_email']['fr-fr'] = "Notifications par e-mail"; +$text['label-destination_email']['he-il'] = "התראות דוא\"ל"; +$text['label-destination_email']['it-it'] = "Notifiche via email"; +$text['label-destination_email']['ka-ge'] = "ელ.ფოსტით შეტყობინებები"; +$text['label-destination_email']['nl-nl'] = "E-mailmeldingen"; +$text['label-destination_email']['pl-pl'] = "Powiadomienia e-mail"; +$text['label-destination_email']['pt-br'] = "Notificações por e-mail"; +$text['label-destination_email']['pt-pt'] = "Notificações por e-mail"; +$text['label-destination_email']['ro-ro'] = "Notificări prin e-mail"; +$text['label-destination_email']['ru-ru'] = "Уведомления по электронной почте"; +$text['label-destination_email']['sv-se'] = "E-postmeddelanden"; +$text['label-destination_email']['uk-ua'] = "Повідомлення електронною поштою"; +$text['label-destination_email']['tr-tr'] = "E-posta Bildirimleri"; +$text['label-destination_email']['zh-cn'] = "邮件通知"; +$text['label-destination_email']['ja-jp'] = "メール通知"; +$text['label-destination_email']['ko-kr'] = "이메일 알림"; + $text['option-caller_id_number']['en-us'] = "Caller ID Number"; $text['option-caller_id_number']['en-gb'] = "Caller ID Number"; $text['option-caller_id_number']['ar-eg'] = "رقم المتصل"; @@ -2352,6 +2379,33 @@ $text['description-usage']['zh-cn'] = "设置目的地的使用方式。"; $text['description-usage']['ja-jp'] = "宛先の使用方法を設定します。"; $text['description-usage']['ko-kr'] = "대상이 사용되는 방식을 설정합니다."; +$text['description-destination_email']['en-us'] = "Choose whether to send SMS and MMS messages to User's email"; +$text['description-destination_email']['en-gb'] = "Choose whether to send SMS and MMS messages to User's email"; +$text['description-destination_email']['ar-eg'] = "اختر ما إذا كنت ترغب في إرسال رسائل SMS و MMS إلى بريد المستخدم الإلكتروني"; +$text['description-destination_email']['de-at'] = "Wählen Sie, ob SMS- und MMS-Nachrichten an die E-Mail des Benutzers gesendet werden sollen"; +$text['description-destination_email']['de-ch'] = "Wählen Sie, ob SMS- und MMS-Nachrichten an die E-Mail des Benutzers gesendet werden sollen"; +$text['description-destination_email']['de-de'] = "Wählen Sie, ob SMS- und MMS-Nachrichten an die E-Mail des Benutzers gesendet werden sollen"; +$text['description-destination_email']['el-gr'] = "Επιλέξτε αν θέλετε να στείλετε μηνύματα SMS και MMS στο email του χρήστη"; +$text['description-destination_email']['es-cl'] = "Elija si desea enviar mensajes SMS y MMS al correo electrónico del usuario"; +$text['description-destination_email']['es-mx'] = "Elija si desea enviar mensajes SMS y MMS al correo electrónico del usuario"; +$text['description-destination_email']['fr-ca'] = "Choisissez si vous souhaitez envoyer des messages SMS et MMS à l'email de l'utilisateur"; +$text['description-destination_email']['fr-fr'] = "Choisissez si vous souhaitez envoyer des messages SMS et MMS à l'email de l'utilisateur"; +$text['description-destination_email']['he-il'] = "בחר אם לשלוח הודעות SMS ו-MMS לדוא\"ל של המשתמש"; +$text['description-destination_email']['it-it'] = "Scegli se inviare messaggi SMS e MMS all'email dell'utente"; +$text['description-destination_email']['ka-ge'] = "აირჩიეთ, გსურთ თუ არა SMS და MMS შეტყობინებების გაგზავნა მომხმარებლის ელ.ფოსტაზე"; +$text['description-destination_email']['nl-nl'] = "Kies of je SMS- en MMS-berichten naar de e-mail van de gebruiker wilt sturen"; +$text['description-destination_email']['pl-pl'] = "Wybierz, czy chcesz wysłać wiadomości SMS i MMS na adres e-mail użytkownika"; +$text['description-destination_email']['pt-br'] = "Escolha se deseja enviar mensagens SMS e MMS para o e-mail do usuário"; +$text['description-destination_email']['pt-pt'] = "Escolha se deseja enviar mensagens SMS e MMS para o e-mail do usuário"; +$text['description-destination_email']['ro-ro'] = "Alegeți dacă doriți să trimiteți mesaje SMS și MMS la adresa de e-mail a utilizatorului"; +$text['description-destination_email']['ru-ru'] = "Выберите, хотите ли вы отправлять SMS и MMS сообщения на электронную почту пользователя"; +$text['description-destination_email']['sv-se'] = "Välj om du vill skicka SMS- och MMS-meddelanden till användarens e-post"; +$text['description-destination_email']['uk-ua'] = "Виберіть, чи хочете ви надсилати SMS і MMS повідомлення на електронну пошту користувача"; +$text['description-destination_email']['tr-tr'] = "Kullanıcının e-posta adresine SMS ve MMS mesajları gönderilip gönderilmeyeceğini seçin"; +$text['description-destination_email']['zh-cn'] = "选择是否将SMS和MMS消息发送到用户的电子邮件"; +$text['description-destination_email']['ja-jp'] = "ユーザーのメールにSMSおよびMMSメッセージを送信するかどうかを選択してください"; +$text['description-destination_email']['ko-kr'] = "사용자 이메일로 SMS 및 MMS 메시지를 보낼지 선택하세요"; + $text['billing-warning']['en-us'] = "If you are using fusionpbx billing application, make sure to add accountcode and carrier variables."; $text['billing-warning']['en-gb'] = "If you are using fusionpbx billing application, make sure to add accountcode and carrier variables."; $text['billing-warning']['ar-eg'] = "إذا كنت تستخدم تطبيق فواتير الدمج، تأكد من إضافة رمز الحساب والمتغيرات الناقلة."; diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 5d594364cc..ba185c3c75 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -130,6 +130,7 @@ $destination_type_text = $_POST["destination_type_text"] ?? null; $destination_type_emergency = $_POST["destination_type_emergency"] ?? null; $destination_carrier = $_POST["destination_carrier"] ?? null; + $destination_email = $_POST["destination_email"]; //sanitize the destination conditions if (!empty($destination_conditions)) { @@ -314,6 +315,9 @@ if (!permission_exists('destination_domain')) { $domain_uuid = $row["domain_uuid"] ?? null; } + if (!permission_exists('destination_email')) { + $destination_email = $row["destination_email"] ?? null; + } } unset($row); @@ -1090,6 +1094,7 @@ $array['destinations'][$x]["destination_distinctive_ring"] = $destination_distinctive_ring; } $array['destinations'][$x]["destination_record"] = $destination_record; + $array['destinations'][$x]["destination_email"] = $destination_email; if (!empty($destination_ringback) && $ringbacks->valid($destination_ringback)) { $array['destinations'][$x]["destination_ringback"] = $destination_ringback; } @@ -1139,7 +1144,7 @@ } //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", 'temp'); $p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_edit", 'temp'); @@ -1270,6 +1275,7 @@ $destination_order = $destination_order ?? ''; $destination_enabled = $destination_enabled ?? ''; $destination_description = $destination_description ?? ''; + $destination_email = $destination_email ?? ''; $select_style = $select_style ?? ''; //pre-populate the form @@ -1316,6 +1322,7 @@ $destination_order = $row["destination_order"]; $destination_enabled = $row["destination_enabled"]; $destination_description = $row["destination_description"]; + $destination_email = $row["destination_email"]; } unset($sql, $parameters, $row); } @@ -1815,6 +1822,34 @@ echo "\n"; } + //destination email + if (permission_exists('destination_email') && permission_exists('message_view')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-destination_email']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_email']."\n"; + echo "\n"; + echo "\n"; + } + //users if (permission_exists('user_edit')) { echo "\n"; diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index 2694665e47..6b05c30c64 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -402,7 +402,7 @@ if (!class_exists('destinations')) { } } //application: hangup - if (!empty($data['application'])) { + if (!empty($data['application']) && $data['application'] === 'hangup') { $select_value = str_replace("transfer", $data['application'], $select_value); } } @@ -1081,7 +1081,7 @@ if (!class_exists('destinations')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); diff --git a/app/destinations/resources/dashboard/config.php b/app/destinations/resources/dashboard/config.php index dcb4590bd7..6eb1d00670 100644 --- a/app/destinations/resources/dashboard/config.php +++ b/app/destinations/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'a294b771-a125-4d36-b51a-973540346fa $array['dashboard'][$x]['dashboard_name'] = 'Destinations'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-right-to-bracket'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/destinations/destinations.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/devices/app_defaults.php b/app/devices/app_defaults.php index eb2acdd48b..9dde91d806 100644 --- a/app/devices/app_defaults.php +++ b/app/devices/app_defaults.php @@ -62,7 +62,7 @@ if ($domains_processed == 1) { $array['device_keys'][$index]['device_key_vendor'] = $row["device_vendor"]; } if (is_array($array) && @sizeof($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('device_key_edit', 'temp'); $database->app_name = 'devices'; @@ -106,7 +106,7 @@ if ($domains_processed == 1) { //save the array if (!empty($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('device_profile_key_add', 'temp'); $database->app_name = 'devices'; @@ -144,7 +144,7 @@ if ($domains_processed == 1) { //save the array if (!empty($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('device_profile_setting_add', 'temp'); $database->app_name = 'devices'; @@ -225,7 +225,7 @@ if ($domains_processed == 1) { //execute if (!empty($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('device_vendor_add', 'temp'); $p->add('device_vendor_function_add', 'temp'); $p->add('device_vendor_function_group_add', 'temp'); diff --git a/app/devices/device_vendor_function_edit.php b/app/devices/device_vendor_function_edit.php index d510a751b6..922302a045 100644 --- a/app/devices/device_vendor_function_edit.php +++ b/app/devices/device_vendor_function_edit.php @@ -44,7 +44,7 @@ //delete the device vendor function group $array['device_vendor_function_groups'][0]['device_vendor_function_group_uuid'] = $device_vendor_function_group_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('device_vendor_function_group_delete', 'temp'); $database = new database; @@ -183,7 +183,7 @@ $array['device_vendor_function_groups'][0]['group_name'] = $group_name; $array['device_vendor_function_groups'][0]['group_uuid'] = $group_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('device_vendor_function_group_add', 'temp'); $database = new database; diff --git a/app/devices/device_vendor_restore.php b/app/devices/device_vendor_restore.php index 779b6e14d9..2a40b1c475 100644 --- a/app/devices/device_vendor_restore.php +++ b/app/devices/device_vendor_restore.php @@ -129,7 +129,7 @@ } //assign temp permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_vendor_add', 'temp'); $p->add('device_vendor_function_add', 'temp'); $p->add('device_vendor_function_group_add', 'temp'); diff --git a/app/devices/resources/classes/device.php b/app/devices/resources/classes/device.php index fba69b9fa9..899962262e 100644 --- a/app/devices/resources/classes/device.php +++ b/app/devices/resources/classes/device.php @@ -518,7 +518,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_setting_delete', 'temp'); $p->add('device_line_delete', 'temp'); $p->add('device_key_delete', 'temp'); @@ -728,7 +728,7 @@ if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_vendor_function_delete', 'temp'); $p->add('device_vendor_function_group_delete', 'temp'); @@ -790,7 +790,7 @@ if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_vendor_function_group_delete', 'temp'); //execute delete @@ -851,7 +851,7 @@ if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_profile_key_delete', 'temp'); $p->add('device_profile_setting_delete', 'temp'); @@ -1376,7 +1376,7 @@ if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_profile_key_add', 'temp'); $p->add('device_profile_setting_add', 'temp'); diff --git a/app/devices/resources/dashboard/device_keys.php b/app/devices/resources/dashboard/device_keys.php index e095100105..402c1409fb 100644 --- a/app/devices/resources/dashboard/device_keys.php +++ b/app/devices/resources/dashboard/device_keys.php @@ -259,7 +259,7 @@ } if ($save) { //add the temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_keys_add', 'temp'); $p->add('device_key_edit', 'temp'); diff --git a/app/dialplan_inbound/dialplan_inbound_add.php b/app/dialplan_inbound/dialplan_inbound_add.php index deb8175233..4b1d2b1f5a 100644 --- a/app/dialplan_inbound/dialplan_inbound_add.php +++ b/app/dialplan_inbound/dialplan_inbound_add.php @@ -402,7 +402,7 @@ //update the destination dialplan_uuid if (is_uuid($destination_uuid)) { - $p = new permissions; + $p = permissions::new(); $p->add('destination_edit', 'temp'); $array['destinations'][0]['destination_uuid'] = $destination_uuid; diff --git a/app/dialplan_outbound/dialplan_outbound_add.php b/app/dialplan_outbound/dialplan_outbound_add.php index cc22127260..7c6a8a44ec 100644 --- a/app/dialplan_outbound/dialplan_outbound_add.php +++ b/app/dialplan_outbound/dialplan_outbound_add.php @@ -815,7 +815,7 @@ } //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_detail_add", "temp"); diff --git a/app/dialplans/app_defaults.php b/app/dialplans/app_defaults.php index 6e81a9678c..923e13f8d8 100644 --- a/app/dialplans/app_defaults.php +++ b/app/dialplans/app_defaults.php @@ -170,7 +170,7 @@ $array['dialplan_details'][1]['dialplan_detail_data'] = 'WARNING [inbound routes] 404 not found \${sip_network_ip}'; $array['dialplan_details'][1]['dialplan_detail_order'] = '20'; - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); $p->add('dialplan_detail_add', 'temp'); diff --git a/app/dialplans/resources/classes/dialplan.php b/app/dialplans/resources/classes/dialplan.php index 9bfa12b491..5c5b1cee7b 100644 --- a/app/dialplans/resources/classes/dialplan.php +++ b/app/dialplans/resources/classes/dialplan.php @@ -124,7 +124,7 @@ $array['dialplans'][0]['dialplan_description'] = $this->dialplan_description; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); //execute insert @@ -156,7 +156,7 @@ $array['dialplans'][0]['dialplan_description'] = $this->dialplan_description; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //execute update @@ -452,7 +452,7 @@ } //end foreach $xml_list //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); $p->add('dialplan_edit', 'temp'); $p->add('dialplan_detail_add', 'temp'); @@ -1065,7 +1065,7 @@ $array['dialplans'][$x]['dialplan_xml'] = $value; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //execute update @@ -1188,7 +1188,7 @@ if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); @@ -1290,7 +1290,7 @@ if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_delete', 'temp'); //execute delete @@ -1395,7 +1395,7 @@ if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array @@ -1546,7 +1546,7 @@ if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_add', 'temp'); //save the array diff --git a/app/email_queue/resources/jobs/email_queue.php b/app/email_queue/resources/jobs/email_queue.php old mode 100644 new mode 100755 index c5cd45d13b..9e1d3952eb --- a/app/email_queue/resources/jobs/email_queue.php +++ b/app/email_queue/resources/jobs/email_queue.php @@ -138,9 +138,8 @@ //process the messages if (is_array($email_queue) && @sizeof($email_queue) != 0) { - $which_php = exec('which php'); foreach($email_queue as $row) { - $command = $which_php." ".$_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/jobs/email_send.php "; + $command = PHP_BINARY." ".$_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/jobs/email_send.php "; $command .= "'action=send&email_queue_uuid=".$row["email_queue_uuid"]."&hostname=".$hostname."'"; if (isset($debug)) { //run process inline to see debug info diff --git a/app/email_queue/resources/jobs/email_send.php b/app/email_queue/resources/jobs/email_send.php old mode 100644 new mode 100755 index 5eb99db1b1..0b116a691c --- a/app/email_queue/resources/jobs/email_send.php +++ b/app/email_queue/resources/jobs/email_send.php @@ -49,12 +49,20 @@ //check to see if the process is running if (file_exists($file)) { $pid = file_get_contents($file); - if (posix_getsid($pid) === false) { - //process is not running - $exists = false; + if (function_exists('posix_getsid')) { + //check if the process is running + $pid = posix_getsid($pid); + if ($pid === null || $pid === 0) { + //process is not running + $exists = false; + } + else { + //process is running + $exists = true; + } } else { - //process is running + //file exists assume the pid is running $exists = true; } } @@ -443,7 +451,7 @@ $array['email_queue'][0]['email_status'] = 'sent'; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('email_queue_add', 'temp'); $p->add('email_queue_update', 'temp'); //execute insert @@ -474,7 +482,7 @@ $array['email_queue'][0]['email_status'] = 'failed'; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('email_queue_add', 'temp'); //execute insert @@ -528,7 +536,7 @@ $array['email_logs'][0]['status'] = 'failed'; $array['email_logs'][0]['email'] = str_replace("'", "''", $msg); //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('email_log_add', 'temp'); //execute insert $database->app_name = 'v_mailto'; @@ -571,4 +579,3 @@ //fwrite($esl, $content); //fclose($esl); - diff --git a/app/email_queue/resources/service/email_queue.php b/app/email_queue/resources/service/email_queue.php index 5385b77325..06f2c3d6c0 100644 --- a/app/email_queue/resources/service/email_queue.php +++ b/app/email_queue/resources/service/email_queue.php @@ -51,7 +51,7 @@ if (file_exists($file)) { $pid = file_get_contents($file); if (function_exists('posix_getsid')) { - if (posix_getsid($pid) === false) { + if (posix_getsid($pid) === false) { //process is not running $exists = false; } @@ -95,12 +95,12 @@ } //make sure the /var/run/fusionpbx directory exists - if (!file_exists('/var/run/fusionpbx')) { - $result = mkdir('/var/run/fusionpbx', 0777, true); - if (!$result) { - die('Failed to create /var/run/fusionpbx'); - } - } + if (!file_exists('/var/run/fusionpbx')) { + $result = mkdir('/var/run/fusionpbx', 0777, true); + if (!$result) { + die('Failed to create /var/run/fusionpbx'); + } + } //create the process id file if the process doesn't exist if (!$pid_exists) { @@ -152,7 +152,7 @@ //process the messages if (is_array($email_queue) && @sizeof($email_queue) != 0) { foreach($email_queue as $row) { - $command = exec('which php')." ".$_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/jobs/email_send.php "; + $command = PHP_BINARY." ".$_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/jobs/email_send.php "; $command .= "'action=send&email_queue_uuid=".$row["email_queue_uuid"]."&hostname=".$hostname."'"; if (isset($debug)) { //run process inline to see debug info @@ -162,7 +162,7 @@ } else { //starts process rapidly doesn't wait for previous process to finish (used for production) - $handle = popen($command." > /dev/null &", 'r'); + $handle = popen($command." > /dev/null &", 'r'); echo "'$handle'; " . gettype($handle) . "\n"; $read = fread($handle, 2096); echo $read; diff --git a/app/email_templates/app_defaults.php b/app/email_templates/app_defaults.php index b860794f1a..de95aa70ab 100644 --- a/app/email_templates/app_defaults.php +++ b/app/email_templates/app_defaults.php @@ -579,7 +579,7 @@ //add the missing email templates if (!empty($array['email_templates'])) { //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("email_template_add", 'temp'); $p->add("email_template_edit", 'temp'); diff --git a/app/event_guard/resources/dashboard/config.php b/app/event_guard/resources/dashboard/config.php index 6e5ec741fd..49d060ee1d 100644 --- a/app/event_guard/resources/dashboard/config.php +++ b/app/event_guard/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'e95f0221-d956-4baf-90c5-e38e16a20a4 $array['dashboard'][$x]['dashboard_name'] = 'Event Guard'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-person-military-pointing'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#5D5CE3'; $array['dashboard'][$x]['dashboard_url'] = '/app/event_guard/event_guard_logs.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -17,9 +18,9 @@ $array['dashboard'][$x]['dashboard_heading_text_color'] = ''; $array['dashboard'][$x]['dashboard_heading_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_heading_background_color'] = ''; $array['dashboard'][$x]['dashboard_heading_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#5D5CE3'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/event_guard/resources/service/event_guard.php b/app/event_guard/resources/service/event_guard.php index 45c269bdac..b916d578df 100644 --- a/app/event_guard/resources/service/event_guard.php +++ b/app/event_guard/resources/service/event_guard.php @@ -229,7 +229,7 @@ $x++; } if (is_array($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('event_guard_log_edit', 'temp'); $database->app_name = 'event guard'; $database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637'; @@ -349,7 +349,7 @@ $array['event_guard_logs'][0]['extension'] = $event['to-user'].'@'.$event['to-host']; $array['event_guard_logs'][0]['user_agent'] = $event['user-agent']; $array['event_guard_logs'][0]['log_status'] = 'blocked'; - $p = new permissions; + $p = permissions::new(); $p->add('event_guard_log_add', 'temp'); $database->app_name = 'event guard'; $database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637'; diff --git a/app/extensions/app_defaults.php b/app/extensions/app_defaults.php index b22e77551f..c4884a9819 100644 --- a/app/extensions/app_defaults.php +++ b/app/extensions/app_defaults.php @@ -50,7 +50,7 @@ } } if (is_array($array) && @sizeof($array) != 0) { - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); $database->app_name = 'extensions'; @@ -69,7 +69,7 @@ $sql .= "where default_setting_category = 'security' "; $sql .= "and default_setting_subcategory like 'password_%' "; - $p = new permissions; + $p = permissions::new(); $p->add('default_setting_edit', 'temp'); $database->execute($sql); diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index c927d4e81c..8542c3430b 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -261,7 +261,7 @@ $array['extension_users'][0]['user_uuid'] = $user_uuid; //add temporary permission - $p = new permissions; + $p = permissions::new(); $p->add('extension_user_delete', 'temp'); //save the array @@ -288,7 +288,7 @@ $array['device_lines'][0]['device_line_uuid'] = $device_line_uuid; //add temporary permission - $p = new permissions; + $p = permissions::new(); $p->add('device_line_delete', 'temp'); //save the array @@ -1061,6 +1061,9 @@ $object = new token; $token = $object->create($_SERVER['PHP_SELF']); +//set the back button + $_SESSION['call_forward_back'] = $_SERVER['PHP_SELF'] . "?id=$extension_uuid"; + //begin the page content require_once "resources/header.php"; if ($action == "update") { diff --git a/app/extensions/resources/classes/extension.php b/app/extensions/resources/classes/extension.php index 6736481c84..8a8eab1afa 100644 --- a/app/extensions/resources/classes/extension.php +++ b/app/extensions/resources/classes/extension.php @@ -153,7 +153,7 @@ if (!class_exists('extension')) { //build update array $array['voicemails'][0]['voicemail_uuid'] = $voicemail_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_edit', 'temp'); } else { @@ -161,7 +161,7 @@ if (!class_exists('extension')) { $array['voicemails'][0]['voicemail_uuid'] = uuid(); $array['voicemails'][0]['domain_uuid'] = $this->domain_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_add', 'temp'); } if (is_array($array) && @sizeof($array) != 0) { @@ -639,7 +639,7 @@ if (!class_exists('extension')) { } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_user_delete', 'temp'); $p->add('follow_me_delete', 'temp'); $p->add('follow_me_destination_delete', 'temp'); @@ -743,7 +743,7 @@ if (!class_exists('extension')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); //save the array diff --git a/app/extensions/resources/dashboard/caller_id.php b/app/extensions/resources/dashboard/caller_id.php index 19ed5e7813..9f6e6929cf 100644 --- a/app/extensions/resources/dashboard/caller_id.php +++ b/app/extensions/resources/dashboard/caller_id.php @@ -89,7 +89,7 @@ $array_temp = $array; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("extension_edit", "temp"); //save to the data diff --git a/app/extensions/resources/dashboard/config.php b/app/extensions/resources/dashboard/config.php index fbd82ae049..ed8eff5fb1 100644 --- a/app/extensions/resources/dashboard/config.php +++ b/app/extensions/resources/dashboard/config.php @@ -26,6 +26,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a $array['dashboard'][$x]['dashboard_name'] = 'Extensions'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-suitcase'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/extensions/extensions.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -39,9 +40,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/fax/app_defaults.php b/app/fax/app_defaults.php index b32e6ace46..3672fbc934 100644 --- a/app/fax/app_defaults.php +++ b/app/fax/app_defaults.php @@ -202,7 +202,7 @@ //add the missing email templates if (!empty($array['email_templates'])) { //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("email_template_add", 'temp'); $p->add("email_template_edit", 'temp'); diff --git a/app/fax/fax_advanced.php b/app/fax/fax_advanced.php index b97e3e3ad4..73af5df487 100644 --- a/app/fax/fax_advanced.php +++ b/app/fax/fax_advanced.php @@ -135,7 +135,7 @@ //execute if (isset($array) && is_array($array)) { //assign temp permission - $p = new permissions; + $p = permissions::new(); $p->add('fax_add', 'temp'); $p->add('fax_edit', 'temp'); diff --git a/app/fax/fax_copy.php b/app/fax/fax_copy.php index 1a8af19be7..dec3752933 100644 --- a/app/fax/fax_copy.php +++ b/app/fax/fax_copy.php @@ -107,7 +107,7 @@ $array['fax'][0]['fax_description'] = $fax_description; //execute insert - $p = new permissions; + $p = permissions::new(); $p->add('fax_add', 'temp'); $database = new database; diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index 5c4fe9a2c8..b135d935c7 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -175,7 +175,7 @@ $array['fax_users'][0]['fax_uuid'] = $fax_uuid; $array['fax_users'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('fax_user_delete', 'temp'); $database = new database; @@ -203,7 +203,7 @@ $array['fax_users'][0]['fax_uuid'] = $fax_uuid; $array['fax_users'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('fax_user_add', 'temp'); $database = new database; @@ -303,7 +303,7 @@ $array['fax'][0]['dialplan_uuid'] = $dialplan_uuid; //assign temp permission - $p = new permissions; + $p = permissions::new(); $p->add('fax_add', 'temp'); //set the dialplan action @@ -315,7 +315,7 @@ $array['fax'][0]['fax_uuid'] = $fax_uuid; //assign temp permission - $p = new permissions; + $p = permissions::new(); $p->add('fax_edit', 'temp'); } diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php index 33c4fcd59d..fff0a9d60f 100644 --- a/app/fax/fax_send.php +++ b/app/fax/fax_send.php @@ -836,7 +836,7 @@ if (!function_exists('fax_split_dtmf')) { $array['fax_queue'][0]['fax_command'] = 'originate '.$dial_string; //add temporary permisison - $p = new permissions; + $p = permissions::new(); $p->add('fax_queue_add', 'temp'); //save the data diff --git a/app/fax/resources/classes/fax.php b/app/fax/resources/classes/fax.php index 0096bcfb15..d3b6b8748d 100644 --- a/app/fax/resources/classes/fax.php +++ b/app/fax/resources/classes/fax.php @@ -99,7 +99,7 @@ if (!class_exists('fax')) { $array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_delete', 'temp'); //execute delete @@ -166,7 +166,7 @@ if (!class_exists('fax')) { $array['dialplans'][] = $dialplan; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", 'temp'); $p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_edit", 'temp'); @@ -312,7 +312,7 @@ if (!class_exists('fax')) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('fax_delete', 'temp'); $p->add('fax_user_delete', 'temp'); $p->add('fax_file_delete', 'temp'); @@ -625,7 +625,7 @@ if (!class_exists('fax')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('fax_add', 'temp'); $p->add('dialplan_add', 'temp'); diff --git a/app/fax/resources/dashboard/config.php b/app/fax/resources/dashboard/config.php index 11888f256a..f769641f90 100644 --- a/app/fax/resources/dashboard/config.php +++ b/app/fax/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'ea3f5a8a-fc93-47d7-a632-a733522affc $array['dashboard'][$x]['dashboard_name'] = 'Fax Server'; $array['dashboard'][$x]['dashboard_path'] = 'core/dashboard/resources/dashboard/icon.php'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-print'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#5D5CE3'; $array['dashboard'][$x]['dashboard_url'] = '/app/fax/fax.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#5d5ce3'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/fax/resources/functions/parse_message.php b/app/fax/resources/functions/parse_message.php index b4d241ba06..6e987457d6 100644 --- a/app/fax/resources/functions/parse_message.php +++ b/app/fax/resources/functions/parse_message.php @@ -47,7 +47,11 @@ function parse_message_decode_text($connection, &$part, $message_number, $id, $o } } if($charset){ - $msg = mb_convert_encoding($msg, $to_charset, $charset); + if ($charset === 'windows-1256') { + $msg = iconv('windows-1256', 'utf-8', $msg); + } else { + $msg = mb_convert_encoding($msg, $to_charset, $charset); + } } $msg = trim($msg); } diff --git a/app/fax_queue/resources/job/fax_queue.php b/app/fax_queue/resources/job/fax_queue.php index 60a113b21c..b08ffcde96 100644 --- a/app/fax_queue/resources/job/fax_queue.php +++ b/app/fax_queue/resources/job/fax_queue.php @@ -151,7 +151,7 @@ //process the messages if (is_array($fax_queue) && @sizeof($fax_queue) != 0) { foreach($fax_queue as $row) { - $command = exec('which php')." ".$_SERVER['DOCUMENT_ROOT']."/app/fax_queue/resources/job/fax_send.php "; + $command = PHP_BINARY." ".$_SERVER['DOCUMENT_ROOT']."/app/fax_queue/resources/job/fax_send.php "; $command .= "'action=send&fax_queue_uuid=".$row["fax_queue_uuid"]."&hostname=".$hostname."&debug=true'"; if (isset($debug)) { //run process inline to see debug info diff --git a/app/fax_queue/resources/job/fax_send.php b/app/fax_queue/resources/job/fax_send.php index 4815f65eef..b48a9e0674 100644 --- a/app/fax_queue/resources/job/fax_send.php +++ b/app/fax_queue/resources/job/fax_send.php @@ -390,7 +390,7 @@ $array['fax_queue'][0]['fax_response'] = $fax_response; //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('fax_queue_edit', 'temp'); //save the data @@ -605,7 +605,7 @@ $array['fax_queue'][0]['fax_notify_date'] = 'now()'; //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('fax_queue_edit', 'temp'); //save the data diff --git a/app/fax_queue/resources/service/fax_queue.php b/app/fax_queue/resources/service/fax_queue.php index 22df8fd69b..6084254ebf 100644 --- a/app/fax_queue/resources/service/fax_queue.php +++ b/app/fax_queue/resources/service/fax_queue.php @@ -181,7 +181,7 @@ //process the messages if (is_array($fax_queue) && @sizeof($fax_queue) != 0) { foreach($fax_queue as $row) { - $command = exec('which php')." ".$_SERVER['DOCUMENT_ROOT']."/app/fax_queue/resources/job/fax_send.php "; + $command = PHP_BINARY." ".$_SERVER['DOCUMENT_ROOT']."/app/fax_queue/resources/job/fax_send.php "; $command .= "'action=send&fax_queue_uuid=".$row["fax_queue_uuid"]."&hostname=".$hostname."'"; if (isset($debug)) { //run process inline to see debug info diff --git a/app/fifo/fifo_edit.php b/app/fifo/fifo_edit.php index 58fcc33505..0087904d74 100644 --- a/app/fifo/fifo_edit.php +++ b/app/fifo/fifo_edit.php @@ -242,7 +242,7 @@ } //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/fifo/resources/classes/fifo.php b/app/fifo/resources/classes/fifo.php index 415b174a2c..4338f3f48e 100644 --- a/app/fifo/resources/classes/fifo.php +++ b/app/fifo/resources/classes/fifo.php @@ -111,7 +111,7 @@ if (!class_exists('fifo')) { //delete the checked rows if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('fifo_member_delete', 'temp'); $p->add('dialplan_delete', 'temp'); @@ -261,7 +261,7 @@ if (!class_exists('fifo')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('fifo_member_add', 'temp'); //save the array diff --git a/app/ivr_menus/app_defaults.php b/app/ivr_menus/app_defaults.php index c79980b75d..4df19f5b75 100644 --- a/app/ivr_menus/app_defaults.php +++ b/app/ivr_menus/app_defaults.php @@ -54,7 +54,7 @@ if ($domains_processed == 1) { } if (!empty($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('ivr_menu_edit', 'temp'); $database->app_name = 'ivr_menus'; diff --git a/app/ivr_menus/ivr_menu_copy.php b/app/ivr_menus/ivr_menu_copy.php index 02f1e702b7..830a9c577c 100644 --- a/app/ivr_menus/ivr_menu_copy.php +++ b/app/ivr_menus/ivr_menu_copy.php @@ -151,7 +151,7 @@ $array['dialplans'] = $dialplan; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 7467683fbc..68b076b4c2 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -401,7 +401,7 @@ $array['dialplans'][0]["app_uuid"] = "a5788e9b-58bc-bd1b-df59-fff5d51253ab"; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); if ($action == "add") { $p->add("dialplan_add", "temp"); } diff --git a/app/ivr_menus/resources/classes/ivr_menu.php b/app/ivr_menus/resources/classes/ivr_menu.php index 734200becf..50a0fde239 100644 --- a/app/ivr_menus/resources/classes/ivr_menu.php +++ b/app/ivr_menus/resources/classes/ivr_menu.php @@ -139,7 +139,7 @@ if (!class_exists('ivr_menu')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ivr_menu_option_delete', 'temp'); $p->add('dialplan_delete', 'temp'); @@ -312,7 +312,7 @@ if (!class_exists('ivr_menu')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array @@ -459,7 +459,7 @@ if (!class_exists('ivr_menu')) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ivr_menu_option_add', 'temp'); $p->add('dialplan_add', 'temp'); @@ -471,7 +471,7 @@ if (!class_exists('ivr_menu')) { unset($array); //revoke temporary permissions - $p = new permissions; + $p = permissions::new(); $p->delete('ivr_menu_option_add', 'temp'); $p->delete('dialplan_add', 'temp'); diff --git a/app/ivr_menus/resources/dashboard/config.php b/app/ivr_menus/resources/dashboard/config.php index feae19b377..f3ea72026d 100644 --- a/app/ivr_menus/resources/dashboard/config.php +++ b/app/ivr_menus/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa $array['dashboard'][$x]['dashboard_name'] = 'IVR Menus'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-diagram-project'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/ivr_menus/ivr_menus.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/modules/resources/classes/modules.php b/app/modules/resources/classes/modules.php index f158c06454..28b83949e0 100644 --- a/app/modules/resources/classes/modules.php +++ b/app/modules/resources/classes/modules.php @@ -743,7 +743,7 @@ if (!class_exists('modules')) { } if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('module_add', 'temp'); //execute insert $database = new database; diff --git a/app/music_on_hold/app_defaults.php b/app/music_on_hold/app_defaults.php index c3c34f624a..bd9bf7f0e1 100644 --- a/app/music_on_hold/app_defaults.php +++ b/app/music_on_hold/app_defaults.php @@ -93,7 +93,7 @@ if ($domains_processed == 1) { $array['music_on_hold'][0]['music_on_hold_chime_max'] = isset($chime_max) ? $chime_max : null; $array['music_on_hold'][0]['music_on_hold_path'] = $stream_path; - $p = new permissions; + $p = permissions::new(); $p->add('music_on_hold_add', 'temp'); $database->app_name = 'app_name'; diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index ad267a2651..95c4443a81 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -272,7 +272,7 @@ $array['music_on_hold'][0]['music_on_hold_chime_freq'] = null; $array['music_on_hold'][0]['music_on_hold_chime_max'] = null; - $p = new permissions; + $p = permissions::new(); $p->add('music_on_hold_add', 'temp'); $database = new database; diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index 99d778d5f9..71d628eca2 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -301,7 +301,7 @@ if (!class_exists('switch_music_on_hold')) { //view_array($array, false); //save the data - $p = new permissions; + $p = permissions::new(); $p->add('music_on_hold_add', 'temp'); $database = new database; diff --git a/app/number_translations/resources/classes/number_translations.php b/app/number_translations/resources/classes/number_translations.php index 7ff7ff2396..22a2836401 100644 --- a/app/number_translations/resources/classes/number_translations.php +++ b/app/number_translations/resources/classes/number_translations.php @@ -119,7 +119,7 @@ if (!class_exists('number_translations')) { } } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('number_translation_add', 'temp'); $p->add('number_translation_detail_add', 'temp'); //execute insert @@ -176,7 +176,7 @@ if (!class_exists('number_translations')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('number_translation_detail_delete', 'temp'); //execute delete @@ -390,7 +390,7 @@ if (!class_exists('number_translations')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('number_translation_detail_add', 'temp'); //save the array diff --git a/app/phrases/app_defaults.php b/app/phrases/app_defaults.php index 4134b887f4..e2b0f79571 100644 --- a/app/phrases/app_defaults.php +++ b/app/phrases/app_defaults.php @@ -83,7 +83,7 @@ if ($domains_processed == 1) { $array['phrase_details'][$index]['phrase_detail_data'] = $phrase_detail_data; } if (is_array($array) && @sizeof($array) != 0) { - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_edit', 'temp'); $database->app_name = 'phrases'; @@ -119,7 +119,7 @@ if ($domains_processed == 1) { $array['phrase_details'][$index]['phrase_detail_data'] = $phrase_detail_data; } if (!empty($array)) { - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_edit', 'temp'); $database->app_name = 'phrases'; diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php index 050251f5ad..00b632083a 100644 --- a/app/phrases/phrase_edit.php +++ b/app/phrases/phrase_edit.php @@ -160,7 +160,7 @@ } //execute insert - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_add', 'temp'); $database = new database; @@ -224,7 +224,7 @@ } //execute update/insert - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_add', 'temp'); $database = new database; diff --git a/app/phrases/resources/classes/phrases.php b/app/phrases/resources/classes/phrases.php index cee405e23b..2ed6f0f893 100644 --- a/app/phrases/resources/classes/phrases.php +++ b/app/phrases/resources/classes/phrases.php @@ -122,7 +122,7 @@ if (!class_exists('phrases')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_delete', 'temp'); //execute delete @@ -204,7 +204,7 @@ if (!class_exists('phrases')) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_delete', 'temp'); //execute delete @@ -398,7 +398,7 @@ if (!class_exists('phrases')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('phrase_detail_add', 'temp'); //save the array diff --git a/app/provision/app_defaults.php b/app/provision/app_defaults.php index ad2ff01dde..7f4b1a8368 100644 --- a/app/provision/app_defaults.php +++ b/app/provision/app_defaults.php @@ -43,7 +43,7 @@ if ($domains_processed == 1) { $array['devices'][0]['device_uuid'] = $device_uuid; $array['devices'][0]['device_address'] = $device_address; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('device_add', 'temp'); //execute update $database->app_name = 'provision'; @@ -67,7 +67,7 @@ if ($domains_processed == 1) { $array['default_settings'][$x]['default_setting_enabled'] = 'true'; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('default_setting_edit', 'temp'); //execute update diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php index 975447bfaf..bd6cc5ea71 100644 --- a/app/provision/resources/classes/provision.php +++ b/app/provision/resources/classes/provision.php @@ -548,7 +548,7 @@ $array['devices'][$x]['device_description'] = $_SERVER['HTTP_USER_AGENT']; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("device_add", "temp"); $p->add("device_edit", "temp"); diff --git a/app/recordings/app_defaults.php b/app/recordings/app_defaults.php index ab68392e75..284b3aff7e 100644 --- a/app/recordings/app_defaults.php +++ b/app/recordings/app_defaults.php @@ -60,7 +60,7 @@ $array['recordings'][0]['domain_uuid'] = $recording_domain_uuid; $array['recordings'][0]['recording_base64'] = $recording_base64; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('recording_edit', 'temp'); //update recording record with base64 $database->app_name = 'recordings'; @@ -109,7 +109,7 @@ $array['recordings'][0]['recording_base64'] = null; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('recording_edit', 'temp'); //update recording record diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php index 56d31bd13a..3e73034d64 100644 --- a/app/recordings/recordings.php +++ b/app/recordings/recordings.php @@ -180,7 +180,7 @@ $array['recordings'][0]['domain_uuid'] = $domain_uuid; $array['recordings'][0]['recording_base64'] = null; //set temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('recording_edit', 'temp'); //execute update $database->app_name = 'recordings'; @@ -217,7 +217,7 @@ $array['recordings'][0]['recording_base64'] = $recording_base64; } //set temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('recording_add', 'temp'); //execute insert $database->app_name = 'recordings'; @@ -238,7 +238,7 @@ $array['recordings'][0]['recording_uuid'] = $found_recording_uuid; $array['recordings'][0]['recording_base64'] = $recording_base64; //set temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('recording_edit', 'temp'); //execute update $database->app_name = 'recordings'; diff --git a/app/recordings/resources/dashboard/config.php b/app/recordings/resources/dashboard/config.php index 9c2779bda0..c0ea2d1d68 100644 --- a/app/recordings/resources/dashboard/config.php +++ b/app/recordings/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db6 $array['dashboard'][$x]['dashboard_name'] = 'Recordings'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-microphone'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/recordings/recordings.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/registrations/resources/dashboard/config.php b/app/registrations/resources/dashboard/config.php index 700512b15e..c7a08b6a94 100644 --- a/app/registrations/resources/dashboard/config.php +++ b/app/registrations/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e7 $array['dashboard'][$x]['dashboard_name'] = 'Registrations'; $array['dashboard'][$x]['dashboard_path'] = 'registrations/registrations.php'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-list-check'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard'][$x]['dashboard_url'] = '/app/registrations/registrations.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf'; +$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = '#5d5ce3'; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/registrations/resources/dashboard/registrations.php b/app/registrations/resources/dashboard/registrations.php index 401ee88b11..6883af3d3d 100644 --- a/app/registrations/resources/dashboard/registrations.php +++ b/app/registrations/resources/dashboard/registrations.php @@ -59,7 +59,7 @@ echo " ".escape($dashboard_label).""; echo "
\n"; echo " \n"; - echo " ".$active_registrations." / ".($active_registrations + $inactive_registrations)."\n"; + echo " ".$active_registrations." / ".($active_registrations + $inactive_registrations)."\n"; echo "
\n"; echo "
\n"; if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { diff --git a/app/ring_groups/app_defaults.php b/app/ring_groups/app_defaults.php index ac375ad34c..2ee2a67d66 100644 --- a/app/ring_groups/app_defaults.php +++ b/app/ring_groups/app_defaults.php @@ -49,7 +49,7 @@ if ($domains_processed == 1) { } if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ring_group_edit', 'temp'); //execute update $database->app_name = 'ring_groups'; diff --git a/app/ring_groups/resources/classes/ring_groups.php b/app/ring_groups/resources/classes/ring_groups.php index 46a2c4adc5..ceab17b711 100644 --- a/app/ring_groups/resources/classes/ring_groups.php +++ b/app/ring_groups/resources/classes/ring_groups.php @@ -125,7 +125,7 @@ if (!class_exists('ring_groups')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ring_group_user_delete', 'temp'); $p->add('ring_group_destination_delete', 'temp'); $p->add('dialplan_delete', 'temp'); @@ -305,7 +305,7 @@ if (!class_exists('ring_groups')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array @@ -472,7 +472,7 @@ if (!class_exists('ring_groups')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ring_group_user_add', 'temp'); $p->add('ring_group_destination_add', 'temp'); $p->add("dialplan_add", "temp"); diff --git a/app/ring_groups/resources/dashboard/config.php b/app/ring_groups/resources/dashboard/config.php index 790d472815..264a39606c 100644 --- a/app/ring_groups/resources/dashboard/config.php +++ b/app/ring_groups/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed41 $array['dashboard'][$x]['dashboard_name'] = 'Ring Group Forward'; $array['dashboard'][$x]['dashboard_path'] = 'ring_groups/ring_group_forward'; $array['dashboard'][$x]['dashboard_icon'] = ''; +$array['dashboard'][$x]['dashboard_icon_color'] = '0292ff'; $array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/ring_groups/resources/dashboard/ring_group_forward.php b/app/ring_groups/resources/dashboard/ring_group_forward.php index 90bdee4429..2e99ad6d5d 100644 --- a/app/ring_groups/resources/dashboard/ring_group_forward.php +++ b/app/ring_groups/resources/dashboard/ring_group_forward.php @@ -83,7 +83,7 @@ if (is_array($array) && sizeof($array) != 0) { //update ring group - $p = new permissions; + $p = permissions::new(); $p->add('ring_group_edit', 'temp'); $database->app_name = 'ring_groups'; diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 4df3cb45ff..8f85007173 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -114,7 +114,7 @@ $array['ring_group_users'][0]['user_uuid'] = $user_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ring_group_user_delete', 'temp'); //execute delete @@ -252,7 +252,7 @@ $array['ring_group_users'][0]['user_uuid'] = $user_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('ring_group_user_add', 'temp'); //execute delete @@ -492,7 +492,7 @@ $array["dialplans"][0]["app_uuid"] = "1d61fb65-1eec-bc73-a6ee-a6203b4fe6f2"; //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("dialplan_add", "temp"); $p->add("dialplan_edit", "temp"); diff --git a/app/sip_profiles/app_defaults.php b/app/sip_profiles/app_defaults.php index 662f1a2930..bad35f898c 100644 --- a/app/sip_profiles/app_defaults.php +++ b/app/sip_profiles/app_defaults.php @@ -120,7 +120,7 @@ //execute inserts if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('sip_profile_add', 'temp'); $p->add('sip_profile_domain_add', 'temp'); $p->add('sip_profile_setting_add', 'temp'); @@ -198,7 +198,7 @@ //execute inserts if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('sip_profile_domain_add', 'temp'); //execute insert diff --git a/app/sip_profiles/resources/classes/sip_profiles.php b/app/sip_profiles/resources/classes/sip_profiles.php index 82470a40dd..5d90bb5de8 100644 --- a/app/sip_profiles/resources/classes/sip_profiles.php +++ b/app/sip_profiles/resources/classes/sip_profiles.php @@ -116,7 +116,7 @@ if (!class_exists('sip_profiles')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('sip_profile_domain_delete', 'temp'); $p->add('sip_profile_setting_delete', 'temp'); diff --git a/app/sip_profiles/sip_profile_edit.php b/app/sip_profiles/sip_profile_edit.php index 7f59589ae3..e5bc167991 100644 --- a/app/sip_profiles/sip_profile_edit.php +++ b/app/sip_profiles/sip_profile_edit.php @@ -206,7 +206,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('sip_profile_domain_add', 'temp'); $p->add('sip_profile_setting_add', 'temp'); diff --git a/app/sofia_global_settings/app_defaults.php b/app/sofia_global_settings/app_defaults.php index f9842a83b3..00b44a05b8 100644 --- a/app/sofia_global_settings/app_defaults.php +++ b/app/sofia_global_settings/app_defaults.php @@ -69,7 +69,7 @@ if ($domains_processed == 1) { //add settings that are not in the database if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('sofia_global_setting_add', 'temp'); //execute insert diff --git a/app/time_conditions/resources/classes/time_conditions.php b/app/time_conditions/resources/classes/time_conditions.php index ef82061a9b..98a5e757df 100644 --- a/app/time_conditions/resources/classes/time_conditions.php +++ b/app/time_conditions/resources/classes/time_conditions.php @@ -100,7 +100,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp'); @@ -193,7 +193,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); //save the array @@ -310,7 +310,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); $p->add('dialplan_detail_add', 'temp'); diff --git a/app/time_conditions/resources/dashboard/config.php b/app/time_conditions/resources/dashboard/config.php index d0bbe04dea..2e5d3507bd 100644 --- a/app/time_conditions/resources/dashboard/config.php +++ b/app/time_conditions/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49c $array['dashboard'][$x]['dashboard_name'] = 'Time Conditions'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-clock'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/time_conditions/time_conditions.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; +$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color'] = ''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php index 0153342a0f..ff4761d5b2 100644 --- a/app/time_conditions/time_condition_edit.php +++ b/app/time_conditions/time_condition_edit.php @@ -153,7 +153,7 @@ $array['dialplans'][0]['dialplan_context'] = $dialplan_context; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_add', 'temp'); } else if ($action == "update") { @@ -161,7 +161,7 @@ $array['dialplan_details'][0]['dialplan_uuid'] = $dialplan_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_delete', 'temp'); //execute delete @@ -182,7 +182,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_edit', 'temp'); } @@ -481,7 +481,7 @@ //execute query if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_edit', 'temp'); diff --git a/app/vars/app_defaults.php b/app/vars/app_defaults.php index d817af3846..48297dfe0d 100644 --- a/app/vars/app_defaults.php +++ b/app/vars/app_defaults.php @@ -95,7 +95,7 @@ if ($domains_processed == 1) { } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("var_add", "temp"); $p->add("var_edit", "temp"); @@ -194,7 +194,7 @@ if ($domains_processed == 1) { if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("var_add", "temp"); //execute inserts diff --git a/app/voicemail_greetings/app_defaults.php b/app/voicemail_greetings/app_defaults.php index 98e8c34501..244172c14d 100644 --- a/app/voicemail_greetings/app_defaults.php +++ b/app/voicemail_greetings/app_defaults.php @@ -52,7 +52,7 @@ if ($domains_processed == 1) { } if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_greeting_edit', 'temp'); //execute @@ -104,7 +104,7 @@ if ($domains_processed == 1) { } if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_greeting_edit', 'temp'); //execute update @@ -151,7 +151,7 @@ if ($domains_processed == 1) { } if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_greeting_edit', 'temp'); //execute update diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php index b5e7cd7357..93a5674dac 100644 --- a/app/voicemail_greetings/voicemail_greetings.php +++ b/app/voicemail_greetings/voicemail_greetings.php @@ -223,7 +223,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_greeting_add', 'temp'); $p->add('voicemail_greeting_edit', 'temp'); diff --git a/app/voicemails/resources/classes/voicemail.php b/app/voicemails/resources/classes/voicemail.php index 8b612ecdc4..771d07ed97 100644 --- a/app/voicemails/resources/classes/voicemail.php +++ b/app/voicemails/resources/classes/voicemail.php @@ -313,8 +313,7 @@ //update the array with additional information if (is_array($result)) { - $i = 0; - foreach ($result as $row) { + foreach ($result as $i => $row) { //set the greeting directory $path = $this->settings->get('switch', 'voicemail', '/var/lib/freeswitch/storage').'/default/'.$_SESSION['domain_name'].'/'.$row['voicemail_id']; if (file_exists($path.'/msg_'.$row['voicemail_message_uuid'].'.wav')) { @@ -323,17 +322,16 @@ if (file_exists($path.'/msg_'.$row['voicemail_message_uuid'].'.mp3')) { $result[$i]['file_path'] = $path.'/msg_'.$row['voicemail_message_uuid'].'.mp3'; } - $result[$i]['file_size'] = filesize($row['file_path'] ?? ''); - $result[$i]['file_size_label'] = byte_convert($row['file_size'] ?? 0); - $result[$i]['file_ext'] = substr($row['file_path'] ?? '', -3); + $result[$i]['file_size'] = filesize($result[$i]['file_path'] ?? ''); + $result[$i]['file_size_label'] = byte_convert($result[$i]['file_size'] ?? 0); + $result[$i]['file_ext'] = substr($result[$i]['file_path'] ?? '', -3); $message_minutes = floor($row['message_length'] / 60); $message_seconds = $row['message_length'] % 60; //use International System of Units (SI) - Source: https://en.wikipedia.org/wiki/International_System_of_Units - $result[$i]['message_length_label'] = ($message_minutes > 0 ? $message_minutes.' min' : null).($message_seconds > 0 ? ' '.$message_seconds.' s' : null); + $result[$i]['message_length_label'] = ($message_minutes > 0 ? $message_minutes.' min' : '').($message_seconds > 0 ? ' '.$message_seconds.' s' : ''); $result[$i]['created_date'] = date("j M Y g:i a",$row['created_epoch']); - $i; } } else { @@ -421,7 +419,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_delete', 'temp'); $p->add('voicemail_option_delete', 'temp'); $p->add('voicemail_message_delete', 'temp'); @@ -537,7 +535,7 @@ //delete the checked rows if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_destination_delete', 'temp'); //execute delete @@ -708,7 +706,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_message_delete', 'temp'); //execute delete @@ -746,7 +744,7 @@ $array['voicemail_messages'][0]['message_status'] = $new_status; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_message_edit', 'temp'); //execute update @@ -989,7 +987,7 @@ } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('email_queue_add', 'temp'); $p->add('email_queue_attachment_add', 'temp'); @@ -1094,7 +1092,7 @@ if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_message_edit', 'temp'); //execute update @@ -1134,7 +1132,7 @@ $array['voicemail_messages'][0]['message_status'] = 'saved'; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('voicemail_message_edit', 'temp'); //execute update diff --git a/app/voicemails/resources/dashboard/config.php b/app/voicemails/resources/dashboard/config.php index e62cdc84a7..387d3af327 100644 --- a/app/voicemails/resources/dashboard/config.php +++ b/app/voicemails/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329c $array['dashboard'][$x]['dashboard_name'] = 'New Messages'; $array['dashboard'][$x]['dashboard_path'] = 'voicemails/voicemails'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-envelope'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf'; +$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = '#03c04a'; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/app/voicemails/resources/dashboard/voicemails.php b/app/voicemails/resources/dashboard/voicemails.php index f1e0baaa61..9c5b571c08 100644 --- a/app/voicemails/resources/dashboard/voicemails.php +++ b/app/voicemails/resources/dashboard/voicemails.php @@ -111,7 +111,7 @@ echo "\n"; echo "
\n"; echo " \n"; - echo " ".$messages['new']."\n"; + echo " ".$messages['new']."\n"; echo "
\n"; echo "
"; } @@ -157,4 +157,4 @@ echo "\n"; -?> \ No newline at end of file +?> diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index af6b11ecf5..8ed1b8a675 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -199,7 +199,7 @@ $array['voicemails'][0]['voicemail_description'] = $voicemail_description; //create permissions object - $p = new permissions; + $p = permissions::new(); //add voicemail options if (permission_exists('voicemail_option_add') && sizeof($voicemail_options) > 0) { diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php index 1753f97565..435a3be647 100644 --- a/app/voicemails/voicemails.php +++ b/app/voicemails/voicemails.php @@ -45,6 +45,12 @@ $language = new text; $text = $language->get(); +//set up database object + $database = database::new(); + +//get the settings + $settings = new settings(['database' => $database, 'domain_uuid' => $_SESSION['domain_uuid'] ?? '', 'user_uuid' => $_SESSION['user_uuid'] ?? '']); + //get the http post data if (!empty($_POST['voicemails'])) { $action = $_POST['action']; @@ -119,18 +125,19 @@ //prepare to page the results $sql = "select count(voicemail_uuid) from v_voicemails "; $sql .= "where true "; + $parameters = null; if ($show != "all" || !permission_exists('voicemail_all')) { $sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; } if (!permission_exists('voicemail_domain')) { - if (is_array($voicemail_uuids) && @sizeof($voicemail_uuids) != 0) { + if (is_array($voicemail_uuids) && sizeof($voicemail_uuids) != 0) { $sql .= "and ("; foreach ($voicemail_uuids as $x => $row) { $sql_where_or[] = 'voicemail_uuid = :voicemail_uuid_'.$x; $parameters['voicemail_uuid_'.$x] = $row['voicemail_uuid']; } - if (is_array($sql_where_or) && @sizeof($sql_where_or) != 0) { + if (is_array($sql_where_or) && sizeof($sql_where_or) != 0) { $sql .= implode(' or ', $sql_where_or); } $sql .= ")"; @@ -140,8 +147,7 @@ } } $sql .= $sql_search ?? ''; - $database = new database; - $num_rows = $database->select($sql, $parameters ?? null, 'column'); + $num_rows = $database->select($sql, $parameters, 'column'); //prepare to page the results $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; @@ -158,17 +164,19 @@ $sql = str_replace('count(voicemail_uuid)', '*', $sql); $sql .= order_by($order_by, $order, null, null, $sort); $sql .= limit_offset($rows_per_page, $offset); - $database = new database; - $voicemails = $database->select($sql, $parameters ?? null, 'all'); + $voicemails = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); //get vm count for each mailbox if (permission_exists('voicemail_message_view')) { - $sql = "select voicemail_uuid, count(*) as voicemail_count "; - $sql .= "from v_voicemail_messages where domain_uuid = :domain_uuid"; - $sql .= " group by voicemail_uuid"; - $parameters['domain_uuid'] = $domain_uuid; - $database = new database; + $parameters = null; + $sql = "select voicemail_uuid, count(voicemail_uuid) as voicemail_count "; + $sql .= "from v_voicemail_messages where true "; + if ($show !== 'all' || !permission_exists('voicemail_all')) { + $sql .= "and domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $domain_uuid; + } + $sql .= "group by voicemail_uuid"; $voicemails_count_tmp = $database->select($sql, $parameters, 'all'); $voicemails_count = array(); @@ -180,11 +188,14 @@ //get vm greeting count for each mailbox if (permission_exists('voicemail_greeting_view')) { + $parameters = null; $sql = "select voicemail_id, count(greeting_id) as greeting_count "; - $sql .= "from v_voicemail_greetings where domain_uuid = :domain_uuid"; - $sql .= " group by voicemail_id"; - $parameters['domain_uuid'] = $domain_uuid; - $database = new database; + $sql .= "from v_voicemail_greetings where true "; + if ($show !== 'all' || !permission_exists('voicemail_all')) { + $sql .= "and domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $domain_uuid; + } + $sql .= "group by voicemail_id"; $voicemail_greetings_count_tmp = $database->select($sql, $parameters, 'all'); $voicemail_greetings_count = array(); @@ -283,7 +294,7 @@ } echo "\n"; - if (is_array($voicemails) && @sizeof($voicemails) != 0) { + if (is_array($voicemails) && sizeof($voicemails) != 0) { $x = 0; foreach ($voicemails as $row) { if (permission_exists('voicemail_edit')) { @@ -362,4 +373,3 @@ //include the footer require_once "resources/footer.php"; -?> diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 9e67bd6b2b..8a5e20bb98 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -231,7 +231,7 @@ if (!class_exists('xml_cdr')) { } //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("xml_cdr_add", "temp"); $p->add("xml_cdr_json_add", "temp"); $p->add("xml_cdr_flow_add", "temp"); @@ -2113,7 +2113,7 @@ if (!class_exists('xml_cdr')) { } //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('call_recording_delete', 'temp'); //execute delete diff --git a/app/xml_cdr/resources/dashboard/config.php b/app/xml_cdr/resources/dashboard/config.php index 0c842eda8c..3b1b4b2e05 100644 --- a/app/xml_cdr/resources/dashboard/config.php +++ b/app/xml_cdr/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab3 $array['dashboard'][$x]['dashboard_name'] = 'Missed Calls'; $array['dashboard'][$x]['dashboard_path'] = 'xml_cdr/missed_calls'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-circle-xmark'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf'; +$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = '#EA4C46'; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; @@ -49,6 +50,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b $array['dashboard'][$x]['dashboard_name'] = 'Recent Calls'; $array['dashboard'][$x]['dashboard_path'] = 'xml_cdr/recent_calls'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-rectangle-list'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -62,9 +64,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf'; +$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = '#417ed3'; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; @@ -93,6 +95,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe $array['dashboard'][$x]['dashboard_name'] = 'Call Detail Records'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-list-ul'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard'][$x]['dashboard_url'] = '/app/xml_cdr/xml_cdr.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; diff --git a/app/xml_cdr/resources/dashboard/missed_calls.php b/app/xml_cdr/resources/dashboard/missed_calls.php index b00e62a973..80b3378c2d 100644 --- a/app/xml_cdr/resources/dashboard/missed_calls.php +++ b/app/xml_cdr/resources/dashboard/missed_calls.php @@ -149,7 +149,7 @@ echo "\n"; echo "
\n"; echo " \n"; - echo " ".$num_rows."\n"; + echo " ".$num_rows."\n"; echo "
\n"; echo "
"; } @@ -220,4 +220,4 @@ } echo "\n"; -?> \ No newline at end of file +?> diff --git a/app/xml_cdr/resources/dashboard/recent_calls.php b/app/xml_cdr/resources/dashboard/recent_calls.php index bdeb2148f3..8de16e74cb 100644 --- a/app/xml_cdr/resources/dashboard/recent_calls.php +++ b/app/xml_cdr/resources/dashboard/recent_calls.php @@ -147,7 +147,7 @@ echo "
\n"; echo "
\n"; echo " \n"; - echo " ".$num_rows."\n"; + echo " ".$num_rows."\n"; echo "
\n"; echo "
"; } @@ -240,4 +240,4 @@ } echo "\n"; -?> \ No newline at end of file +?> diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index 414b6f998a..eca4c79e62 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -114,7 +114,7 @@ if (is_array($array) && @sizeof($array) != 0) { //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('xml_cdr_edit', 'temp'); //remove record_path, record_name and record_length diff --git a/app/xml_cdr/xml_cdr_extension_summary.php b/app/xml_cdr/xml_cdr_extension_summary.php index fc77f5f507..b7eade3167 100644 --- a/app/xml_cdr/xml_cdr_extension_summary.php +++ b/app/xml_cdr/xml_cdr_extension_summary.php @@ -67,7 +67,7 @@ //set the headers header('Content-type: application/octet-binary'); - header('Content-Disposition: attachment; filename=user-summary.csv'); + header('Content-Disposition: attachment; filename=extension-summary.csv'); //show the column names on the first line $z = 0; diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index d09a0784c2..2f5a9f280a 100644 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -228,7 +228,7 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_cid_source"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "2"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "4"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "The type of SIP header(s) to carry the caller ID; 0-FROM, 1-PAI 2-PAI-FROM (default), 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM, 6-Preference"; $y++; diff --git a/core/authentication/app_defaults.php b/core/authentication/app_defaults.php index d0d2c6f9f0..ed70985cbd 100644 --- a/core/authentication/app_defaults.php +++ b/core/authentication/app_defaults.php @@ -94,7 +94,7 @@ //add the missing email templates if (!empty($array['email_templates'])) { //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("email_template_add", 'temp'); $p->add("email_template_edit", 'temp'); diff --git a/core/authentication/resources/classes/authentication.php b/core/authentication/resources/classes/authentication.php index 5355451606..790f319709 100644 --- a/core/authentication/resources/classes/authentication.php +++ b/core/authentication/resources/classes/authentication.php @@ -79,7 +79,7 @@ class authentication { } //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //use the authentication plugins foreach ($_SESSION['authentication']['methods'] as $name) { diff --git a/core/authentication/resources/classes/plugins/database.php b/core/authentication/resources/classes/plugins/database.php index 7b55144de9..9d61f26379 100644 --- a/core/authentication/resources/classes/plugins/database.php +++ b/core/authentication/resources/classes/plugins/database.php @@ -171,7 +171,7 @@ class plugin_database { $user_authorized = false; //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //check the username and password if they don't match then redirect to the login $sql = "select "; @@ -310,7 +310,7 @@ class plugin_database { $array['user_groups'][0]['user_uuid'] = $this->user_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('user_edit', 'temp'); //execute insert diff --git a/core/authentication/resources/classes/plugins/email.php b/core/authentication/resources/classes/plugins/email.php index dc822d7a01..900c467b36 100644 --- a/core/authentication/resources/classes/plugins/email.php +++ b/core/authentication/resources/classes/plugins/email.php @@ -258,7 +258,7 @@ class plugin_email { $hostname = gethostname(); //add the temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("email_queue_add", 'temp'); $p->add("email_queue_edit", 'temp'); @@ -404,7 +404,7 @@ class plugin_email { unset($_POST['authentication_code']); //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //get the user details if ($auth_valid) { @@ -522,4 +522,4 @@ class plugin_email { } } -?> \ No newline at end of file +?> diff --git a/core/authentication/resources/classes/plugins/ldap.php b/core/authentication/resources/classes/plugins/ldap.php index 3fe2ec859b..dfd499602f 100644 --- a/core/authentication/resources/classes/plugins/ldap.php +++ b/core/authentication/resources/classes/plugins/ldap.php @@ -178,7 +178,7 @@ class plugin_ldap { $array['user_groups'][0]['user_uuid'] = $this->user_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('user_add', 'temp'); $p->add('user_group_add', 'temp'); diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php index 5bb5134857..0524335a63 100644 --- a/core/authentication/resources/classes/plugins/totp.php +++ b/core/authentication/resources/classes/plugins/totp.php @@ -224,7 +224,7 @@ class plugin_totp { $array['users'][$x]['user_totp_secret'] = $this->user_totp_secret; //add the user_edit permission - $p = new permissions; + $p = permissions::new(); $p->add("user_edit", "temp"); //save the data @@ -328,7 +328,7 @@ class plugin_totp { unset($_POST['authentication_code']); //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //get the user details if ($auth_valid) { @@ -440,4 +440,4 @@ class plugin_totp { } } -?> \ No newline at end of file +?> diff --git a/core/contacts/contact_address_edit.php b/core/contacts/contact_address_edit.php index a1a079e2b3..1715f04f65 100644 --- a/core/contacts/contact_address_edit.php +++ b/core/contacts/contact_address_edit.php @@ -131,7 +131,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/contact_auth.php b/core/contacts/contact_auth.php index b5c9335960..e43356017f 100644 --- a/core/contacts/contact_auth.php +++ b/core/contacts/contact_auth.php @@ -61,7 +61,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') { if (isset($_REQUEST['signout'])) { unset($_SESSION['contact_auth']['token']); message::add($text['message-google_signed_out']); - header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']); + header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/core/contacts/".$_SESSION['contact_auth']['referer']); exit; } @@ -117,4 +117,4 @@ else { exit; } -?> \ No newline at end of file +?> diff --git a/core/contacts/contact_edit.php b/core/contacts/contact_edit.php index 605f7045fc..d8d1767eab 100644 --- a/core/contacts/contact_edit.php +++ b/core/contacts/contact_edit.php @@ -543,7 +543,7 @@ //save the data if (!empty($array)) { //add the permission object - $p = new permissions; + $p = permissions::new(); $p->add('contact_add', 'temp'); $p->add('contact_phone_add', 'temp'); $p->add('contact_address_add', 'temp'); @@ -963,10 +963,10 @@ } }; if (search) { - xhttp.open("GET", "/app/contacts/contact_json.php?search="+search, true); + xhttp.open("GET", "/core/contacts/contact_json.php?search="+search, true); } else { - xhttp.open("GET", "/app/contacts/contact_json.php", true); + xhttp.open("GET", "/core/contacts/contact_json.php", true); } xhttp.send(); } diff --git a/core/contacts/contact_email_edit.php b/core/contacts/contact_email_edit.php index b6c89d8b37..1f41f0ba77 100644 --- a/core/contacts/contact_email_edit.php +++ b/core/contacts/contact_email_edit.php @@ -112,7 +112,7 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) { $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/contact_import_google.php b/core/contacts/contact_import_google.php index 0cb041c5ef..aebd791ff6 100644 --- a/core/contacts/contact_import_google.php +++ b/core/contacts/contact_import_google.php @@ -107,7 +107,7 @@ if ($_POST['a'] == 'import') { unset($duplicate_contact_uuid); //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('contact_delete', 'temp'); //delete duplicate contact diff --git a/core/contacts/contact_note_edit.php b/core/contacts/contact_note_edit.php index 6c6061e13a..0915d21c44 100644 --- a/core/contacts/contact_note_edit.php +++ b/core/contacts/contact_note_edit.php @@ -102,7 +102,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/contact_phone_edit.php b/core/contacts/contact_phone_edit.php index 4d729c34f2..c999eb7aec 100644 --- a/core/contacts/contact_phone_edit.php +++ b/core/contacts/contact_phone_edit.php @@ -132,7 +132,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/contact_relation_edit.php b/core/contacts/contact_relation_edit.php index e77b1d4fcf..f223e084e5 100644 --- a/core/contacts/contact_relation_edit.php +++ b/core/contacts/contact_relation_edit.php @@ -110,7 +110,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; @@ -241,10 +241,10 @@ } }; if (search) { - xhttp.open("GET", "/app/contacts/contact_json.php?search="+search, true); + xhttp.open("GET", "/core/contacts/contact_json.php?search="+search, true); } else { - xhttp.open("GET", "/app/contacts/contact_json.php", true); + xhttp.open("GET", "/core/contacts/contact_json.php", true); } xhttp.send(); } diff --git a/core/contacts/contact_setting_edit.php b/core/contacts/contact_setting_edit.php index 5fe5a36dbb..94d1f63f71 100644 --- a/core/contacts/contact_setting_edit.php +++ b/core/contacts/contact_setting_edit.php @@ -129,7 +129,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/contact_time_edit.php b/core/contacts/contact_time_edit.php index d7d4b0cb08..ec4d3fa7bb 100644 --- a/core/contacts/contact_time_edit.php +++ b/core/contacts/contact_time_edit.php @@ -102,7 +102,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/contact_url_edit.php b/core/contacts/contact_url_edit.php index 3cef3ff885..323e5e7afa 100644 --- a/core/contacts/contact_url_edit.php +++ b/core/contacts/contact_url_edit.php @@ -115,7 +115,7 @@ $array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_user'] = $_SESSION['username']; - $p = new permissions; + $p = permissions::new(); $p->add('contact_edit', 'temp'); $database = new database; diff --git a/core/contacts/resources/classes/contacts.php b/core/contacts/resources/classes/contacts.php index 9fa93eec23..c29f0243a8 100644 --- a/core/contacts/resources/classes/contacts.php +++ b/core/contacts/resources/classes/contacts.php @@ -108,7 +108,7 @@ if (!class_exists('contacts')) { if (is_array($array) && @sizeof($array) != 0) { //grant temp permissions - $p = new permissions; + $p = permissions::new(); $database = new database; foreach ($this->tables as $table) { $p->add(database::singular($table).'_delete', 'temp'); diff --git a/core/contacts/resources/dashboard/config.php b/core/contacts/resources/dashboard/config.php index 09f7ca8b64..4f076d885c 100644 --- a/core/contacts/resources/dashboard/config.php +++ b/core/contacts/resources/dashboard/config.php @@ -5,7 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2f $array['dashboard'][$x]['dashboard_name'] = 'Contacts'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-regular fa-address-card'; -$array['dashboard'][$x]['dashboard_url'] = '/app/contacts/contacts.php'; +$array['dashboard'][$x]['dashboard_url'] = '/core/contacts/contacts.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard'][$x]['dashboard_height'] = ''; diff --git a/core/dashboard/app_config.php b/core/dashboard/app_config.php index 63f0950532..89549d09e7 100644 --- a/core/dashboard/app_config.php +++ b/core/dashboard/app_config.php @@ -78,6 +78,11 @@ $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard icon.'; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon_color'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard icon color.'; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_url'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; @@ -157,6 +162,11 @@ $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the number text color hover.'; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_number_background_color'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the number background color.'; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_background_color'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; diff --git a/core/dashboard/app_defaults.php b/core/dashboard/app_defaults.php index 7334a5591a..7019d63cf1 100644 --- a/core/dashboard/app_defaults.php +++ b/core/dashboard/app_defaults.php @@ -66,7 +66,9 @@ if ($domains_processed == 1) { if (!empty($row['dashboard_label_text_color_hover'])) { $array['dashboard'][$x]['dashboard_label_text_color_hover'] = $row['dashboard_label_text_color_hover']; } if (!empty($row['dashboard_number_text_color'])) { $array['dashboard'][$x]['dashboard_number_text_color'] = $row['dashboard_number_text_color']; } if (!empty($row['dashboard_number_text_color_hover'])) { $array['dashboard'][$x]['dashboard_number_text_color_hover'] = $row['dashboard_number_text_color_hover']; } + if (!empty($row['dashboard_number_background_color'])) { $array['dashboard'][$x]['dashboard_number_background_color'] = $row['dashboard_number_background_color']; } if (!empty($row['dashboard_icon'])) { $array['dashboard'][$x]['dashboard_icon'] = $row['dashboard_icon']; } + if (!empty($row['dashboard_icon_color'])) { $array['dashboard'][$x]['dashboard_icon_color'] = $row['dashboard_icon_color']; } if (!empty($row['dashboard_url'])) { $array['dashboard'][$x]['dashboard_url'] = $row['dashboard_url']; } if (!empty($row['dashboard_width'])) { $array['dashboard'][$x]['dashboard_width'] = $row['dashboard_width']; } if (!empty($row['dashboard_height'])) { $array['dashboard'][$x]['dashboard_height'] = $row['dashboard_height']; } @@ -98,7 +100,7 @@ if ($domains_processed == 1) { } //add the temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('dashboard_add', 'temp'); $p->add('dashboard_group_add', 'temp'); diff --git a/core/dashboard/app_languages.php b/core/dashboard/app_languages.php index 1cdca26cda..02d88537c3 100644 --- a/core/dashboard/app_languages.php +++ b/core/dashboard/app_languages.php @@ -216,6 +216,168 @@ $text['description-dashboard_path']['zh-cn'] = "输入仪表板小部件路径 $text['description-dashboard_path']['ja-jp'] = "ダッシュボード ウィジェットのパスを入力します。"; $text['description-dashboard_path']['ko-kr'] = "대시보드 위젯 경로를 입력합니다."; +$text['description-dashboard_icon']['en-us'] = "Select an icon."; +$text['description-dashboard_icon']['en-gb'] = "Select an icon."; +$text['description-dashboard_icon']['ar-eg'] = "اختر أيقونة."; +$text['description-dashboard_icon']['de-at'] = "Wählen Sie ein Symbol."; +$text['description-dashboard_icon']['de-ch'] = "Wählen Sie ein Symbol."; +$text['description-dashboard_icon']['de-de'] = "Wählen Sie ein Symbol."; +$text['description-dashboard_icon']['el-gr'] = "Επιλέξτε ένα εικονίδιο."; +$text['description-dashboard_icon']['es-cl'] = "Selecciona un ícono."; +$text['description-dashboard_icon']['es-mx'] = "Selecciona un ícono."; +$text['description-dashboard_icon']['fr-ca'] = "Sélectionnez une icône."; +$text['description-dashboard_icon']['fr-fr'] = "Sélectionnez une icône."; +$text['description-dashboard_icon']['he-il'] = "בחר אייקון."; +$text['description-dashboard_icon']['it-it'] = "Seleziona un'icona."; +$text['description-dashboard_icon']['ka-ge'] = "აირჩიეთ ხატული."; +$text['description-dashboard_icon']['nl-nl'] = "Selecteer een pictogram."; +$text['description-dashboard_icon']['pl-pl'] = "Wybierz ikonę."; +$text['description-dashboard_icon']['pt-br'] = "Selecione um ícone."; +$text['description-dashboard_icon']['pt-pt'] = "Selecione um ícone."; +$text['description-dashboard_icon']['ro-ro'] = "Selectați o pictogramă."; +$text['description-dashboard_icon']['ru-ru'] = "Выберите значок."; +$text['description-dashboard_icon']['sv-se'] = "Välj ett ikon."; +$text['description-dashboard_icon']['uk-ua'] = "Виберіть значок."; +$text['description-dashboard_icon']['tr-tr'] = "Bir simge seçin."; +$text['description-dashboard_icon']['zh-cn'] = "选择一个图标。"; +$text['description-dashboard_icon']['ja-jp'] = "アイコンを選択してください。"; +$text['description-dashboard_icon']['ko-kr'] = "아이콘을 선택하세요."; + +$text['label-dashboard_icon_color']['en-us'] = "Color"; +$text['label-dashboard_icon_color']['en-gb'] = "Color"; +$text['label-dashboard_icon_color']['ar-eg'] = "اللون"; +$text['label-dashboard_icon_color']['de-at'] = "Farbe"; +$text['label-dashboard_icon_color']['de-ch'] = "Farbe"; +$text['label-dashboard_icon_color']['de-de'] = "Farbe"; +$text['label-dashboard_icon_color']['el-gr'] = "Χρώμα"; +$text['label-dashboard_icon_color']['es-cl'] = "Color"; +$text['label-dashboard_icon_color']['es-mx'] = "Color"; +$text['label-dashboard_icon_color']['fr-ca'] = "Couleur"; +$text['label-dashboard_icon_color']['fr-fr'] = "Couleur"; +$text['label-dashboard_icon_color']['he-il'] = "צבע"; +$text['label-dashboard_icon_color']['it-it'] = "Colore"; +$text['label-dashboard_icon_color']['ka-ge'] = "ფერი"; +$text['label-dashboard_icon_color']['nl-nl'] = "Kleur"; +$text['label-dashboard_icon_color']['pl-pl'] = "Kolor"; +$text['label-dashboard_icon_color']['pt-br'] = "Cor"; +$text['label-dashboard_icon_color']['pt-pt'] = "Cor"; +$text['label-dashboard_icon_color']['ro-ro'] = "Culoare"; +$text['label-dashboard_icon_color']['ru-ru'] = "Цвет"; +$text['label-dashboard_icon_color']['sv-se'] = "Färg"; +$text['label-dashboard_icon_color']['uk-ua'] = "Колір"; +$text['label-dashboard_icon_color']['tr-tr'] = "Renk"; +$text['label-dashboard_icon_color']['zh-cn'] = "颜色"; +$text['label-dashboard_icon_color']['ja-jp'] = "色"; +$text['label-dashboard_icon_color']['ko-kr'] = "색상"; + +$text['description-dashboard_icon_color']['en-us'] = "Enter the icon color."; +$text['description-dashboard_icon_color']['en-gb'] = "Enter the icon color."; +$text['description-dashboard_icon_color']['ar-eg'] = "أدخل لون الأيقونة."; +$text['description-dashboard_icon_color']['de-at'] = "Geben Sie die Symbolfarbe ein."; +$text['description-dashboard_icon_color']['de-ch'] = "Geben Sie die Symbolfarbe ein."; +$text['description-dashboard_icon_color']['de-de'] = "Geben Sie die Symbolfarbe ein."; +$text['description-dashboard_icon_color']['el-gr'] = "Εισάγετε το χρώμα του εικονιδίου."; +$text['description-dashboard_icon_color']['es-cl'] = "Ingresa el color del ícono."; +$text['description-dashboard_icon_color']['es-mx'] = "Ingresa el color del ícono."; +$text['description-dashboard_icon_color']['fr-ca'] = "Entrez la couleur de l'icône."; +$text['description-dashboard_icon_color']['fr-fr'] = "Entrez la couleur de l'icône."; +$text['description-dashboard_icon_color']['he-il'] = "הזן את צבע האייקון."; +$text['description-dashboard_icon_color']['it-it'] = "Inserisci il colore dell'icona."; +$text['description-dashboard_icon_color']['ka-ge'] = "შეიყვანეთ ხატულის ფერი."; +$text['description-dashboard_icon_color']['nl-nl'] = "Voer de kleur van het pictogram in."; +$text['description-dashboard_icon_color']['pl-pl'] = "Wprowadź kolor ikony."; +$text['description-dashboard_icon_color']['pt-br'] = "Digite a cor do ícone."; +$text['description-dashboard_icon_color']['pt-pt'] = "Digite a cor do ícone."; +$text['description-dashboard_icon_color']['ro-ro'] = "Introduceți culoarea pictogramei."; +$text['description-dashboard_icon_color']['ru-ru'] = "Введите цвет значка."; +$text['description-dashboard_icon_color']['sv-se'] = "Ange ikons färg."; +$text['description-dashboard_icon_color']['uk-ua'] = "Введіть колір значка."; +$text['description-dashboard_icon_color']['tr-tr'] = "Simge rengini girin."; +$text['description-dashboard_icon_color']['zh-cn'] = "输入图标颜色。"; +$text['description-dashboard_icon_color']['ja-jp'] = "アイコンの色を入力してください。"; +$text['description-dashboard_icon_color']['ko-kr'] = "아이콘 색상을 입력하세요."; + +$text['description-dashboard_url']['en-us'] = "Enter the URL."; +$text['description-dashboard_url']['en-gb'] = "Enter the URL."; +$text['description-dashboard_url']['ar-eg'] = "أدخل الرابط."; +$text['description-dashboard_url']['de-at'] = "Geben Sie die URL ein."; +$text['description-dashboard_url']['de-ch'] = "Geben Sie die URL ein."; +$text['description-dashboard_url']['de-de'] = "Geben Sie die URL ein."; +$text['description-dashboard_url']['el-gr'] = "Εισάγετε τη διεύθυνση URL."; +$text['description-dashboard_url']['es-cl'] = "Ingrese la URL."; +$text['description-dashboard_url']['es-mx'] = "Ingrese la URL."; +$text['description-dashboard_url']['fr-ca'] = "Entrez l'URL."; +$text['description-dashboard_url']['fr-fr'] = "Entrez l'URL."; +$text['description-dashboard_url']['he-il'] = "הכנס את ה-URL."; +$text['description-dashboard_url']['it-it'] = "Inserisci l'URL."; +$text['description-dashboard_url']['ka-ge'] = "შეიყვანეთ URL-მისამართი."; +$text['description-dashboard_url']['nl-nl'] = "Voer de URL in."; +$text['description-dashboard_url']['pl-pl'] = "Wprowadź URL."; +$text['description-dashboard_url']['pt-br'] = "Digite a URL."; +$text['description-dashboard_url']['pt-pt'] = "Digite a URL."; +$text['description-dashboard_url']['ro-ro'] = "Introduceți URL-ul."; +$text['description-dashboard_url']['ru-ru'] = "Введите URL."; +$text['description-dashboard_url']['sv-se'] = "Ange URL:en."; +$text['description-dashboard_url']['uk-ua'] = "Введіть URL."; +$text['description-dashboard_url']['tr-tr'] = "URL'yi girin."; +$text['description-dashboard_url']['zh-cn'] = "请输入网址."; +$text['description-dashboard_url']['ja-jp'] = "URLを入力してください。"; +$text['description-dashboard_url']['ko-kr'] = "URL을 입력하세요."; + +$text['description-dashboard_width']['en-us'] = "Enter the window width."; +$text['description-dashboard_width']['en-gb'] = "Enter the window width."; +$text['description-dashboard_width']['ar-eg'] = "أدخل عرض النافذة."; +$text['description-dashboard_width']['de-at'] = "Geben Sie die Fensterbreite ein."; +$text['description-dashboard_width']['de-ch'] = "Geben Sie die Fensterbreite ein."; +$text['description-dashboard_width']['de-de'] = "Geben Sie die Fensterbreite ein."; +$text['description-dashboard_width']['el-gr'] = "Εισάγετε το πλάτος του παραθύρου."; +$text['description-dashboard_width']['es-cl'] = "Ingrese el ancho de la ventana."; +$text['description-dashboard_width']['es-mx'] = "Ingrese el ancho de la ventana."; +$text['description-dashboard_width']['fr-ca'] = "Entrez la largeur de la fenêtre."; +$text['description-dashboard_width']['fr-fr'] = "Entrez la largeur de la fenêtre."; +$text['description-dashboard_width']['he-il'] = "הכנס את רוחב החלון."; +$text['description-dashboard_width']['it-it'] = "Inserisci la larghezza della finestra."; +$text['description-dashboard_width']['ka-ge'] = "შეიყვანეთ ფანჯრის სიგანე."; +$text['description-dashboard_width']['nl-nl'] = "Voer de vensterbreedte in."; +$text['description-dashboard_width']['pl-pl'] = "Wprowadź szerokość okna."; +$text['description-dashboard_width']['pt-br'] = "Digite a largura da janela."; +$text['description-dashboard_width']['pt-pt'] = "Digite a largura da janela."; +$text['description-dashboard_width']['ro-ro'] = "Introduceți lățimea ferestrei."; +$text['description-dashboard_width']['ru-ru'] = "Введите ширину окна."; +$text['description-dashboard_width']['sv-se'] = "Ange fönstrets bredd."; +$text['description-dashboard_width']['uk-ua'] = "Введіть ширину вікна."; +$text['description-dashboard_width']['tr-tr'] = "Pencere genişliğini girin."; +$text['description-dashboard_width']['zh-cn'] = "请输入窗口宽度."; +$text['description-dashboard_width']['ja-jp'] = "ウィンドウの幅を入力してください。"; +$text['description-dashboard_width']['ko-kr'] = "창 너비를 입력하세요."; + +$text['description-dashboard_height']['en-us'] = "Enter the window height."; +$text['description-dashboard_height']['en-gb'] = "Enter the window height."; +$text['description-dashboard_height']['ar-eg'] = "أدخل ارتفاع النافذة."; +$text['description-dashboard_height']['de-at'] = "Geben Sie die Fensterhöhe ein."; +$text['description-dashboard_height']['de-ch'] = "Geben Sie die Fensterhöhe ein."; +$text['description-dashboard_height']['de-de'] = "Geben Sie die Fensterhöhe ein."; +$text['description-dashboard_height']['el-gr'] = "Εισάγετε το ύψος του παραθύρου."; +$text['description-dashboard_height']['es-cl'] = "Ingrese la altura de la ventana."; +$text['description-dashboard_height']['es-mx'] = "Ingrese la altura de la ventana."; +$text['description-dashboard_height']['fr-ca'] = "Entrez la hauteur de la fenêtre."; +$text['description-dashboard_height']['fr-fr'] = "Entrez la hauteur de la fenêtre."; +$text['description-dashboard_height']['he-il'] = "הכנס את גובה החלון."; +$text['description-dashboard_height']['it-it'] = "Inserisci l'altezza della finestra."; +$text['description-dashboard_height']['ka-ge'] = "შეიყვანეთ ფანჯრის სიმაღლე."; +$text['description-dashboard_height']['nl-nl'] = "Voer de vensterhoogte in."; +$text['description-dashboard_height']['pl-pl'] = "Wprowadź wysokość okna."; +$text['description-dashboard_height']['pt-br'] = "Digite a altura da janela."; +$text['description-dashboard_height']['pt-pt'] = "Digite a altura da janela."; +$text['description-dashboard_height']['ro-ro'] = "Introduceți înălțimea ferestrei."; +$text['description-dashboard_height']['ru-ru'] = "Введите высоту окна."; +$text['description-dashboard_height']['sv-se'] = "Ange fönstrets höjd."; +$text['description-dashboard_height']['uk-ua'] = "Введіть висоту вікна."; +$text['description-dashboard_height']['tr-tr'] = "Pencere yüksekliğini girin."; +$text['description-dashboard_height']['zh-cn'] = "请输入窗口高度."; +$text['description-dashboard_height']['ja-jp'] = "ウィンドウの高さを入力してください。"; +$text['description-dashboard_height']['ko-kr'] = "창 높이를 입력하세요."; + $text['label-dashboard_content_text_align']['en-us'] = "Text Align"; $text['label-dashboard_content_text_align']['en-gb'] = "Text Align"; $text['label-dashboard_content_text_align']['ar-eg'] = "محاذاة النص"; @@ -488,7 +650,7 @@ $text['label-doughnut']['ko-kr'] = "도넛"; $text['label-progress_bar']['en-us'] = "Progress Bar"; $text['label-progress_bar']['en-gb'] = "Progress Bar"; -$text['label-progress_bar']['ar-eg'] = "شريط التقدم"; +$text['label-progress_bar']['ar-eg'] = "شريط التقدم"; $text['label-progress_bar']['de-at'] = "Fortschrittsbalken"; $text['label-progress_bar']['de-ch'] = "Fortschrittsbalken"; $text['label-progress_bar']['de-de'] = "Fortschrittsbalken"; @@ -511,7 +673,7 @@ $text['label-progress_bar']['uk-ua'] = "Індикатор виконання"; $text['label-progress_bar']['tr-tr'] = "İlerleme Çubuğu"; $text['label-progress_bar']['zh-cn'] = "进度条"; $text['label-progress_bar']['ja-jp'] = "進行バー"; -$text['label-progress_bar']['ko-kr'] = "진행 막대"; +$text['label-progress_bar']['ko-kr'] = "진행 막대"; $text['label-dashboard_label_enabled']['en-us'] = "Label Enabled"; $text['label-dashboard_label_enabled']['en-gb'] = "Label Enabled"; @@ -891,6 +1053,60 @@ $text['description-dashboard_number_text_color_hover']['zh-cn'] = "输入仪表 $text['description-dashboard_number_text_color_hover']['ja-jp'] = "ダッシュボード ウィジェットの番号、テキストの色、ホバーを入力します。"; $text['description-dashboard_number_text_color_hover']['ko-kr'] = "대시보드 위젯 번호 텍스트 색상을 마우스로 가리키면 입력됩니다."; +$text['label-dashboard_number_background_color']['en-us'] = "Number Background Color"; +$text['label-dashboard_number_background_color']['en-gb'] = "Number Background Color"; +$text['label-dashboard_number_background_color']['ar-eg'] = "لون خلفية الرقم"; +$text['label-dashboard_number_background_color']['de-at'] = "Hintergrundfarbe der Zahl"; +$text['label-dashboard_number_background_color']['de-ch'] = "Hintergrundfarbe der Zahl"; +$text['label-dashboard_number_background_color']['de-de'] = "Hintergrundfarbe der Zahl"; +$text['label-dashboard_number_background_color']['el-gr'] = "Χρώμα φόντου αριθμού"; +$text['label-dashboard_number_background_color']['es-cl'] = "Color de fondo del número"; +$text['label-dashboard_number_background_color']['es-mx'] = "Color de fondo del número"; +$text['label-dashboard_number_background_color']['fr-ca'] = "Couleur de fond du nombre"; +$text['label-dashboard_number_background_color']['fr-fr'] = "Couleur de fond du nombre"; +$text['label-dashboard_number_background_color']['he-il'] = "צבע רקע המספר"; +$text['label-dashboard_number_background_color']['it-it'] = "Colore di sfondo del numero"; +$text['label-dashboard_number_background_color']['ka-ge'] = "რიცხვის ფონური ფერი"; +$text['label-dashboard_number_background_color']['nl-nl'] = "Achtergrondkleur van het nummer"; +$text['label-dashboard_number_background_color']['pl-pl'] = "Kolor tła liczby"; +$text['label-dashboard_number_background_color']['pt-br'] = "Cor de fundo do número"; +$text['label-dashboard_number_background_color']['pt-pt'] = "Cor de fundo do número"; +$text['label-dashboard_number_background_color']['ro-ro'] = "Culoare fundal număr"; +$text['label-dashboard_number_background_color']['ru-ru'] = "Цвет фона числа"; +$text['label-dashboard_number_background_color']['sv-se'] = "Nummerbakgrundsfärg"; +$text['label-dashboard_number_background_color']['uk-ua'] = "Колір фону числа"; +$text['label-dashboard_number_background_color']['tr-tr'] = "Numara Arka Plan Rengi"; +$text['label-dashboard_number_background_color']['zh-cn'] = "数字背景颜色"; +$text['label-dashboard_number_background_color']['ja-jp'] = "数字の背景色"; +$text['label-dashboard_number_background_color']['ko-kr'] = "숫자 배경 색상"; + +$text['description-dashboard_number_background_color']['en-us'] = "Enter the dashboard widget number background color."; +$text['description-dashboard_number_background_color']['en-gb'] = "Enter the dashboard widget number background color."; +$text['description-dashboard_number_background_color']['ar-eg'] = "أدخل لون خلفية الرقم في عنصر واجهة المستخدم على لوحة التحكم."; +$text['description-dashboard_number_background_color']['de-at'] = "Geben Sie die Hintergrundfarbe der Zahl im Dashboard-Widget ein."; +$text['description-dashboard_number_background_color']['de-ch'] = "Geben Sie die Hintergrundfarbe der Zahl im Dashboard-Widget ein."; +$text['description-dashboard_number_background_color']['de-de'] = "Geben Sie die Hintergrundfarbe der Zahl im Dashboard-Widget ein."; +$text['description-dashboard_number_background_color']['el-gr'] = "Εισάγετε το χρώμα φόντου του αριθμού στο widget του πίνακα ελέγχου."; +$text['description-dashboard_number_background_color']['es-cl'] = "Ingrese el color de fondo del número en el widget del tablero."; +$text['description-dashboard_number_background_color']['es-mx'] = "Ingrese el color de fondo del número en el widget del tablero."; +$text['description-dashboard_number_background_color']['fr-ca'] = "Entrez la couleur de fond du nombre dans le widget du tableau de bord."; +$text['description-dashboard_number_background_color']['fr-fr'] = "Entrez la couleur de fond du nombre dans le widget du tableau de bord."; +$text['description-dashboard_number_background_color']['he-il'] = "הזן את צבע הרקע של המספר בווידג'ט בלוח המחוונים."; +$text['description-dashboard_number_background_color']['it-it'] = "Inserisci il colore di sfondo del numero nel widget del cruscotto."; +$text['description-dashboard_number_background_color']['ka-ge'] = "შეიტანეთ ფონი რიცხვის ფონური ფერი ვიჯეტში."; +$text['description-dashboard_number_background_color']['nl-nl'] = "Voer de achtergrondkleur van het nummer in het dashboardwidget in."; +$text['description-dashboard_number_background_color']['pl-pl'] = "Wprowadź kolor tła liczby w widżecie pulpitu nawigacyjnego."; +$text['description-dashboard_number_background_color']['pt-br'] = "Digite a cor de fundo do número no widget do painel."; +$text['description-dashboard_number_background_color']['pt-pt'] = "Digite a cor de fundo do número no widget do painel."; +$text['description-dashboard_number_background_color']['ro-ro'] = "Introduceți culoarea de fundal a numărului în widgetul tabloului de bord."; +$text['description-dashboard_number_background_color']['ru-ru'] = "Введите цвет фона числа в виджете панели управления."; +$text['description-dashboard_number_background_color']['sv-se'] = "Ange bakgrundsfärgen för numret i dashboard-widgeten."; +$text['description-dashboard_number_background_color']['uk-ua'] = "Введіть колір фону числа в віджеті панелі інструментів."; +$text['description-dashboard_number_background_color']['tr-tr'] = "Panel aracındaki numara arka plan rengini girin."; +$text['description-dashboard_number_background_color']['zh-cn'] = "输入仪表板小部件中数字的背景颜色。"; +$text['description-dashboard_number_background_color']['ja-jp'] = "ダッシュボードウィジェットの数字の背景色を入力してください。"; +$text['description-dashboard_number_background_color']['ko-kr'] = "대시보드 위젯 숫자의 배경 색상을 입력하세요."; + $text['label-dashboard_background_color']['en-us'] = "Background Color"; $text['label-dashboard_background_color']['en-gb'] = "Background Color"; $text['label-dashboard_background_color']['ar-eg'] = "لون الخلفية"; diff --git a/core/dashboard/dashboard_edit.php b/core/dashboard/dashboard_edit.php index 225449b07e..24915a82c3 100644 --- a/core/dashboard/dashboard_edit.php +++ b/core/dashboard/dashboard_edit.php @@ -47,6 +47,7 @@ $dashboard_path = 'dashboard/icon'; //$dashboard_path = ''; $dashboard_icon = ''; + $dashboard_icon_color = ''; $dashboard_url = ''; $dashboard_target = 'self'; $dashboard_width = ''; @@ -58,6 +59,7 @@ $dashboard_label_text_color = ''; $dashboard_label_background_color = ''; $dashboard_number_text_color = ''; + $dashboard_number_background_color = ''; $dashboard_groups = []; $dashboard_column_span = ''; $dashboard_row_span = ''; @@ -83,6 +85,7 @@ $dashboard_name = $_POST["dashboard_name"] ?? ''; $dashboard_path = $_POST["dashboard_path"] ?? ''; $dashboard_icon = $_POST["dashboard_icon"] ?? ''; + $dashboard_icon_color = $_POST["dashboard_icon_color"] ?? ''; $dashboard_url = $_POST["dashboard_url"] ?? ''; $dashboard_target = $_POST["dashboard_target"] ?? 'self'; $dashboard_width = $_POST["dashboard_width"] ?? ''; @@ -99,6 +102,7 @@ $dashboard_label_background_color_hover = $_POST["dashboard_label_background_color_hover"] ?? ''; $dashboard_number_text_color = $_POST["dashboard_number_text_color"] ?? ''; $dashboard_number_text_color_hover = $_POST["dashboard_number_text_color_hover"] ?? ''; + $dashboard_number_background_color = $_POST["dashboard_number_background_color"] ?? ''; $dashboard_background_color = $_POST["dashboard_background_color"] ?? ''; $dashboard_background_color_hover = $_POST["dashboard_background_color_hover"] ?? ''; $dashboard_detail_background_color = $_POST["dashboard_detail_background_color"] ?? ''; @@ -121,6 +125,7 @@ $dashboard_name = trim(preg_replace('/[^a-zA-Z0-9 _\-\/.#]/', '', $dashboard_name)); $dashboard_path = preg_replace($text_pattern, '', strtolower($dashboard_path)); $dashboard_icon = preg_replace($text_pattern, '', $dashboard_icon); + $dashboard_icon_color = preg_replace($text_pattern, '', $dashboard_icon_color); $dashboard_url = trim(preg_replace($text_pattern, '', $dashboard_url)); $dashboard_target = trim(preg_replace($text_pattern, '', $dashboard_target)); $dashboard_width = trim(preg_replace($text_pattern, '', $dashboard_width)); @@ -136,6 +141,7 @@ $dashboard_label_background_color_hover = preg_replace($text_pattern, '', $dashboard_label_background_color_hover); $dashboard_number_text_color = preg_replace($text_pattern, '', $dashboard_number_text_color); $dashboard_number_text_color_hover = preg_replace($text_pattern, '', $dashboard_number_text_color_hover); + $dashboard_number_background_color = preg_replace($text_pattern, '', $dashboard_number_background_color); $dashboard_background_color = preg_replace($text_pattern, '', $dashboard_background_color); $dashboard_background_color_hover = preg_replace($text_pattern, '', $dashboard_background_color_hover); $dashboard_detail_background_color = preg_replace($text_pattern, '', $dashboard_detail_background_color); @@ -273,6 +279,7 @@ $array['dashboard'][0]['dashboard_name'] = $dashboard_name; $array['dashboard'][0]['dashboard_path'] = $dashboard_path; $array['dashboard'][0]['dashboard_icon'] = $dashboard_icon; + $array['dashboard'][0]['dashboard_icon_color'] = $dashboard_icon_color; $array['dashboard'][0]['dashboard_url'] = $dashboard_url; $array['dashboard'][0]['dashboard_width'] = $dashboard_width; $array['dashboard'][0]['dashboard_height'] = $dashboard_height; @@ -288,6 +295,7 @@ $array['dashboard'][0]['dashboard_label_background_color_hover'] = $dashboard_label_background_color_hover; $array['dashboard'][0]['dashboard_number_text_color'] = $dashboard_number_text_color; $array['dashboard'][0]['dashboard_number_text_color_hover'] = $dashboard_number_text_color_hover; + $array['dashboard'][0]['dashboard_number_background_color'] = $dashboard_number_background_color; $array['dashboard'][0]['dashboard_background_color'] = $dashboard_background_color; $array['dashboard'][0]['dashboard_background_color_hover'] = $dashboard_background_color_hover; $array['dashboard'][0]['dashboard_detail_background_color'] = $dashboard_detail_background_color; @@ -338,6 +346,7 @@ $sql .= " dashboard_name, "; $sql .= " dashboard_path, "; $sql .= " dashboard_icon, "; + $sql .= " dashboard_icon_color, "; $sql .= " dashboard_url, "; $sql .= " dashboard_width, "; $sql .= " dashboard_height, "; @@ -353,6 +362,7 @@ $sql .= " dashboard_label_background_color_hover, "; $sql .= " dashboard_number_text_color, "; $sql .= " dashboard_number_text_color_hover, "; + $sql .= " dashboard_number_background_color, "; $sql .= " dashboard_background_color, "; $sql .= " dashboard_background_color_hover, "; $sql .= " dashboard_detail_background_color, "; @@ -373,6 +383,7 @@ $dashboard_name = $row["dashboard_name"]; $dashboard_path = $row["dashboard_path"]; $dashboard_icon = $row["dashboard_icon"]; + $dashboard_icon_color = $row["dashboard_icon_color"]; $dashboard_url = $row["dashboard_url"]; $dashboard_width = $row["dashboard_width"]; $dashboard_height = $row["dashboard_height"]; @@ -388,6 +399,7 @@ $dashboard_label_background_color_hover = $row["dashboard_label_background_color_hover"]; $dashboard_number_text_color = $row["dashboard_number_text_color"]; $dashboard_number_text_color_hover = $row["dashboard_number_text_color_hover"]; + $dashboard_number_background_color = $row["dashboard_number_background_color"]; $dashboard_background_color = $row["dashboard_background_color"]; $dashboard_background_color_hover = $row["dashboard_background_color_hover"]; $dashboard_detail_background_color = $row["dashboard_detail_background_color"]; @@ -650,9 +662,21 @@ else { echo " "; } + echo $text['description-dashboard_icon']."\n"; echo " "; echo " "; + echo "\n"; + echo "\n"; + echo $text['label-dashboard_icon_color']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dashboard_icon_color']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-link']."\n"; @@ -704,10 +728,7 @@ echo "\n"; } - if ( - $action == "add" || - $dashboard_path == "dashboard/content" - ) { + if ($action == "add" || $dashboard_path == "dashboard/content") { echo "\n"; echo "\n"; echo " ".$text['label-content']."\n"; @@ -734,11 +755,7 @@ echo "\n"; } - if ( - $action == "add" || - $dashboard_path == "dashboard/content" || - $dashboard_path == "dashboard/icon" - ) { + if ($action == "add" || $dashboard_path == "dashboard/content" || $dashboard_path == "dashboard/icon") { echo "\n"; echo "\n"; echo " ".$text['label-details']."\n"; @@ -793,8 +810,7 @@ echo "\n"; echo "\n"; - if ( - $dashboard_path == "voicemails/voicemails" || + if ($dashboard_path == "voicemails/voicemails" || $dashboard_path == "xml_cdr/missed_calls" || $dashboard_path == "xml_cdr/recent_calls" || $dashboard_path == "system/system_status" || @@ -808,8 +824,7 @@ $dashboard_path == "registrations/registrations" || $dashboard_path == "domains/domains" || $dashboard_path == "extensions/caller_id" || - $dashboard_path == "maintenance/maintenance" - ) { + $dashboard_path == "maintenance/maintenance") { echo "\n"; echo "\n"; echo $text['label-dashboard_chart_type']."\n"; @@ -900,18 +915,18 @@ echo "\n"; } - echo "\n"; - echo "\n"; - echo $text['label-dashboard_number_text_color']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-dashboard_number_text_color']."\n"; - echo "\n"; - echo "\n"; + if ($dashboard_path != "dashboard/icon") { + echo "\n"; + echo "\n"; + echo $text['label-dashboard_number_text_color']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dashboard_number_text_color']."\n"; + echo "\n"; + echo "\n"; - if ($action == "add" || $dashboard_path == "dashboard/icon") { echo "\n"; echo "\n"; echo $text['label-dashboard_number_text_color_hover']."\n"; @@ -923,6 +938,19 @@ echo "\n"; echo "\n"; } + + if ($dashboard_chart_type == "icon") { + echo "\n"; + echo "\n"; + echo $text['label-dashboard_number_background_color']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dashboard_number_background_color']."\n"; + echo "\n"; + echo "\n"; + } echo "\n"; echo "\n"; diff --git a/core/dashboard/index.php b/core/dashboard/index.php index f58b4da2b3..c9b92880dc 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -78,6 +78,7 @@ $sql .= "dashboard_name, "; $sql .= "dashboard_path, "; $sql .= "dashboard_icon, "; + $sql .= "dashboard_icon_color, "; $sql .= "dashboard_url, "; $sql .= "dashboard_target, "; $sql .= "dashboard_width, "; @@ -93,6 +94,7 @@ $sql .= "dashboard_label_background_color_hover, "; $sql .= "dashboard_number_text_color, "; $sql .= "dashboard_number_text_color_hover, "; + $sql .= "dashboard_number_background_color, "; $sql .= "dashboard_background_color, "; $sql .= "dashboard_background_color_hover, "; $sql .= "dashboard_detail_background_color, "; @@ -263,6 +265,11 @@ div.hud_chart { 0 || substr_count($subcategory, '_key') > 0 || substr_count($subcategory, '_secret') > 0) { - echo " ".str_repeat('*', strlen($row['default_setting_value'] ?? '')); + echo " ".str_repeat('*', 10); //use the same number of characters to mask the password length } else if ($category == 'theme' && $subcategory == 'button_icons' && $name == 'text') { echo " ".$text['option-button_icons_'.$row['default_setting_value']]."\n"; diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index 98f776ad8b..80b8395569 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -155,7 +155,7 @@ unset($sql, $parameters); //update the timezone - $p = new permissions; + $p = permissions::new(); if ($detail_action == "update") { $array['dialplan_details'][0]['dialplan_detail_uuid'] = $dialplan_detail_uuid; $array['dialplan_details'][0]['dialplan_detail_data'] = 'timezone='.$domain_setting_value; @@ -280,7 +280,7 @@ $array['dialplan_details'][0]['dialplan_detail_group'] = $dialplan_detail_group; $array['dialplan_details'][0]['dialplan_detail_order'] = '15'; - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_add', 'temp'); } @@ -289,7 +289,7 @@ $array['dialplan_details'][0]['dialplan_detail_uuid'] = $dialplan_detail_uuid; $array['dialplan_details'][0]['dialplan_detail_data'] = 'timezone='.$domain_setting_value; - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_edit', 'temp'); } diff --git a/core/domains/resources/dashboard/config.php b/core/domains/resources/dashboard/config.php index 16ec86f112..ef2b1df3b3 100644 --- a/core/domains/resources/dashboard/config.php +++ b/core/domains/resources/dashboard/config.php @@ -5,6 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'c41e7619-e213-49fd-a82f-df8fb8c46ad $array['dashboard'][$x]['dashboard_name'] = 'Domains'; $array['dashboard'][$x]['dashboard_path'] = 'domains/domains.php'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-earth-americas'; +$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard'][$x]['dashboard_url'] = '/core/domains/domains.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; @@ -18,9 +19,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; -$array['dashboard'][$x]['dashboard_number_background_color'] = ''; -$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf'; +$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; +$array['dashboard'][$x]['dashboard_number_background_color'] = '#0292FF'; $array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = ''; diff --git a/core/domains/resources/dashboard/domains.php b/core/domains/resources/dashboard/domains.php index 6b35a3e7b4..190ebb6cd0 100644 --- a/core/domains/resources/dashboard/domains.php +++ b/core/domains/resources/dashboard/domains.php @@ -37,7 +37,7 @@ echo " ".escape($dashboard_label).""; echo "
\n"; echo " \n"; - echo " ".$domain_count."\n"; + echo " ".$domain_count."\n"; echo "
\n"; echo " \n"; if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { @@ -46,4 +46,4 @@ echo " "; echo "\n"; -?> \ No newline at end of file +?> diff --git a/core/groups/group_member_add.php b/core/groups/group_member_add.php index b21269d25e..98b4b310d4 100644 --- a/core/groups/group_member_add.php +++ b/core/groups/group_member_add.php @@ -68,7 +68,7 @@ $array['user_groups'][0]['group_name'] = $group_name; $array['user_groups'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('user_group_add', 'temp'); $database->app_name = 'groups'; diff --git a/core/groups/permissions_copy.php b/core/groups/permissions_copy.php index 9236524cce..c017b1321b 100644 --- a/core/groups/permissions_copy.php +++ b/core/groups/permissions_copy.php @@ -113,7 +113,7 @@ } if (is_array($array) && sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('group_permission_add', 'temp'); //execute insert diff --git a/core/groups/resources/classes/permission.php b/core/groups/resources/classes/permission.php index 45578b78f5..779a176048 100644 --- a/core/groups/resources/classes/permission.php +++ b/core/groups/resources/classes/permission.php @@ -95,7 +95,7 @@ } if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('group_permission_delete', 'temp'); //execute delete $database = new database; @@ -185,7 +185,7 @@ if (is_array($array) && @sizeof($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('group_permission_add', 'temp'); //execute insert diff --git a/core/install/install.php b/core/install/install.php index 66099f5653..78b77825c0 100644 --- a/core/install/install.php +++ b/core/install/install.php @@ -205,7 +205,7 @@ //if the domain name does not exist then add the domain name if (!$domain_exists) { //add the domain permission - $p = new permissions; + $p = permissions::new(); $p->add("domain_add", "temp"); //prepare the array @@ -271,7 +271,7 @@ unset($parameters); //add the user permission - $p = new permissions; + $p = permissions::new(); $p->add("user_add", "temp"); $p->add("user_edit", "temp"); $p->add("user_group_add", "temp"); diff --git a/core/notifications/app_defaults.php b/core/notifications/app_defaults.php index e379565697..27e2e818b1 100644 --- a/core/notifications/app_defaults.php +++ b/core/notifications/app_defaults.php @@ -36,7 +36,7 @@ if ($domains_processed == 1) { // $array['notifications'][0]['notification_uuid'] = uuid(); // $array['notifications'][0]['project_notifications'] = 'false'; // //grant temporary permissions - // $p = new permissions; + // $p = permissions::new(); // $p->add('notification_add', 'temp'); // //execute insert // $database->app_name = 'notifications'; diff --git a/core/permissions/app_defaults.php b/core/permissions/app_defaults.php index 23d1113aec..b3e8fac14f 100644 --- a/core/permissions/app_defaults.php +++ b/core/permissions/app_defaults.php @@ -45,7 +45,7 @@ if ($domains_processed == 1) { //save the data to the database if (!empty($array)) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('permission_add', 'temp'); //execute insert diff --git a/core/software/app_defaults.php b/core/software/app_defaults.php index 15cb2bf3e5..62e7965bc6 100644 --- a/core/software/app_defaults.php +++ b/core/software/app_defaults.php @@ -46,7 +46,7 @@ if ($domains_processed == 1) { //save the data in the array if (!empty($array)) { //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("software_add", 'temp'); $p->add("software_edit", 'temp'); diff --git a/core/user_logs/resources/classes/user_logs.php b/core/user_logs/resources/classes/user_logs.php index c690b1a32a..041603f66f 100644 --- a/core/user_logs/resources/classes/user_logs.php +++ b/core/user_logs/resources/classes/user_logs.php @@ -84,7 +84,7 @@ if (!class_exists('user_logs')) { } //add the dialplan permission - $p = new permissions; + $p = permissions::new(); $p->add("user_log_add", 'temp'); //save to the data diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php index 4696c4c95b..b480be6f05 100644 --- a/core/user_settings/user_setting_edit.php +++ b/core/user_settings/user_setting_edit.php @@ -156,14 +156,14 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { //update the timezone if ($detail_action == "update") { - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_edit', 'temp'); $array['dialplan_details'][0]['dialplan_detail_uuid'] = $dialplan_detail_uuid; $array['dialplan_details'][0]['dialplan_detail_data'] = 'timezone='.$user_setting_value; } else { - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_add', 'temp'); $array['dialplan_details'][0]['domain_uuid'] = $domain_uuid; @@ -266,7 +266,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { $array['dialplan_details'][0]['dialplan_detail_group'] = !empty($dialplan_detail_group) ? $dialplan_detail_group : 'null'; $array['dialplan_details'][0]['dialplan_detail_order'] = '15'; - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_add', 'temp'); $database->app_name = 'user_settings'; @@ -284,7 +284,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { $array['dialplan_details'][0]['domain_uuid'] = $_SESSION["domain_uuid"]; $array['dialplan_details'][0]['dialplan_uuid'] = $dialplan_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('dialplan_detail_edit', 'temp'); $database->app_name = 'user_settings'; diff --git a/core/user_settings/user_setting_set.php b/core/user_settings/user_setting_set.php index 2c8361f6b4..90dc47ed26 100644 --- a/core/user_settings/user_setting_set.php +++ b/core/user_settings/user_setting_set.php @@ -97,7 +97,7 @@ Mark J Crane $array['user_settings'][0]['user_uuid'] = $_SESSION['user_uuid']; $array['user_settings'][0]['domain_uuid'] = $_SESSION['domain_uuid']; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_delete', 'temp'); //execute $database->app_name = 'user_settings'; @@ -132,7 +132,7 @@ Mark J Crane $array['user_settings'][0]['user_setting_enabled'] = $user_setting_enabled; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_add', 'temp'); $p->add('user_setting_edit', 'temp'); diff --git a/core/users/app_defaults.php b/core/users/app_defaults.php index a061e6587d..75c00a25c1 100644 --- a/core/users/app_defaults.php +++ b/core/users/app_defaults.php @@ -151,7 +151,7 @@ if ($domains_processed == 1) { $array['default_settings'][$x]['default_setting_subcategory'] = "password_special"; //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("default_setting_edit", 'temp'); //save to the data @@ -200,7 +200,7 @@ if ($domains_processed == 1) { $x++; //add the temporary permission - $p = new permissions; + $p = permissions::new(); $p->add("email_template_add", 'temp'); $p->add("email_template_edit", 'temp'); diff --git a/core/users/resources/classes/users.php b/core/users/resources/classes/users.php index 6f1589da9f..734ce273d9 100644 --- a/core/users/resources/classes/users.php +++ b/core/users/resources/classes/users.php @@ -130,7 +130,7 @@ if (!class_exists('users')) { //delete the checked rows if (is_array($array) && @sizeof($array) != 0) { //execute - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_delete', 'temp'); $p->add('user_group_delete', 'temp'); diff --git a/core/users/user_edit.php b/core/users/user_edit.php index 4e7c8914ee..71813680bc 100644 --- a/core/users/user_edit.php +++ b/core/users/user_edit.php @@ -88,7 +88,7 @@ $array['user_groups'][0]['group_uuid'] = $group_uuid; $array['user_groups'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('user_group_delete', 'temp'); $database->delete($array); @@ -297,7 +297,7 @@ $array_delete['user_settings'][0]['user_setting_subcategory'] = 'language'; $array_delete['user_settings'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_delete', 'temp'); $database->delete($array_delete); @@ -345,7 +345,7 @@ $array_delete['user_settings'][0]['user_setting_subcategory'] = 'time_zone'; $array_delete['user_settings'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_delete', 'temp'); $database->delete($array_delete); @@ -394,7 +394,7 @@ $array_delete['user_settings'][0]['user_setting_subcategory'] = 'key'; $array_delete['user_settings'][0]['user_uuid'] = $user_uuid; - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_delete', 'temp'); $database->delete($array_delete); @@ -555,7 +555,7 @@ $x++; //add the user_edit permission - $p = new permissions; + $p = permissions::new(); $p->add("user_setting_add", "temp"); $p->add("user_setting_edit", "temp"); $p->add("user_edit", "temp"); diff --git a/logout.php b/logout.php index 176edd78ae..108163ef28 100644 --- a/logout.php +++ b/logout.php @@ -89,7 +89,7 @@ $array['user_settings'][0]['user_setting_value'] = $referrer; $array['user_settings'][0]['user_setting_enabled'] = 'true'; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('user_setting_add', 'temp'); //execute insert $database = new database; diff --git a/resources/classes/directory.php b/resources/classes/directory.php index c000e60df3..fc1574aea0 100644 --- a/resources/classes/directory.php +++ b/resources/classes/directory.php @@ -179,7 +179,7 @@ $array['extensions'][0]['description'] = $description; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_add', 'temp'); //execute insert @@ -282,7 +282,7 @@ $array['extensions'][0]['description'] = $description; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_edit', 'temp'); //execute insert @@ -304,7 +304,7 @@ $array['extensions'][0]['extension_uuid'] = $extension_uuid; $array['extensions'][0]['domain_uuid'] = $domain_uuid; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('extension_delete', 'temp'); //execute delete $database = new database; diff --git a/resources/classes/domains.php b/resources/classes/domains.php index 8d3fd4c643..2875616cdd 100644 --- a/resources/classes/domains.php +++ b/resources/classes/domains.php @@ -707,7 +707,7 @@ if (!class_exists('domains')) { //add the missing default settings if (isset($array) && is_array($array) && count($array) > 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('default_setting_add', 'temp'); //execute insert diff --git a/resources/classes/email.php b/resources/classes/email.php index 18ebc9b64b..81cf026dd3 100644 --- a/resources/classes/email.php +++ b/resources/classes/email.php @@ -335,7 +335,7 @@ if (!class_exists('email')) { } //add temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("email_queue_add", 'temp'); $p->add("email_queue_attachment_add", 'temp'); diff --git a/resources/classes/groups.php b/resources/classes/groups.php index 430110d914..2bf85c4e63 100644 --- a/resources/classes/groups.php +++ b/resources/classes/groups.php @@ -141,7 +141,7 @@ if (!class_exists('groups')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('group_permission_delete', 'temp'); //execute delete @@ -193,7 +193,7 @@ if (!class_exists('groups')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('user_group_delete', 'temp'); //execute delete @@ -437,7 +437,7 @@ if (!class_exists('groups')) { $group_uuids[$array['groups'][$x]['group_name']] = $array['groups'][$x]['group_uuid']; //add the temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("group_add", "temp"); $p->add("group_edit", "temp"); @@ -482,7 +482,7 @@ if (!class_exists('groups')) { unset($group_uuids); //add the temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add("group_permission_add", "temp"); $p->add("group_permission_edit", "temp"); diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 3ab7b1372f..194956d409 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -142,7 +142,7 @@ if (!class_exists('menu')) { //delete the checked rows if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('menu_item_delete', 'temp'); $p->add('menu_item_group_delete', 'temp'); $p->add('menu_language_delete', 'temp'); @@ -223,7 +223,7 @@ if (!class_exists('menu')) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('menu_language_delete', 'temp'); $p->add('menu_item_group_delete', 'temp'); @@ -507,7 +507,7 @@ if (!class_exists('menu')) { } if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('menu_item_add', 'temp'); $p->add('menu_language_add', 'temp'); //execute insert @@ -572,7 +572,7 @@ if (!class_exists('menu')) { if (is_array($array) && @sizeof($array) != 0) { //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('menu_item_group_add', 'temp'); //execute insert $this->database->app_name = 'menu'; @@ -901,7 +901,7 @@ if (!class_exists('menu')) { $array['menus'][0]['menu_description'] = 'Default Menu'; //grant temporary permissions - $p = new permissions; + $p = permissions::new(); $p->add('menu_add', 'temp'); //execute insert @@ -1082,7 +1082,7 @@ if (!class_exists('menu')) { $user_graphic = ""; //overwrite user graphic with image from session, if exists if ($this->settings->get('theme', 'body_header_user_image', true) == true && !empty($_SESSION['user']['contact_image']) && is_uuid($_SESSION['user']['contact_image'])) { - $user_graphic = ""; + $user_graphic = ""; } $html .= "