Merge branch 'fusionpbx:master' into leave-vm-as-new

This commit is contained in:
Norman King 2025-03-05 09:58:38 -05:00 committed by GitHub
commit 8609210b41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
215 changed files with 3480 additions and 1130 deletions

View File

@ -211,8 +211,12 @@
if (!empty($access_controls) && count($access_controls) > 0) {
$x = 0;
foreach ($access_controls as $row) {
$list_row_url = '';
if (permission_exists('access_control_edit')) {
$list_row_url = "access_control_edit.php?id=".urlencode($row['access_control_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
@ -254,3 +258,4 @@
require_once "resources/footer.php";
?>

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'])) {
@ -126,7 +126,7 @@
$offset = $rows_per_page * $page;
//get the list
$sql = "select b.bridge_uuid, d.domain_name, b.bridge_name, b.bridge_destination, bridge_enabled, bridge_description ";
$sql = "select d.domain_uuid, b.bridge_uuid, d.domain_name, b.bridge_name, b.bridge_destination, bridge_enabled, bridge_description ";
$sql .= "from v_bridges as b, v_domains as d ";
$sql .= "where b.domain_uuid = d.domain_uuid ";
if (!empty($show) && $show == "all" && permission_exists('bridge_all')) {
@ -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";
@ -234,8 +234,12 @@
if (!empty($bridges)) {
$x = 0;
foreach ($bridges as $row) {
$list_row_url = '';
if (permission_exists('bridge_edit')) {
$list_row_url = "bridge_edit.php?id=".urlencode($row['bridge_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {
@ -266,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

@ -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";
@ -309,8 +309,12 @@
if (!empty($result)) {
$x = 0;
foreach ($result as $row) {
$list_row_url = '';
if (permission_exists('call_block_edit')) {
$list_row_url = "call_block_edit.php?id=".urlencode($row['call_block_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_block_add') || permission_exists('call_block_edit') || permission_exists('call_block_delete')) {
@ -381,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";
@ -405,3 +409,4 @@
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) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -557,7 +557,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";

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";
@ -227,8 +227,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_broadcast_edit')) {
$list_row_url = "call_broadcast_edit.php?id=".urlencode($row['call_broadcast_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) {
@ -262,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";
@ -286,3 +290,4 @@
require_once "resources/footer.php";
?>

View File

@ -128,6 +128,9 @@
$x = 0;
foreach($call_center_queues as $row) {
$list_row_url = PROJECT_PATH."/app/call_center_active/call_center_active.php?queue_name=".escape($row['call_center_queue_uuid'])."&name=".urlencode(escape($row['queue_name']));
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td><a href='".$list_row_url."'>".escape($row['queue_name'])."</a></td>\n";
echo " <td>".escape($row['queue_extension'])."</td>\n";
@ -159,3 +162,4 @@
require_once "resources/footer.php";
?>

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";
@ -214,8 +214,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_center_agent_edit')) {
$list_row_url = "call_center_agent_edit.php?id=".urlencode($row['call_center_agent_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_center_agent_delete')) {
@ -266,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";
@ -290,3 +294,4 @@
require_once "resources/footer.php";
?>

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";
@ -227,8 +227,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_center_queue_edit')) {
$list_row_url = "call_center_queue_edit.php?id=".urlencode($row['call_center_queue_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) {
@ -269,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";
@ -293,3 +297,4 @@
require_once "resources/footer.php";
?>

View File

@ -96,8 +96,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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";
@ -243,8 +243,12 @@
if (!empty($call_flows)) {
$x = 0;
foreach ($call_flows as $row) {
$list_row_url = '';
if (permission_exists('call_flow_edit')) {
$list_row_url = "call_flow_edit.php?id=".urlencode($row['call_flow_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
@ -287,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";
@ -311,3 +315,4 @@
require_once "resources/footer.php";
?>

View File

@ -96,8 +96,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -241,7 +241,7 @@
}
}
if ($show !== 'all' && permission_exists('call_forward_all')) {
echo button::create(['type' => 'button', 'label' => $text['button-show_all'], 'icon' => $_SESSION['theme']['button_icon_all'], 'link' => '?show=all' . $param]);
echo button::create(['type' => 'button', 'label' => $text['button-show_all'], 'icon' => $_SESSION['theme']['button_icon_all'], 'link' => '?show=all' . (!empty($params) ? '&'.implode('&', $params) : null)]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if ($show == 'all' && permission_exists('call_forward_all')) {
@ -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";
@ -306,6 +306,9 @@
$x = 0;
foreach ($extensions as $row) {
$list_row_url = PROJECT_PATH . "/app/call_forward/call_forward_edit.php?id=" . $row['extension_uuid'] . "&return_url=" . urlencode($_SERVER['REQUEST_URI']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
echo "<tr class='list-row' href='" . $list_row_url . "'>\n";
if (!$is_included && $extensions) {
echo " <td class='checkbox'>\n";
@ -399,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";
}
@ -504,7 +504,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'];

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

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

View File

@ -84,8 +84,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -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";
@ -229,8 +229,12 @@
if (!empty($conference_centers)) {
$x = 0;
foreach ($conference_centers as $row) {
$list_row_url = '';
if (permission_exists('conference_center_edit')) {
$list_row_url = "conference_center_edit.php?id=".$row['conference_center_uuid'];
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_center_edit') || permission_exists('conference_center_delete')) {
@ -262,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";
@ -285,3 +289,4 @@
require_once "resources/footer.php";
?>

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";
@ -319,8 +319,12 @@
$participant_pin = substr($participant_pin, 0, 3) ."-". substr($participant_pin, 3, 3) ."-". substr($participant_pin, -3)."\n";
}
$list_row_url = '';
if (permission_exists('conference_room_edit')) {
$list_row_url = "conference_room_edit.php?id=".urlencode($row['conference_room_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_room_add') || permission_exists('conference_room_edit') || permission_exists('conference_room_delete')) {
@ -486,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";
@ -508,3 +512,4 @@
require_once "resources/footer.php";
?>

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

@ -96,8 +96,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

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

@ -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";
@ -231,8 +231,12 @@
if (!empty($conferences)) {
$x = 0;
foreach($conferences as $row) {
$list_row_url = '';
if (permission_exists('conference_edit')) {
$list_row_url = "conference_edit.php?id=".urlencode($row['conference_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_add') || permission_exists('conference_edit') || permission_exists('conference_delete')) {
@ -277,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";
@ -301,3 +305,4 @@
require_once "resources/footer.php";
?>

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";
@ -195,8 +195,12 @@
$x = 0;
foreach($transactions as $row) {
if (empty($row['domain_name'])) { $row['domain_name'] = $text['label-global']; }
$list_row_url = '';
if (permission_exists('database_transaction_edit')) {
$list_row_url = "database_transaction_edit.php?id=".urlencode($row['database_transaction_uuid']).(!empty($page) ? "&page=".urlencode($page) : null).(!empty($search) ? "&search=".urlencode($search) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td>".escape($row['domain_name'])."&nbsp;</td>\n";
@ -206,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";
@ -225,3 +229,4 @@
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) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -2097,7 +2097,7 @@
//enabled
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destination_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\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 ";
@ -157,6 +157,7 @@
$sql .= "and (";
$sql .= "lower(destination_type) like :search ";
$sql .= "or lower(destination_number) like :search ";
$sql .= "or lower(destination_cid_name_prefix) like :search ";
$sql .= "or lower(destination_context) like :search ";
$sql .= "or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
@ -201,6 +202,7 @@
$sql .= " d.destination_area_code, ";
$sql .= " d.destination_number, ";
$sql .= " d.destination_actions, ";
$sql .= " d.destination_cid_name_prefix, ";
$sql .= " d.destination_context, ";
$sql .= " d.destination_caller_id_name, ";
$sql .= " d.destination_caller_id_number, ";
@ -221,6 +223,7 @@
$sql .= "and (";
$sql .= " lower(destination_type) like :search ";
$sql .= " or lower(destination_number) like :search ";
$sql .= " or lower(destination_cid_name_prefix) like :search ";
$sql .= " or lower(destination_context) like :search ";
$sql .= " or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
@ -350,6 +353,9 @@
if (!$show == "all") {
echo "<th>". $text['label-destination_actions']."</th>";
}
if (permission_exists('destination_cid_name_prefix')) {
echo th_order_by('destination_cid_name_prefix', $text['label-destination_cid_name_prefix'], $order_by, $order, $param);
}
if (permission_exists("destination_context")) {
echo th_order_by('destination_context', $text['label-destination_context'], $order_by, $order, $param);
}
@ -359,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";
@ -369,8 +375,12 @@
foreach ($destinations as $row) {
//create the row link
$list_row_url = '';
if (permission_exists('destination_edit')) {
$list_row_url = "destination_edit.php?id=".urlencode($row['destination_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
//show the data
@ -412,6 +422,9 @@
if (!$show == "all") {
echo " <td class='overflow' style='min-width: 125px;'>".$row['actions']."&nbsp;</td>\n";
}
if (permission_exists("destination_cid_name_prefix")) {
echo " <td>".escape($row['destination_cid_name_prefix'])."&nbsp;</td>\n";
}
if (permission_exists("destination_context")) {
echo " <td>".escape($row['destination_context'])."&nbsp;</td>\n";
}
@ -421,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";
@ -450,3 +463,4 @@
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) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
*/
@ -1101,7 +1101,7 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td class='vncell' width='30%' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' width='30%' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-device_address']."\n";
echo "</td>\n";
echo "<td class='vtable' width='70%' align='left'>\n";
@ -1992,7 +1992,7 @@
if (permission_exists('device_enable')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-device_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\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";
@ -237,8 +237,12 @@
if (is_array($device_profiles) && @sizeof($device_profiles) != 0) {
$x = 0;
foreach($device_profiles as $row) {
$list_row_url = '';
if (permission_exists('device_profile_edit')) {
$list_row_url = "device_profile_edit.php?id=".urlencode($row['device_profile_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('device_profile_add') || permission_exists('device_profile_edit') || permission_exists('device_profile_delete')) {
@ -274,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";
@ -298,3 +302,4 @@
require_once "resources/footer.php";
?>

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";
@ -211,8 +211,12 @@
unset ($vendor_function_groups);
//show the row of data
$list_row_url = '';
if (permission_exists('device_vendor_function_edit')) {
$list_row_url = "device_vendor_function_edit.php?device_vendor_uuid=".urlencode($row['device_vendor_uuid'])."&id=".urlencode($row['device_vendor_function_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('device_vendor_function_add') || permission_exists('device_vendor_function_edit') || permission_exists('device_vendor_function_delete')) {
@ -252,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";
@ -289,3 +293,4 @@
echo "</script>\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";
@ -178,8 +178,12 @@
if (is_array($result) && @sizeof($result) != 0) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('device_vendor_edit')) {
$list_row_url = "device_vendor_edit.php?id=".urlencode($row['device_vendor_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('device_vendor_edit') || permission_exists('device_vendor_delete')) {
@ -198,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";
@ -222,3 +226,4 @@
require_once "resources/footer.php";
?>

View File

@ -397,8 +397,12 @@
}
}
$list_row_url = '';
if (permission_exists('device_edit')) {
$list_row_url = "device_edit.php?id=".urlencode($row['device_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
$device_provisioned_method = '';
@ -473,3 +477,4 @@
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";
}
@ -551,9 +551,13 @@
$x = 0;
foreach ($dialplans as $row) {
$list_row_url = '';
if ($row['app_uuid'] == "4b821450-926b-175a-af93-a03c441818b1") {
if (permission_exists('time_condition_edit') || permission_exists('dialplan_edit')) {
$list_row_url = PROJECT_PATH."/app/time_conditions/time_condition_edit.php?id=".urlencode($row['dialplan_uuid']).(is_uuid($app_uuid) ? "&app_uuid=".urlencode($app_uuid) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
}
else if (
@ -563,6 +567,9 @@
permission_exists('dialplan_edit')
) {
$list_row_url = "dialplan_edit.php?id=".urlencode($row['dialplan_uuid']).(is_uuid($app_uuid) ? "&app_uuid=".urlencode($app_uuid) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
else {
unset($list_row_url);
@ -618,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')) ||
@ -648,3 +655,4 @@
require_once "resources/footer.php";
?>

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";
@ -337,8 +337,12 @@
if (is_array($email_queue) && @sizeof($email_queue) != 0) {
$x = 0;
foreach ($email_queue as $row) {
$list_row_url = '';
if (permission_exists('email_queue_edit')) {
$list_row_url = "email_queue_edit.php?id=".urlencode($row['email_queue_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('email_queue_add') || permission_exists('email_queue_edit') || permission_exists('email_queue_delete')) {
@ -369,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

@ -298,7 +298,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

@ -189,8 +189,8 @@ echo "<tr class='list-header'>\n";
if (!empty($show) && $show == 'all' && permission_exists('emergency_logs_view_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo "<th class='left'>".$text['label-emergency_time']."</th>\n";
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";
echo "</tr>\n";
@ -202,8 +202,8 @@ if (!empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_l
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('emergency_logs_view_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td>".escape($row['time_formatted'])."</td>\n";
echo " <td>".escape($row['date_formatted'])."</td>\n";
echo " <td>".escape($row['time_formatted'])."</td>\n";
echo " <td>".escape($row['extension'])."</td>\n";
echo " <td>".escape($row['event'])."</td>\n";
echo "</tr>\n";

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";
@ -244,8 +244,12 @@
if (is_array($event_guard_logs) && @sizeof($event_guard_logs) != 0) {
$x = 0;
foreach ($event_guard_logs as $row) {
$list_row_url = '';
if (permission_exists('event_guard_log_edit')) {
$list_row_url = "event_guard_log_edit.php?id=".urlencode($row['event_guard_log_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row'>\n";
if (permission_exists('event_guard_log_add') || permission_exists('event_guard_log_edit') || permission_exists('event_guard_log_delete')) {
@ -273,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

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

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

@ -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";
@ -339,8 +339,12 @@
if (is_array($extensions) && @sizeof($extensions) != 0) {
$x = 0;
foreach($extensions as $row) {
$list_row_url = '';
if (permission_exists('extension_edit')) {
$list_row_url = "extension_edit.php?id=".urlencode($row['extension_uuid']).(is_numeric($page) ? '&page='.urlencode($page) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('extension_enabled') || permission_exists('extension_delete')) {
@ -421,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";
@ -447,3 +451,4 @@
require_once "resources/footer.php";
?>

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";
@ -247,8 +247,12 @@
if (is_array($result) && @sizeof($result) != 0) {
$x = 0;
foreach ($result as $row) {
$list_row_url = '';
if (permission_exists('fax_extension_edit')) {
$list_row_url = "fax_edit.php?id=".urlencode($row['fax_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('fax_extension_add') || permission_exists('fax_extension_delete')) {
@ -301,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";
@ -325,3 +329,4 @@
require_once "resources/footer.php";
?>

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

@ -332,8 +332,12 @@
if (!empty($fax_queue)) {
$x = 0;
foreach ($fax_queue as $row) {
$list_row_url = '';
if ($permission['fax_queue_edit']) {
$list_row_url = "fax_queue_edit.php?id=".urlencode($row['fax_queue_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if ($permission['fax_queue_add'] || $permission['fax_queue_edit'] || $permission['fax_queue_delete']) {

View File

@ -5,7 +5,7 @@
$apps[$x]['uuid'] = '16589224-c876-aeb3-f59f-523a1c0801f7';
$apps[$x]['category'] = 'Switch';
$apps[$x]['subcategory'] = '';
$apps[$x]['version'] = '2.0';
$apps[$x]['version'] = '2.1';
$apps[$x]['license'] = 'Mozilla Public License 1.1';
$apps[$x]['url'] = 'http://www.fusionpbx.com';
$apps[$x]['description']['en-us'] = "Queues are used to setup waiting lines for callers. Also known as FIFO Queues.";
@ -140,11 +140,31 @@
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'A feature code for the agent to login or logout of the Queue.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fifo_strategy";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select the strategy.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_members';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_timeout_seconds';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_exit_key';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_exit_action';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_music';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
@ -268,4 +288,4 @@
//cache details
$apps[$x]['cache']['key'] = "dialplan.\${domain_name}";
?>
?>

View File

@ -324,6 +324,87 @@ $text['description-fifo_agent_queue']['zh-cn'] = "代理等待呼叫者或接听
$text['description-fifo_agent_queue']['ja-jp'] = "エージェントが発信者を待機したり、キューで待機中の通話に応答したりするためのキュー。";
$text['description-fifo_agent_queue']['ko-kr'] = "상담원이 발신자를 기다리거나 대기열에 대기 중인 전화를 받기 위한 대기열입니다.";
$text['label-strategy']['en-us'] = "Strategy";
$text['label-strategy']['en-gb'] = "Strategy";
$text['label-strategy']['ar-eg'] = "الاستراتيجية";
$text['label-strategy']['de-at'] = "Strategie";
$text['label-strategy']['de-ch'] = "Strategie";
$text['label-strategy']['de-de'] = "Strategie";
$text['label-strategy']['el-gr'] = "Στρατηγική";
$text['label-strategy']['es-cl'] = "Estrategia";
$text['label-strategy']['es-mx'] = "Estrategia";
$text['label-strategy']['fr-ca'] = "Stratégie";
$text['label-strategy']['fr-fr'] = "Stratégie";
$text['label-strategy']['he-il'] = "אסטרטגיה";
$text['label-strategy']['it-it'] = "Strategia";
$text['label-strategy']['ka-ge'] = "სტრატეგია";
$text['label-strategy']['nl-nl'] = "Strategie";
$text['label-strategy']['pl-pl'] = "Strategia";
$text['label-strategy']['pt-br'] = "Estratégia";
$text['label-strategy']['pt-pt'] = "Estratégia";
$text['label-strategy']['ro-ro'] = "Strategie";
$text['label-strategy']['ru-ru'] = "Стратегия";
$text['label-strategy']['sv-se'] = "Strategi";
$text['label-strategy']['uk-ua'] = "Стратегія";
$text['label-strategy']['tr-tr'] = "Strateji";
$text['label-strategy']['zh-cn'] = "战略";
$text['label-strategy']['ja-jp'] = "ストラテジー";
$text['label-strategy']['ko-kr'] = "전략";
$text['description-strategy']['en-us'] = "Select the ring strategy.";
$text['description-strategy']['en-gb'] = "Select the ring strategy.";
$text['description-strategy']['ar-eg'] = "اختيار استراتيجية الخاتم.";
$text['description-strategy']['de-at'] = "Wählen Sie eine Strategie.";
$text['description-strategy']['de-ch'] = "Wählen Sie eine Strategie.";
$text['description-strategy']['de-de'] = "Wählen Sie eine Strategie.";
$text['description-strategy']['el-gr'] = "Επιλέξτε τη στρατηγική του δακτυλίου.";
$text['description-strategy']['es-cl'] = "Ingrese la estrategia de llamado.";
$text['description-strategy']['es-mx'] = "Ingrese la estrategia de llamado.";
$text['description-strategy']['fr-ca'] = "Choisir la statégie de sonnerie.";
$text['description-strategy']['fr-fr'] = "Choisir la statégie de sonnerie.";
$text['description-strategy']['he-il'] = "בחר את אסטרטגיית החיוג";
$text['description-strategy']['it-it'] = "Selezionare la strategia di squillo.";
$text['description-strategy']['ka-ge'] = "აირჩიეთ ზარის სტრატეგია.";
$text['description-strategy']['nl-nl'] = "Kies de bel strategie.";
$text['description-strategy']['pl-pl'] = "Wybierz strategię";
$text['description-strategy']['pt-br'] = "Selecione a estraétia da fila";
$text['description-strategy']['pt-pt'] = "Escolha o tipo de estratégia de toque.";
$text['description-strategy']['ro-ro'] = "Selectați strategia de inel.";
$text['description-strategy']['ru-ru'] = "Выберите стратегию вызовов.";
$text['description-strategy']['sv-se'] = "Välj strategi för ringflöde.";
$text['description-strategy']['uk-ua'] = "Виберіть стратегію кільця.";
$text['description-strategy']['tr-tr'] = "Zil stratejisini seçin.";
$text['description-strategy']['zh-cn'] = "选择响铃策略。";
$text['description-strategy']['ja-jp'] = "リング戦略を選択します。";
$text['description-strategy']['ko-kr'] = "링 전략을 선택합니다.";
$text['message-strategy']['en-us'] = "Please provide: Strategy";
$text['message-strategy']['en-gb'] = "Please provide: Strategy";
$text['message-strategy']['ar-eg'] = "يرجى تقديم ما يلي: الاستراتيجية";
$text['message-strategy']['de-at'] = "Bitte geben Sie folgendes an: Strategie";
$text['message-strategy']['de-ch'] = "Bitte geben Sie folgendes an: Strategie";
$text['message-strategy']['de-de'] = "Bitte geben Sie folgendes an: Strategie";
$text['message-strategy']['el-gr'] = "Παρέχετε: Στρατηγική";
$text['message-strategy']['es-cl'] = "Por favor indique: Estrategia";
$text['message-strategy']['es-mx'] = "Por favor indique: Estrategia";
$text['message-strategy']['fr-ca'] = "Merci d'indiquer: Stratégie";
$text['message-strategy']['fr-fr'] = "Merci d'indiquer: Stratégie";
$text['message-strategy']['he-il'] = "נא לספק: אסטרטגיה";
$text['message-strategy']['it-it'] = "Prego fornire: Strategia";
$text['message-strategy']['ka-ge'] = "შეიყვანეთ: სტრატეგია";
$text['message-strategy']['nl-nl'] = "Geef aub.: Strategie";
$text['message-strategy']['pl-pl'] = "Wprowadź strategię";
$text['message-strategy']['pt-br'] = "Por favor indique: Estratégia";
$text['message-strategy']['pt-pt'] = "Por favor indique: Estratégia";
$text['message-strategy']['ro-ro'] = "Vă rugăm să furnizați: Strategie";
$text['message-strategy']['ru-ru'] = "Пожалуйста укажите: Стратегию";
$text['message-strategy']['sv-se'] = "Ange: Strategi";
$text['message-strategy']['uk-ua'] = "Будь ласка, заповніть: Стратегія";
$text['message-strategy']['tr-tr'] = "Lütfen sağlayın: Strateji";
$text['message-strategy']['zh-cn'] = "请提供:策略";
$text['message-strategy']['ja-jp'] = "提供してください: 戦略";
$text['message-strategy']['ko-kr'] = "제공하십시오: 전략";
$text['label-fifo_members']['en-us'] = "Agents";
$text['label-fifo_members']['en-gb'] = "Agents";
$text['label-fifo_members']['ar-eg'] = "عملاء";
@ -377,6 +458,7 @@ $text['description-fifo_members']['zh-cn'] = "代理是队列的成员。队列
$text['description-fifo_members']['ja-jp'] = "エージェントはキューのメンバーです。キュー内の通話は、対応可能なエージェントに分配されます。";
$text['description-fifo_members']['ko-kr'] = "에이전트는 대기열의 멤버입니다. 대기열의 통화는 사용 가능한 에이전트에게 분배됩니다.";
$text['label-fifo_music']['en-us'] = "Music";
$text['label-fifo_music']['en-gb'] = "Music";
$text['label-fifo_music']['ar-eg'] = "موسيقى";
@ -431,6 +513,162 @@ $text['description-fifo_music']['zh-cn'] = "选择排队等候时可以听到的
$text['description-fifo_music']['ja-jp'] = "キューで待機中に聞く保留音を選択します。";
$text['description-fifo_music']['ko-kr'] = "대기열에서 기다리는 동안 들을 수 있는 대기 음악을 선택하세요.";
$text['label-fifo_timeout_seconds']['en-us'] = 'Timeout';
$text['label-fifo_timeout_seconds']['en-gb'] = 'Timeout';
$text['label-fifo_timeout_seconds']['ar-eg'] = '';
$text['label-fifo_timeout_seconds']['de-at'] = '';
$text['label-fifo_timeout_seconds']['de-ch'] = '';
$text['label-fifo_timeout_seconds']['de-de'] = '';
$text['label-fifo_timeout_seconds']['el-gr'] = '';
$text['label-fifo_timeout_seconds']['es-cl'] = '';
$text['label-fifo_timeout_seconds']['es-mx'] = '';
$text['label-fifo_timeout_seconds']['fr-ca'] = '';
$text['label-fifo_timeout_seconds']['fr-fr'] = '';
$text['label-fifo_timeout_seconds']['he-il'] = '';
$text['label-fifo_timeout_seconds']['it-it'] = '';
$text['label-fifo_timeout_seconds']['nl-nl'] = '';
$text['label-fifo_timeout_seconds']['pl-pl'] = '';
$text['label-fifo_timeout_seconds']['pt-br'] = '';
$text['label-fifo_timeout_seconds']['pt-pt'] = '';
$text['label-fifo_timeout_seconds']['ro-ro'] = '';
$text['label-fifo_timeout_seconds']['ru-ru'] = '';
$text['label-fifo_timeout_seconds']['sv-se'] = '';
$text['label-fifo_timeout_seconds']['uk-ua'] = '';
$text['label-fifo_timeout_seconds']['tr-tr'] = '';
$text['label-fifo_timeout_seconds']['zh-cn'] = '';
$text['label-fifo_timeout_seconds']['ja-jp'] = '';
$text['label-fifo_timeout_seconds']['ko-kr'] = '';
$text['description-fifo_timeout_seconds']['en-us'] = 'Enter the queue timeout seconds. 0 means no queue timeout.';
$text['description-fifo_timeout_seconds']['en-gb'] = 'Enter the queue timeout seconds. 0 means no queue timeout.';
$text['description-fifo_timeout_seconds']['ar-eg'] = '';
$text['description-fifo_timeout_seconds']['de-at'] = '';
$text['description-fifo_timeout_seconds']['de-ch'] = '';
$text['description-fifo_timeout_seconds']['de-de'] = '';
$text['description-fifo_timeout_seconds']['el-gr'] = '';
$text['description-fifo_timeout_seconds']['es-cl'] = '';
$text['description-fifo_timeout_seconds']['es-mx'] = '';
$text['description-fifo_timeout_seconds']['fr-ca'] = '';
$text['description-fifo_timeout_seconds']['fr-fr'] = '';
$text['description-fifo_timeout_seconds']['he-il'] = '';
$text['description-fifo_timeout_seconds']['it-it'] = '';
$text['description-fifo_timeout_seconds']['nl-nl'] = '';
$text['description-fifo_timeout_seconds']['pl-pl'] = '';
$text['description-fifo_timeout_seconds']['pt-br'] = '';
$text['description-fifo_timeout_seconds']['pt-pt'] = '';
$text['description-fifo_timeout_seconds']['ro-ro'] = '';
$text['description-fifo_timeout_seconds']['ru-ru'] = '';
$text['description-fifo_timeout_seconds']['sv-se'] = '';
$text['description-fifo_timeout_seconds']['uk-ua'] = '';
$text['description-fifo_timeout_seconds']['tr-tr'] = '';
$text['description-fifo_timeout_seconds']['zh-cn'] = '';
$text['description-fifo_timeout_seconds']['ja-jp'] = '';
$text['description-fifo_timeout_seconds']['ko-kr'] = '';
$text['label-fifo_exit_key']['en-us'] = 'Exit Key';
$text['label-fifo_exit_key']['en-gb'] = 'Exit Key';
$text['label-fifo_exit_key']['ar-eg'] = '';
$text['label-fifo_exit_key']['de-at'] = '';
$text['label-fifo_exit_key']['de-ch'] = '';
$text['label-fifo_exit_key']['de-de'] = '';
$text['label-fifo_exit_key']['el-gr'] = '';
$text['label-fifo_exit_key']['es-cl'] = '';
$text['label-fifo_exit_key']['es-mx'] = '';
$text['label-fifo_exit_key']['fr-ca'] = '';
$text['label-fifo_exit_key']['fr-fr'] = '';
$text['label-fifo_exit_key']['he-il'] = '';
$text['label-fifo_exit_key']['it-it'] = '';
$text['label-fifo_exit_key']['nl-nl'] = '';
$text['label-fifo_exit_key']['pl-pl'] = '';
$text['label-fifo_exit_key']['pt-br'] = '';
$text['label-fifo_exit_key']['pt-pt'] = '';
$text['label-fifo_exit_key']['ro-ro'] = '';
$text['label-fifo_exit_key']['ru-ru'] = '';
$text['label-fifo_exit_key']['sv-se'] = '';
$text['label-fifo_exit_key']['uk-ua'] = '';
$text['label-fifo_exit_key']['tr-tr'] = '';
$text['label-fifo_exit_key']['zh-cn'] = '';
$text['label-fifo_exit_key']['ja-jp'] = '';
$text['label-fifo_exit_key']['ko-kr'] = '';
$text['description-fifo_exit_key']['en-us'] = 'Enter the number to exit the queue.';
$text['description-fifo_exit_key']['en-gb'] = 'Enter the number to exit the queue.';
$text['description-fifo_exit_key']['ar-eg'] = '';
$text['description-fifo_exit_key']['de-at'] = '';
$text['description-fifo_exit_key']['de-ch'] = '';
$text['description-fifo_exit_key']['de-de'] = '';
$text['description-fifo_exit_key']['el-gr'] = '';
$text['description-fifo_exit_key']['es-cl'] = '';
$text['description-fifo_exit_key']['es-mx'] = '';
$text['description-fifo_exit_key']['fr-ca'] = '';
$text['description-fifo_exit_key']['fr-fr'] = '';
$text['description-fifo_exit_key']['he-il'] = '';
$text['description-fifo_exit_key']['it-it'] = '';
$text['description-fifo_exit_key']['nl-nl'] = '';
$text['description-fifo_exit_key']['pl-pl'] = '';
$text['description-fifo_exit_key']['pt-br'] = '';
$text['description-fifo_exit_key']['pt-pt'] = '';
$text['description-fifo_exit_key']['ro-ro'] = '';
$text['description-fifo_exit_key']['ru-ru'] = '';
$text['description-fifo_exit_key']['sv-se'] = '';
$text['description-fifo_exit_key']['uk-ua'] = '';
$text['description-fifo_exit_key']['tr-tr'] = '';
$text['description-fifo_exit_key']['zh-cn'] = '';
$text['description-fifo_exit_key']['ja-jp'] = '';
$text['description-fifo_exit_key']['ko-kr'] = '';
$text['label-fifo_exit_action']['en-us'] = 'Exit Action';
$text['label-fifo_exit_action']['en-gb'] = 'Exit Action';
$text['label-fifo_exit_action']['ar-eg'] = '';
$text['label-fifo_exit_action']['de-at'] = '';
$text['label-fifo_exit_action']['de-ch'] = '';
$text['label-fifo_exit_action']['de-de'] = '';
$text['label-fifo_exit_action']['el-gr'] = '';
$text['label-fifo_exit_action']['es-cl'] = '';
$text['label-fifo_exit_action']['es-mx'] = '';
$text['label-fifo_exit_action']['fr-ca'] = '';
$text['label-fifo_exit_action']['fr-fr'] = '';
$text['label-fifo_exit_action']['he-il'] = '';
$text['label-fifo_exit_action']['it-it'] = '';
$text['label-fifo_exit_action']['nl-nl'] = '';
$text['label-fifo_exit_action']['pl-pl'] = '';
$text['label-fifo_exit_action']['pt-br'] = '';
$text['label-fifo_exit_action']['pt-pt'] = '';
$text['label-fifo_exit_action']['ro-ro'] = '';
$text['label-fifo_exit_action']['ru-ru'] = '';
$text['label-fifo_exit_action']['sv-se'] = '';
$text['label-fifo_exit_action']['uk-ua'] = '';
$text['label-fifo_exit_action']['tr-tr'] = '';
$text['label-fifo_exit_action']['zh-cn'] = '';
$text['label-fifo_exit_action']['ja-jp'] = '';
$text['label-fifo_exit_action']['ko-kr'] = '';
$text['description-fifo_exit_action']['en-us'] = 'Select where to route the caller when exiting the queue.';
$text['description-fifo_exit_action']['en-gb'] = 'Select where to route the caller when exiting the queue.';
$text['description-fifo_exit_action']['ar-eg'] = '';
$text['description-fifo_exit_action']['de-at'] = '';
$text['description-fifo_exit_action']['de-ch'] = '';
$text['description-fifo_exit_action']['de-de'] = '';
$text['description-fifo_exit_action']['el-gr'] = '';
$text['description-fifo_exit_action']['es-cl'] = '';
$text['description-fifo_exit_action']['es-mx'] = '';
$text['description-fifo_exit_action']['fr-ca'] = '';
$text['description-fifo_exit_action']['fr-fr'] = '';
$text['description-fifo_exit_action']['he-il'] = '';
$text['description-fifo_exit_action']['it-it'] = '';
$text['description-fifo_exit_action']['nl-nl'] = '';
$text['description-fifo_exit_action']['pl-pl'] = '';
$text['description-fifo_exit_action']['pt-br'] = '';
$text['description-fifo_exit_action']['pt-pt'] = '';
$text['description-fifo_exit_action']['ro-ro'] = '';
$text['description-fifo_exit_action']['ru-ru'] = '';
$text['description-fifo_exit_action']['sv-se'] = '';
$text['description-fifo_exit_action']['uk-ua'] = '';
$text['description-fifo_exit_action']['tr-tr'] = '';
$text['description-fifo_exit_action']['zh-cn'] = '';
$text['description-fifo_exit_action']['ja-jp'] = '';
$text['description-fifo_exit_action']['ko-kr'] = '';
$text['label-fifo_order']['en-us'] = "Order";
$text['label-fifo_order']['en-gb'] = "Order";
$text['label-fifo_order']['ar-eg'] = "طلب";
@ -755,6 +993,59 @@ $text['description-member_simultaneous']['zh-cn'] = "同时输入成员。";
$text['description-member_simultaneous']['ja-jp'] = "メンバー同時入力。";
$text['description-member_simultaneous']['ko-kr'] = "회원을 동시 입력하세요.";
$text['option-longest_idle_agent']['en-us'] = "Longest Idle Agent";
$text['option-longest_idle_agent']['en-gb'] = "Longest Idle Agent";
$text['option-longest_idle_agent']['ar-eg'] = "أطول عامل خامل";
$text['option-longest_idle_agent']['de-at'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['de-ch'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['de-de'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['el-gr'] = "Ο μακρύτερος πράκτορας σε αδράνεια";
$text['option-longest_idle_agent']['es-cl'] = "Agente desocupado por más tiempo";
$text['option-longest_idle_agent']['es-mx'] = "Agente desocupado por más tiempo";
$text['option-longest_idle_agent']['fr-ca'] = "Agent inactif le plus longtemps";
$text['option-longest_idle_agent']['fr-fr'] = "Agent inactif le plus longtemps";
$text['option-longest_idle_agent']['he-il'] = "סוכן הסרק הארוך ביותר";
$text['option-longest_idle_agent']['it-it'] = "Da più tempo libero";
$text['option-longest_idle_agent']['ka-ge'] = "ოპერატორი, რომელიც ყველაზე დიდხანს იყო უქმად";
$text['option-longest_idle_agent']['nl-nl'] = "Langst wachtende agent";
$text['option-longest_idle_agent']['pl-pl'] = "Najdlużej bezczynny agent";
$text['option-longest_idle_agent']['pt-br'] = "Agente desocupado há mais tempo";
$text['option-longest_idle_agent']['pt-pt'] = "Agente desocupado há mais tempo";
$text['option-longest_idle_agent']['ro-ro'] = "Cel mai lung agent inactiv";
$text['option-longest_idle_agent']['ru-ru'] = "Максимально незанятый оператор";
$text['option-longest_idle_agent']['sv-se'] = "Agent Längst Ledig";
$text['option-longest_idle_agent']['uk-ua'] = "Найдовше бездіяльний агент";
$text['option-longest_idle_agent']['zh-cn'] = "最长空闲代理";
$text['option-longest_idle_agent']['ja-jp'] = "最長アイドル エージェント";
$text['option-longest_idle_agent']['ko-kr'] = "가장 긴 유휴 에이전트";
$text['option-simultaneous']['en-us'] = "Simultaneous";
$text['option-simultaneous']['en-gb'] = "Simultaneous";
$text['option-simultaneous']['ar-eg'] = "بسيطة";
$text['option-simultaneous']['de-at'] = "gleichzeitig";
$text['option-simultaneous']['de-ch'] = "gleichzeitig";
$text['option-simultaneous']['de-de'] = "gleichzeitig";
$text['option-simultaneous']['el-gr'] = "Ταυτόχρονος";
$text['option-simultaneous']['es-cl'] = "Simultaneos";
$text['option-simultaneous']['es-mx'] = "Simultaneos";
$text['option-simultaneous']['fr-ca'] = "Simultané";
$text['option-simultaneous']['fr-fr'] = "Simultané";
$text['option-simultaneous']['he-il'] = "באותו הזמן";
$text['option-simultaneous']['it-it'] = "Parallelo";
$text['option-simultaneous']['ka-ge'] = "ერთდროული";
$text['option-simultaneous']['nl-nl'] = "Gelijktijdig";
$text['option-simultaneous']['pl-pl'] = "Jednoczesne";
$text['option-simultaneous']['pt-br'] = "Simultâneo";
$text['option-simultaneous']['pt-pt'] = "Simultâneo";
$text['option-simultaneous']['ro-ro'] = "Simultan";
$text['option-simultaneous']['ru-ru'] = "Одновременное";
$text['option-simultaneous']['sv-se'] = "Samtidig";
$text['option-simultaneous']['uk-ua'] = "Симулятор";
$text['option-simultaneous']['tr-tr'] = "Eş zamanlı";
$text['option-simultaneous']['zh-cn'] = "同时";
$text['option-simultaneous']['ja-jp'] = "同時に";
$text['option-simultaneous']['ko-kr'] = "동시";
$text['label-member_wrap_up_time']['en-us'] = "Wrap Up Time";
$text['label-member_wrap_up_time']['en-gb'] = "Wrap Up Time";
$text['label-member_wrap_up_time']['ar-eg'] = "وقت الختام";
@ -836,4 +1127,4 @@ $text['label-member_enabled']['zh-cn'] = "已启用";
$text['label-member_enabled']['ja-jp'] = "有効";
$text['label-member_enabled']['ko-kr'] = "활성화됨";
?>
?>

View File

@ -145,8 +145,8 @@
$sql .= "fifo_uuid, ";
$sql .= "fifo_name, ";
$sql .= "fifo_extension, ";
$sql .= "fifo_agent_queue, ";
$sql .= "fifo_agent_status, ";
$sql .= "fifo_agent_queue, ";
$sql .= "fifo_music, ";
$sql .= "u.domain_uuid, ";
$sql .= "d.domain_name, ";
@ -249,8 +249,8 @@
}
echo th_order_by('fifo_name', $text['label-fifo_name'], $order_by, $order);
echo th_order_by('fifo_extension', $text['label-fifo_extension'], $order_by, $order);
echo th_order_by('fifo_agent_queue', $text['label-fifo_agent_queue'], $order_by, $order);
echo th_order_by('fifo_agent_status', $text['label-fifo_agent_status'], $order_by, $order);
echo th_order_by('fifo_agent_queue', $text['label-fifo_agent_queue'], $order_by, $order);
echo th_order_by('fifo_order', $text['label-fifo_order'], $order_by, $order);
echo th_order_by('fifo_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-fifo_description']."</th>\n";
@ -264,6 +264,9 @@
foreach ($fifo as $row) {
if (permission_exists('fifo_edit')) {
$list_row_url = "fifo_edit.php?id=".urlencode($row['fifo_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('fifo_add') || permission_exists('fifo_edit') || permission_exists('fifo_delete')) {
@ -284,8 +287,8 @@
}
echo " </td>\n";
echo " <td>".escape($row['fifo_extension'])."</td>\n";
echo " <td>".escape($row['fifo_agent_queue'])."</td>\n";
echo " <td>".escape($row['fifo_agent_status'])."</td>\n";
echo " <td>".escape($row['fifo_agent_queue'])."</td>\n";
echo " <td>".escape($row['fifo_order'])."</td>\n";
if (permission_exists('fifo_edit')) {
echo " <td class='no-link center'>\n";
@ -319,4 +322,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@ -39,9 +39,15 @@
$language = new text;
$text = $language->get();
//connect to the database
$database = database::new();
//add the settings object
$settings = new settings(["domain_uuid" => $_SESSION['domain_uuid'], "user_uuid" => $_SESSION['user_uuid']]);
//setup the event socket connection
$event_socket = event_socket::create();
//set from session variables
$button_icon_back = $settings->get('theme', 'button_icon_back', '');
$button_icon_copy = $settings->get('theme', 'button_icon_copy', '');
@ -66,7 +72,11 @@
$fifo_extension = $_POST["fifo_extension"];
$fifo_agent_status = $_POST["fifo_agent_status"];
$fifo_agent_queue = $_POST["fifo_agent_queue"];
$fifo_strategy = $_POST["fifo_strategy"];
$fifo_members = $_POST["fifo_members"];
$fifo_timeout_seconds = $_POST["fifo_timeout_seconds"];
$fifo_exit_key = $_POST["fifo_exit_key"];
$fifo_exit_action = $_POST["fifo_exit_action"];
$fifo_music = $_POST["fifo_music"];
$domain_uuid = $_POST["domain_uuid"];
$fifo_order = $_POST["fifo_order"];
@ -104,20 +114,17 @@
switch ($_POST['action']) {
case 'copy':
if (permission_exists('fifo_add')) {
$obj = new database;
$obj->copy($array);
$database->copy($array);
}
break;
case 'delete':
if (permission_exists('fifo_delete')) {
$obj = new database;
$obj->delete($array);
$database->delete($array);
}
break;
case 'toggle':
if (permission_exists('fifo_update')) {
$obj = new database;
$obj->toggle($array);
$database->toggle($array);
}
break;
}
@ -129,13 +136,38 @@
}
}
//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"; }
if (strlen($fifo_extension) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_extension']."<br>\n"; }
//if (strlen($fifo_agent_status) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_agent_status']."<br>\n"; }
//if (strlen($fifo_agent_queue) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_agent_queue']."<br>\n"; }
if (strlen($fifo_strategy) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_strategy']."<br>\n"; }
//if (strlen($fifo_members) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_members']."<br>\n"; }
//if (strlen($fifo_timeout_seconds) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_timeout_seconds']."<br>\n"; }
//if (strlen($fifo_exit_key) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_exit_key']."<br>\n"; }
//if (strlen($fifo_exit_action) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_exit_action']."<br>\n"; }
//if (strlen($fifo_music) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_music']."<br>\n"; }
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
if (strlen($fifo_order) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_order']."<br>\n"; }
@ -177,52 +209,115 @@
$array['fifo'][0]['fifo_extension'] = $fifo_extension;
$array['fifo'][0]['fifo_agent_status'] = $fifo_agent_status;
$array['fifo'][0]['fifo_agent_queue'] = $fifo_agent_queue;
$array['fifo'][0]['fifo_strategy'] = $fifo_strategy;
$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_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++;
}
}
}
//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'];
}
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->command('api '.$command);
}
}
}
//get the action destination number
if (!empty($fifo_exit_action)) {
$fifo_exit_destination = explode(':', $fifo_exit_action)[1];
$fifo_exit_destination = explode(' ', $fifo_exit_destination)[0];
}
//add the fifo dialplan
if (!empty($fifo_extension)) {
//escape the * symbol
$fifo_agent_status_xml = str_replace("*", "\*", $fifo_agent_status);
$fifo_agent_queue_xml = str_replace("*", "\*", $fifo_agent_queue);
//prepare the fifo orbit extension
if (!empty($fifo_exit_destination) && $fifo_timeout_seconds == 0) {
$fifo_orbit_exten = $fifo_exit_destination;
}
else {
$fifo_orbit_exten = $fifo_exit_destination.":".$fifo_timeout_seconds;
}
//build the xml dialplan
$dialplan_xml = "<extension name=\"".xml::sanitize($fifo_name)."\" continue=\"false\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($fifo_extension)."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".$fifo_uuid."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".$fifo_music."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".xml::sanitize($fifo_uuid)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".xml::sanitize($fifo_music)."\" inline=\"true\"/>\n";
if ($fifo_strategy == 'longest_idle_agent') {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_strategy=waiting_longer\" inline=\"true\"/>\n";
}
if ($fifo_strategy == 'simultaneous') {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_strategy=more_ppl\" inline=\"true\"/>\n";
}
/*
<action application="set" data="fifo_orbit_dialplan=XML"/>
<action application="set" data="fifo_orbit_context=default"/>
<action application="set" data="fifo_orbit_announce=digits/6.wav"/>
<action application="set" data="fifo_caller_exit_key=2"/>
<action application="set" data="fifo_caller_exit_to_orbit=true"/>
*/
if (!empty($fifo_exit_key)) {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_caller_exit_key=".xml::sanitize($fifo_exit_key)."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_orbit_dialplan=XML\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_orbit_context=".xml::sanitize($_SESSION['domain_name'])."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_caller_exit_to_orbit=true\"/>\n";
}
if (!empty($fifo_orbit_exten)) {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_orbit_exten=".xml::sanitize($fifo_orbit_exten)."\"/>\n";
}
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"$queue_name in\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"".xml::sanitize($queue_name)." in\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$fifo_agent_status_xml."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".$fifo_uuid."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_name=$queue_name\" inline=\"true\"/>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($fifo_agent_status_xml)."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".xml::sanitize($fifo_uuid)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_name=".xml::sanitize($queue_name)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"user_name=\${caller_id_number}@\${domain_name}\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"pin_number=\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"lua\" data=\"app/fifo/resources/scripts/member.lua\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$fifo_agent_queue_xml."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".$fifo_uuid."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".$fifo_music."\" inline=\"true\"/>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($fifo_agent_queue_xml)."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".xml::sanitize($fifo_uuid)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".xml::sanitize($fifo_music)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"$queue_name out wait\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"".xml::sanitize($queue_name)." out wait\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";
@ -247,7 +342,6 @@
$p->add("dialplan_edit", "temp");
//save the data
$database = new database;
$database->app_name = 'fifo';
$database->app_uuid = '16589224-c876-aeb3-f59f-523a1c0801f7';
$result = $database->save($array);
@ -296,6 +390,10 @@
$sql .= " fifo_extension, ";
$sql .= " fifo_agent_status, ";
$sql .= " fifo_agent_queue, ";
$sql .= " fifo_strategy, ";
$sql .= " fifo_timeout_seconds, ";
$sql .= " fifo_exit_key, ";
$sql .= " fifo_exit_action, ";
$sql .= " fifo_music, ";
$sql .= " domain_uuid, ";
$sql .= " fifo_order, ";
@ -306,7 +404,6 @@
//$sql .= "and domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['fifo_uuid'] = $fifo_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$dialplan_uuid = $row["dialplan_uuid"];
@ -314,6 +411,10 @@
$fifo_extension = $row["fifo_extension"];
$fifo_agent_status = $row["fifo_agent_status"];
$fifo_agent_queue = $row["fifo_agent_queue"];
$fifo_strategy = $row["fifo_strategy"];
$fifo_timeout_seconds = $row["fifo_timeout_seconds"];
$fifo_exit_key = $row["fifo_exit_key"];
$fifo_exit_action = $row["fifo_exit_action"];
$fifo_music = $row["fifo_music"];
$domain_uuid = $row["domain_uuid"];
$fifo_order = $row["fifo_order"];
@ -339,7 +440,6 @@
//$sql .= "and domain_uuid = '".$domain_uuid."' ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['fifo_uuid'] = $fifo_uuid;
$database = new database;
$fifo_members = $database->select($sql, $parameters, 'all');
unset ($sql, $parameters);
}
@ -358,16 +458,28 @@
$fifo_member_uuid = uuid();
}
//add an empty row
$x = isset($fifo_members) && is_array($fifo_members) ? sizeof($fifo_members) : 0;
$fifo_members[$x]['domain_uuid'] = $_SESSION['domain_uuid'];
$fifo_members[$x]['fifo_uuid'] = $fifo_uuid;
$fifo_members[$x]['fifo_member_uuid'] = uuid();
$fifo_members[$x]['member_contact'] = '';
$fifo_members[$x]['member_call_timeout'] = '';
//$fifo_members[$x]['member_simultaneous'] = '';
$fifo_members[$x]['member_wrap_up_time'] = '';
$fifo_members[$x]['member_enabled'] = '';
//add an empty row to the members array
if (count($fifo_members) == 0) {
$rows = $settings->get('fifo', 'option_add_rows', '5');
$id = 0;
$show_option_delete = false;
}
if (count($fifo_members) > 0) {
$rows = $settings->get('fifo', 'option_edit_rows', '1');
$id = count($fifo_members)+1;
$show_option_delete = true;
}
for ($x = 0; $x < $rows; $x++) {
$fifo_members[$id]['domain_uuid'] = $_SESSION['domain_uuid'];
$fifo_members[$id]['fifo_uuid'] = $fifo_uuid;
$fifo_members[$id]['fifo_member_uuid'] = uuid();
$fifo_members[$id]['member_contact'] = '';
$fifo_members[$id]['member_call_timeout'] = '';
//$fifo_members[$id]['member_simultaneous'] = '';
$fifo_members[$id]['member_wrap_up_time'] = '';
$fifo_members[$id]['member_enabled'] = '';
$id++;
}
//create token
$object = new token;
@ -377,11 +489,14 @@
$destination = new destinations;
//set the defaults
if (empty($fifo_timeout_seconds)) {
$fifo_timeout_seconds = 0;
}
if (empty($fifo_order)) {
$fifo_order = 50;
}
if (!isset($fifo_enabled)) {
// $fifo_enabled = true;
if (empty($fifo_enabled)) {
$fifo_enabled = true;
}
//show the header
@ -422,7 +537,7 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_name']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
@ -465,6 +580,20 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-strategy']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='fifo_strategy' onchange=\"getElementById('destination_delayorder').innerHTML = (this.selectedIndex == 1 || this.selectedIndex == 3) ? '".$text['label-destination_order']."' : '".$text['label-destination_delay']."';\">\n";
echo " <option value='longest_idle_agent' ".(($fifo_strategy == "'option-longest_idle_agent") ? "selected='selected'" : null).">".$text['option-longest_idle_agent']."</option>\n";
echo " <option value='simultaneous' ".(($fifo_strategy == "simultaneous") ? "selected='selected'" : null).">".$text['option-simultaneous']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-strategy']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_members']."\n";
@ -477,7 +606,7 @@
//echo " <th class='vtablereq'>".$text['label-member_simultaneous']."</th>\n";
echo " <th class='vtablereq'>".$text['label-member_wrap_up_time']."</th>\n";
echo " <th class='vtablereq'>".$text['label-member_enabled']."</th>\n";
if (is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
if ($show_option_delete && is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
echo " <span id='delete_label_details'>".$text['label-delete']."</span>\n";
echo " <span id='delete_toggle_details'><input type='checkbox' id='checkbox_all_details' name='checkbox_all' onclick=\"edit_all_toggle('details'); checkbox_on_change(this);\"></span>\n";
@ -523,7 +652,7 @@
echo " </select>\n";
}
echo " </td>\n";
if (is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
if ($show_option_delete && is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
if (is_uuid($row['fifo_member_uuid'])) {
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
echo " <input type='checkbox' name='fifo_members[".$x."][checked]' value='true' class='chk_delete checkbox_details' onclick=\"checkbox_on_change(this);\">\n";
@ -543,16 +672,47 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_timeout_seconds']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='fifo_timeout_seconds' maxlength='255' value='".escape($fifo_timeout_seconds)."'>\n";
echo "<br />\n";
echo $text['description-fifo_timeout_seconds']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_exit_key']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='fifo_exit_key' maxlength='255' value='".escape($fifo_exit_key)."'>\n";
echo "<br />\n";
echo $text['description-fifo_exit_key']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_exit_action']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
$destination = new destinations;
echo $destination->select('dialplan', 'fifo_exit_action', $fifo_exit_action);
echo "<br />\n";
echo $text['description-fifo_exit_action']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_music']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
//echo " <input class='formfld' type='text' name='fifo_music' maxlength='255' value='".escape($fifo_music)."'>\n";
$ringbacks = new ringbacks;
echo $ringbacks->select('fifo_music', $fifo_music ?? null);
echo "<br />\n";
echo $text['description-fifo_music']."\n";
echo "</td>\n";

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";
@ -286,8 +286,12 @@
if (!empty($gateways)) {
$x = 0;
foreach($gateways as $row) {
$list_row_url = '';
if (permission_exists('gateway_edit')) {
$list_row_url = "gateway_edit.php?id=".urlencode($row['gateway_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('gateway_add') || permission_exists('gateway_edit') || permission_exists('gateway_delete')) {
@ -367,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";
@ -391,3 +395,4 @@
require_once "resources/footer.php";
?>

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";
@ -236,8 +236,12 @@
if (!empty($ivr_menus)) {
$x = 0;
foreach($ivr_menus as $row) {
$list_row_url = '';
if (permission_exists('ivr_menu_edit')) {
$list_row_url = "ivr_menu_edit.php?id=".urlencode($row['ivr_menu_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('ivr_menu_add') || permission_exists('ivr_menu_edit') || permission_exists('ivr_menu_delete')) {
@ -274,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";
@ -298,3 +302,4 @@
require_once "resources/footer.php";
?>

View File

@ -96,8 +96,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -205,6 +205,7 @@
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";
@ -297,6 +298,7 @@
echo "</tr>\n";
echo "</table>";
echo "</div>";
echo "<br><br>";
if ($action == "update") {

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";
@ -202,8 +202,12 @@
echo "</tr>\n";
write_header($row["module_category"]);
}
$list_row_url = '';
if (permission_exists('module_edit')) {
$list_row_url = "module_edit.php?id=".urlencode($row['module_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('module_edit') || permission_exists('module_delete')) {
@ -257,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";
@ -283,3 +287,4 @@
require_once "resources/footer.php";
?>

View File

@ -87,8 +87,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); // 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)); // 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";
@ -225,8 +225,12 @@
if (!empty($number_translations)) {
$x = 0;
foreach ($number_translations as $row) {
$list_row_url = '';
if (permission_exists('number_translation_edit')) {
$list_row_url = "number_translation_edit.php?id=".urlencode($row['number_translation_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('number_translation_add') || permission_exists('number_translation_edit') || permission_exists('number_translation_delete')) {
@ -254,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";
@ -276,3 +280,4 @@
require_once "resources/footer.php";
?>

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";
@ -211,8 +211,12 @@
if (is_array($phrases) && @sizeof($phrases) != 0) {
$x = 0;
foreach($phrases as $row) {
$list_row_url = '';
if (permission_exists('phrase_edit')) {
$list_row_url = "phrase_edit.php?id=".urlencode($row['phrase_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('phrase_add') || permission_exists('phrase_edit') || permission_exists('phrase_delete')) {
@ -249,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";
@ -273,3 +277,4 @@
require_once "resources/footer.php";
?>

View File

@ -181,7 +181,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";
@ -189,8 +189,12 @@
if (is_array($pin_numbers) && @sizeof($pin_numbers) != 0) {
$x = 0;
foreach ($pin_numbers as $row) {
$list_row_url = '';
if (permission_exists('pin_number_edit')) {
$list_row_url = "pin_number_edit.php?id=".urlencode($row['pin_number_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('pin_number_add') || permission_exists('pin_number_edit') || permission_exists('pin_number_delete')) {
@ -218,7 +222,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";
@ -241,3 +245,4 @@
require_once "resources/footer.php";
?>

View File

@ -529,8 +529,12 @@
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['recording_uuid'])."' onclick=\"recording_seek(event,'".escape($row['recording_uuid'] ?? '')."')\" style='display: none;'><td id='playback_progress_bar_background_".escape($row['recording_uuid'])."' class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['recording_uuid'])."'></span></td></tr>\n";
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
}
$list_row_url = '';
if (permission_exists('recording_edit')) {
$list_row_url = "recording_edit.php?id=".urlencode($row['recording_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('recording_delete')) {
@ -710,3 +714,4 @@
}
?>

View File

@ -94,8 +94,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -234,13 +234,13 @@
echo " <td class='hide-md-dn'>".escape($row['ping-time'])."</td>\n";
echo " <td class='hide-md-dn' nowrap='nowrap'>".escape($row['sip_profile_name'])."</td>\n";
echo " <td class='action-button'>\n";
if (!empty($_SESSION['registrations']['list_row_button_unregister']['boolean']) && $_SESSION['registrations']['list_row_button_unregister']['boolean'] == 'true') {
if (filter_var($_SESSION['registrations']['list_row_button_unregister']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo button::create(['type'=>'submit','title'=>$text['button-unregister'],'icon'=>'user-slash fa-fw','style'=>'margin-left: 2px; margin-right: 0;','onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('unregister'); list_form_submit('form_list')"]);
}
if (!empty($_SESSION['registrations']['list_row_button_provision']['boolean']) && $_SESSION['registrations']['list_row_button_provision']['boolean'] == 'true') {
if (filter_var($_SESSION['registrations']['list_row_button_provision']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo button::create(['type'=>'submit','title'=>$text['button-provision'],'icon'=>'fax fa-fw','style'=>'margin-left: 2px; margin-right: 0;','onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('provision'); list_form_submit('form_list')"]);
}
if (!empty($_SESSION['registrations']['list_row_button_reboot']['boolean']) && $_SESSION['registrations']['list_row_button_reboot']['boolean'] == 'true') {
if (filter_var($_SESSION['registrations']['list_row_button_reboot']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo button::create(['type'=>'submit','title'=>$text['button-reboot'],'icon'=>'power-off fa-fw','style'=>'margin-left: 2px; margin-right: 0;','onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('reboot'); list_form_submit('form_list')"]);
}
echo "</td>\n";

View File

@ -249,7 +249,7 @@
echo th_order_by('ring_group_forward_enabled', $text['label-forwarding'], $order_by, $order);
echo th_order_by('ring_group_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('ring_group_description', $text['header-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('ring_group_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('ring_group_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";
@ -257,8 +257,12 @@
if (is_array($ring_groups) && @sizeof($ring_groups) != 0) {
$x = 0;
foreach ($ring_groups as $row) {
$list_row_url = '';
if (permission_exists('ring_group_edit')) {
$list_row_url = "ring_group_edit.php?id=".urlencode($row['ring_group_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('ring_group_add') || permission_exists('ring_group_edit') || permission_exists('ring_group_delete')) {
@ -291,7 +295,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['ring_group_description'])."&nbsp;</td>\n";
if (permission_exists('ring_group_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('ring_group_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";
@ -315,3 +319,4 @@
require_once "resources/footer.php";
?>

View File

@ -96,8 +96,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -76,7 +76,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);
//get order and order by
if (isset($_GET["order_by"])) {
@ -180,7 +180,7 @@
echo th_order_by('sip_profile_hostname', $text['label-sip_profile_hostname'], $order_by, $order);
echo th_order_by('sip_profile_enabled', $text['label-sip_profile_enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('sip_profile_description', $text['label-sip_profile_description'], $order_by, $order, null, "class='hide-sm-dn pct-70'");
if (permission_exists('sip_profile_edit') && $list_row_edit_button == 'true') {
if (permission_exists('sip_profile_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -188,8 +188,12 @@
if (!empty($sip_profiles) && @sizeof($sip_profiles) != 0) {
$x = 0;
foreach ($sip_profiles as $row) {
$list_row_url = '';
if (permission_exists('sip_profile_edit')) {
$list_row_url = "sip_profile_edit.php?id=".urlencode($row['sip_profile_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('sip_profile_add') || permission_exists('sip_profile_edit') || permission_exists('sip_profile_delete')) {
@ -217,7 +221,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['sip_profile_description'])."&nbsp;</td>\n";
if (permission_exists('sip_profile_edit') && $list_row_edit_button == 'true') {
if (permission_exists('sip_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";
@ -239,3 +243,4 @@
require_once "resources/footer.php";
?>

View File

@ -44,7 +44,7 @@
$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['sofia_global_settings'])) {
@ -201,7 +201,7 @@
echo th_order_by('global_setting_value', $text['label-global_setting_value'], $order_by, $order);
echo th_order_by('global_setting_enabled', $text['label-global_setting_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-global_setting_description']."</th>\n";
if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button == 'true') {
if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -209,8 +209,12 @@
if (!empty($sofia_global_settings) && @sizeof($sofia_global_settings) != 0) {
$x = 0;
foreach ($sofia_global_settings as $row) {
$list_row_url = '';
if (permission_exists('sofia_global_setting_edit')) {
$list_row_url = "sofia_global_setting_edit.php?id=".urlencode($row['sofia_global_setting_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('sofia_global_setting_add') || permission_exists('sofia_global_setting_edit') || permission_exists('sofia_global_setting_delete')) {
@ -239,7 +243,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['global_setting_description'])."</td>\n";
if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button == 'true') {
if (permission_exists('sofia_global_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";
@ -261,3 +265,4 @@
require_once "resources/footer.php";
?>

View File

@ -240,7 +240,7 @@
echo " <th class='pct-60'>".$text['label-play']."</th>\n";
echo th_order_by('stream_enabled', $text['label-stream_enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('stream_description', $text['label-stream_description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('stream_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('stream_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";
@ -248,8 +248,12 @@
if (!empty($streams)) {
$x = 0;
foreach ($streams as $row) {
$list_row_url = '';
if (permission_exists('stream_edit')) {
$list_row_url = "stream_edit.php?id=".urlencode($row['stream_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('stream_add') || permission_exists('stream_edit') || permission_exists('stream_delete')) {
@ -293,7 +297,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['stream_description'])."&nbsp;</td>\n";
if (permission_exists('stream_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('stream_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";
@ -315,3 +319,4 @@
require_once "resources/footer.php";
?>

View File

@ -11,6 +11,8 @@
<param name="sip-trace" value="no"/>
<param name="context" value="public"/>
<param name="rfc2833-pt" value="101"/>
<!-- RFC 5626 : Send reg-id and sip.instance -->
<param name="enable-rfc-5626" value="true" enabled="false"/>
<!-- port to bind to for sip traffic -->
<param name="sip-port" value="5060"/>
<param name="dialplan" value="XML"/>

View File

@ -83,6 +83,8 @@
<param name="context" value="public"/>
<param name="rfc2833-pt" value="101"/>
<!-- RFC 5626 : Send reg-id and sip.instance -->
<param name="enable-rfc-5626" value="true" enabled="false"/>
<!-- port to bind to for sip traffic -->
<param name="sip-port" value="5060"/>
<param name="dialplan" value="XML"/>

View File

@ -94,7 +94,7 @@ local sql = "SELECT * FROM v_email_templates ";
sql = sql .. "WHERE template_category = :category ";
sql = sql .. "AND template_subcategory = :subcategory ";
sql = sql .. "AND template_enabled = :status ";
local params = {category = 'plugins', subcategory = 'emergency', status = 'true'}
local params = {category = 'plugin', subcategory = 'emergency', status = 'true'}
dbh:query(sql, params, function(row)
subject = row.template_subject;
body = row.template_body;
@ -192,9 +192,10 @@ end);
--set event
if (tonumber(destination_number) == 933) then
event = '933 Emergency Address Validation Service';
else if (tonumber(destination_number) == 911) then
elseif (tonumber(destination_number) == 922) then
event = '922 Emergency Address Validation Service';
elseif (tonumber(destination_number) == 911) then
event = '911 Emergency Call';
end
end
--connect to the database
@ -261,4 +262,3 @@ end
dbh:query(sql, params);
dbh:release();

View File

@ -25,364 +25,361 @@
-- POSSIBILITY OF SUCH DAMAGE.
--load libraries
local send_mail = require 'resources.functions.send_mail'
local Database = require "resources.functions.database"
local Settings = require "resources.functions.lazy_settings"
local send_mail = require 'resources.functions.send_mail'
local Database = require "resources.functions.database"
local Settings = require "resources.functions.lazy_settings"
--define a function to send email
function send_email(id, uuid)
function send_email(id, uuid)
--prepare the database, settings and variables
local db = dbh or Database.new('system');
local settings = Settings.new(db, domain_name, domain_uuid);
local http_protocol = settings:get('domain', 'http_protocol', 'text') or "https";
local email_queue_enabled = "true";
--get voicemail message details
local sql = [[SELECT * FROM v_voicemails
WHERE domain_uuid = :domain_uuid
AND voicemail_id = :voicemail_id]]
local params = {domain_uuid = domain_uuid, voicemail_id = id};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
db_voicemail_uuid = string.lower(row["voicemail_uuid"]);
--voicemail_password = row["voicemail_password"];
--greeting_id = row["greeting_id"];
voicemail_mail_to = row["voicemail_mail_to"];
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
voicemail_file = row["voicemail_file"];
voicemail_local_after_email = row["voicemail_local_after_email"];
voicemail_local_after_forward = row["voicemail_local_after_forward"];
voicemail_description = row["voicemail_description"];
end);
--get voicemail message details
local sql = [[SELECT * FROM v_voicemails
WHERE domain_uuid = :domain_uuid
AND voicemail_id = :voicemail_id]]
local params = {domain_uuid = domain_uuid, voicemail_id = id};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
db_voicemail_uuid = string.lower(row["voicemail_uuid"]);
--voicemail_password = row["voicemail_password"];
--greeting_id = row["greeting_id"];
voicemail_mail_to = row["voicemail_mail_to"];
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
voicemail_file = row["voicemail_file"];
voicemail_local_after_email = row["voicemail_local_after_email"];
voicemail_description = row["voicemail_description"];
end);
--set default values
if (voicemail_file == nil) then
voicemail_file = "listen";
end
if (voicemail_local_after_email == nil) then
voicemail_local_after_email = "true";
end
if (voicemail_local_after_forward == nil) then
voicemail_local_after_forward = "true";
end
--set default values
if (voicemail_file == nil or voicemail_file == '') then
voicemail_file = "listen";
end
if (voicemail_local_after_email == nil or voicemail_local_after_email == '') then
voicemail_local_after_email = "true";
end
--require the email address to send the email
if (string.len(voicemail_mail_to) > 2) then
--include languages file
local Text = require "resources.functions.text"
local text = Text.new("app.voicemail.app_languages")
local dbh = dbh
--require the email address to send the email
if (string.len(voicemail_mail_to) > 2) then
--include languages file
local Text = require "resources.functions.text"
local text = Text.new("app.voicemail.app_languages")
local dbh = dbh
--user setting time zone, if set
local sql = [[
select
us.user_setting_value as time_zone
from
v_user_settings as us,
v_extension_users as eu,
v_extensions as e,
v_voicemails as v
where
v.voicemail_id = :voicemail_id and
v.domain_uuid = :domain_uuid and
v.voicemail_id = e.extension and
e.domain_uuid = :domain_uuid and
e.extension_uuid = eu.extension_uuid and
eu.domain_uuid = :domain_uuid and
eu.user_uuid = us.user_uuid and
us.domain_uuid = :domain_uuid and
us.user_setting_category = 'domain' and
us.user_setting_subcategory = 'time_zone' and
us.user_setting_name = 'name' and
us.user_setting_enabled = 'true'
order by
eu.insert_date asc
limit 1
]]
local params = {domain_uuid = domain_uuid, voicemail_id = id};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
time_zone = row["time_zone"];
end);
--user setting time zone, if set
local sql = [[
select
us.user_setting_value as time_zone
from
v_user_settings as us,
v_extension_users as eu,
v_extensions as e,
v_voicemails as v
where
v.voicemail_id = :voicemail_id and
v.domain_uuid = :domain_uuid and
v.voicemail_id = e.extension and
e.domain_uuid = :domain_uuid and
e.extension_uuid = eu.extension_uuid and
eu.domain_uuid = :domain_uuid and
eu.user_uuid = us.user_uuid and
us.domain_uuid = :domain_uuid and
us.user_setting_category = 'domain' and
us.user_setting_subcategory = 'time_zone' and
us.user_setting_name = 'name' and
us.user_setting_enabled = 'true'
order by
eu.insert_date asc
limit 1
]]
local params = {domain_uuid = domain_uuid, voicemail_id = id};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
time_zone = row["time_zone"];
end);
--default/domain setting time zone
if (time_zone == nil or time_zone == '') then
time_zone = settings:get('domain', 'time_zone', 'name');
end
--default time zone
if (time_zone == nil or time_zone == '') then
time_zone = 'UTC';
end
--connect using other backend if needed
if storage_type == "base64" then
dbh = Database.new('system', 'base64/read')
end
--get voicemail message details
local sql = [[SELECT to_char(timezone(:time_zone, to_timestamp(created_epoch)), 'Day DD Mon YYYY HH:MI:SS PM') as message_date, *
FROM v_voicemail_messages
WHERE domain_uuid = :domain_uuid
AND voicemail_message_uuid = :uuid]]
local params = {domain_uuid = domain_uuid, uuid = uuid, time_zone = time_zone};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
--get the values from the database
--uuid = row["voicemail_message_uuid"];
created_epoch = row["created_epoch"];
caller_id_name = row["caller_id_name"];
caller_id_number = row["caller_id_number"];
message_date = row["message_date"];
message_length = row["message_length"];
--message_status = row["message_status"];
--message_priority = row["message_priority"];
--get the recordings from the database
if (storage_type == "base64") then
--set the voicemail intro and message paths
message_location = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
intro_location = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
--save the recordings to the file system
if (string.len(row["message_base64"]) > 32) then
--save the value to a variable
voicemail_base64 = row["message_base64"];
--include the file io
local file = require "resources.functions.file"
--write decoded message string to file
file.write_base64(message_location, row["message_base64"]);
--write decoded intro string to file, if any
if (string.len(row["message_intro_base64"]) > 32) then
file.write_base64(intro_location, row["message_intro_base64"]);
end
end
end
end);
--close temporary connection
if storage_type == "base64" then
dbh:release()
end
--format the message length and date
message_length_formatted = format_seconds(message_length);
if (debug["info"]) then
freeswitch.consoleLog("notice", "[voicemail] message date: " .. message_date .. "\n");
freeswitch.consoleLog("notice", "[voicemail] message length: " .. message_length .. "\n");
end
--local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch);
--connect to the database
local dbh = Database.new('system');
--get the templates
local sql = "SELECT * FROM v_email_templates ";
sql = sql .. "WHERE (domain_uuid = :domain_uuid or domain_uuid is null) ";
sql = sql .. "AND template_language = :template_language ";
sql = sql .. "AND template_category = 'voicemail' "
if (voicemail_transcription_enabled == 'true') then
sql = sql .. "AND template_subcategory = 'transcription' "
else
sql = sql .. "AND template_subcategory = 'default' "
end
sql = sql .. "AND template_enabled = 'true' "
sql = sql .. "ORDER BY domain_uuid DESC "
local params = {domain_uuid = domain_uuid, template_language = default_language.."-"..default_dialect};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
subject = row["template_subject"];
body = row["template_body"];
end);
--get the link_address
link_address = http_protocol.."://"..domain_name..project_path;
--set proper delete status
local local_after_email = '';
if (voicemail_local_after_email == "false" or voicemail_local_after_forward == "false") then
local_after_email = "false";
else
local_after_email = "true";
end
--prepare the headers
local headers = {
["X-FusionPBX-Domain-UUID"] = domain_uuid;
["X-FusionPBX-Domain-Name"] = domain_name;
["X-FusionPBX-Call-UUID"] = uuid;
["X-FusionPBX-Email-Type"] = 'voicemail';
["X-FusionPBX-local_after_email"] = local_after_email;
}
--prepare the voicemail_name_formatted
voicemail_name_formatted = id;
local display_domain_name = settings:get('voicemail', 'display_domain_name', 'boolean');
if (display_domain_name == 'true') then
voicemail_name_formatted = id.."@"..domain_name;
end
if (voicemail_description ~= nil and voicemail_description ~= "" and voicemail_description ~= id) then
voicemail_name_formatted = voicemail_name_formatted.." ("..voicemail_description..")";
end
--prepare file
file = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
--combine intro, if exists, with message for emailing (only)
intro = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
combined = voicemail_dir.."/"..id.."/intro_msg_"..uuid.."."..vm_message_ext;
if (file_exists(intro) and file_exists(file)) then
os.execute("sox "..intro.." "..file.." "..combined);
end
--prepare the subject
if (subject ~= nil) then
subject = subject:gsub("${caller_id_name}", caller_id_name);
subject = subject:gsub("${caller_id_number}", caller_id_number);
subject = subject:gsub("${message_date}", message_date);
subject = subject:gsub("${message_duration}", message_length_formatted);
subject = subject:gsub("${account}", voicemail_name_formatted);
subject = subject:gsub("${voicemail_id}", id);
subject = subject:gsub("${voicemail_description}", voicemail_description);
subject = subject:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
subject = subject:gsub("${domain_name}", domain_name);
subject = subject:gsub("${new_messages}", new_messages);
subject = trim(subject);
else
subject = text['label-voicemail'] .. ' ' .. caller_id_name .. ' <' .. caller_id_number .. '> ' .. message_length_formatted;
end
subject = '=?utf-8?B?'..base64.encode(subject)..'?=';
--prepare the body
if (body ~= nil) then
body = body:gsub("${caller_id_name}", caller_id_name);
body = body:gsub("${caller_id_number}", caller_id_number);
body = body:gsub("${message_date}", message_date);
if (transcription ~= nil) then
transcription = transcription:gsub("%%", "*");
body = body:gsub("${message_text}", transcription);
end
body = body:gsub("${message_duration}", message_length_formatted);
body = body:gsub("${account}", voicemail_name_formatted);
body = body:gsub("${voicemail_id}", id);
body = body:gsub("${voicemail_description}", voicemail_description);
body = body:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
body = body:gsub("${domain_name}", domain_name);
body = body:gsub("${sip_to_user}", id);
if (origination_callee_id_name ~= nil) then
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
end
body = body:gsub("${dialed_user}", id);
if (voicemail_file == "attach" and file) then
body = body:gsub("${message}", text['label-attached']);
elseif (voicemail_file == "link") then
body = body:gsub("${message}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>");
else
body = body:gsub("${message}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>");
end
--body = body:gsub(" ", "&nbsp;");
--body = body:gsub("%s+", "");
--body = body:gsub("&nbsp;", " ");
body = trim(body);
else
body = '<html><body>';
if (caller_id_name ~= nil and caller_id_name ~= caller_id_number) then
body = body .. caller_id_name .. '<br>';
end
body = body .. caller_id_number .. '<br>';
body = body .. message_date .. '<br>';
if (voicemail_file == "attach" and file) then
body = body .. '<br>' .. text['label-attached'];
elseif (voicemail_file == "link") then
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>";
else
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>";
end
body = body .. '</body></html>';
end
--get the smtp from address and name
smtp_from = settings:get('voicemail', 'smtp_from', 'text');
smtp_from_name = settings:get('voicemail', 'smtp_from_name', 'text');
if (smtp_from == nil or smtp_from == '') then
smtp_from = settings:get('email', 'smtp_from', 'text');
end
if (smtp_from_name == nil or smtp_from_name == '') then
smtp_from_name = settings:get('email', 'smtp_from_name', 'text');
end
if (smtp_from_name and string.len(smtp_from_name) > 0 and smtp_from and string.len(smtp_from) > 2) then
smtp_from = smtp_from_name.."<"..smtp_from..">";
end
--send the email with, or without, including the intro
if (file_exists(combined)) then
voicemail_path = combined
else
voicemail_path = file
end
--send the email
send_mail(headers,
smtp_from,
voicemail_mail_to,
{subject, body},
(voicemail_file == "attach") and voicemail_path,
voicemail_base64
);
end
--whether to keep the voicemail message and details local after email
if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
if (voicemail_local_after_email == "false" and voicemail_local_after_forward == "false") then
--delete the voicemail message details
local sql = [[DELETE FROM v_voicemail_messages
WHERE domain_uuid = :domain_uuid
AND voicemail_uuid = :voicemail_uuid
AND voicemail_message_uuid = :uuid]]
local params = {domain_uuid = domain_uuid,
voicemail_uuid = db_voicemail_uuid, uuid = uuid};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params);
--delete voicemail recording files
if (file_exists(file)) then
os.remove(file);
end
if (file_exists(intro)) then
os.remove(intro);
end
if (file_exists(combined)) then
os.remove(combined);
end
--set message waiting indicator
message_waiting(id, domain_uuid);
--clear the variable
db_voicemail_uuid = '';
elseif (storage_type == "base64") then
--delete voicemail recording files
if (file_exists(file)) then
os.remove(file);
end
if (file_exists(intro)) then
os.remove(intro);
end
if (file_exists(combined)) then
os.remove(combined);
end
--default/domain setting time zone
if (time_zone == nil or time_zone == '') then
time_zone = settings:get('domain', 'time_zone', 'name');
end
--default time zone
if (time_zone == nil or time_zone == '') then
time_zone = 'UTC';
end
--connect using other backend if needed
if storage_type == "base64" then
dbh = Database.new('system', 'base64/read')
end
--get voicemail message details
local sql = [[SELECT to_char(timezone(:time_zone, to_timestamp(created_epoch)), 'Day DD Mon YYYY HH:MI:SS PM') as message_date, *
FROM v_voicemail_messages
WHERE domain_uuid = :domain_uuid
AND voicemail_message_uuid = :uuid]]
local params = {domain_uuid = domain_uuid, uuid = uuid, time_zone = time_zone};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
--get the values from the database
--uuid = row["voicemail_message_uuid"];
created_epoch = row["created_epoch"];
caller_id_name = row["caller_id_name"];
caller_id_number = row["caller_id_number"];
message_date = row["message_date"];
message_length = row["message_length"];
--message_status = row["message_status"];
--message_priority = row["message_priority"];
--get the recordings from the database
if (storage_type == "base64") then
--set the voicemail intro and message paths
message_location = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
intro_location = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
--save the recordings to the file system
if (string.len(row["message_base64"]) > 32) then
--save the value to a variable
voicemail_base64 = row["message_base64"];
--include the file io
local file = require "resources.functions.file"
--write decoded message string to file
file.write_base64(message_location, row["message_base64"]);
--write decoded intro string to file, if any
if (string.len(row["message_intro_base64"]) > 32) then
file.write_base64(intro_location, row["message_intro_base64"]);
end
end
end
end);
--close temporary connection
if storage_type == "base64" then
dbh:release()
end
--format the message length and date
message_length_formatted = format_seconds(message_length);
if (debug["info"]) then
freeswitch.consoleLog("notice", "[voicemail] message date: " .. message_date .. "\n");
freeswitch.consoleLog("notice", "[voicemail] message length: " .. message_length .. "\n");
end
--local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch);
--connect to the database
local dbh = Database.new('system');
--get the templates
local sql = "SELECT * FROM v_email_templates ";
sql = sql .. "WHERE (domain_uuid = :domain_uuid or domain_uuid is null) ";
sql = sql .. "AND template_language = :template_language ";
sql = sql .. "AND template_category = 'voicemail' "
if (voicemail_transcription_enabled == 'true') then
sql = sql .. "AND template_subcategory = 'transcription' "
else
sql = sql .. "AND template_subcategory = 'default' "
end
sql = sql .. "AND template_enabled = 'true' "
sql = sql .. "ORDER BY domain_uuid DESC "
local params = {domain_uuid = domain_uuid, template_language = default_language.."-"..default_dialect};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
subject = row["template_subject"];
body = row["template_body"];
end);
--get the link_address
link_address = http_protocol.."://"..domain_name..project_path;
--set proper delete status
local local_after_email = '';
if (voicemail_local_after_email == "false") then
local_after_email = "false";
else
local_after_email = "true";
end
--prepare the headers
local headers = {
["X-FusionPBX-Domain-UUID"] = domain_uuid;
["X-FusionPBX-Domain-Name"] = domain_name;
["X-FusionPBX-Call-UUID"] = uuid;
["X-FusionPBX-Email-Type"] = 'voicemail';
["X-FusionPBX-local_after_email"] = local_after_email;
}
--prepare the voicemail_name_formatted
voicemail_name_formatted = id;
local display_domain_name = settings:get('voicemail', 'display_domain_name', 'boolean');
if (display_domain_name == 'true') then
voicemail_name_formatted = id.."@"..domain_name;
end
if (voicemail_description ~= nil and voicemail_description ~= "" and voicemail_description ~= id) then
voicemail_name_formatted = voicemail_name_formatted.." ("..voicemail_description..")";
end
--prepare file
file = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
--combine intro, if exists, with message for emailing (only)
intro = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
combined = voicemail_dir.."/"..id.."/intro_msg_"..uuid.."."..vm_message_ext;
if (file_exists(intro) and file_exists(file)) then
os.execute("sox "..intro.." "..file.." "..combined);
end
--prepare the subject
if (subject ~= nil) then
subject = subject:gsub("${caller_id_name}", caller_id_name);
subject = subject:gsub("${caller_id_number}", caller_id_number);
subject = subject:gsub("${message_date}", message_date);
subject = subject:gsub("${message_duration}", message_length_formatted);
subject = subject:gsub("${account}", voicemail_name_formatted);
subject = subject:gsub("${voicemail_id}", id);
subject = subject:gsub("${voicemail_description}", voicemail_description);
subject = subject:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
subject = subject:gsub("${domain_name}", domain_name);
subject = subject:gsub("${new_messages}", new_messages);
subject = trim(subject);
else
subject = text['label-voicemail'] .. ' ' .. caller_id_name .. ' <' .. caller_id_number .. '> ' .. message_length_formatted;
end
subject = '=?utf-8?B?'..base64.encode(subject)..'?=';
--prepare the body
if (body ~= nil) then
body = body:gsub("${caller_id_name}", caller_id_name);
body = body:gsub("${caller_id_number}", caller_id_number);
body = body:gsub("${message_date}", message_date);
if (transcription ~= nil) then
transcription = transcription:gsub("%%", "*");
body = body:gsub("${message_text}", transcription);
end
body = body:gsub("${message_duration}", message_length_formatted);
body = body:gsub("${account}", voicemail_name_formatted);
body = body:gsub("${voicemail_id}", id);
body = body:gsub("${voicemail_description}", voicemail_description);
body = body:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
body = body:gsub("${domain_name}", domain_name);
body = body:gsub("${sip_to_user}", id);
if (origination_callee_id_name ~= nil) then
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
end
body = body:gsub("${dialed_user}", id);
if (voicemail_file == "attach" and file) then
body = body:gsub("${message}", text['label-attached']);
elseif (voicemail_file == "link") then
body = body:gsub("${message}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>");
else
body = body:gsub("${message}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>");
end
--body = body:gsub(" ", "&nbsp;");
--body = body:gsub("%s+", "");
--body = body:gsub("&nbsp;", " ");
body = trim(body);
else
body = '<html><body>';
if (caller_id_name ~= nil and caller_id_name ~= caller_id_number) then
body = body .. caller_id_name .. '<br>';
end
body = body .. caller_id_number .. '<br>';
body = body .. message_date .. '<br>';
if (voicemail_file == "attach" and file) then
body = body .. '<br>' .. text['label-attached'];
elseif (voicemail_file == "link") then
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>";
else
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>";
end
body = body .. '</body></html>';
end
--get the smtp from address and name
smtp_from = settings:get('voicemail', 'smtp_from', 'text');
smtp_from_name = settings:get('voicemail', 'smtp_from_name', 'text');
if (smtp_from == nil or smtp_from == '') then
smtp_from = settings:get('email', 'smtp_from', 'text');
end
if (smtp_from_name == nil or smtp_from_name == '') then
smtp_from_name = settings:get('email', 'smtp_from_name', 'text');
end
if (smtp_from_name and string.len(smtp_from_name) > 0 and smtp_from and string.len(smtp_from) > 2) then
smtp_from = smtp_from_name.."<"..smtp_from..">";
end
--send the email with, or without, including the intro
if (file_exists(combined)) then
voicemail_path = combined
else
voicemail_path = file
end
--send the email
send_mail(headers,
smtp_from,
voicemail_mail_to,
{subject, body},
(voicemail_file == "attach") and voicemail_path,
voicemail_base64
);
end
--whether to keep the voicemail message and details local after email
if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
if (voicemail_local_after_email == "false") then
--delete the voicemail message details
local sql = [[DELETE FROM v_voicemail_messages
WHERE domain_uuid = :domain_uuid
AND voicemail_uuid = :voicemail_uuid
AND voicemail_message_uuid = :uuid]]
local params = {domain_uuid = domain_uuid,
voicemail_uuid = db_voicemail_uuid, uuid = uuid};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params);
--delete voicemail recording files
if (file_exists(file)) then
os.remove(file);
end
if (file_exists(intro)) then
os.remove(intro);
end
if (file_exists(combined)) then
os.remove(combined);
end
--set message waiting indicator
message_waiting(id, domain_uuid);
--clear the variable
db_voicemail_uuid = '';
elseif (storage_type == "base64") then
--delete voicemail recording files
if (file_exists(file)) then
os.remove(file);
end
if (file_exists(intro)) then
os.remove(intro);
end
if (file_exists(combined)) then
os.remove(combined);
end
end
end
end
end

View File

@ -260,8 +260,8 @@
//get the domain active and inactive counts
$sql = "select ";
$sql .= "(select count(*) from v_domains where domain_enabled = 'true') as active, ";
$sql .= "(select count(*) from v_domains where domain_enabled = 'false') as inactive; ";
$sql .= "(select count(domain_uuid) from v_domains where domain_enabled = 'true') as active, ";
$sql .= "(select count(domain_uuid) from v_domains where domain_enabled = 'false') as inactive; ";
$row = $database->select($sql, null, 'row');
$domain_active = $row['active'];
$domain_inactive = $row['inactive'];

View File

@ -49,9 +49,9 @@
if (permission_exists("system_view_support")) {
$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';
}
//additional includes

View File

@ -210,7 +210,7 @@
echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, null, "class='center'", ($search != '' ? "search=".$search : null));
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'", ($search != '' ? "search=".$search : null));
echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'", ($search != '' ? "search=".$search : null));
if (permission_exists('time_condition_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('time_condition_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";
@ -218,8 +218,12 @@
if (is_array($dialplans) && @sizeof($dialplans) != 0) {
$x = 0;
foreach ($dialplans as $row) {
$list_row_url = '';
if (permission_exists('time_condition_edit')) {
$list_row_url = "time_condition_edit.php?id=".urlencode($row['dialplan_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('time_condition_add') || permission_exists('time_condition_edit') || permission_exists('time_condition_delete')) {
@ -260,7 +264,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".$row['dialplan_description']."&nbsp;</td>\n";
if (permission_exists('time_condition_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('time_condition_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";
@ -282,3 +286,4 @@
require_once "resources/footer.php";
?>

View File

@ -85,7 +85,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);
//get the count
$sql = "select count(var_uuid) from v_vars ";
@ -207,7 +207,7 @@
echo th_order_by('var_hostname', $text['label-hostname'], $order_by, $order, null, "class='hide-sm-dn'");
echo th_order_by('var_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo "<th class='hide-sm-dn'>".$text['label-description']."</th>\n";
if (permission_exists('var_edit') && $list_row_edit_button == 'true') {
if (permission_exists('var_edit') && $list_row_edit_button) {
echo "<td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
@ -224,8 +224,12 @@
echo "</tr>\n";
write_header($row["var_category"]);
}
$list_row_url = '';
if (permission_exists('var_edit')) {
$list_row_url = "var_edit.php?id=".urlencode($row['var_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('var_add') || permission_exists('var_edit') || permission_exists('var_delete')) {
@ -259,7 +263,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['var_description'] ?? '')."</td>\n";
if (permission_exists('var_edit') && $list_row_edit_button == 'true') {
if (permission_exists('var_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";
@ -283,3 +287,4 @@
require_once "resources/footer.php";
?>

View File

@ -424,7 +424,7 @@
}
echo th_order_by('greeting_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn pct-25'", "id=".urlencode($voicemail_id));
$col_count++;
if (permission_exists('voicemail_greeting_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('voicemail_greeting_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";
@ -437,8 +437,12 @@
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['voicemail_greeting_uuid'])."' onclick=\"recording_seek(event,'".escape($row['voicemail_greeting_uuid'])."')\" style='display: none;'><td id='playback_progress_bar_background_".escape($row['voicemail_greeting_uuid'])."' class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['voicemail_greeting_uuid'])."'></span></td></tr>\n";
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
}
$list_row_url = '';
if (permission_exists('voicemail_greeting_edit')) {
$list_row_url = "voicemail_greeting_edit.php?id=".urlencode($row['voicemail_greeting_uuid'])."&voicemail_id=".urlencode($voicemail_id);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('voicemail_greeting_delete')) {
@ -493,7 +497,7 @@
echo " <td class='center no-wrap hide-xs'>".$file_date."</td>\n";
}
echo " <td class='description overflow hide-sm-dn'>".escape($row['greeting_description'])."&nbsp;</td>\n";
if (permission_exists('voicemail_greeting_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('voicemail_greeting_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";
@ -605,3 +609,4 @@
}
?>

View File

@ -103,8 +103,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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($greeting_dir.'/'.$temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}

View File

@ -180,10 +180,6 @@
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "agent";
$y++;
$apps[$x]['permissions'][$y]['name'] = "voicemail_local_after_forward";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "voicemail_recording_instructions";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
@ -491,6 +487,7 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose to keep the voicemail file after sending to forward destinations.";
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
@ -751,4 +748,4 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
?>

View File

@ -649,33 +649,6 @@ $text['label-voicemail_local_after_email']['zh-cn'] = "保持本地";
$text['label-voicemail_local_after_email']['ja-jp'] = "ローカルに保つ";
$text['label-voicemail_local_after_email']['ko-kr'] = "로컬 유지";
$text['label-voicemail_local_after_forward']['en-us'] = "Keep Local After Forward";
$text['label-voicemail_local_after_forward']['en-gb'] = "Keep Local After Forward";
$text['label-voicemail_local_after_forward']['ar-eg'] = "الحفاظ على المحلية بعد الأمام";
$text['label-voicemail_local_after_forward']['de-at'] = "Nach Weiterleitung lokal behalten";
$text['label-voicemail_local_after_forward']['de-ch'] = "Nach Weiterleitung lokal behalten";
$text['label-voicemail_local_after_forward']['de-de'] = "Nach Weiterleitung lokal behalten";
$text['label-voicemail_local_after_forward']['el-gr'] = "Keep Local After Forward";
$text['label-voicemail_local_after_forward']['es-cl'] = "Mantener local después de avanzar";
$text['label-voicemail_local_after_forward']['es-mx'] = "Mantener local después de avanzar";
$text['label-voicemail_local_after_forward']['fr-ca'] = "Rester local après le transfert";
$text['label-voicemail_local_after_forward']['fr-fr'] = "Rester local après le transfert";
$text['label-voicemail_local_after_forward']['he-il'] = "שמור על מקומי לאחר קדימה";
$text['label-voicemail_local_after_forward']['it-it'] = "Mantieni locale dopo l'inoltro";
$text['label-voicemail_local_after_forward']['ka-ge'] = "გადაგზავნის შემდეგ ადგილობრივად შენარჩუნება";
$text['label-voicemail_local_after_forward']['nl-nl'] = "Lokaal behouden na doorsturen";
$text['label-voicemail_local_after_forward']['pl-pl'] = "Zachowaj lokalny po przesłaniu dalej";
$text['label-voicemail_local_after_forward']['pt-br'] = "Manter local depois de encaminhar";
$text['label-voicemail_local_after_forward']['pt-pt'] = "Manter local depois de encaminhar";
$text['label-voicemail_local_after_forward']['ro-ro'] = "Păstrați local după redirecționare";
$text['label-voicemail_local_after_forward']['ru-ru'] = "Сохранять локальное значение после пересылки";
$text['label-voicemail_local_after_forward']['sv-se'] = "Håll lokal efter Forward";
$text['label-voicemail_local_after_forward']['uk-ua'] = "Зберігати локальні після пересилання";
$text['label-voicemail_local_after_forward']['tr-tr'] = "İleriden Sonra Yerel Tut";
$text['label-voicemail_local_after_forward']['zh-cn'] = "转发后保持本地";
$text['label-voicemail_local_after_forward']['ja-jp'] = "転送後もローカルに保持";
$text['label-voicemail_local_after_forward']['ko-kr'] = "전달 후 로컬 유지";
$text['label-voicemail_transcribe_enabled']['en-us'] = "Transcribe";
$text['label-voicemail_transcribe_enabled']['en-gb'] = "Transcribe";
$text['label-voicemail_transcribe_enabled']['ar-eg'] = "نسخ";
@ -1782,32 +1755,32 @@ $text['description-voicemail_alternate_greet_id']['zh-cn'] = "默认问候语中
$text['description-voicemail_alternate_greet_id']['ja-jp'] = "デフォルトのグリーティングで使用される代替グリーティング ID。";
$text['description-voicemail_alternate_greet_id']['ko-kr'] = "기본 인사말에 사용되는 대체 인사말 ID입니다.";
$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to. Multiple addresses may be separated by commas.";
$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to. Multiple addresses may be separated by commas.";
$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 las direcciones de correo a quien desee enviar el correo de voz.";
$text['description-voicemail_mail_to']['es-mx'] = "Ingrese las direcciones de correo a quien desee enviar el correo de voz.";
$text['description-voicemail_mail_to']['fr-ca'] = "Saisissez l'adresse e-mail à laquelle envoyer le message vocal. Plusieurs adresses peuvent être séparées par des virgules.";
$text['description-voicemail_mail_to']['fr-fr'] = "Saisissez l'adresse e-mail à laquelle envoyer le message vocal. Plusieurs adresses peuvent être séparées par des virgules.";
$text['description-voicemail_mail_to']['he-il'] = "הזן את כתובת הדואר האלקטרוני שאליה יש לשלוח דואר קולי. כתובות מרובות עשויות להיות מופרדות בפסיקים.";
$text['description-voicemail_mail_to']['it-it'] = "Inserire l'indirizzo email a cui spedire i messaggi vocali.";
$text['description-voicemail_mail_to']['ka-ge'] = "შეიყვანეთ ელფოსტის მისამართი, სადაც ხმოვანი ფოსტა გაიგზავნება. ერთზე მეტი მისამართი მძიმით უნდა გამოჰყოთ.";
$text['description-voicemail_mail_to']['nl-nl'] = "Voer het E-mail adres om de boodschap naar te sturen.";
$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.";
$text['description-voicemail_mail_to']['ro-ro'] = "Introduceți adresa de e-mail la care trimiteți mesajul vocal. Adresele multiple pot fi separate prin virgule.";
$text['description-voicemail_mail_to']['ru-ru'] = "Введите адрес электронной почты для отправки голосовой почты.";
$text['description-voicemail_mail_to']['sv-se'] = "Ange E-post adressen dit meddelande skall skickas.";
$text['description-voicemail_mail_to']['uk-ua'] = "Введіть адресу E-Mail на яку надіслати голосове повідомлення";
$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gönderileceği e-posta adresini girin. 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_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.";
@ -1836,33 +1809,6 @@ $text['description-voicemail_local_after_email']['zh-cn'] = "选择发送电子
$text['description-voicemail_local_after_email']['ja-jp'] = "電子メール通知の送信後にボイスメールをシステムに保持するかどうかを選択します。";
$text['description-voicemail_local_after_email']['ko-kr'] = "이메일 알림을 보낸 후 시스템에 음성 메일을 유지할지 여부를 선택합니다.";
$text['description-voicemail_local_after_forward']['en-us'] = "Choose whether to keep the voicemail in this mailbox after sending to the defined Forward Destination(s).";
$text['description-voicemail_local_after_forward']['en-gb'] = "Choose whether to keep the voicemail in this mailbox after sending to the defined Forward Destination(s).";
$text['description-voicemail_local_after_forward']['ar-eg'] = "اختر ما إذا كنت تريد الاحتفاظ بالبريد الصوتي في صندوق البريد هذا بعد إرساله إلى وجهة (وجهات) إعادة التوجيه المحددة.";
$text['description-voicemail_local_after_forward']['de-at'] = "Wählen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
$text['description-voicemail_local_after_forward']['de-ch'] = "Wählen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
$text['description-voicemail_local_after_forward']['de-de'] = "Wählen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
$text['description-voicemail_local_after_forward']['el-gr'] = "Επιλέξτε εάν θα διατηρηθεί ο τηλεφωνητής σε αυτό το γραμματοκιβώτιο μετά την αποστολή στον καθορισμένο(ους) Προορισμό(ους).";
$text['description-voicemail_local_after_forward']['es-cl'] = "Elija si desea conservar el correo de voz en este buzón después de enviarlo a los destinos de reenvío definidos.";
$text['description-voicemail_local_after_forward']['es-mx'] = "Elija si desea conservar el correo de voz en este buzón después de enviarlo a los destinos de reenvío definidos.";
$text['description-voicemail_local_after_forward']['fr-ca'] = "Choisissez si vous souhaitez conserver la messagerie vocale dans cette boîte aux lettres après l'envoi vers la ou les destinations de transfert définies.";
$text['description-voicemail_local_after_forward']['fr-fr'] = "Choisissez si vous souhaitez conserver la messagerie vocale dans cette boîte aux lettres après l'envoi vers la ou les destinations de transfert définies.";
$text['description-voicemail_local_after_forward']['he-il'] = "בחר אם לשמור את הדואר הקולי בתיבת הדואר הזו לאחר השליחה ליעד/ים המוגדרים.";
$text['description-voicemail_local_after_forward']['it-it'] = "Scegliere se conservare i messaggi vocali in questa casella di posta dopo l'invio alle destinazioni di inoltro definite.";
$text['description-voicemail_local_after_forward']['ka-ge'] = "აირჩიეთ, დარჩება თუ არა ხმოვანი ფოსტა ამ საფოსტო ყუთში განსაზღვრულ დანიშნულების პუნქტებამდე გაგზავნის შემდეგ.";
$text['description-voicemail_local_after_forward']['nl-nl'] = "Kies of u de voicemail in deze mailbox wilt bewaren na verzending naar de gedefinieerde doorstuurbestemming(en).";
$text['description-voicemail_local_after_forward']['pl-pl'] = "Wybierz, czy poczta głosowa ma być przechowywana w tej skrzynce pocztowej po wysłaniu do określonych miejsc docelowych przekazywania.";
$text['description-voicemail_local_after_forward']['pt-br'] = "Escolha se deseja manter o correio de voz nesta caixa postal após enviar para o(s) destino(s) de encaminhamento definido(s).";
$text['description-voicemail_local_after_forward']['pt-pt'] = "Escolha se deseja manter o correio de voz nesta caixa postal após enviar para o(s) destino(s) de encaminhamento definido(s).";
$text['description-voicemail_local_after_forward']['ro-ro'] = "Alegeți dacă doriți să păstrați mesageria vocală în această cutie poștală după trimiterea către destinația (destinațiile) de redirecționare definite.";
$text['description-voicemail_local_after_forward']['ru-ru'] = "Выберите, следует ли сохранять голосовую почту в этом почтовом ящике после отправки в определенные пункты назначения пересылки.";
$text['description-voicemail_local_after_forward']['sv-se'] = "Välj om du vill behålla röstbrevlådan i den här brevlådan efter att ha skickats till den eller de definierade vidarebefordrandestinationerna.";
$text['description-voicemail_local_after_forward']['uk-ua'] = "Виберіть, чи зберігати голосову пошту в цій поштовій скриньці після надсилання на визначені пункти призначення.";
$text['description-voicemail_local_after_forward']['tr-tr'] = "Tanımlanan İletme Hedef(ler)ine gönderdikten sonra sesli postanın bu posta kutusunda tutulup tutulmayacağını seçin.";
$text['description-voicemail_local_after_forward']['zh-cn'] = "选择在发送到定义的转发目的地后是否将语音邮件保留在此邮箱中。";
$text['description-voicemail_local_after_forward']['ja-jp'] = "定義された転送先に送信した後、ボイスメールをこのメールボックスに保持するかどうかを選択します。";
$text['description-voicemail_local_after_forward']['ko-kr'] = "정의된 전달 대상으로 음성 메일을 보낸 후 이 사서함에 음성 메일을 보관할지 여부를 선택합니다.";
$text['description-voicemail_id']['en-us'] = "Enter the Voicemail ID";
$text['description-voicemail_id']['en-gb'] = "Enter the Voicemail ID";
$text['description-voicemail_id']['ar-eg'] = "أدخل معرف البريد الصوتي";
@ -2726,4 +2672,4 @@ $text['message-emails_resent']['zh-cn'] = "电子邮件已重新发送";
$text['message-emails_resent']['ja-jp'] = "再送信メール";
$text['message-emails_resent']['ko-kr'] = "이메일 재전송";
?>
?>

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):
@ -100,7 +100,6 @@
$voicemail_file = $_POST["voicemail_file"];
$voicemail_local_after_email = $_POST["voicemail_local_after_email"] ?? null;
$voicemail_destination = $_POST["voicemail_destination"];
$voicemail_local_after_forward = $_POST["voicemail_local_after_forward"] ?? null;
$voicemail_enabled = $_POST["voicemail_enabled"] ?? 'false';
$voicemail_description = $_POST["voicemail_description"];
$voicemail_tutorial = $_POST["voicemail_tutorial"] ?? null;
@ -153,8 +152,8 @@
if ($action == "add" && permission_exists('voicemail_add')) {
$voicemail_uuid = uuid();
//if adding a mailbox and don't have the transcription permission, set the default transcribe behavior
if (!permission_exists('voicemail_transcription_enabled') && isset($_SESSION['voicemail']['transcription_enabled_default']['boolean'])) {
$voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?? 'false';
if (!permission_exists('voicemail_transcription_enabled')) {
$voicemail_transcription_enabled = filter_var($_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
}
}
@ -178,24 +177,9 @@
if (permission_exists('voicemail_file')) {
$array['voicemails'][0]['voicemail_file'] = $voicemail_file;
}
if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
if (permission_exists('voicemail_local_after_email')) {
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_email ?? 'false';
}
else if (permission_exists('voicemail_local_after_forward')) {
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_forward ?? 'false';
}
else {
$array['voicemails'][0]['voicemail_local_after_email'] = 'true';
}
if (permission_exists('voicemail_local_after_forward')) {
$array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_forward ?? 'false';
}
else if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
$array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_email ?? 'false';
}
else {
$array['voicemails'][0]['voicemail_local_after_forward'] = 'true';
}
$array['voicemails'][0]['voicemail_enabled'] = $voicemail_enabled;
$array['voicemails'][0]['voicemail_description'] = $voicemail_description;
@ -362,7 +346,6 @@
$voicemail_recording_options = $row["voicemail_recording_options"];
$voicemail_file = $row["voicemail_file"];
$voicemail_local_after_email = $row["voicemail_local_after_email"];
$voicemail_local_after_forward = $row["voicemail_local_after_forward"];
$voicemail_enabled = $row["voicemail_enabled"];
$voicemail_description = $row["voicemail_description"];
}
@ -370,8 +353,7 @@
}
else {
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
$voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
$voicemail_local_after_forward = $_SESSION['voicemail']['keep_local']['boolean'];
$voicemail_local_after_email = filter_var($_SESSION['voicemail']['keep_local']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
}
//remove the spaces
@ -381,9 +363,8 @@
//set the defaults
if (empty($voicemail_local_after_email)) { $voicemail_local_after_email = 'true'; }
if (empty($voicemail_local_after_forward)) { $voicemail_local_after_forward = 'true'; }
if (empty($voicemail_enabled)) { $voicemail_enabled = 'true'; }
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = filter_var($_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?? false, FILTER_VALIDATE_BOOL); }
if (empty($voicemail_tutorial)) { $voicemail_tutorial = 'false'; }
if (empty($voicemail_recording_instructions)) { $voicemail_recording_instructions = 'true'; }
if (empty($voicemail_recording_options)) { $voicemail_recording_options = 'true'; }
@ -488,8 +469,8 @@
require_once "resources/header.php";
//password complexity
$password_complexity = $_SESSION['voicemail']['password_complexity']['boolean'] ?? '';
if ($password_complexity == "true") {
$password_complexity = filter_var($_SESSION['voicemail']['password_complexity']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
if ($password_complexity) {
echo "<script>\n";
$req['length'] = $_SESSION['voicemail']['password_min_length']['numeric'];
echo " function check_password_strength(pwd) {\n";
@ -555,7 +536,7 @@
if ($action == "update" && (permission_exists('voicemail_delete') || permission_exists('voicemail_option_delete'))) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>'margin-left: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>($password_complexity == "true" ? "if (check_password_strength(document.getElementById('password').value)) { submit_form(); } else { this.blur(); return false; }" : 'submit_form();')]);
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>($password_complexity ? "if (check_password_strength(document.getElementById('password').value)) { submit_form(); } else { this.blur(); return false; }" : 'submit_form();')]);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
@ -852,7 +833,7 @@
echo "</tr>\n";
}
if (permission_exists('voicemail_transcription_enabled') && ($_SESSION['transcribe']['enabled']['boolean'] ?? '') == "true") {
if (permission_exists('voicemail_transcription_enabled') && filter_var($_SESSION['transcribe']['enabled']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_transcription_enabled']."\n";
@ -893,10 +874,7 @@
echo "</tr>\n";
}
if (
permission_exists('voicemail_file') &&
permission_exists('voicemail_local_after_email')
) {
if (permission_exists('voicemail_file') && permission_exists('voicemail_local_after_email')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_local_after_email']."\n";
@ -970,38 +948,8 @@
echo " </tr>";
}
if (
permission_exists('voicemail_forward') &&
permission_exists('voicemail_local_after_forward') &&
!empty($voicemail_destinations_assigned) &&
is_array($voicemail_destinations_assigned)
) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_local_after_forward']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='voicemail_local_after_forward' name='voicemail_local_after_forward' value='true' ".($voicemail_local_after_forward == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span> \n";
echo " </label>\n";
}
else {
echo " <select class='formfld' id='voicemail_local_after_forward' name='voicemail_local_after_forward'>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".($voicemail_local_after_forward == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
}
echo "<br />\n";
echo $text['description-voicemail_local_after_forward']."\n";
echo "</td>\n";
echo "</tr>\n";
unset($voicemail_destinations_assigned);
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\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):
@ -322,7 +322,7 @@
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-voicemail_messages']." (".$total_rows.")</b></div>\n";
echo " <div class='heading'><b>".$text['title-voicemail_messages']."</b><div class='count'>".number_format($total_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>$_SESSION['back'][$_SERVER['PHP_SELF']]]);
$margin_left = false;

View File

@ -297,8 +297,12 @@
if (is_array($voicemails) && sizeof($voicemails) != 0) {
$x = 0;
foreach ($voicemails as $row) {
$list_row_url = '';
if (permission_exists('voicemail_edit')) {
$list_row_url = "voicemail_edit.php?id=".urlencode($row['voicemail_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('voicemail_edit') || permission_exists('voicemail_delete')) {
@ -373,3 +377,4 @@
//include the footer
require_once "resources/footer.php";

View File

@ -225,8 +225,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -369,7 +369,7 @@ if (!class_exists('xml_cdr')) {
//skip call detail records for calls blocked by call block
if (isset($xml->variables->call_block) && !empty($this->settings->get('call_block', 'save_call_detail_record'))) {
if ($xml->variables->call_block == 'true' && $this->settings->get('call_block', 'save_call_detail_record') == 'false') {
if ($xml->variables->call_block == 'true' && $this->settings->get('call_block', 'save_call_detail_record', false) !== true) {
//delete the xml cdr file
if (!empty($this->settings->get('switch', 'log'))) {
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
@ -612,12 +612,6 @@ if (!class_exists('xml_cdr')) {
if ($xml->variables->hangup_cause == 'NO_ANSWER') {
$status = 'no_answer';
}
if (substr($destination_number, 0, 3) == '*99') {
$status = 'voicemail';
}
if (isset($xml->variables->voicemail_message_seconds) && $xml->variables->voicemail_message_seconds > 0) {
$status = 'voicemail';
}
if ($xml->variables->hangup_cause == 'ORIGINATOR_CANCEL') {
$status = 'cancelled';
}
@ -633,12 +627,18 @@ if (!class_exists('xml_cdr')) {
if ($xml->variables->cc_side == 'agent' && $xml->variables->billsec == 0) {
$status = 'no_answer';
}
if (!isset($status) && $xml->variables->billsec == 0) {
if (!isset($status) && $xml->variables->billsec == 0) {
$status = 'no_answer';
}
if ($missed_call == 'true') {
$status = 'missed';
}
if (substr($destination_number, 0, 3) == '*99') {
$status = 'voicemail';
}
if (!empty($xml->variables->voicemail_message_seconds)) {
$status = 'voicemail';
}
//set the key
$key = 'xml_cdr';
@ -1695,7 +1695,7 @@ if (!class_exists('xml_cdr')) {
//if http enabled is set to false then deny access
if (!defined('STDIN')) {
if ($this->settings->get('cdr', 'http_enabled') == "false") {
if ($this->settings->get('cdr', 'http_enabled') == false) {
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR'].'] XML CDR import default setting http_enabled is not enabled. Line: '.__line__);
closelog();

View File

@ -188,9 +188,9 @@
"&dest_cid_number=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_number'] ?? '').
"&src=".urlencode($_SESSION['user']['extension'][0]['user'] ?? '').
"&dest=".urlencode($row['caller_id_number'] ?? '').
"&rec=".(isset($_SESSION['click_to_call']['record']['boolean']) ? $_SESSION['click_to_call']['record']['boolean'] : "false").
"&rec=".(filter_var($_SESSION['click_to_call']['record']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? "true" : "false").
"&ringback=".(isset($_SESSION['click_to_call']['ringback']['text']) ? $_SESSION['click_to_call']['ringback']['text'] : "us-ring").
"&auto_answer=".(isset($_SESSION['click_to_call']['auto_answer']['boolean']) ? $_SESSION['click_to_call']['auto_answer']['boolean'] : "true").
"&auto_answer=".(filter_var($_SESSION['click_to_call']['auto_answer']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? "true" : "false").
"');\" ".
"style='cursor: pointer;'";
}

View File

@ -206,9 +206,9 @@
"&dest_cid_number=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_number'] ?? '').
"&src=".urlencode($_SESSION['user']['extension'][0]['user'] ?? '').
"&dest=".urlencode($dest ?? '').
"&rec=".(isset($_SESSION['click_to_call']['record']['boolean']) ? $_SESSION['click_to_call']['record']['boolean'] : "false").
"&rec=".(filter_var($_SESSION['click_to_call']['record']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true' : 'false').
"&ringback=".(isset($_SESSION['click_to_call']['ringback']['text']) ? $_SESSION['click_to_call']['ringback']['text'] : "us-ring").
"&auto_answer=".(isset($_SESSION['click_to_call']['auto_answer']['boolean']) ? $_SESSION['click_to_call']['auto_answer']['boolean'] : "true").
"&auto_answer=".(filter_var($_SESSION['click_to_call']['auto_answer']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true' : 'false').
"');\" ".
"style='cursor: pointer;'";
}

View File

@ -84,8 +84,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); // positive phase only - left (a-leg) top, right (b-leg) bottom
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // 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

@ -877,8 +877,12 @@
$content .= "<tr class='list-row' id='recording_progress_bar_".$row['xml_cdr_uuid']."' style='display: none;' onclick=\"recording_seek(event,'".escape($row['xml_cdr_uuid'])."')\"><td id='playback_progress_bar_background_".escape($row['xml_cdr_uuid'])."' class='playback_progress_bar_background' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".$row['xml_cdr_uuid']."'></span></td></tr>\n";
$content .= "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
}
$list_row_url = '';
if ($permission['xml_cdr_details']) {
$list_row_url = "xml_cdr_details.php?id=".urlencode($row['xml_cdr_uuid']).($_REQUEST['show'] ? "&show=all" : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
$content .= "<tr class='list-row' href='".$list_row_url."'>\n";
if (!$archive_request && $permission['xml_cdr_delete']) {
@ -1059,3 +1063,4 @@
require_once "resources/footer.php";
?>

View File

@ -633,7 +633,7 @@
}
}
$sql = str_replace(" ", " ", $sql);
if ($archive_request && $_SESSION['cdr']['archive_database']['boolean'] == 'true') {
if ($archive_request && filter_var($_SESSION['cdr']['archive_database']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
$database->driver = $_SESSION['cdr']['archive_database_driver']['text'];
$database->host = $_SESSION['cdr']['archive_database_host']['text'];
$database->type = $_SESSION['cdr']['archive_database_type']['text'];

View File

@ -38,7 +38,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);
//set the uuid
if (!empty($_GET['id']) && is_uuid($_GET['id'])) {
@ -88,8 +88,12 @@
$x = 0;
foreach ($contact_addresses as $row) {
$map_query = $row['address_street']." ".$row['address_extended'].", ".$row['address_locality'].", ".$row['address_region'].", ".$row['address_region'].", ".$row['address_postal_code'];
$list_row_url = '';
if (permission_exists('contact_address_edit')) {
$list_row_url = "contact_address_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_address_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_address_delete')) {
@ -123,3 +127,4 @@
}
?>

View File

@ -26,6 +26,7 @@
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//add multi-lingual support
$language = new text;

View File

@ -70,15 +70,15 @@
//get the attachment type
if (empty($attachment) || sizeof($attachment) == 0) {
$attachment_type = strtolower(pathinfo($_POST['attachment_filename'], PATHINFO_EXTENSION));
$attachment_extension = strtolower(pathinfo($_POST['attachment_filename'], PATHINFO_EXTENSION));
}
else {
$attachment_type = strtolower(pathinfo($attachment['name'], PATHINFO_EXTENSION));
$attachment_extension = strtolower(pathinfo($attachment['name'], PATHINFO_EXTENSION));
}
//unflag others as primary
$allowed_primary_attachment = false;
if ($attachment_primary && ($attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png')) {
if ($attachment_primary && ($attachment_extension == 'jpg' || $attachment_extension == 'jpeg' || $attachment_extension == 'gif' || $attachment_extension == 'png')) {
$sql = "update v_contact_attachments set attachment_primary = 0 ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and contact_uuid = :contact_uuid ";
@ -94,29 +94,41 @@
//get the allowed extensions
$allowed_extensions = array_keys(json_decode($_SESSION['contact']['allowed_attachment_types']['text'], true));
//get the attachment extension
$attachment_extension = strtolower(pathinfo($attachment['name'], PATHINFO_EXTENSION));
//check the allowed extensions
if ($attachment['error'] == '0' && in_array($attachment_extension, $allowed_extensions)) {
//get the attachment content
$attachment_content = file_get_contents($attachment['tmp_name']);
//list of image extensions
$image_extensions = array('png','jpg','jpeg','gif','bmp', 'webp');
//read the image from the string then output the image without meta data
if (in_array($attachment_extension, $image_extensions)) {
if (in_array($attachment_extension, ['png','jpg','jpeg','gif','bmp', 'webp'])) {
//create the image object from the content string
$image = imagecreatefromstring($attachment_content);
imagealphablending($image, FALSE);
imagesavealpha($image, TRUE);
//start output buffering to capture the image data
ob_start();
//output the image without the EXIF data
imagepng($image);
switch ($attachment_extension) {
case 'png':
imagealphablending($image, FALSE);
imagesavealpha($image, TRUE);
imagepng($image);
break;
case 'jpg':
case 'jpeg':
imagejpeg($image);
break;
case 'gif':
imagesavealpha($image, TRUE);
imagegif($image);
break;
case 'bmp':
imagebmp($image);
break;
case 'webp':
imagewebp($image);
break;
}
//get the image from the buffer
$attachment_content = ob_get_contents();
@ -215,11 +227,11 @@
echo " ".$text['label-attachment']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
$attachment_type = strtolower(pathinfo($attachment_filename ?? '', PATHINFO_EXTENSION));
$attachment_extension = strtolower(pathinfo($attachment_filename ?? '', PATHINFO_EXTENSION));
if ($action == 'update') {
echo "<input type='hidden' name='attachment_filename' value=\"".escape($attachment_filename)."\">\n";
if ($attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png') {
echo "<img src='data:image/".$attachment_type.";base64,".$attachment_content."' style='border: none; width: auto; max-height: 400px;' oncontextmenu=\"window.open('contact_attachment.php?id=".$contact_attachment_uuid."&action=download'); return false;\">";
if ($attachment_extension == 'jpg' || $attachment_extension == 'jpeg' || $attachment_extension == 'gif' || $attachment_extension == 'png') {
echo "<img src='data:image/".$attachment_extension.";base64,".$attachment_content."' style='border: none; width: auto; max-height: 400px;' oncontextmenu=\"window.open('contact_attachment.php?id=".$contact_attachment_uuid."&action=download'); return false;\">";
}
else {
echo "<a href='contact_attachment.php?id=".$contact_attachment_uuid."&action=download' style='font-size: 120%;'>".$attachment_filename."</a>";
@ -233,7 +245,7 @@
echo "</td>\n";
echo "</tr>\n";
if ($action == 'update' && ($attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png')) {
if ($action == 'update' && ($attachment_extension == 'jpg' || $attachment_extension == 'jpeg' || $attachment_extension == 'gif' || $attachment_extension == 'png')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-attachment_filename']."\n";

View File

@ -38,7 +38,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);
//get the contact attachment list
$sql = "select *, length(decode(attachment_content,'base64')) as attachment_size from v_contact_attachments ";
@ -107,8 +107,12 @@
foreach ($contact_attachments as $row) {
$attachment_type = strtolower(pathinfo($row['attachment_filename'], PATHINFO_EXTENSION));
$attachment_type_label = $attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png' ? $text['label-image'] : $text['label-file'];
$list_row_url = '';
if (permission_exists('contact_attachment_edit')) {
$list_row_url = "contact_attachment_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_attachment_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_attachment_delete')) {
@ -147,3 +151,4 @@
}
?>

View File

@ -92,7 +92,7 @@
//$contact_users = $_POST["contact_users"];
//$contact_groups = $_POST["contact_groups"];
$contact_user_uuid = ($_SESSION['contact']['permissions']['boolean'] == "true") ? ($_POST["contact_user_uuid"] ?? $_SESSION["user_uuid"]) : ($contact_user_uuid = $_POST["contact_user_uuid"] ?? null);
$contact_user_uuid = filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN) ? ($_POST["contact_user_uuid"] ?? $_SESSION["user_uuid"]) : ($contact_user_uuid = $_POST["contact_user_uuid"] ?? null);
$contact_group_uuid = $_POST["contact_group_uuid"] ?? null;
$contact_phones = $_POST["contact_phones"];
@ -1529,7 +1529,7 @@ echo " </div>\n";
echo " </div>\n";
unset($contact_note);
if ($_SESSION['contact']['permissions']['boolean'] == "true") {
if (filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
if (permission_exists('contact_user_view') || permission_exists('contact_group_view')) {
echo " <div class='form_set card'>\n";
echo " <div class='heading'>\n";
@ -1574,7 +1574,7 @@ if ($_SESSION['contact']['permissions']['boolean'] == "true") {
}
if (permission_exists('contact_user_add')) {
echo " <div class='vtable' style='border-bottom: none;'>\n";
echo " <select name='contact_user_uuid' class='formfld' style='width: auto;'>\n";
echo " <select name='contact_user_uuid' class='formfld' style='width: 112px;'>\n";
echo " <option value=''></option>\n";
foreach ($users as $field) {
if (!empty($contact_users_assigned) && in_array($field['user_uuid'], array_column($contact_users_assigned, 'user_uuid'))) { continue; } //skip users already assigned
@ -1632,7 +1632,7 @@ if ($_SESSION['contact']['permissions']['boolean'] == "true") {
if (permission_exists('contact_group_add')) {
if (!empty($contact_groups_available)) {
echo " <div class='vtable' style='border-bottom: none;'>\n";
echo " <select name='contact_group_uuid' class='formfld' style='width: auto; margin-right: 3px;'>\n";
echo " <select name='contact_group_uuid' class='formfld' style='width: 112px;'>\n";
echo " <option value=''></option>\n";
foreach ($contact_groups_available as $field) {
if ($field['group_name'] == "superadmin" && !if_group("superadmin")) { continue; } //only show superadmin group to superadmins
@ -1788,10 +1788,10 @@ if (permission_exists('contact_phone_view')) {
echo " <div class='label'>\n";
echo " ".$text['label-phone_type']."\n";
echo " </div>\n";
echo " <div class='field no-wrap'>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_voice]' id='phone_type_voice' value='1' ".(($row['phone_type_voice']) ? "checked='checked'" : null)."> ".$text['label-voice']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_fax]' id='phone_type_fax' value='1' ".(($row['phone_type_fax']) ? "checked='checked'" : null)."> ".$text['label-fax']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_video]' id='phone_type_video' value='1' ".(($row['phone_type_video']) ? "checked='checked'" : null)."> ".$text['label-video']."</label>&nbsp;\n";
echo " <div class='field no-wrap' style='display: flex; flex-wrap: wrap; gap: 3px;'>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_voice]' id='phone_type_voice' value='1' ".(($row['phone_type_voice']) ? "checked='checked'" : null)."> ".$text['label-voice']."</label>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_fax]' id='phone_type_fax' value='1' ".(($row['phone_type_fax']) ? "checked='checked'" : null)."> ".$text['label-fax']."</label>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_video]' id='phone_type_video' value='1' ".(($row['phone_type_video']) ? "checked='checked'" : null)."> ".$text['label-video']."</label>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_text]' id='phone_type_text' value='1' ".(($row['phone_type_text']) ? "checked='checked'" : null)."> ".$text['label-text']."</label>\n";
echo " <br />\n";
//echo $text['description-phone_type']."\n";
@ -2719,8 +2719,9 @@ if (permission_exists('contact_note_view')) {
$x = 0;
foreach($contact_notes as $row) {
$contact_note = $row['contact_note'];
$contact_note = escape($contact_note);
$contact_note = str_replace("\n","<br />",$contact_note);
if (!empty($contact_note)) {
$contact_note = htmlspecialcars($contact_note, ENT_QUOTES, 'UTF-8');
}
if (permission_exists('contact_note_add')) {
$list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']);
}

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