Merge branch 'fusionpbx:master' into master

This commit is contained in:
n0obHere 2025-03-14 12:04:37 -04:00 committed by GitHub
commit 67d9d36eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
243 changed files with 1524 additions and 1359 deletions

View File

@ -2,11 +2,7 @@
/**
* access controls class
*
* @method null download
*/
if (!class_exists('access_controls')) {
class access_controls {
/**
@ -264,6 +260,3 @@ if (!class_exists('access_controls')) {
}
}
}
}
?>

View File

@ -27,7 +27,6 @@
/**
* Define the operator_panel class
*/
if (!class_exists('basic_operator_panel')) {
class basic_operator_panel {
/**
@ -245,6 +244,3 @@ if (!class_exists('basic_operator_panel')) {
return $result;
}
}
}
?>

View File

@ -353,7 +353,7 @@ if (is_array($activity)) {
}
else {
//unregistered extension
if (!empty($_SESSION['operator_panel']['show_unregistered']['boolean']) && $_SESSION['operator_panel']['show_unregistered']['boolean'] == 'true') {
if (filter_var($_SESSION['operator_panel']['show_unregistered']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
$css_class = "ur_ext";
}
else {
@ -551,7 +551,7 @@ if (is_array($activity)) {
if (in_array($extension, $_SESSION['user']['extensions'])) {
$user_extensions[] = $block;
} elseif (!empty($ext['call_group']) && filter_var($_SESSION['operator_panel']['group_extensions']['boolean'], FILTER_VALIDATE_BOOLEAN)) {
} elseif (!empty($ext['call_group']) && filter_var($_SESSION['operator_panel']['group_extensions']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) {
$grouped_extensions[$ext['call_group']][] = $block;
} else {
$other_extensions[] = $block;

View File

@ -47,7 +47,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['bridges'])) {
@ -226,7 +226,7 @@
echo th_order_by('bridge_destination', $text['label-bridge_destination'], $order_by, $order);
echo th_order_by('bridge_enabled', $text['label-bridge_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-bridge_description']."</th>\n";
if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
if (permission_exists('bridge_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -270,7 +270,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['bridge_description'])."</td>\n";
if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
if (permission_exists('bridge_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the bridges class
if (!class_exists('bridges')) {
class bridges {
/**
@ -255,6 +254,3 @@ if (!class_exists('bridges')) {
}
}
}
?>

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get posted data
if (!empty($_POST['call_blocks'])) {
@ -301,7 +301,7 @@
echo th_order_by('call_block_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('insert_date', $text['label-date-added'], $order_by, $order, null, "class='shrink no-wrap'");
echo "<th class='hide-md-dn pct-20'>".$text['label-description']."</th>\n";
if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_block_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -385,7 +385,7 @@
echo " </td>\n";
echo " <td class='no-wrap'>".$row['date_formatted']." <span class='hide-sm-dn'>".$row['time_formatted']."</span></td>\n";
echo " <td class='description overflow hide-md-dn'>".escape($row['call_block_description'])."</td>\n";
if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_block_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -674,6 +674,8 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
}
echo "<div class='card'>\n";
foreach (['inbound','outbound'] as $direction) {
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
echo "<tr class='list-header'>\n";
@ -754,6 +756,8 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "</table>\n";
}
echo "</div>\n";
echo "<br />\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";

View File

@ -2,10 +2,7 @@
/**
* call block class
*
* @method null download
*/
if (!class_exists('call_block')) {
class call_block {
/**
@ -459,6 +456,3 @@ if (!class_exists('call_block')) {
} //method
} //class
}
?>

View File

@ -47,7 +47,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get posted data
if (!empty($_POST['call_broadcasts'])) {
@ -219,7 +219,7 @@
echo th_order_by('broadcast_concurrent_limit', $text['label-concurrent-limit'], $order_by, $order);
echo th_order_by('broadcast_start_time', $text['label-start_time'], $order_by, $order);
echo th_order_by('broadcast_description', $text['label-description'], $order_by, $order);
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -266,7 +266,7 @@
}
echo " <td>".escape($broadcast_start_time ?? '')."</td>\n";
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</td>\n";
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -27,10 +27,7 @@
/**
* call broadcast class
*
* @method null download
*/
if (!class_exists('call_broadcast')) {
class call_broadcast {
/**
@ -177,6 +174,3 @@ if (!class_exists('call_broadcast')) {
}
}
}
?>

View File

@ -43,7 +43,7 @@
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get posted data
if (!empty($_POST['call_center_agents'])) {
@ -206,7 +206,7 @@
//echo th_order_by('agent_wrap_up_time', $text['label-wrap_up_time'], $order_by, $order);
//echo th_order_by('agent_reject_delay_time', $text['label-reject_delay_time'], $order_by, $order);
//echo th_order_by('agent_busy_delay_time', $text['label-busy_delay_time'], $order_by, $order);
if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -270,7 +270,7 @@
//echo " <td>".$row[agent_wrap_up_time]."</td>\n";
//echo " <td>".$row[agent_reject_delay_time]."</td>\n";
//echo " <td>".$row[agent_busy_delay_time]."</td>\n";
if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get posted data
if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) {
@ -219,7 +219,7 @@
//echo th_order_by('queue_abandoned_resume_allowed', $text['label-abandoned_resume_allowed'], $order_by, $order);
//echo th_order_by('queue_tier_rule_wait_multiply_level', $text['label-tier_rule_wait_multiply_level'], $order_by, $order);
echo th_order_by('queue_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_center_queue_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -273,7 +273,7 @@
//echo " <td>".escape($row[queue_abandoned_resume_allowed])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])."&nbsp;</td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['queue_description'])."</td>\n";
if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_center_queue_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -26,11 +26,8 @@
/**
* cache class provides an abstracted cache
*
* @method string dialplan - builds the dialplan for call center
*/
//define the call center class
if (!class_exists('call_center')) {
class call_center {
/**
* define the variables
@ -611,7 +608,6 @@
} //method
} //class
}
/*
$o = new call_center;
@ -625,5 +621,3 @@ $c->destination_number = "";
$c->queue_cc_exit_keys = "";
$c->dialplan();
*/
?>

View File

@ -27,8 +27,7 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
//check permisions
@ -96,8 +95,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get search
$search = $_REQUEST['search'] ?? null;
@ -235,7 +235,7 @@
}
echo th_order_by('call_flow_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('call_flow_description', $text['label-call_flow_description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_flow_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -291,7 +291,7 @@
echo escape($row['call_flow_enabled']);
}
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])."&nbsp;</td>\n";
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
if (permission_exists('call_flow_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the call_flows class
if (!class_exists('call_flows')) {
class call_flows {
/**
@ -410,6 +409,3 @@ if (!class_exists('call_flows')) {
} //method
} //class
}
?>

View File

@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@ -96,8 +95,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -296,8 +296,8 @@
echo " <th>" . $text['label-dnd'] . "</th>\n";
}
echo " <th class='" . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . $text['label-description'] . "</th>\n";
$list_row_edit_button = $_SESSION['theme']['list_row_edit_button']['boolean'] ?? 'false';
if ( $list_row_edit_button === 'true') {
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
if ($list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -402,7 +402,7 @@
echo " </td>\n";
}
echo " <td class='description overflow " . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . escape($row['description']) . "&nbsp;</td>\n";
if ($list_row_edit_button === 'true') {
if ($list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type' => 'button', 'title' => $text['button-edit'], 'icon' => $_SESSION['theme']['button_icon_edit'], 'link' => $list_row_url]);
echo " </td>\n";

View File

@ -341,7 +341,7 @@
*/
//send feature event notify to the phone
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
$ring_count = ceil($call_timeout / 6);
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -358,7 +358,7 @@
else {
$feature_event_notify->forward_all_destination = $forward_all_destination;
}
if ($forward_busy_destination == "") {
$feature_event_notify->forward_busy_destination = "0";
}
@ -421,7 +421,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@ -504,7 +503,7 @@
}
//prepare the autocomplete
if(!empty($_SESSION['follow_me']['follow_me_autocomplete']['boolean']) && $_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
if(filter_var($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) {
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
echo "<script type=\"text/javascript\">\n";

View File

@ -227,7 +227,7 @@
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -248,7 +248,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);

View File

@ -240,7 +240,7 @@
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -261,7 +261,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);

View File

@ -405,7 +405,7 @@
$p->delete('follow_me_edit', 'temp');
//send feature event notify to the phone
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -426,7 +426,6 @@
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);

View File

@ -26,10 +26,7 @@
/**
* call_recordings class
*
* @method null download
*/
if (!class_exists('call_recordings')) {
class call_recordings {
/**
@ -525,6 +522,3 @@ if (!class_exists('call_recordings')) {
}
} //class
}
?>

View File

@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@ -84,8 +83,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -56,5 +56,16 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_active_all";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_active_profile";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_active_application";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_active_codec";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_active_secure";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
?>

View File

@ -198,19 +198,25 @@
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";
if (permission_exists('call_active_profile')) {
echo " <th class='hide-small'>".$text['label-profile']."</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_application')) {
echo " <th class='hide-small hide-medium'>".$text['label-app']."</th>\n";
}
if (permission_exists('call_active_codec')) {
echo " <th class='hide-small hide-medium'>".$text['label-codec']."</th>\n";
}
if (permission_exists('call_active_secure')) {
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";
}
@ -269,7 +275,9 @@
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n";
echo " </td>\n";
}
echo " <td class='hide-small'>".escape($sip_profile)."&nbsp;</td>\n";
if (permission_exists('call_active_profile')) {
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') {
@ -279,9 +287,15 @@
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_application')) {
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";
}
if (permission_exists('call_active_codec')) {
echo " <td class='hide-small hide-medium'>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)."&nbsp;</td>\n";
}
if (permission_exists('call_active_secure')) {
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

View File

@ -49,7 +49,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get posted data
if (!empty($_POST['conference_centers'])) {
@ -221,7 +221,7 @@
echo th_order_by('conference_center_pin_length', $text['label-conference_center_pin_length'], $order_by, $order, null, "class='center shrink'");
echo th_order_by('conference_center_enabled', $text['label-conference_center_enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('conference_center_description', $text['label-conference_center_description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('conference_center_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_center_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -266,7 +266,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_center_description'])."&nbsp;</td>\n";
if (permission_exists('conference_center_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_center_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -49,7 +49,7 @@
$search = $_GET["search"] ?? null;
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['conference_rooms'])) {
@ -300,7 +300,7 @@
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
}
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_room_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -490,7 +490,7 @@
}
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_room_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -45,7 +45,7 @@
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//set variables from the http values
$order_by = $_GET["order_by"] ?? '' ? $_GET["order_by"] : 'start_epoch';
@ -152,7 +152,7 @@
echo "<th>".$text['label-time']."</th>\n";
echo th_order_by('start_epoch', $text['label-start'], $order_by, $order);
echo th_order_by('end_epoch', $text['label-end'], $order_by, $order);
if (permission_exists('conference_session_details') && $list_row_edit_button == 'true') {
if (permission_exists('conference_session_details') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -191,7 +191,7 @@
echo " <td>".$time_difference."&nbsp;</td>\n";
echo " <td>".$start_date."&nbsp;</td>\n";
echo " <td>".$end_date."&nbsp;</td>\n";
if (permission_exists('conference_session_details') && $list_row_edit_button == 'true') {
if (permission_exists('conference_session_details') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -46,7 +46,7 @@
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['conference_sessions'])) {
@ -172,7 +172,7 @@
echo th_order_by('profile', $text['label-profile'], $order_by, $order);
//echo th_order_by('recording', $text['label-recording'], $order_by, $order);
echo "<th>".$text['label-tools']."</th>\n";
if ($list_row_edit_button == 'true') {
if ($list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -232,7 +232,7 @@
echo "</table>\n";
}
echo " </td>\n";
if ($list_row_edit_button == 'true') {
if ($list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -26,7 +26,6 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//define the conference centers class
if (!class_exists('conference_centers')) {
class conference_centers {
/**
@ -800,7 +799,7 @@ if (!class_exists('conference_centers')) {
} //class
}
//example conference center
/*
@ -814,5 +813,3 @@ if (!class_exists('conference_centers')) {
$result = $conference_center->rooms();
print_r($result);
*/
?>

View File

@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@ -96,8 +95,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -43,7 +43,7 @@
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['conference_control_details'])) {
@ -163,7 +163,7 @@
echo th_order_by('control_action', $text['label-control_action'], $order_by, $order, null, null, $param);
echo th_order_by('control_data', $text['label-control_data'], $order_by, $order, null, "class='pct-50 hide-xs'", $param);
echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order, null, "class='center'", $param);
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -200,7 +200,7 @@
echo $text['label-'.$row['control_enabled']];
}
echo " </td>\n";
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -43,7 +43,7 @@
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['conference_controls'])) {
@ -179,7 +179,7 @@
echo th_order_by('control_name', $text['label-control_name'], $order_by, $order);
echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order, null, "class='center shrink'");
echo " <th class='hide-sm-dn'>".$text['label-control_description']."</th>\n";
if (permission_exists('conference_control_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_control_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -215,7 +215,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['control_description'])."</td>\n";
if (permission_exists('conference_control_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_control_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -26,12 +26,7 @@
/**
* conference_controls class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('conference_controls')) {
class conference_controls {
/**
@ -426,6 +421,3 @@ if (!class_exists('conference_controls')) {
}
}
}
?>

View File

@ -43,7 +43,7 @@
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['conference_profile_params'])) {
@ -152,7 +152,7 @@
echo th_order_by('profile_param_value', $text['label-profile_param_value'], $order_by, $order, null, "class='pct-40'", $param);
echo th_order_by('profile_param_enabled', $text['label-profile_param_enabled'], $order_by, $order, null, "class='center'", $param);
echo th_order_by('profile_param_description', $text['label-profile_param_description'], $order_by, $order, null, "class='hide-sm-dn'", $param);
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -189,7 +189,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['profile_param_description'])."&nbsp;</td>\n";
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -45,7 +45,7 @@
$search = $_GET["search"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['conference_profiles'])) {
@ -175,7 +175,7 @@
echo th_order_by('profile_name', $text['label-profile_name'], $order_by, $order);
echo th_order_by('profile_enabled', $text['label-profile_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-profile_description']."</th>\n";
if (permission_exists('conference_profile_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_profile_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -211,7 +211,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['profile_description'])."</td>\n";
if (permission_exists('conference_profile_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_profile_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -26,12 +26,7 @@
/**
* conference_profiles class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('conference_profiles')) {
class conference_profiles {
/**
@ -432,6 +427,3 @@ if (!class_exists('conference_profiles')) {
}
}
}
?>

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get posted data
if (!empty($_POST['conferences'])) {
@ -223,7 +223,7 @@
echo "<th style='text-align: center;'>".$text['label-tools']."</th>\n";
echo th_order_by('conference_enabled', $text['table-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('conference_description', $text['table-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -281,7 +281,7 @@
echo $text['label-'.$row['conference_enabled']];
}
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_description'])."&nbsp;</td>\n";
if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
if (permission_exists('conference_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the conferences class
if (!class_exists('conferences')) {
class conferences {
/**
@ -374,6 +373,3 @@ if (!class_exists('conferences')) {
}
}
}
?>

View File

@ -144,7 +144,7 @@
echo " <td>".escape($conference_extension)."</td>\n";
echo " <td>".escape($participant_pin)."</td>\n";
echo " <td class='center'>".escape($member_count)."</td>\n";
if (permission_exists('conference_interactive_view') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('conference_interactive_view') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -51,7 +51,7 @@
$order = $_GET["order"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
$button_icon_view = !empty($_SESSION['theme']['button_icon_view']) ? $_SESSION['theme']['button_icon_view'] : '';
//add the user filter and search term
@ -187,7 +187,7 @@
echo th_order_by('transaction_address', $text['label-transaction_address'], $order_by, $order);
echo th_order_by('transaction_type', $text['label-transaction_type'], $order_by, $order);
echo th_order_by('transaction_date', $text['label-transaction_date'], $order_by, $order);
if (permission_exists('database_transaction_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
if (permission_exists('database_transaction_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -210,7 +210,7 @@
echo " <td>".escape($row['transaction_address'])."&nbsp;</td>\n";
echo " <td>".escape($row['transaction_type'])."&nbsp;</td>\n";
echo " <td>".escape($row['transaction_date'])."&nbsp;</td>\n";
if (permission_exists('database_transaction_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
if (permission_exists('database_transaction_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -1964,7 +1964,6 @@
echo " ".$text['label-destination_hold_music']."\n";
echo "</td>\n";
echo "<td width=\"70%\" class='vtable' align='left'>\n";
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$music_on_hold = new switch_music_on_hold;
echo $music_on_hold->select('destination_hold_music', $destination_hold_music, null);
echo " <br />\n";

View File

@ -334,7 +334,7 @@
$array["dialplans"][$row_id]["dialplan_xml"] .= "</extension>\n";
//dialplan details
if ($_SESSION['destinations']['dialplan_details']['boolean'] == "true") {
if (filter_var($_SESSION['destinations']['dialplan_details']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
//check the destination number
$array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;

View File

@ -141,7 +141,7 @@
$order = $_GET["order"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//prepare to page the results
$sql = "select count(*) from v_destinations ";
@ -365,7 +365,7 @@
}
echo th_order_by('destination_enabled', $text['label-destination_enabled'], $order_by, $order, $param);
echo th_order_by('destination_description', $text['label-destination_description'], $order_by, $order, $param, "class='hide-sm-dn'");
if (permission_exists('destination_edit') && $list_row_edit_button == 'true') {
if (permission_exists('destination_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -434,9 +434,9 @@
}
echo " <td>".escape($text['label-'.$row['destination_enabled']])."&nbsp;</td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['destination_description'])."&nbsp;</td>\n";
if (permission_exists('destination_edit') && $list_row_edit_button == 'true') {
if (permission_exists('destination_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$list_row_edit_button,'link'=>$list_row_url]);
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
}
echo "</tr>\n";

View File

@ -26,11 +26,7 @@
/**
* destinations
*
* @method get_array get the destinations
* @method select build the html select
*/
if (!class_exists('destinations')) {
class destinations {
/**
@ -455,26 +451,24 @@ if (!class_exists('destinations')) {
$destination_id = str_replace("[", "_", $destination_id);
//$destination_id = preg_replace('/[^a-zA-Z_,.]/', '', $destination_name);
?>
<script type="text/javascript">
function get_destinations(id, destination_type, action, search) {
//alert(action);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(id).innerHTML = this.responseText;
}
};
if (action) {
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type+"&action="+action, true);
}
else {
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type, true);
}
xhttp.send();
}
</script>
<?php
//send request for destinations
echo "<script type=\"text/javascript\">\n";
echo " function get_destinations(id, destination_type, action, search) {\n";
echo " var xhttp = new XMLHttpRequest();\n";
echo " xhttp.onreadystatechange = function() {\n";
echo " if (this.readyState == 4 && this.status == 200) {\n";
echo " document.getElementById(id).innerHTML = this.responseText;\n";
echo " }\n";
echo " };\n";
echo " if (action) {\n";
echo " xhttp.open(\"GET\", \"/app/destinations/resources/destinations.php?destination_type=\"+destination_type+\"&action=\"+action, true);\n";
echo " }\n";
echo " else {\n";
echo " xhttp.open(\"GET\", \"/app/destinations/resources/destinations.php?destination_type=\"+destination_type, true);\n";
echo " }\n";
echo " xhttp.send();\n";
echo " }\n";
echo "</script>\n";
//get the destinations
$destinations = $this->get($destination_type);
@ -1308,7 +1302,7 @@ if (!class_exists('destinations')) {
} //method
} //class
}
/*
$obj = new destinations;
//$destinations = $obj->destinations;
@ -1319,5 +1313,3 @@ echo $obj->select('ivr', 'example4', '');
echo $obj->select('ivr', 'example5', '');
echo $obj->select('ivr', 'example6', '');
*/
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2023
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -252,6 +252,7 @@
$x = 0;
foreach ($available_columns as $table_name => $columns) {
$table_name_label = ucwords(str_replace(['-','_',],' ', $table_name));
echo "<div class='card'>\n";
echo "<div class='category'>\n";
echo "<b>".$table_name_label."</b>\n";
echo "<br>\n";
@ -284,6 +285,7 @@
echo "</table>\n";
echo "<br>\n";
echo "</div>\n";
echo "</div>\n";
}
}

View File

@ -229,7 +229,7 @@
echo th_order_by('device_profile_name', $text['label-device_profile_name'], $order_by, $order);
echo th_order_by('device_profile_enabled', $text['label-device_profile_enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('device_profile_description', $text['label-device_profile_description'], $order_by, $order, null, "class='hide-xs'");
if (permission_exists('device_profile_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('device_profile_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -278,7 +278,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-xs'>".escape($row['device_profile_description'])."&nbsp;</td>\n";
if (permission_exists('device_profile_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('device_profile_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -176,7 +176,7 @@
echo "<th class='hide-sm-dn'>".$text['label-groups']."</th>\n";
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('device_vendor_function_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('device_vendor_function_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -256,7 +256,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
if (permission_exists('device_vendor_function_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('device_vendor_function_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -170,7 +170,7 @@
echo th_order_by('name', $text['label-name'], $order_by, $order);
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-xs'");
if (permission_exists('device_vendor_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('device_vendor_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -202,7 +202,7 @@
echo $text['label-'.$row['enabled']];
}
echo " <td class='description overflow hide-xs'>".escape($row['description'])."&nbsp;</td>\n";
if (permission_exists('device_vendor_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('device_vendor_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -1382,7 +1382,7 @@
//save the array
$this->database->app_name = $this->app_name;
$this->databasee->app_uuid = $this->app_uuid;
$this->database->app_uuid = $this->app_uuid;
$this->database->save($array);
unset($array);

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -318,7 +318,7 @@
$tmp_prefix == $dialplan_expression
? $outbound_prefix = ""
: $outbound_prefix = $tmp_prefix;
if ($gateway_type == "gateway") {
$dialplan_name = $gateway_name.".".$abbrv;
if ($abbrv == "988") {
@ -863,7 +863,7 @@
}
else {
$sql .= "and domain_uuid = :domain_uuid ";
}
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
@ -939,6 +939,7 @@ function type_onchange(dialplan_detail_type) {
echo $text['description-outbound-routes']."\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n";
@ -1346,17 +1347,18 @@ function type_onchange(dialplan_detail_type) {
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "<br><br>";
echo "</table>\n";
echo "</div>\n";
echo "<br><br>\n";
if (!empty($action) && $action == "update") {
echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n";
}
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>";
echo "</form>\n";
//show the footer
require_once "resources/footer.php";
?>
?>

View File

@ -181,9 +181,9 @@
// load editor preferences/defaults
$setting_size = !empty($_SESSION["editor"]["font_size"]["text"]) ? $_SESSION["editor"]["font_size"]["text"] : '12px';
$setting_theme = !empty($_SESSION["editor"]["theme"]["text"]) ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
$setting_invisibles = isset($_SESSION["editor"]["invisibles"]["boolean"]) && $_SESSION["editor"]["invisibles"]["boolean"] != '' ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
$setting_indenting = isset($_SESSION["editor"]["indent_guides"]["boolean"]) && $_SESSION["editor"]["indent_guides"]["boolean"] != '' ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
$setting_numbering = isset($_SESSION["editor"]["line_numbers"]["boolean"]) && $_SESSION["editor"]["line_numbers"]["boolean"] != '' ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
$setting_invisibles = isset($_SESSION['editor']['invisibles']['text']) ? $_SESSION['editor']['invisibles']["text"] : 'false';
$setting_indenting = isset($_SESSION['editor']['indent_guides']['text']) ? $_SESSION['editor']['indent_guides']["text"]: 'false';
$setting_numbering = isset($_SESSION['editor']['line_numbers']['text']) ? $_SESSION['editor']['line_numbers']["text"] : 'true';
//create token
$object = new token;

View File

@ -134,15 +134,15 @@
$show = !empty($_GET["show"]) ? $_GET["show"] : '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$button_icon_add = !empty($_SESSION['theme']['button_icon_add']) ? $_SESSION['theme']['button_icon_add'] : '';
$button_icon_copy = !empty($_SESSION['theme']['button_icon_copy']) ? $_SESSION['theme']['button_icon_copy'] : '';
$button_icon_toggle = !empty($_SESSION['theme']['button_icon_toggle']) ? $_SESSION['theme']['button_icon_toggle'] : '';
$button_icon_all = !empty($_SESSION['theme']['button_icon_all']) ? $_SESSION['theme']['button_icon_all'] : '';
$button_icon_delete = !empty($_SESSION['theme']['button_icon_delete']) ? $_SESSION['theme']['button_icon_delete'] : '';
$button_icon_search = !empty($_SESSION['theme']['button_icon_search']) ? $_SESSION['theme']['button_icon_search'] : '';
$button_icon_edit = !empty($_SESSION['theme']['button_icon_edit']) ? $_SESSION['theme']['button_icon_edit'] : '';
$button_icon_reset = !empty($_SESSION['theme']['button_icon_reset']) ? $_SESSION['theme']['button_icon_reset'] : '';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
$button_icon_add = $_SESSION['theme']['button_icon_add'] ?? '';
$button_icon_copy = $_SESSION['theme']['button_icon_copy'] ?? '';
$button_icon_toggle = $_SESSION['theme']['button_icon_toggle'] ?? '';
$button_icon_all = $_SESSION['theme']['button_icon_all'] ?? '';
$button_icon_delete = $_SESSION['theme']['button_icon_delete'] ?? '';
$button_icon_search = $_SESSION['theme']['button_icon_search'] ?? '';
$button_icon_edit = $_SESSION['theme']['button_icon_edit'] ?? '';
$button_icon_reset = $_SESSION['theme']['button_icon_reset'] ?? '';
//get the number of rows in the dialplan
$sql = "select count(*) from v_dialplans ";
@ -541,7 +541,7 @@
($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
permission_exists('dialplan_edit')) && $list_row_edit_button == 'true'
permission_exists('dialplan_edit')) && $list_row_edit_button
) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
@ -625,7 +625,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['dialplan_description'])."&nbsp;</td>\n";
if ($list_row_edit_button == 'true' && (
if ($list_row_edit_button && (
(!is_uuid($app_uuid) && permission_exists('dialplan_edit')) ||
($row['app_uuid'] == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
($row['app_uuid'] == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||

View File

@ -25,7 +25,6 @@
*/
//define the dialplan class
if (!class_exists('dialplan')) {
class dialplan {
//variables
@ -1580,6 +1579,3 @@
} //class
}
?>

View File

@ -329,7 +329,7 @@
echo th_order_by('email_retry_count', $text['label-email_retry_count'], $order_by, $order);
//echo th_order_by('email_action_before', $text['label-email_action_before'], $order_by, $order);
echo "<th class='hide-md-dn'>".$text['label-email_action_after']."</th>\n";
if (permission_exists('email_queue_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('email_queue_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -373,7 +373,7 @@
echo " <td>".escape($row['email_retry_count'])."</td>\n";
//echo " <td>".escape($row['email_action_before'])."</td>\n";
echo " <td class='hide-md-dn'>".escape($row['email_action_after'])."</td>\n";
if (permission_exists('email_queue_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('email_queue_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -236,9 +236,9 @@
//load editor preferences/defaults
$setting_size = !empty($_SESSION["editor"]["font_size"]["text"]) ? $_SESSION["editor"]["font_size"]["text"] : '12px';
$setting_theme = !empty($_SESSION["editor"]["theme"]["text"]) ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
$setting_invisibles = !empty($_SESSION["editor"]["invisibles"]["boolean"]) ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
$setting_indenting = !empty($_SESSION["editor"]["indent_guides"]["boolean"]) ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
$setting_numbering = !empty($_SESSION["editor"]["line_numbers"]["boolean"]) ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
$setting_invisibles = isset($_SESSION['editor']['invisibles']['text']) ? $_SESSION['editor']['invisibles']["text"] : 'false';
$setting_indenting = isset($_SESSION['editor']['indent_guides']['text']) ? $_SESSION['editor']['indent_guides']["text"]: 'false';
$setting_numbering = isset($_SESSION['editor']['line_numbers']['text']) ? $_SESSION['editor']['line_numbers']["text"] : 'true';
//create token
$object = new token;
@ -518,7 +518,7 @@
echo "</td>\n";
echo "</tr>\n";
if ($_SESSION['email_queue']['save_response']['boolean'] == 'true') {
if (filter_var($_SESSION['email_queue']['save_response']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-email_response']."\n";

View File

@ -2,12 +2,7 @@
/**
* email_queue class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('email_queue')) {
class email_queue {
/**
@ -225,6 +220,3 @@ if (!class_exists('email_queue')) {
}
}
}
?>

View File

@ -11,7 +11,6 @@
//includes files
require_once "resources/pdo.php";
include "resources/classes/permissions.php";
require $_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/functions/transcribe.php";
//increase limits

View File

@ -10,7 +10,6 @@
}
//include files
include "resources/classes/permissions.php";
include_once "resources/phpmailer/class.phpmailer.php";
include_once "resources/phpmailer/class.smtp.php";
@ -298,7 +297,7 @@
//echo "Body: ".$email_body."\n";
//update the message transcription
if (isset($voicemail_transcription_enabled) && $voicemail_transcription_enabled == 'true' && isset($transcribe_message)) {
if (isset($voicemail_transcription_enabled) && $voicemail_transcription_enabled && isset($transcribe_message)) {
$sql = "update v_voicemail_messages ";
$sql .= "set message_transcription = :message_transcription ";
$sql .= "where voicemail_message_uuid = :voicemail_message_uuid; ";

View File

@ -9,9 +9,6 @@
exit;
}
//include files
include "resources/classes/permissions.php";
//increase limits
set_time_limit(0);
ini_set('max_execution_time', 0);

View File

@ -162,4 +162,58 @@ $text['label-emergency_event']['zh-cn'] = "事件";
$text['label-emergency_event']['ja-jp'] = "イベント";
$text['label-emergency_event']['ko-kr'] = "이벤트";
$text['label-emergency_call_status']['en-us'] = "Call Status";
$text['label-emergency_call_status']['en-gb'] = "Call Status";
$text['label-emergency_call_status']['ar-eg'] = "";
$text['label-emergency_call_status']['de-at'] = "";
$text['label-emergency_call_status']['de-ch'] = "";
$text['label-emergency_call_status']['de-de'] = "";
$text['label-emergency_call_status']['el-gr'] = "";
$text['label-emergency_call_status']['es-cl'] = "";
$text['label-emergency_call_status']['es-mx'] = "";
$text['label-emergency_call_status']['fr-ca'] = "";
$text['label-emergency_call_status']['fr-fr'] = "";
$text['label-emergency_call_status']['he-il'] = "";
$text['label-emergency_call_status']['it-it'] = "";
$text['label-emergency_call_status']['ka-ge'] = "";
$text['label-emergency_call_status']['nl-nl'] = "";
$text['label-emergency_call_status']['pl-pl'] = "";
$text['label-emergency_call_status']['pt-br'] = "";
$text['label-emergency_call_status']['pt-pt'] = "";
$text['label-emergency_call_status']['ro-ro'] = "";
$text['label-emergency_call_status']['ru-ru'] = "";
$text['label-emergency_call_status']['sv-se'] = "";
$text['label-emergency_call_status']['uk-ua'] = "";
$text['label-emergency_call_status']['tr-tr'] = "";
$text['label-emergency_call_status']['zh-cn'] = "";
$text['label-emergency_call_status']['ja-jp'] = "";
$text['label-emergency_call_status']['ko-kr'] = "";
$text['label-recording']['en-us'] = "Recording";
$text['label-recording']['en-gb'] = "Recording";
$text['label-recording']['ar-eg'] = "تسجيل";
$text['label-recording']['de-at'] = "Aufnahme";
$text['label-recording']['de-ch'] = "Aufnahme";
$text['label-recording']['de-de'] = "Aufnahme";
$text['label-recording']['el-gr'] = "Εγγραφή";
$text['label-recording']['es-cl'] = "Grabación";
$text['label-recording']['es-mx'] = "Grabación";
$text['label-recording']['fr-ca'] = "Enregistrement";
$text['label-recording']['fr-fr'] = "Enregistrement";
$text['label-recording']['he-il'] = "הקלטה";
$text['label-recording']['it-it'] = "Registrazione";
$text['label-recording']['ka-ge'] = "ჩანაწერი";
$text['label-recording']['nl-nl'] = "Opname";
$text['label-recording']['pl-pl'] = "Nagranie";
$text['label-recording']['pt-br'] = "Gravação";
$text['label-recording']['pt-pt'] = "Gravação";
$text['label-recording']['ro-ro'] = "Înregistrare";
$text['label-recording']['ru-ru'] = "Запись";
$text['label-recording']['sv-se'] = "Inspelning";
$text['label-recording']['uk-ua'] = "Запис";
$text['label-recording']['tr-tr'] = "Kayıt";
$text['label-recording']['zh-cn'] = "记录";
$text['label-recording']['ja-jp'] = "録音";
$text['label-recording']['ko-kr'] = "녹음";
?>

View File

@ -0,0 +1,48 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2016-2020
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permisions
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
//access granted
}
else {
echo "access denied";
exit;
}
//download
if (is_uuid($_GET['id'])) {
$obj = new call_recordings;
$obj->recording_uuid = $_GET['id'];
$obj->binary = isset($_GET['binary']) ? true : false;
$obj->download();
}
?>

View File

@ -30,6 +30,14 @@ $database = new database;
$database->app_name = 'emergency_logs';
$database->app_uuid = 'de63b1ae-7750-11ee-b3a5-005056a27559';
//set permissions for CDR details and call recordings
$permission = array();
$permission['xml_cdr_hangup_cause'] = permission_exists('xml_cdr_hangup_cause');
$permission['xml_cdr_status'] = permission_exists('xml_cdr_status');
$permission['xml_cdr_recording'] = permission_exists('xml_cdr_recording');
$permission['xml_cdr_recording_play'] = permission_exists('xml_cdr_recording_play');
$permission['xml_cdr_recording_download'] = permission_exists('xml_cdr_recording_download');
//process the http post data by action
if (!empty($action) && !empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_logs) != 0) {
@ -115,31 +123,38 @@ else {
}
//get the list
$sql = "select emergency_log_uuid, ";
$sql .= "domain_uuid, ";
$sql .= "extension, ";
$sql .= "event, ";
$sql .= "to_char(timezone(:time_zone, insert_date), 'DD Mon YYYY') as date_formatted, ";
$sql .= "to_char(timezone(:time_zone, insert_date), 'HH12:MI:SS am') as time_formatted, ";
$sql .= "insert_date ";
$sql .= "from v_emergency_logs ";
$sql = "select e.emergency_log_uuid, ";
$sql .= "e.domain_uuid, ";
$sql .= "e.extension, ";
$sql .= "e.event, ";
$sql .= "to_char(timezone(:time_zone, e.insert_date), 'DD Mon YYYY') as date_formatted, ";
$sql .= "to_char(timezone(:time_zone, e.insert_date), 'HH12:MI:SS am') as time_formatted, ";
$sql .= "e.insert_date, ";
$sql .= "c.status as status, ";
$sql .= "concat(c.record_path, '/', c.record_name) as recording, "; //temp
$sql .= "c.record_path as call_recording_path, ";
$sql .= "c.record_name as call_recording_name ";
$sql .= "from v_emergency_logs e ";
$sql .= "left join v_xml_cdr c ";
$sql .= "on e.emergency_log_uuid = c.xml_cdr_uuid ";
if ($show == 'all') {
$sql .= "where true ";
}
else {
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "where e.domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!empty($search)) {
$sql .= "and ( ";
$sql .= " lower(event) like :search ";
$sql .= " lower(e.event) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= "order by insert_date desc ";
$sql .= "order by e.insert_date desc ";
$sql .= limit_offset($rows_per_page, $offset);
$parameters['time_zone'] = $time_zone;
$emergency_logs = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@ -193,6 +208,12 @@ echo "<th class='left'>".$text['label-emergency_date']."</th>\n";
echo "<th class='left'>".$text['label-emergency_time']."</th>\n";
echo "<th class='left'>".$text['label-emergency_extension']."</th>\n";
echo "<th class='left'>".$text['label-emergency_event']."</th>\n";
if ($permission['xml_cdr_recording'] && ($permission['xml_cdr_recording_play'] || $permission['xml_cdr_recording_download'])) {
echo "<th class='center'>".$text['label-recording']."</th>\n";
}
if ($permission['xml_cdr_status'] || $permission['xml_cdr_hangup_cause']) {
echo "<th class='left'>".$text['label-emergency_call_status']."</th>\n";
}
echo "</tr>\n";
if (!empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_logs) != 0) {
@ -206,6 +227,43 @@ if (!empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_l
echo " <td>".escape($row['time_formatted'])."</td>\n";
echo " <td>".escape($row['extension'])."</td>\n";
echo " <td>".escape($row['event'])."</td>\n";
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
echo " <td class='middle button center no-link no-wrap'>";
if ($row['recording'] !== '/') {
if (permission_exists('call_recording_play')) {
$recording_file_ext = pathinfo($row['call_recording_name'], PATHINFO_EXTENSION);
switch ($recording_file_ext) {
case "wav" : $recording_type = "audio/wav"; break;
case "mp3" : $recording_type = "audio/mpeg"; break;
case "ogg" : $recording_type = "audio/ogg"; break;
}
echo "<audio id='recording_audio_".escape($row['emergency_log_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['emergency_log_uuid'])."')\" onended=\"recording_reset('".escape($row['emergency_log_uuid'])."');\" src='download.php?id=".urlencode($row['emergency_log_uuid'])."' type='".$recording_type."'></audio>";
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['emergency_log_uuid']),'onclick'=>"recording_play('".escape($row['emergency_log_uuid'])."')"]);
}
if (permission_exists('call_recording_download')) {
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['emergency_log_uuid']).'&binary']);
}
}
echo " </td>\n";
}
// debug: display file directory and filename of the call recording
/*
if ($permission['xml_cdr_recording'] && ($permission['xml_cdr_recording_play'] || $permission['xml_cdr_recording_download'])) {
if ($row['recording'] !== '/') {
echo "<td>" . escape($row['recording']) . "</td>\n";
}
}
*/
$domain_name = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
if ($permission['xml_cdr_status'] || $permission['xml_cdr_hangup_cause']) {
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('emergency_logs_view_all')) {
echo " <td>" . (isset($row['status']) && $row['status'] !== '' ? "<a href='https://{$domain_name}/app/xml_cdr/xml_cdr_details.php?id=".urlencode($row['emergency_log_uuid'])."&show=all' target='_blank'>".escape($row['status'])."</a>" : '&nbsp;') . "</td>\n";
}
else {
//echo " <td>" . (isset($row['status']) && $row['status'] !== '' ? escape($row['status']) : '') . "</td>\n";
echo " <td>" . (isset($row['status']) && $row['status'] !== '' ? "<a href='https://{$domain_name}/app/xml_cdr/xml_cdr_details.php?id=".urlencode($row['emergency_log_uuid'])."' target='_blank'>".escape($row['status'])."</a>" : '&nbsp;') . "</td>\n";
}
}
echo "</tr>\n";
$x++;
}

View File

@ -236,7 +236,7 @@
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
echo "<th class='hide-md-dn'>".$text['label-user_agent']."</th>\n";
echo th_order_by('log_status', $text['label-log_status'], $order_by, $order);
if (permission_exists('event_guard_log_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('event_guard_log_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -277,7 +277,7 @@
echo " <td>".escape($row['extension'])."</td>\n";
echo " <td class='hide-md-dn'>".escape($row['user_agent'])."</td>\n";
echo " <td>".escape($text['label-'.$row['log_status']])."</td>\n";
if (permission_exists('event_guard_log_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('event_guard_log_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -26,12 +26,7 @@
/**
* event_guard_logs class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('event_guard')) {
class event_guard {
/**
@ -303,6 +298,3 @@ if (!class_exists('event_guard')) {
}
}
}
?>

View File

@ -44,7 +44,7 @@
$id = '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['extension_settings'])) {
@ -272,7 +272,7 @@
echo " <th class='center'>".$text['label-extension_setting_enabled']."</th>\n";
echo " <th class='hide-sm-dn'>".$text['label-extension_setting_description']."</th>\n";
if (permission_exists('extension_setting_edit') && $list_row_edit_button == 'true') {
if (permission_exists('extension_setting_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -305,7 +305,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['extension_setting_description'])."</td>\n";
if (permission_exists('extension_setting_edit') && $list_row_edit_button == 'true') {
if (permission_exists('extension_setting_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -26,12 +26,7 @@
/**
* extension_settings class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('extension_settings')) {
class extension_settings {
/**
@ -272,6 +267,3 @@ if (!class_exists('extension_settings')) {
}
}
}
?>

View File

@ -2698,32 +2698,32 @@ $text['description-voicemail_password']['zh-cn'] = "在此处输入数字语音
$text['description-voicemail_password']['ja-jp'] = "ここに数値のボイスメール パスワードを入力します。";
$text['description-voicemail_password']['ko-kr'] = "여기에 숫자 음성사서함 암호를 입력합니다.";
$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to (optional).";
$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to (optional).";
$text['description-voicemail_mail_to']['ar-eg'] = "أدخل العنوان الإلكتروني لإرسال البريد الصوتي إلى (اختياري).";
$text['description-voicemail_mail_to']['de-at'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
$text['description-voicemail_mail_to']['de-ch'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
$text['description-voicemail_mail_to']['de-de'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
$text['description-voicemail_mail_to']['el-gr'] = "Εισαγάγετε τη διεύθυνση email στην οποία θα στείλετε αυτόματο τηλεφωνητή (προαιρετικό).";
$text['description-voicemail_mail_to']['es-cl'] = "Ingrese una dirección de correo electrónico para enviar el correo de voz (opcional).";
$text['description-voicemail_mail_to']['es-mx'] = "Ingrese una dirección de correo electrónico para enviar el correo de voz (opcional).";
$text['description-voicemail_mail_to']['fr-ca'] = "Insérer le courriel où sera envoyé le message de notification (optionnel).";
$text['description-voicemail_mail_to']['fr-fr'] = "Insérer le courriel où sera envoyé le message de notification (optionnel).";
$text['description-voicemail_mail_to']['he-il'] = "היכנס לכתובת הדואר האלקטרוני כדי לשלוח הודעות קוליות (אופציונלי).";
$text['description-voicemail_mail_to']['it-it'] = "Inserire l'indirizzo email a cui recapitare i messaggi vocali (opzionale).";
$text['description-voicemail_mail_to']['ka-ge'] = "შეიყვანეთ ელფოსტის მისამართი, რომელზეც ხმოვანი ფოსტა გამოიგზავნება (არასავალდებულო).";
$text['description-voicemail_mail_to']['nl-nl'] = "Voer het E-mail adres om de voicemail naar te sturen (optioneel).";
$text['description-voicemail_mail_to']['pl-pl'] = "Dodaj adres email na który będą wysyłane pliki poczty głosowej";
$text['description-voicemail_mail_to']['pt-br'] = "Insira o endereço de email para enviar o correio de voz (opcional).";
$text['description-voicemail_mail_to']['pt-pt'] = "Introduza o endereço de email para enviar o correio de voz (opcional).";
$text['description-voicemail_mail_to']['ro-ro'] = "Introduceți adresa de e-mail la care trimiteți mesajul vocal (opțional).";
$text['description-voicemail_mail_to']['ru-ru'] = "Введите адрес электронной почты, чтобы отправить голосовую почту (опционально).";
$text['description-voicemail_mail_to']['sv-se'] = "Ange E-post adressen för röstbrevlådan (valfritt).";
$text['description-voicemail_mail_to']['uk-ua'] = "Введіть адресу електронної пошти для відправки голосового повідомлення (за бажанням).";
$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gönderileceği e-posta adresini girin (isteğe bağlı).";
$text['description-voicemail_mail_to']['zh-cn'] = "输入要向其发送语音邮件的电子邮件地址(可选)。";
$text['description-voicemail_mail_to']['ja-jp'] = "ボイスメールの送信先の電子メール アドレスを入力します (オプション)";
$text['description-voicemail_mail_to']['ko-kr'] = "음성 메일을 보낼 이메일 주소를 입력합니다(선택 사항).";
$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to (optional). Multiple addresses may be separated by commas.";
$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to (optional). Multiple addresses may be separated by commas.";
$text['description-voicemail_mail_to']['ar-eg'] = "أدخل عنوان البريد الإلكتروني لإرسال البريد الصوتي إليه (اختياري). يمكن فصل العناوين المتعددة بفواصل.";
$text['description-voicemail_mail_to']['de-at'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen können durch Kommas getrennt werden.";
$text['description-voicemail_mail_to']['de-ch'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen können durch Kommas getrennt werden.";
$text['description-voicemail_mail_to']['de-de'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen können durch Kommas getrennt werden.";
$text['description-voicemail_mail_to']['el-gr'] = "Εισαγάγετε τη διεύθυνση email για αποστολή του φωνητικού μηνύματος (προαιρετικό). Πολλαπλές διευθύνσεις μπορούν να διαχωριστούν με κόμματα.";
$text['description-voicemail_mail_to']['es-cl'] = "Ingrese la dirección de correo electrónico para enviar el correo de voz (opcional). Se pueden separar múltiples direcciones con comas.";
$text['description-voicemail_mail_to']['es-mx'] = "Ingrese la dirección de correo electrónico para enviar el correo de voz (opcional). Se pueden separar múltiples direcciones con comas.";
$text['description-voicemail_mail_to']['fr-ca'] = "Entrez l'adresse e-mail à laquelle envoyer la messagerie vocale (facultatif). Plusieurs adresses peuvent être séparées par des virgules.";
$text['description-voicemail_mail_to']['fr-fr'] = "Entrez l'adresse e-mail à laquelle envoyer la messagerie vocale (facultatif). Plusieurs adresses peuvent être séparées par des virgules.";
$text['description-voicemail_mail_to']['he-il'] = "הזן את כתובת האימייל לשליחת הדואר הקולי (אופציונלי). ניתן להפריד בין כתובות מרובות באמצעות פסיקים.";
$text['description-voicemail_mail_to']['it-it'] = "Inserisci l'indirizzo email a cui inviare la segreteria telefonica (opzionale). Più indirizzi possono essere separati da virgole.";
$text['description-voicemail_mail_to']['ka-ge'] = "შეიყვანეთ ელ.ფოსტის მისამართი, რომელზეც გაიგზავნება ხმოვანი ფოსტა (არასავალდებულო). შესაძლებელია მრავალი მისამართის მძიმით გამოყოფა.";
$text['description-voicemail_mail_to']['nl-nl'] = "Voer het e-mailadres in om de voicemail naartoe te sturen (optioneel). Meerdere adressen kunnen worden gescheiden door komma's.";
$text['description-voicemail_mail_to']['pl-pl'] = "Wprowadź adres e-mail, na który ma zostać wysłana poczta głosowa (opcjonalnie). Wiele adresów można oddzielić przecinkami.";
$text['description-voicemail_mail_to']['pt-br'] = "Digite o endereço de e-mail para enviar o correio de voz (opcional). Vários endereços podem ser separados por vírgulas.";
$text['description-voicemail_mail_to']['pt-pt'] = "Digite o endereço de e-mail para enviar o correio de voz (opcional). Vários endereços podem ser separados por vírgulas.";
$text['description-voicemail_mail_to']['ro-ro'] = "Introduceți adresa de e-mail la care se va trimite mesageria vocală (opțional). Mai multe adrese pot fi separate prin virgule.";
$text['description-voicemail_mail_to']['ru-ru'] = "Введите адрес электронной почты для отправки голосовой почты (необязательно). Несколько адресов можно разделять запятыми.";
$text['description-voicemail_mail_to']['sv-se'] = "Ange e-postadressen som röstbrevet ska skickas till (valfritt). Flera adresser kan separeras med kommatecken.";
$text['description-voicemail_mail_to']['uk-ua'] = "Введіть адресу електронної пошти для надсилання голосової пошти (необов’язково). Декілька адрес можна розділити комами.";
$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gönderileceği e-posta adresini girin (isteğe bağlı). Birden fazla adres virgülle ayrılabilir.";
$text['description-voicemail_mail_to']['zh-cn'] = "输入要发送语音邮件的电子邮件地址(可选)。多个地址可用逗号分隔";
$text['description-voicemail_mail_to']['ja-jp'] = "ボイスメールを送信するメールアドレスを入力してください(オプション)。複数のアドレスはコンマで区切ることができます";
$text['description-voicemail_mail_to']['ko-kr'] = "보이스메일을 보낼 이메일 주소를 입력하세요(선택 사항). 여러 개의 주소는 쉼표로 구분할 수 있습니다.";
$text['description-voicemail_local_after_email']['en-us'] = "Choose whether to keep the voicemail in the system after sending the email notification.";
$text['description-voicemail_local_after_email']['en-gb'] = "Choose whether to keep the voicemail in the system after sending the email notification.";

View File

@ -186,7 +186,6 @@
//synchronize configuration
if (is_writable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);

View File

@ -850,7 +850,6 @@
//synchronize configuration
if (is_writable($switch_extensions)) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
@ -2037,7 +2036,6 @@
echo " ".$text['label-hold_music']."\n";
echo "</td>\n";
echo "<td width=\"70%\" class='vtable' align='left'>\n";
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$options = '';
$moh = new switch_music_on_hold;
echo $moh->select('hold_music', $hold_music ?? '', $options);

View File

@ -331,7 +331,7 @@
}
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -425,7 +425,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
if (permission_exists('extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the directory class
if (!class_exists('extension')) {
class extension {
/**
@ -795,6 +794,3 @@ if (!class_exists('extension')) {
}
}
}
?>

View File

@ -239,7 +239,7 @@
echo th_order_by('fax_email', $text['label-email'], $order_by, $order);
echo " <th>".$text['label-tools']."</th>";
echo th_order_by('fax_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('fax_extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('fax_extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -305,7 +305,7 @@
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['fax_description'])."&nbsp;</td>\n";
if (permission_exists('fax_extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('fax_extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -29,7 +29,6 @@
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/functions/object_to_array.php";
require_once "resources/functions/parse_message.php";
require_once "resources/classes/text.php";
//get accounts to monitor
$sql = "select d.domain_name, f.* ";

View File

@ -179,7 +179,7 @@
//echo th_order_by('fax_retry_sleep', $text['label-fax_retry_sleep'], $order_by, $order);
echo th_order_by('fax_uri', $text['label-fax_destination'], $order_by, $order, null, null, "&id=".$fax_uuid);
//echo th_order_by('fax_epoch', $text['label-fax_epoch'], $order_by, $order);
if (!empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -213,7 +213,7 @@
//echo " <td>".$row['fax_retry_sleep']."&nbsp;</td>\n";
echo " <td>".basename($row['fax_uri'])."&nbsp;</td>\n";
//echo " <td>".$row['fax_epoch']."&nbsp;</td>\n";
if (!empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -28,22 +28,25 @@
Corey Moullas <cmoullas@emak.tech>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
//check if windows
if (stristr(PHP_OS, 'WIN')) { $IS_WINDOWS = true; } else { $IS_WINDOWS = false; }
//executed via command line
if (defined('STDIN')) {
//command line
if (defined('STDIN')) {
//add multi-lingual support
$language = new text;
$text = $language->get($setting->get('domain','language','en-us'), 'app/fax');
//add multi-lingual support
$language = new text;
$text = $language->get($settings->get('domain','language','en-us'), 'app/fax');
}
//executed via browser
else {
}
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
//web server
if (!defined('STDIN')) {
//additional include
require_once "resources/check_auth.php";
//set the domain_uuid and domain_name
@ -51,11 +54,6 @@ else {
$domain_name = $_SESSION['domain_name'];
$user_uuid = $_SESSION['user_uuid'];
//initialize the settings object
if (empty($settings)) {
$setting = new settings(["domain_uuid" => $domain_uuid]);
}
//check permissions
if (permission_exists('fax_send')) {
//access granted
@ -121,12 +119,12 @@ else {
}
//set the fax directory
if (!empty($setting->get('switch','storage'))) {
$fax_dir = $setting->get('switch','storage').'/fax/'.$domain_name;
if (!empty($settings->get('switch','storage'))) {
$fax_dir = $settings->get('switch','storage').'/fax/'.$domain_name;
}
//set fax cover font to generate pdf
$fax_cover_font = $setting->get('fax','cover_font') ?? null;
$fax_cover_font = $settings->get('fax','cover_font') ?? null;
}
//define function correct_path
@ -171,14 +169,14 @@ if (!function_exists('fax_split_dtmf')) {
$dir_fax_temp = $fax_dir.'/'.$fax_extension.'/temp';
//make sure the directories exist
if (!empty($setting->get('switch','storage')) && !is_dir($setting->get('switch','storage'))) {
mkdir($setting->get('switch','storage'), 0770);
if (!empty($settings->get('switch','storage')) && !is_dir($settings->get('switch','storage'))) {
mkdir($settings->get('switch','storage'), 0770);
}
if (!empty($setting->get('switch','storage')) && !is_dir($setting->get('switch','storage').'/fax')) {
mkdir($setting->get('switch','storage').'/fax', 0770);
if (!empty($settings->get('switch','storage')) && !is_dir($settings->get('switch','storage').'/fax')) {
mkdir($settings->get('switch','storage').'/fax', 0770);
}
if (!empty($setting->get('switch','storage')) && !is_dir($setting->get('switch','storage').'/fax/'.$domain_name)) {
mkdir($setting->get('switch','storage').'/fax/'.$domain_name, 0770);
if (!empty($settings->get('switch','storage')) && !is_dir($settings->get('switch','storage').'/fax/'.$domain_name)) {
mkdir($settings->get('switch','storage').'/fax/'.$domain_name, 0770);
}
if (!is_dir($fax_dir.'/'.$fax_extension)) {
mkdir($fax_dir.'/'.$fax_extension, 0770);
@ -301,7 +299,7 @@ if (!function_exists('fax_split_dtmf')) {
}
//un/authorized file extensions
$allowed_file_extensions = $setting->get('fax','allowed_extension');
$allowed_file_extensions = $settings->get('fax','allowed_extension');
$disallowed_file_extensions = explode(',','sh,ssh,so,dll,exe,bat,vbs,zip,rar,z,tar,tbz,tgz,gz');
//process uploaded or emailed files (if any)
@ -410,19 +408,19 @@ if (!function_exists('fax_split_dtmf')) {
//logo
$display_logo = false;
if (empty($setting->get('fax','cover_logo'))) {
if (empty($settings->get('fax','cover_logo'))) {
$logo = ''; //explicitly empty
}
else if ($setting->get('fax','cover_logo') != '') {
if (substr($setting->get('fax','cover_logo'), 0, 4) == 'http') {
$logo = $setting->get('fax','cover_logo');
else if ($settings->get('fax','cover_logo') != '') {
if (substr($settings->get('fax','cover_logo'), 0, 4) == 'http') {
$logo = $settings->get('fax','cover_logo');
}
else if (substr($setting->get('fax','cover_logo'), 0, 1) == '/') {
if (substr($setting->get('fax','cover_logo'), 0, strlen($_SERVER['DOCUMENT_ROOT'])) != $_SERVER['DOCUMENT_ROOT']) {
$logo = $_SERVER['DOCUMENT_ROOT'].$setting->get('fax','cover_logo');
else if (substr($settings->get('fax','cover_logo'), 0, 1) == '/') {
if (substr($settings->get('fax','cover_logo'), 0, strlen($_SERVER['DOCUMENT_ROOT'])) != $_SERVER['DOCUMENT_ROOT']) {
$logo = $_SERVER['DOCUMENT_ROOT'].$settings->get('fax','cover_logo');
}
else {
$logo = $setting->get('fax','cover_logo');
$logo = $settings->get('fax','cover_logo');
}
}
}
@ -497,7 +495,7 @@ if (!function_exists('fax_split_dtmf')) {
$pdf->SetFont($pdf_font, "", 12);
$pdf->SetXY($x + 2.0, $y + 1.65);
if (defined('STDIN') || ($_REQUEST['submit'] != '' && $_REQUEST['submit'] != 'preview')) {
$date = new DateTime('now', new DateTimeZone( $setting->get('domain','time_zone', date_default_timezone_get() ) ));
$date = new DateTime('now', new DateTimeZone( $settings->get('domain','time_zone', date_default_timezone_get() ) ));
$pdf->Write(0.3, $date->format('d M Y @ h:i:s A'));
}
$pdf->SetXY($x + 2.0, $y + 1.95);
@ -569,7 +567,7 @@ if (!function_exists('fax_split_dtmf')) {
}
else {
//determine cover message box height, and difference, to adjust footer position accordingly
$cover_message_height = $setting->get('fax','cover_message_height');
$cover_message_height = $settings->get('fax','cover_message_height');
$cover_message_height = (float) ($cover_message_height ?? 6.15);
$height_difference = 6.15 - $cover_message_height;
@ -677,7 +675,7 @@ if (!function_exists('fax_split_dtmf')) {
}
//prepare variables send the fax
$mail_from_address = (!empty($setting->get('fax','smtp_from'))) ? $setting->get('fax','smtp_from') : $setting->get('email','smtp_from');
$mail_from_address = (!empty($settings->get('fax','smtp_from'))) ? $settings->get('fax','smtp_from') : $settings->get('email','smtp_from');
//get the fax mail to address and fax prefix
$sql = "select * from v_fax where fax_uuid = :fax_uuid ";
@ -805,7 +803,7 @@ if (!function_exists('fax_split_dtmf')) {
//send the external call
$fax_variables = '';
foreach($setting->get('fax','variable') as $variable) {
foreach($settings->get('fax','variable') as $variable) {
$fax_variables .= $variable.",";
}
}
@ -897,7 +895,7 @@ if (!defined('STDIN')) {
$sql .= "and cp.phone_type_fax = 1 ";
$sql .= "and cp.phone_number is not null ";
$sql .= "and cp.phone_number <> '' ";
if ($setting->get('contact','permissions', false)) {
if ($settings->get('contact','permissions', false)) {
if (is_array($user_group_uuids) && @sizeof($user_group_uuids) != 0) {
//only show contacts assigned to current user's group(s) and those not assigned to any group
$sql .= "and (";
@ -1013,7 +1011,7 @@ if (!defined('STDIN')) {
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['header-new_fax']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$setting->get('theme','button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'fax.php']);
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme','button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'fax.php']);
if ($domain_enabled == true) {
echo button::create(['type'=>'submit','label'=>$text['button-preview'],'icon'=>'eye','name'=>'submit','value'=>'preview']);
echo button::create(['type'=>'submit','label'=>$text['button-send'],'icon'=>'paper-plane','id'=>'btn_save','name'=>'submit','value'=>'send','style'=>'margin-left: 15px;']);
@ -1036,7 +1034,7 @@ if (!defined('STDIN')) {
echo " ".$text['label-fax-header']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input type='text' name='fax_header' class='formfld' style='' value='".($setting->get('fax','cover_header') ?? '')."'>\n";
echo " <input type='text' name='fax_header' class='formfld' style='' value='".($settings->get('fax','cover_header') ?? '')."'>\n";
echo " <br />\n";
echo " ".$text['description-fax-header']."\n";
echo "</td>\n";
@ -1104,7 +1102,7 @@ if (!defined('STDIN')) {
for ($f = 1; $f <= 3; $f++) {
echo " <span id='fax_file_".$f."' ".(($f > 1) ? "style='display: none;'" : null).">";
echo " <input name='fax_files[]' id='fax_files_".$f."' type='file' class='formfld fileinput' style='margin-right: 3px; ".(($f > 1) ? "margin-top: 3px;" : null)."' onchange=\"".(($f < 3) ? "document.getElementById('fax_file_".($f+1)."').style.display='';" : null)." list_selected_files(".$f.");\" multiple='multiple'>";
echo button::create(['type'=>'button','label'=>$text['button-clear'],'icon'=>$setting->get('theme','button_icon_reset'),'onclick'=>"reset_file_input('fax_files_".$f."'); document.getElementById('file_list_".$f."').innerHTML='';"]);
echo button::create(['type'=>'button','label'=>$text['button-clear'],'icon'=>$settings->get('theme','button_icon_reset'),'onclick'=>"reset_file_input('fax_files_".$f."'); document.getElementById('file_list_".$f."').innerHTML='';"]);
echo "<br />";
echo " <span id='file_list_".$f."'></span>";
echo " </span>\n";
@ -1119,9 +1117,9 @@ if (!defined('STDIN')) {
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='fax_resolution' class='formfld'>\n";
echo " <option value='normal' ".(($setting->get('fax','resolution') == 'normal') ? 'selected' : null).">".$text['option-fax-resolution-normal']."</option>\n";
echo " <option value='fine' ".(($setting->get('fax','resolution') == 'fine') ? 'selected' : null).">".$text['option-fax-resolution-fine']."</option>\n";
echo " <option value='superfine' ".(($setting->get('fax','resolution') == 'superfine') ? 'selected' : null).">".$text['option-fax-resolution-superfine']."</option>\n";
echo " <option value='normal' ".(($settings->get('fax','resolution') == 'normal') ? 'selected' : null).">".$text['option-fax-resolution-normal']."</option>\n";
echo " <option value='fine' ".(($settings->get('fax','resolution') == 'fine') ? 'selected' : null).">".$text['option-fax-resolution-fine']."</option>\n";
echo " <option value='superfine' ".(($settings->get('fax','resolution') == 'superfine') ? 'selected' : null).">".$text['option-fax-resolution-superfine']."</option>\n";
echo " </select>\n";
echo " <br />\n";
echo " ".$text['description-fax-resolution']."\n";
@ -1134,9 +1132,9 @@ if (!defined('STDIN')) {
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='fax_page_size' class='formfld'>\n";
echo " <option value='letter' ".(($setting->get('fax','page_size') == 'letter') ? 'selected' : null).">Letter</option>\n";
echo " <option value='legal' ".(($setting->get('fax','page_size') == 'legal') ? 'selected' : null).">Legal</option>\n";
echo " <option value='a4' ".(($setting->get('fax','page_size') == 'a4') ? 'selected' : null).">A4</option>\n";
echo " <option value='letter' ".(($settings->get('fax','page_size') == 'letter') ? 'selected' : null).">Letter</option>\n";
echo " <option value='legal' ".(($settings->get('fax','page_size') == 'legal') ? 'selected' : null).">Legal</option>\n";
echo " <option value='a4' ".(($settings->get('fax','page_size') == 'a4') ? 'selected' : null).">A4</option>\n";
echo " </select>\n";
echo " <br />\n";
echo " ".$text['description-fax-page-size']."\n";
@ -1144,7 +1142,7 @@ if (!defined('STDIN')) {
echo "</tr>\n";
if (permission_exists('fax_subject')) {
$cover_subject_required = $setting->get('fax','cover_subject_required') ?? '';
$cover_subject_required = $settings->get('fax','cover_subject_required') ?? '';
$class = ($cover_subject_required == 'true') ? 'vncellreq' : 'vncell';
$required = ($cover_subject_required == 'true') ? 'required' : '';
echo "<tr>\n";
@ -1160,7 +1158,7 @@ if (!defined('STDIN')) {
}
if (permission_exists('fax_message')) {
$cover_message_required = $setting->get('fax','cover_message_required') ?? '';
$cover_message_required = $settings->get('fax','cover_message_required') ?? '';
$class = ($cover_message_required == 'true') ? 'vncellreq' : 'vncell';
$required = ($cover_message_required == 'true') ? 'required' : '';
echo "<tr>\n";
@ -1168,7 +1166,7 @@ if (!defined('STDIN')) {
echo " ".$text['label-fax-message']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <textarea type='text' name='fax_message' class='formfld' ".$required." style='width: 65%; height: 175px;'>".$setting->get('fax','cover_message')."</textarea>\n";
echo " <textarea type='text' name='fax_message' class='formfld' ".$required." style='width: 65%; height: 175px;'>".$settings->get('fax','cover_message')."</textarea>\n";
echo "<br />\n";
echo " ".$text['description-fax-message']."\n";
echo "</td>\n";
@ -1181,7 +1179,7 @@ if (!defined('STDIN')) {
echo " ".$text['label-fax-footer']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <textarea type='text' name='fax_footer' class='formfld' style='width: 65%; height: 100px;'>".$setting->get('fax','cover_footer')."</textarea>\n";
echo " <textarea type='text' name='fax_footer' class='formfld' style='width: 65%; height: 100px;'>".$settings->get('fax','cover_footer')."</textarea>\n";
echo " <br />\n";
echo " ".$text['description-fax-footer']."\n";
echo "</td>\n";
@ -1228,4 +1226,4 @@ function showgrid($pdf) {
}
}
*/
?>
?>

View File

@ -25,7 +25,6 @@
*/
//define the fax class
if (!class_exists('fax')) {
class fax {
/**
@ -725,7 +724,6 @@ if (!class_exists('fax')) {
}
} //class
}
/*
$o = new fax;
@ -738,5 +736,3 @@ $c->destination_number = $fax_destination_number;
$c->fax_description = $fax_description;
$c->dialplan();
*/
?>

View File

@ -26,12 +26,7 @@
/**
* fax_queue class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('fax_queue')) {
class fax_queue {
/**
@ -274,6 +269,3 @@ if (!class_exists('fax_queue')) {
}
}
}
}
?>

View File

@ -8,7 +8,6 @@
//includes files
require_once dirname(__DIR__, 4) . "/resources/require.php";
require_once "resources/pdo.php";
include "resources/classes/permissions.php";
//increase limits
set_time_limit(0);

View File

@ -136,6 +136,27 @@
}
}
//validate the data
$fifo_extension = preg_replace('#[^a-zA-Z0-9.\-\*]#', '', $fifo_extension ?? '');
$fifo_order = preg_replace('#[^0-9]#', '', $fifo_order ?? '');
$fifo_exit_key = preg_replace('#[^0-9]#', '', $fifo_exit_key ?? '');
$fifo_timeout_seconds = preg_replace('#[^0-9]#', '', $fifo_timeout_seconds ?? '');
$fifo_agent_status = preg_replace('#[^a-zA-Z0-9.\-\*]#', '', $fifo_agent_status ?? '');
$fifo_agent_queue = preg_replace('#[^a-zA-Z0-9.\-\*]#', '', $fifo_agent_queue ?? '');
if (!empty($fifo_uuid) && !is_uuid($fifo_uuid)) { throw new Exception("invalid uuid"); }
if (!empty($dialplan_uuid) && !is_uuid($dialplan_uuid)) { throw new Exception("invalid uuid"); }
if (is_array($fifo_members)) {
$i = 0;
foreach ($fifo_members as $row) {
$fifo_members[$i]['member_contact'] = preg_replace('#[^a-zA-Z0-9/@.\-\*]#', '', $row["member_contact"] ?? '');
$fifo_members[$i]['member_call_timeout'] = preg_replace('#[^0-9]#', '', $row["member_call_timeout"] ?? '20');
$fifo_members[$i]['member_wrap_up_time'] = preg_replace('#[^0-9]#', '', $row["member_wrap_up_time"] ?? '10');
$fifo_members[$i]['member_enabled'] = $row["member_enabled"] ?? 'false';
$i++;
}
}
//check for all required data
$msg = '';
if (strlen($fifo_name) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_name']."<br>\n"; }
@ -192,21 +213,20 @@
$array['fifo'][0]['fifo_timeout_seconds'] = $fifo_timeout_seconds;
$array['fifo'][0]['fifo_exit_key'] = $fifo_exit_key;
$array['fifo'][0]['fifo_exit_action'] = $fifo_exit_action;
$array['fifo'][0]['fifo_exit_key'] = $fifo_exit_key;
$array['fifo'][0]['fifo_music'] = $fifo_music;
$array['fifo'][0]['fifo_order'] = $fifo_order;
$array['fifo'][0]['fifo_enabled'] = $fifo_enabled;
$array['fifo'][0]['fifo_description'] = $fifo_description;
$y = 0;
if (is_array($fifo_members)) {
$y = 0;
foreach ($fifo_members as $row) {
if (!empty($row['member_contact']) && strlen($row['member_contact']) > 0) {
$array['fifo'][0]['fifo_members'][$y]['fifo_member_uuid'] = $row["fifo_member_uuid"];
$array['fifo'][0]['fifo_members'][$y]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['fifo'][0]['fifo_members'][$y]['member_contact'] = $row["member_contact"];
$array['fifo'][0]['fifo_members'][$y]['member_call_timeout'] = $row["member_call_timeout"];
$array['fifo'][0]['fifo_members'][$y]['member_call_timeout'] = $row["member_call_timeout"] ?? '20';
//$array['fifo'][0]['fifo_members'][$y]['member_simultaneous'] = $row["member_simultaneous"];
$array['fifo'][0]['fifo_members'][$y]['member_wrap_up_time'] = $row["member_wrap_up_time"];
$array['fifo'][0]['fifo_members'][$y]['member_wrap_up_time'] = $row["member_wrap_up_time"] ?? '10';
$array['fifo'][0]['fifo_members'][$y]['member_enabled'] = $row["member_enabled"] ?? 'false';
$y++;
}
@ -216,6 +236,11 @@
//send commands for agent login or agent logout
if (is_array($fifo_members)) {
foreach ($fifo_members as $row) {
//empty row skip iteration
if (empty($row["member_contact"])) {
continue;
}
//build the command to add or remove the agent from the FIFO queue
if ($row["member_enabled"] == 'true') {
$command = "fifo_member add ".$fifo_extension."@".$_SESSION['domain_name']." {fifo_member_wait=nowait}".$row["member_contact"]." 5 ".$row['member_call_timeout']." ".$row['member_wrap_up_time'];
@ -223,8 +248,9 @@
else {
$command = "fifo_member del ".$fifo_extension."@".$_SESSION['domain_name']." {fifo_member_wait=nowait}".$row["member_contact"];
}
if ($event_socket->is_connected()) {
$response = event_socket::api($command);
$response = $event_socket->command('api '.$command);
}
}
}

View File

@ -2,12 +2,7 @@
/**
* fifo class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('fifo')) {
class fifo {
/**
@ -283,6 +278,3 @@ if (!class_exists('fifo')) {
}
}
}
?>

View File

@ -118,7 +118,7 @@
$show = !empty($_GET["show"]) ? $_GET["show"] : '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get total gateway count from the database
$sql = "select count(*) from v_gateways where true ";
@ -278,7 +278,7 @@
echo th_order_by('hostname', $text['label-hostname'], $order_by, $order, null, "class='hide-sm-dn'");
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('gateway_edit') && $list_row_edit_button == 'true') {
if (permission_exists('gateway_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -371,9 +371,9 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row["description"])."&nbsp;</td>\n";
if (permission_exists('gateway_edit') && $list_row_edit_button == 'true') {
if (permission_exists('gateway_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$list_row_edit_button,'link'=>$list_row_url]);
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
}
echo "</tr>\n";

View File

@ -25,7 +25,6 @@
*/
//define the gateways class
if (!class_exists('gateways')) {
class gateways {
/**
@ -583,6 +582,3 @@ if (!class_exists('gateways')) {
}
}
}
?>

View File

@ -349,7 +349,7 @@
$dialplan_xml = "<extension name=\"".xml::sanitize($ivr_menu_name)."\" continue=\"false\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($ivr_menu_extension)."\$\">\n";
$dialplan_xml .= " <action application=\"ring_ready\" data=\"\"/>\n";
if ($_SESSION['ivr_menu']['answer']['boolean'] == 'true') {
if (filter_var($_SESSION['ivr_menu']['answer']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
}
$dialplan_xml .= " <action application=\"sleep\" data=\"1000\"/>\n";

View File

@ -94,7 +94,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//prepare to page the results
$sql = "select count(*) from v_ivr_menus ";
@ -228,7 +228,7 @@
echo th_order_by('ivr_menu_extension', $text['label-extension'], $order_by, $order);
echo th_order_by('ivr_menu_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('ivr_menu_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('ivr_menu_edit') && $list_row_edit_button == 'true') {
if (permission_exists('ivr_menu_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -278,7 +278,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['ivr_menu_description'])."&nbsp;</td>\n";
if (permission_exists('ivr_menu_edit') && $list_row_edit_button == 'true') {
if (permission_exists('ivr_menu_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the ivr_menu class
if (!class_exists('ivr_menu')) {
class ivr_menu {
/**
@ -489,6 +488,3 @@ if (!class_exists('ivr_menu')) {
}
}
}
?>

View File

@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@ -96,8 +95,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -60,7 +60,7 @@
}
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//process the http post data by action
if ($action != '' && is_array($modules) && @sizeof($modules) != 0) {
@ -185,7 +185,7 @@
}
echo "<th class='center'>".$text['label-enabled']."</th>\n";
echo "<th class='hide-sm-dn' style='min-width: 40%;'>".$text['label-description']."</th>\n";
if (permission_exists('module_edit') && $list_row_edit_button == 'true') {
if (permission_exists('module_edit') && $list_row_edit_button) {
echo "<td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -261,7 +261,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row["module_description"])."&nbsp;</td>\n";
if (permission_exists('module_edit') && $list_row_edit_button == 'true') {
if (permission_exists('module_edit') && $list_row_edit_button) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the modules class
if (!class_exists('modules')) {
class modules {
/**
@ -1101,10 +1100,8 @@ if (!class_exists('modules')) {
} //class
}
/*
require_once "resources/classes/modules.php";
$mod = new modules;
$mod->dir = $_SESSION['switch']['mod']['dir'];
echo $mod->dir."\n";
@ -1138,5 +1135,3 @@ echo $mod->dir."\n";
//print_r($result);
//echo "</pre>\n";
*/
?>

View File

@ -308,7 +308,6 @@
$cache = new cache;
$cache->delete("configuration:local_stream.conf");
//require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$music = new switch_music_on_hold;
$music->reload();

View File

@ -27,7 +27,6 @@
*/
//define the switch_music_on_hold class
if (!class_exists('switch_music_on_hold')) {
class switch_music_on_hold {
/**
@ -85,7 +84,6 @@ if (!class_exists('switch_music_on_hold')) {
}
//recordings
if (is_dir($_SERVER["PROJECT_ROOT"].'/app/recordings')) {
require_once "app/recordings/resources/classes/switch_recordings.php";
$recordings_c = new switch_recordings;
$recordings = $recordings_c->list_recordings();
if (is_array($recordings) && sizeof($recordings) > 0) {
@ -447,12 +445,9 @@ if (!class_exists('switch_music_on_hold')) {
} //method
} //class
}
//build and save the XML
//require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
//$moh = new switch_music_on_hold;
//$moh->xml();
//$moh->save();
?>

View File

@ -27,7 +27,6 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform;
@ -87,8 +86,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = Waveform::$singlePhase === true ? false : (empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false); // combine channels into single axis
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = Waveform::$singlePhase === true ? false : (filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'); // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -46,7 +46,7 @@
$search = $_GET["search"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['number_translations'])) {
@ -217,7 +217,7 @@
echo th_order_by('number_translation_name', $text['label-number_translation_name'], $order_by, $order);
echo th_order_by('number_translation_enabled', $text['label-number_translation_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-number_translation_description']."</th>\n";
if (permission_exists('number_translation_edit') && $list_row_edit_button == 'true') {
if (permission_exists('number_translation_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -258,7 +258,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['number_translation_description'])."</td>\n";
if (permission_exists('number_translation_edit') && $list_row_edit_button == 'true') {
if (permission_exists('number_translation_edit') && $list_row_edit_button) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the number translations class
if (!class_exists('number_translations')) {
class number_translations {
/**
@ -414,11 +413,8 @@ if (!class_exists('number_translations')) {
} //method
} //class
}
/*
$obj = new number_translations;
$obj->delete();
*/
?>

View File

@ -203,7 +203,7 @@
echo th_order_by('phrase_language', $text['label-language'], $order_by, $order);
echo th_order_by('phrase_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('phrase_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn' style='min-width: 40%;'");
if (permission_exists('phrase_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('phrase_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -253,7 +253,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['phrase_description'])."&nbsp;</td>\n";
if (permission_exists('phrase_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('phrase_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";

View File

@ -25,7 +25,6 @@
*/
//define the phrases class
if (!class_exists('phrases')) {
class phrases {
/**
@ -431,6 +430,3 @@ if (!class_exists('phrases')) {
} //method
} //class
}
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -133,6 +133,7 @@
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
@ -156,6 +157,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br><br>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
@ -165,4 +167,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2016-2023
Portions created by the Initial Developer are Copyright (C) 2016-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -168,6 +168,7 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) {
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@ -217,17 +218,18 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) {
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "<br /><br />";
echo "</table>\n";
echo "</div>\n";
echo "<br /><br />\n";
if ($action == "update") {
echo "<input type='hidden' name='pin_number_uuid' value='".escape($pin_number_uuid)."'>\n";
}
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>";
echo "</form>\n";
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2016-2020
Portions created by the Initial Developer are Copyright (C) 2016-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -170,6 +170,7 @@
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('pin_number_add') || permission_exists('pin_number_edit') || permission_exists('pin_number_delete')) {
@ -181,7 +182,7 @@
echo th_order_by('accountcode', $text['label-accountcode'], $order_by, $order);
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('pin_number_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('pin_number_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -222,7 +223,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."&nbsp;</td>\n";
if (permission_exists('pin_number_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('pin_number_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
@ -234,6 +235,7 @@
unset($pin_numbers);
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
@ -245,4 +247,3 @@
require_once "resources/footer.php";
?>

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