Merge branch 'fusionpbx:master' into master

This commit is contained in:
Norman King 2024-12-13 10:35:25 -05:00 committed by GitHub
commit bf53194087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
178 changed files with 1419 additions and 889 deletions

View File

@ -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';

View File

@ -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

View File

@ -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

View File

@ -166,7 +166,7 @@
$array['dialplans'][$index]['dialplan_enabled'] = 'true';
}
$p = new permissions;
$p = permissions::new();
$p->add('dialplan_edit', 'temp');
$database->save($array);

View File

@ -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

View File

@ -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++;
?>

View File

@ -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");

View File

@ -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;

View File

@ -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");

View File

@ -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');

View File

@ -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");

View File

@ -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

View File

@ -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 "<div class='action_bar sub'>\n";

View File

@ -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 "<form method='post' name='frm' id='frm'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-call_forward']."</b></div>\n";
echo " <div class='actions'>\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 " </div>\n";
echo " <div style='clear: both;'></div>\n";

View File

@ -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

View File

@ -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

View File

@ -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');

View File

@ -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'] = '';

View File

@ -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

View File

@ -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'] = "استخدم هذا لعرض جميع الملحقات ومراقبة المكالمات النشطة والتفاعل معها.";

View File

@ -88,10 +88,8 @@
}
$num_rows = @sizeof($rows);
//if the connnection is available then run it and return the results
if (!$event_socket) {
$msg = "<div align='center'>".$text['confirm-socket']."<br /></div>";
echo "<div align='center'>\n";
echo "<table width='40%'>\n";
@ -103,172 +101,203 @@
echo "</tr>\n";
echo "</table>\n";
echo "</div>\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 "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo " <span id='refresh_state'>".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()'])."</span>";
if (permission_exists('call_active_eavesdrop') && !empty($_SESSION['user']['extensions'])) {
if (sizeof($_SESSION['user']['extensions']) > 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".(($_REQUEST['eavesdrop_dest'] == '') ? $_SESSION['user']['extension'][0]['destination'] : escape($_REQUEST['eavesdrop_dest']))."\">\n";
echo " <i class='fas fa-headphones' style='margin-left: 15px; cursor: help;' title='".$text['description-eavesdrop_destination']."' align='absmiddle'></i>\n";
echo " <select class='formfld' style='margin-right: 5px;' align='absmiddle' onchange=\"document.getElementById('eavesdrop_dest').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
if (is_array($_SESSION['user']['extensions'])) {
foreach ($_SESSION['user']['extensions'] as $user_extension) {
echo " <option value='".escape($user_extension)."' ".(($_REQUEST['eavesdrop_dest'] == $user_extension) ? "selected" : null).">".escape($user_extension)."</option>\n";
}
//add the style
echo "<style>\n";
echo " /* Small screens: Hide columns with class 'hide-small' */\n";
echo " @media (max-width: 600px) {\n";
echo " .hide-small {\n";
echo " display: none;\n";
echo " }\n";
echo " }\n";
echo "\n";
echo " /* Medium screens: Hide columns with class 'hide-medium' */\n";
echo "@media (max-width: 1023px) and (min-width: 601px) {\n";
echo " .hide-medium {\n";
echo " display: none;\n";
echo " }\n";
echo " }\n";
echo "\n";
echo "</style>\n";
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo " <span id='refresh_state'>".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()'])."</span>";
if (permission_exists('call_active_eavesdrop') && !empty($_SESSION['user']['extensions'])) {
if (sizeof($_SESSION['user']['extensions']) > 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".(($_REQUEST['eavesdrop_dest'] == '') ? $_SESSION['user']['extension'][0]['destination'] : escape($_REQUEST['eavesdrop_dest']))."\">\n";
echo " <i class='fas fa-headphones' style='margin-left: 15px; cursor: help;' title='".$text['description-eavesdrop_destination']."' align='absmiddle'></i>\n";
echo " <select class='formfld' style='margin-right: 5px;' align='absmiddle' onchange=\"document.getElementById('eavesdrop_dest').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
if (is_array($_SESSION['user']['extensions'])) {
foreach ($_SESSION['user']['extensions'] as $user_extension) {
echo " <option value='".escape($user_extension)."' ".(($_REQUEST['eavesdrop_dest'] == $user_extension) ? "selected" : null).">".escape($user_extension)."</option>\n";
}
}
echo " </select>\n";
}
else if (sizeof($_SESSION['user']['extensions']) == 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".escape($_SESSION['user']['extension'][0]['destination'])."\">\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 " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\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 "<br /><br />\n";
//show the results
echo "<div id='cmd_reponse'></div>\n";
echo "<form id='form_list' method='post' action='calls_exec.php'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<div class='card'>\n";
echo " <table class='list'>\n";
echo " <tr class='list-header'>\n";
if (permission_exists('call_active_hangup')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
}
echo " <th class='hide-small'>".$text['label-profile']."</th>\n";
//echo" <th>".$text['label-created']."</th>\n";
echo " <th>".$text['label-duration']."</th>\n";
if ($show == 'all') {
echo " <th>".$text['label-domain']."</th>\n";
}
//echo " <th>".$text['label-number']."</th>\n";
echo " <th class='hide-small'>".$text['label-cid-name']."</th>\n";
echo " <th>".$text['label-cid-number']."</th>\n";
echo " <th>".$text['label-destination']."</th>\n";
echo " <th class='hide-small hide-medium'>".$text['label-app']."</th>\n";
echo " <th class='hide-small hide-medium'>".$text['label-codec']."</th>\n";
echo " <th class='hide-small hide-medium'>".$text['label-secure']."</th>\n";
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <th>&nbsp;</th>\n";
}
echo " </tr>\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 " </select>\n";
}
else if (sizeof($_SESSION['user']['extensions']) == 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".escape($_SESSION['user']['extension'][0]['destination'])."\">\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 " <tr class='list-row'>\n";
if (permission_exists('call_active_hangup')) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='calls[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (this.checked) { refresh_stop(); } else { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n";
echo " </td>\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 " <td class='hide-small'>".escape($sip_profile)."&nbsp;</td>\n";
//echo " <td>".escape($created)."&nbsp;</td>\n";
echo " <td>".escape($elapsed_time)."</td>\n";
if ($show == 'all') {
echo " <td>".escape($domain_name)."&nbsp;</td>\n";
}
}
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\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 "<br /><br />\n";
//show the results
echo "<div id='cmd_reponse'></div>\n";
echo "<form id='form_list' method='post' action='calls_exec.php'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('call_active_hangup')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
}
echo " <th>".$text['label-profile']."</th>\n";
echo " <th>".$text['label-created']."</th>\n";
if ($show == 'all') {
echo " <th>".$text['label-domain']."</th>\n";
}
echo " <th>".$text['label-number']."</th>\n";
echo " <th>".$text['label-cid-name']."</th>\n";
echo " <th>".$text['label-cid-number']."</th>\n";
echo " <th>".$text['label-destination']."</th>\n";
echo " <th>".$text['label-app']."</th>\n";
echo " <th>".$text['label-codec']."</th>\n";
echo " <th>".$text['label-secure']."</th>\n";
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <th>&nbsp;</th>\n";
}
echo "</tr>\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 "<tr class='list-row'>\n";
if (permission_exists('call_active_hangup')) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='calls[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (this.checked) { refresh_stop(); } else { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n";
echo " </td>\n";
}
echo " <td>".escape($sip_profile)."&nbsp;</td>\n";
echo " <td>".escape($created)."&nbsp;</td>\n";
if ($show == 'all') {
echo " <td>".escape($domain_name)."&nbsp;</td>\n";
}
echo " <td>".escape($tmp_number)."&nbsp;</td>\n";
echo " <td>".escape($cid_name)."&nbsp;</td>\n";
echo " <td>".escape($cid_num)."&nbsp;</td>\n";
echo " <td>".escape($dest)."&nbsp;</td>\n";
echo " <td>".(!empty($application) ? escape($application).":".escape($application_data) : null)."&nbsp;</td>\n";
echo " <td>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)."&nbsp;</td>\n";
echo " <td>".escape($secure)."&nbsp;</td>\n";
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <td class='button right' style='padding-right: 0;'>\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 "</td>\n";
}
echo "</tr>\n";
//unset the domain name
unset($domain_name);
//increment counter
$x++;
//echo " <td>".escape($tmp_number)."&nbsp;</td>\n";
echo " <td class='hide-small'>".escape($cid_name)."&nbsp;</td>\n";
echo " <td>".escape($cid_num)."&nbsp;</td>\n";
echo " <td>".escape($dest)."&nbsp;</td>\n";
echo " <td class='hide-small hide-medium' style='max-width: 200px; word-wrap: break-word;'>".(!empty($application) ? escape($application).":".escape($application_data) : null)."&nbsp;</td>\n";
echo " <td class='hide-small hide-medium'>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)."&nbsp;</td>\n";
echo " <td class='hide-small hide-medium'>".escape($secure)."&nbsp;</td>\n";
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <td class='button right' style='padding-right: 0;'>\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 " </td>\n";
}
unset($rows);
}
echo " </tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//unset the domain name
unset($domain_name);
//increment counter
$x++;
}
}
echo " </table>\n";
echo "</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
?>

View File

@ -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++;
?>

View File

@ -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");

View File

@ -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';

View File

@ -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

View File

@ -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'] = '';

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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

View File

@ -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');

View File

@ -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');

View File

@ -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'] = '';

View File

@ -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';

View File

@ -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

View File

@ -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'] = "إذا كنت تستخدم تطبيق فواتير الدمج، تأكد من إضافة رمز الحساب والمتغيرات الناقلة.";

View File

@ -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 "</tr>\n";
}
//destination email
if (permission_exists('destination_email') && permission_exists('message_view')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destination_email']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='destination_email'>\n";
echo " <option value=''></option>\n";
if (!empty($destination_email) && $destination_email == "true") {
echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
if (!empty($destination_email) && $destination_email == "false") {
echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['option-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-destination_email']."\n";
echo "</td>\n";
echo "</tr>\n";
}
//users
if (permission_exists('user_edit')) {
echo "<tr id='tr_user'>\n";

View File

@ -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');

View File

@ -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'] = '';

View File

@ -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');

View File

@ -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;

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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;

View File

@ -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");

View File

@ -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');

View File

@ -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

3
app/email_queue/resources/jobs/email_queue.php Normal file → Executable file
View File

@ -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

23
app/email_queue/resources/jobs/email_send.php Normal file → Executable file
View File

@ -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);

View File

@ -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;

View File

@ -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');

View File

@ -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'] = '';

View File

@ -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';

View File

@ -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);

View File

@ -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") {

View File

@ -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

View File

@ -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

View File

@ -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'] = '';

View File

@ -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');

View File

@ -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');

View File

@ -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;

View File

@ -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');
}

View File

@ -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

View File

@ -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');

View File

@ -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'] = '';

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -242,7 +242,7 @@
}
//add the dialplan permission
$p = new permissions;
$p = permissions::new();
$p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp");

View File

@ -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

View File

@ -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';

View File

@ -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");

View File

@ -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");
}

View File

@ -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');

View File

@ -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'] = '';

View File

@ -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;

View File

@ -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';

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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';

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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");

View File

@ -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

View File

@ -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';

View File

@ -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'] = '';

View File

@ -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'] = '';

View File

@ -59,7 +59,7 @@
echo " <span class='hud_title' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\">".escape($dashboard_label)."</span>";
echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\"><i class=\"fas ".$dashboard_icon."\"></i></span>\n";
echo " <span style=\"background-color: #5d5ce3; color: #ffffff; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$active_registrations." / ".($active_registrations + $inactive_registrations)."</span>\n";
echo " <span style=\"background-color: ".($row['dashboard_number_background_color'] ?? '#5d5ce3')."; color: ".($row['dashboard_number_text_color'] ?? '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$active_registrations." / ".($active_registrations + $inactive_registrations)."</span>\n";
echo " </div>\n";
echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") {

View File

@ -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';

View File

@ -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");

View File

@ -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'] = '';

View File

@ -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';

View File

@ -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");

View File

@ -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

View File

@ -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');

View File

@ -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');

Some files were not shown because too many files have changed in this diff Show More