Merge branch 'fusionpbx:master' into leave-vm-as-new
This commit is contained in:
@@ -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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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])." </td>\n";
|
||||
//echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'> </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']) . " </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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
@@ -191,7 +191,7 @@
|
||||
echo " <td>".$time_difference." </td>\n";
|
||||
echo " <td>".$start_date." </td>\n";
|
||||
echo " <td>".$end_date." </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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'> </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'])." </td>\n";
|
||||
@@ -206,7 +210,7 @@
|
||||
echo " <td>".escape($row['transaction_address'])." </td>\n";
|
||||
echo " <td>".escape($row['transaction_type'])." </td>\n";
|
||||
echo " <td>".escape($row['transaction_date'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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'> </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']." </td>\n";
|
||||
}
|
||||
if (permission_exists("destination_cid_name_prefix")) {
|
||||
echo " <td>".escape($row['destination_cid_name_prefix'])." </td>\n";
|
||||
}
|
||||
if (permission_exists("destination_context")) {
|
||||
echo " <td>".escape($row['destination_context'])." </td>\n";
|
||||
}
|
||||
@@ -421,9 +434,9 @@
|
||||
}
|
||||
echo " <td>".escape($text['label-'.$row['destination_enabled']])." </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['destination_description'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+19
-11
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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; ";
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = 'Email Templates';
|
||||
$apps[$x]['uuid'] = '8173e738-2523-46d5-8943-13883befd2fd';
|
||||
$apps[$x]['category'] = '';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en-us'] = '';
|
||||
$apps[$x]['description']['en-gb'] = '';
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'email_template_view';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'email_template_add';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'email_template_edit';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'email_template_delete';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'email_template_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
|
||||
//Email Templates
|
||||
$y = 2;
|
||||
$apps[$x]['db'][$y]['table']['name'] = 'v_email_templates';
|
||||
$apps[$x]['db'][$y]['table']['parent'] = '';
|
||||
$z = 0;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'email_template_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_language';
|
||||
$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'] = 'Enter the language.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_category';
|
||||
$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 category.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_subcategory';
|
||||
$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'] = 'Enter the subcategory.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_subject';
|
||||
$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'] = 'Enter the template subject.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_body';
|
||||
$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'] = 'Enter the template body.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_type';
|
||||
$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'] = 'Set the type as html or text.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_enabled';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Set the status of the template.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'template_description';
|
||||
$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'] = 'Enter the description.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
@@ -1,604 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2018
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//if the number of rows is 0 then read the sip profile xml into the database
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//build the array
|
||||
$x = 0;
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '5256e0aa-10a3-41a9-a7d9-47240823a186';
|
||||
$array['email_templates'][$x]['template_language'] = 'de-at';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Sprachnachricht von ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Neue Sprachnachricht<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nebenstelle \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Anrufer <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Lä nge \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nachricht \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '861e6e04-92fe-4bfb-a983-f29b3a5c07cf';
|
||||
$array['email_templates'][$x]['template_language'] = 'de-at';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Sprachnachricht von ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Neue Sprachnachricht\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nebenstelle \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Anrufer \${caller_id_number}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Lä nge \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nachricht \${message}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'cb0045f2-6ff1-4ed8-a030-6cec6c65b632';
|
||||
$array['email_templates'][$x]['template_language'] = 'de-de';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Sprachnachricht von ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Neue Sprachnachricht<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nebenstelle \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Anrufer <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Lä nge \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nachricht \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'f45935f0-7dc1-4b92-9bd7-7b35121a3ca7';
|
||||
$array['email_templates'][$x]['template_language'] = 'de-de';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Sprachnachricht von ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Neue Sprachnachricht\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nebenstelle \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Anrufer \${caller_id_number}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Lä nge \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Nachricht \${message}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '74fc9686-55fd-44a3-8a0a-283d786dab6f';
|
||||
$array['email_templates'][$x]['template_language'] = 'de-de';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Verpasster Anruf von ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Verpasster Anruf von \${caller_id_name} <<a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a>> an \${sip_to_user} Nebenstelle \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '62d1e7ef-c423-4ac6-be9e-c0e2adbbb60d';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "From \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'defb880a-e368-4862-b946-a5244871af55';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Voicemail from \${caller_id_name} <\${caller_id_number}>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '5d73fb7f-c48a-4752-b5e9-bfe94b4b02d6';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'transcription';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Voicemail from \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Transcription<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\${message_text}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'c5f3ae42-a5af-4bb7-80a3-480cfe90fb49';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'transcription';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Voicemail from \${caller_id_name} <\${caller_id_number}>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Transcription\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\${message_text}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'fbd0c8ea-6adb-4f8b-92cf-00e9087e3568';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Voicemail from \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '56bb3416-53fc-4a3d-936d-9e3ba869081d';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Voicemail from \${caller_id_name} <\${caller_id_number}>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '233135c9-7e3e-48d6-b6ad-ba1a383c0ac4';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'transcription';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Voicemail from \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Transcription<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\${message_text}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'c8f14f37-4998-41a2-9c7b-7e810c77c570';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'transcription';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Voicemail from ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Voicemail from \${caller_id_name} <\${caller_id_number}>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "To \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Length \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Transcription\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\${message_text}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '133860ce-175f-4a6f-bfa3-ef7322e80b98';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Missed Call from ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Missed Call from \${caller_id_name} <<a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a>> to \${sip_to_user} ext \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '890626c4-907b-44ad-9cf6-02d0b0a2379d';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Missed Call from ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "Missed Call from \${caller_id_name} <\${caller_id_number}> to \${sip_to_user} ext \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'eafaf4fe-b21d-47a0-ab2c-5943cb8cb5be';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Missed Call from ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Missed Call from \${caller_id_name} <<a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a>> to \${sip_to_user} ext \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'a1b11ded-831f-4b81-8a23-fce866196508';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Missed Call from ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "Missed Call from \${caller_id_name} <\${caller_id_number}> to \${sip_to_user} ext \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '14cf1738-2304-4030-b970-a478fda35abc';
|
||||
$array['email_templates'][$x]['template_language'] = 'fr-ca';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Messagerie vocale à partir de ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Messagerie vocale à partir de \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "À \${voicemail_name_formatted}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Reçu \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Longueur \${message_duration}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'd3971eb3-757e-4501-8469-9d59738db821';
|
||||
$array['email_templates'][$x]['template_language'] = 'fr-ca';
|
||||
$array['email_templates'][$x]['template_category'] = 'voicemail';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Messagerie vocale à partir de ${caller_id_name} <${caller_id_number}> ${message_duration}';
|
||||
$array['email_templates'][$x]['template_body'] = "Messagerie vocale à partir de \${caller_id_name} <\${caller_id_number}>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "À \${voicemail_name_formatted}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Reçu \${message_date}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Longueur \${message_duration}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Message \${message}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'ca96d814-cf5e-4dca-91ab-0150c2c6c36a';
|
||||
$array['email_templates'][$x]['template_language'] = 'fr-ca';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Appel manqué de ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Appel manqué de \${caller_id_name} <<a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a>> À \${sip_to_user} ext \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '5c57bd40-0479-49ba-945a-c675cd96dc8c';
|
||||
$array['email_templates'][$x]['template_language'] = 'fr-ca';
|
||||
$array['email_templates'][$x]['template_category'] = 'missed';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Appel manqué de ${caller_id_name} <${caller_id_number}>';
|
||||
$array['email_templates'][$x]['template_body'] = "Appel manqué de \${caller_id_name} <\${caller_id_number}> À \${sip_to_user} ext \${dialed_user}\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'text';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'false';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'b1eefbfc-c008-4c82-b93f-6a6df237aeaa';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'success_default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Subject, Fax to: ${number_dialed} SENT';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We are happy to report the fax was sent successfully. It has been attached for your records.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '48ce4fef-e6bd-4be6-9c76-1590e8498408';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'fail_default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} has Failed';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We are sorry the fax failed to go through. It has been attached. Please check the number \${number_dialed}, and if it was correct you might consider emailing it instead.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = 'd64d9a03-affd-4dbf-ba04-5ad5accae4d9';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'fail_busy';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} was Busy';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We tried sending, but the call was busy \${fax_busy_attempts} of those times.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '29729743-28bc-4f7b-88e1-0bdf6ff33cce';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'fail_invalid';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} was Invalid';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We tried sending, but the number entered was not a working phone number.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '297a3e32-125d-4e21-a528-17edc0d50829';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'success_default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} SENT';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We are happy to report the fax was sent successfully. It has been attached for your records.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '420d56d8-6cc5-484a-961e-da02ae0646a5';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'fail_default';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} has Failed';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We are sorry the fax failed to go through. It has been attached. Please check the number \${number_dialed}, and if it was correct you might consider emailing it instead.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '3899a9f2-96f2-4778-8f77-9962e4bc7ec8';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'fail_busy';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} was Busy';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We tried sending, but the call was busy \${fax_busy_attempts} of those times.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '307499c6-f390-446e-884a-3b5d7554771b';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'fax';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'fail_invalid';
|
||||
$array['email_templates'][$x]['template_subject'] = 'Fax to: ${number_dialed} was Invalid';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "We tried sending, but the number entered was not a working phone number.\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '814c08da-78ff-11ee-b73f-005056a27559';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-gb';
|
||||
$array['email_templates'][$x]['template_category'] = 'plugin';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'emergency';
|
||||
$array['email_templates'][$x]['template_subject'] = '911 Emergency Call';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "From \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Emergency Name \${emergency_caller_id_name}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Emergency Name \${emergency_caller_id_number}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Event \${event}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
$x++;
|
||||
|
||||
$array['email_templates'][$x]['email_template_uuid'] = '8928e8d4-78ff-11ee-ac06-005056a27559';
|
||||
$array['email_templates'][$x]['template_language'] = 'en-us';
|
||||
$array['email_templates'][$x]['template_category'] = 'plugin';
|
||||
$array['email_templates'][$x]['template_subcategory'] = 'emergency';
|
||||
$array['email_templates'][$x]['template_subject'] = '911 Emergency Call';
|
||||
$array['email_templates'][$x]['template_body'] = "<html>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "From \${caller_id_name} <a href=\"tel:\${caller_id_number}\">\${caller_id_number}</a><br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Emergency Name \${emergency_caller_id_name}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Emergency Name \${emergency_caller_id_number}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Received \${message_date}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "Event \${event}<br />\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</body>\n";
|
||||
$array['email_templates'][$x]['template_body'] .= "</html>\n";
|
||||
$array['email_templates'][$x]['template_type'] = 'html';
|
||||
$array['email_templates'][$x]['template_enabled'] = 'true';
|
||||
$array['email_templates'][$x]['template_description'] = '';
|
||||
|
||||
//build array of email template uuids
|
||||
foreach ($array['email_templates'] as $row) {
|
||||
if (is_uuid($row['email_template_uuid'])) {
|
||||
$uuids[] = $row['email_template_uuid'];
|
||||
}
|
||||
}
|
||||
|
||||
//add the email templates to the database
|
||||
if (!empty($uuids)) {
|
||||
$sql = "select * from v_email_templates where ";
|
||||
foreach ($uuids as $index => $uuid) {
|
||||
$sql_where[] = "email_template_uuid = :email_template_uuid_".$index;
|
||||
$parameters['email_template_uuid_'.$index] = $uuid;
|
||||
}
|
||||
$sql .= implode(' or ', $sql_where);
|
||||
$email_templates = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $sql_where, $parameters);
|
||||
|
||||
//remove templates that already exist from the array
|
||||
foreach ($array['email_templates'] as $index => $row) {
|
||||
if (is_array($email_templates) && @sizeof($email_templates) != 0) {
|
||||
foreach($email_templates as $email_template) {
|
||||
if ($row['email_template_uuid'] == $email_template['email_template_uuid']) {
|
||||
unset($array['email_templates'][$index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($email_templates, $index);
|
||||
}
|
||||
|
||||
//add the missing email templates
|
||||
if (!empty($array['email_templates'])) {
|
||||
//add the temporary permission
|
||||
$p = permissions::new();
|
||||
$p->add("email_template_add", 'temp');
|
||||
$p->add("email_template_edit", 'temp');
|
||||
|
||||
//save the data
|
||||
$database->app_name = 'email_templates';
|
||||
$database->app_uuid = '8173e738-2523-46d5-8943-13883befd2fd';
|
||||
$database->save($array, false);
|
||||
//$message = $database->message;
|
||||
|
||||
//remove the temporary permission
|
||||
$p->delete("email_template_add", 'temp');
|
||||
$p->delete("email_template_edit", 'temp');
|
||||
}
|
||||
|
||||
//remove the array
|
||||
if (!empty($array)) {
|
||||
unset($array);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,543 +0,0 @@
|
||||
<?php
|
||||
|
||||
$text['title-email_templates']['en-us'] = "Email Templates";
|
||||
$text['title-email_templates']['en-gb'] = "Email Templates";
|
||||
$text['title-email_templates']['ar-eg'] = "نماذج البريد الإلكتروني";
|
||||
$text['title-email_templates']['de-at'] = "E-Mail-Vorlagen";
|
||||
$text['title-email_templates']['de-ch'] = "E-Mail-Vorlagen";
|
||||
$text['title-email_templates']['de-de'] = "E-Mail-Vorlagen";
|
||||
$text['title-email_templates']['el-gr'] = "Πρότυπα email";
|
||||
$text['title-email_templates']['es-cl'] = "Plantillas de correo electrónico";
|
||||
$text['title-email_templates']['es-mx'] = "Plantillas de correo electrónico";
|
||||
$text['title-email_templates']['fr-ca'] = "Modèles de courriel";
|
||||
$text['title-email_templates']['fr-fr'] = "Modèles de courriel";
|
||||
$text['title-email_templates']['he-il'] = "תבניות דואר אלקטרוני";
|
||||
$text['title-email_templates']['it-it'] = "Modelli e-mail";
|
||||
$text['title-email_templates']['ka-ge'] = "ელფოსტის ნიმუშები";
|
||||
$text['title-email_templates']['nl-nl'] = "E-mail tempel";
|
||||
$text['title-email_templates']['pl-pl'] = "Szablony Email";
|
||||
$text['title-email_templates']['pt-br'] = "Modelos de email";
|
||||
$text['title-email_templates']['pt-pt'] = "Modelos de email";
|
||||
$text['title-email_templates']['ro-ro'] = "Șabloane de e-mail";
|
||||
$text['title-email_templates']['ru-ru'] = "Email шаблоны";
|
||||
$text['title-email_templates']['sv-se'] = "E-postmallar";
|
||||
$text['title-email_templates']['uk-ua'] = "Шаблони електронної пошти";
|
||||
$text['title-email_templates']['tr-tr'] = "E-posta Şablonları";
|
||||
$text['title-email_templates']['zh-cn'] = "电子邮件模板";
|
||||
$text['title-email_templates']['ja-jp'] = "メール テンプレート";
|
||||
$text['title-email_templates']['ko-kr'] = "이메일 템플릿";
|
||||
|
||||
$text['title-email_template']['en-us'] = "Email Template";
|
||||
$text['title-email_template']['en-gb'] = "Email Template";
|
||||
$text['title-email_template']['ar-eg'] = "نموذج البريد الإلكتروني";
|
||||
$text['title-email_template']['de-at'] = "E-Mail senden";
|
||||
$text['title-email_template']['de-ch'] = "E-Mail senden";
|
||||
$text['title-email_template']['de-de'] = "E-Mail senden";
|
||||
$text['title-email_template']['el-gr'] = "Πρότυπο email";
|
||||
$text['title-email_template']['es-cl'] = "Plantilla de correo electrónico";
|
||||
$text['title-email_template']['es-mx'] = "Plantilla de correo electrónico";
|
||||
$text['title-email_template']['fr-ca'] = "Modèle de courriel";
|
||||
$text['title-email_template']['fr-fr'] = "Modèle de courriel";
|
||||
$text['title-email_template']['he-il'] = "תבנית דואר אלקטרוני";
|
||||
$text['title-email_template']['it-it'] = "Template Email";
|
||||
$text['title-email_template']['ka-ge'] = "ელფოსტის ნიმუში";
|
||||
$text['title-email_template']['nl-nl'] = "Email temp";
|
||||
$text['title-email_template']['pl-pl'] = "Szablon Email";
|
||||
$text['title-email_template']['pt-br'] = "Modelo de Email";
|
||||
$text['title-email_template']['pt-pt'] = "Modelo de Email";
|
||||
$text['title-email_template']['ro-ro'] = "Șablon de e-mail";
|
||||
$text['title-email_template']['ru-ru'] = "Email шаблон";
|
||||
$text['title-email_template']['sv-se'] = "E-post mall";
|
||||
$text['title-email_template']['uk-ua'] = "Шаблон електронної пошти";
|
||||
$text['title-email_template']['tr-tr'] = "E-posta şablonu";
|
||||
$text['title-email_template']['zh-cn'] = "电子邮件模板";
|
||||
$text['title-email_template']['ja-jp'] = "メールテンプレート";
|
||||
$text['title-email_template']['ko-kr'] = "이메일 템플릿";
|
||||
|
||||
$text['title_description-email_template']['en-us'] = "Define and manage dynamic templates used for system generated outbound emails.";
|
||||
$text['title_description-email_template']['en-gb'] = "Define and manage dynamic templates used for system generated outbound emails.";
|
||||
$text['title_description-email_template']['ar-eg'] = ":: تحديد وإدارة النماذج الدينامية المستخدمة في النظام المولدة إلكترونيات إلكترونية خارجية.";
|
||||
$text['title_description-email_template']['de-at'] = "Definieren und verwalten Sie dynamische Vorlagen, die für System generierte Outbound-E-Mails verwendet werden.";
|
||||
$text['title_description-email_template']['de-ch'] = "Definieren und verwalten Sie dynamische Vorlagen, die für System generierte Outbound-E-Mails verwendet werden.";
|
||||
$text['title_description-email_template']['de-de'] = "Definieren und verwalten Sie dynamische Vorlagen, die für System generierte Outbound-E-Mails verwendet werden.";
|
||||
$text['title_description-email_template']['el-gr'] = "Καθορίστε και διαχειριστείτε δυναμικά πρότυπα που χρησιμοποιούνται για εξερχόμενα email που δημιουργούνται από το σύστημα.";
|
||||
$text['title_description-email_template']['es-cl'] = "Definir y gestionar plantillas dinámicas utilizadas para el sistema generado correos electrónicos de salida.";
|
||||
$text['title_description-email_template']['es-mx'] = "Definir y gestionar plantillas dinámicas utilizadas para el sistema generado correos electrónicos de salida.";
|
||||
$text['title_description-email_template']['fr-ca'] = "Définir et gérer les modèles dynamiques utilisés pour les courriels générés par le système.";
|
||||
$text['title_description-email_template']['fr-fr'] = "Définir et gérer les modèles dynamiques utilisés pour les courriels générés par le système.";
|
||||
$text['title_description-email_template']['he-il'] = 'Define ולנהל תבניות דינמיות המשמשות עבור המערכת יצרו הודעות דוא"ל.';
|
||||
$text['title_description-email_template']['it-it'] = "Definire e gestire modelli dinamici utilizzati per le e-mail di uscita generate dal sistema.";
|
||||
$text['title_description-email_template']['ka-ge'] = "აღწერეთ და მართეთ დინამიკური ნიმუშები სისტემის მიერ დაგენერირებული გამავალი ელფოსტებისთვის.";
|
||||
$text['title_description-email_template']['nl-nl'] = "Definieer en manage dynamische tempels gebruikt voor systeem gegenereerd e-mails.";
|
||||
$text['title_description-email_template']['pl-pl'] = "Definiowanie i zarządzanie dynamicznymi szablonami wykorzystywanymi w generowanych przez system wychodzących wiadomościach e-mail.";
|
||||
$text['title_description-email_template']['pt-br'] = "Defina e gerencie modelos dinâmicos usados para e-mails de saída gerados pelo sistema.";
|
||||
$text['title_description-email_template']['pt-pt'] = "Defina e gerencie modelos dinâmicos usados para e-mails de saída gerados pelo sistema.";
|
||||
$text['title_description-email_template']['ro-ro'] = "Definiți și gestionați șabloanele dinamice utilizate pentru e-mailurile de ieșire generate de sistem.";
|
||||
$text['title_description-email_template']['ru-ru'] = "Определение и управление динамическими шаблонами, используемыми для системных генерируемых исходящих электронных писем.";
|
||||
$text['title_description-email_template']['sv-se'] = "Definiera och hantera dynamiska mallar som används för systemgenererade utgående e-postmeddelanden.";
|
||||
$text['title_description-email_template']['uk-ua'] = "Визначте та управляти динамічними шаблонами, які використовуються для системи, створених для вихідних електронних листів.";
|
||||
$text['title_description-email_template']['tr-tr'] = "Sistem tarafından oluşturulan giden e-postalar için kullanılan dinamik şablonları tanımlayın ve yönetin.";
|
||||
$text['title_description-email_template']['zh-cn'] = "定义和管理用于系统生成的出站电子邮件的动态模板。";
|
||||
$text['title_description-email_template']['ja-jp'] = "システム生成のアウトバウンド電子メールに使用される動的テンプレートを定義および管理します。";
|
||||
$text['title_description-email_template']['ko-kr'] = "시스템 생성 아웃바운드 이메일에 사용되는 동적 템플릿을 정의하고 관리합니다.";
|
||||
|
||||
$text['label-template_language']['en-us'] = "Language";
|
||||
$text['label-template_language']['en-gb'] = "Language";
|
||||
$text['label-template_language']['ar-eg'] = "اللغة";
|
||||
$text['label-template_language']['de-at'] = "Sprache";
|
||||
$text['label-template_language']['de-ch'] = "Sprache";
|
||||
$text['label-template_language']['de-de'] = "Sprache";
|
||||
$text['label-template_language']['el-gr'] = "Γλώσσα";
|
||||
$text['label-template_language']['es-cl'] = "Idioma";
|
||||
$text['label-template_language']['es-mx'] = "Idioma";
|
||||
$text['label-template_language']['fr-ca'] = "Langue ";
|
||||
$text['label-template_language']['fr-fr'] = "Langue ";
|
||||
$text['label-template_language']['he-il'] = "שפה";
|
||||
$text['label-template_language']['it-it'] = "Lingua";
|
||||
$text['label-template_language']['ka-ge'] = "ენა";
|
||||
$text['label-template_language']['nl-nl'] = "Vertaling:";
|
||||
$text['label-template_language']['pl-pl'] = "Język";
|
||||
$text['label-template_language']['pt-br'] = "Língua";
|
||||
$text['label-template_language']['pt-pt'] = "Língua";
|
||||
$text['label-template_language']['ro-ro'] = "Limba";
|
||||
$text['label-template_language']['ru-ru'] = "Язык";
|
||||
$text['label-template_language']['sv-se'] = "Språkspråk";
|
||||
$text['label-template_language']['uk-ua'] = "Українська";
|
||||
$text['label-template_language']['tr-tr'] = "Dil";
|
||||
$text['label-template_language']['zh-cn'] = "语言";
|
||||
$text['label-template_language']['ja-jp'] = "言語";
|
||||
$text['label-template_language']['ko-kr'] = "언어";
|
||||
|
||||
$text['description-template_language']['en-us'] = "Enter the language.";
|
||||
$text['description-template_language']['en-gb'] = "Enter the language.";
|
||||
$text['description-template_language']['ar-eg'] = "أدخلي اللغة";
|
||||
$text['description-template_language']['de-at'] = "Geben Sie die Sprache ein.";
|
||||
$text['description-template_language']['de-ch'] = "Geben Sie die Sprache ein.";
|
||||
$text['description-template_language']['de-de'] = "Geben Sie die Sprache ein.";
|
||||
$text['description-template_language']['el-gr'] = "Εισαγάγετε τη γλώσσα.";
|
||||
$text['description-template_language']['es-cl'] = "Entra en el idioma.";
|
||||
$text['description-template_language']['es-mx'] = "Entra en el idioma.";
|
||||
$text['description-template_language']['fr-ca'] = "Entrer la langue";
|
||||
$text['description-template_language']['fr-fr'] = "Entrer la langue";
|
||||
$text['description-template_language']['he-il'] = "היכנסו לשפה";
|
||||
$text['description-template_language']['it-it'] = "Inserisci la lingua.";
|
||||
$text['description-template_language']['ka-ge'] = "შეიყვანეთ ენა.";
|
||||
$text['description-template_language']['nl-nl'] = "In de taal.";
|
||||
$text['description-template_language']['pl-pl'] = "Wprowadź język.";
|
||||
$text['description-template_language']['pt-br'] = "Digite o idioma.";
|
||||
$text['description-template_language']['pt-pt'] = "Digite o idioma.";
|
||||
$text['description-template_language']['ro-ro'] = "Introduceți limba.";
|
||||
$text['description-template_language']['ru-ru'] = "Введите язык.";
|
||||
$text['description-template_language']['sv-se'] = "Ange språket.";
|
||||
$text['description-template_language']['uk-ua'] = "Введіть мову.";
|
||||
$text['description-template_language']['tr-tr'] = "Dili girin.";
|
||||
$text['description-template_language']['zh-cn'] = "输入语言。";
|
||||
$text['description-template_language']['ja-jp'] = "言語を入力します。";
|
||||
$text['description-template_language']['ko-kr'] = "언어를 입력하세요.";
|
||||
|
||||
$text['label-template_category']['en-us'] = "Category";
|
||||
$text['label-template_category']['en-gb'] = "Category";
|
||||
$text['label-template_category']['ar-eg'] = "الفئة";
|
||||
$text['label-template_category']['de-at'] = "Kategorie";
|
||||
$text['label-template_category']['de-ch'] = "Kategorie";
|
||||
$text['label-template_category']['de-de'] = "Kategorie";
|
||||
$text['label-template_category']['el-gr'] = "Κατηγορία";
|
||||
$text['label-template_category']['es-cl'] = "Categoría";
|
||||
$text['label-template_category']['es-mx'] = "Categoría";
|
||||
$text['label-template_category']['fr-ca'] = "Catégorie";
|
||||
$text['label-template_category']['fr-fr'] = "Catégorie";
|
||||
$text['label-template_category']['he-il'] = "קטגוריה";
|
||||
$text['label-template_category']['it-it'] = "Categoria";
|
||||
$text['label-template_category']['ka-ge'] = "კატეგორია";
|
||||
$text['label-template_category']['nl-nl'] = "Categorie";
|
||||
$text['label-template_category']['pl-pl'] = "Kategoria";
|
||||
$text['label-template_category']['pt-br'] = "Categoria";
|
||||
$text['label-template_category']['pt-pt'] = "Categoria";
|
||||
$text['label-template_category']['ro-ro'] = "Categorie";
|
||||
$text['label-template_category']['ru-ru'] = "Категория";
|
||||
$text['label-template_category']['sv-se'] = "Kategori";
|
||||
$text['label-template_category']['uk-ua'] = "Категорії";
|
||||
$text['label-template_category']['tr-tr'] = "Kategori";
|
||||
$text['label-template_category']['zh-cn'] = "类别";
|
||||
$text['label-template_category']['ja-jp'] = "カテゴリー";
|
||||
$text['label-template_category']['ko-kr'] = "범주";
|
||||
|
||||
$text['description-template_category']['en-us'] = "Select the category.";
|
||||
$text['description-template_category']['en-gb'] = "Select the category.";
|
||||
$text['description-template_category']['ar-eg'] = "اختيار الفئة.";
|
||||
$text['description-template_category']['de-at'] = "Wählen Sie die Kategorie aus.";
|
||||
$text['description-template_category']['de-ch'] = "Wählen Sie die Kategorie aus.";
|
||||
$text['description-template_category']['de-de'] = "Wählen Sie die Kategorie aus.";
|
||||
$text['description-template_category']['el-gr'] = "Επιλέξτε την κατηγορία.";
|
||||
$text['description-template_category']['es-cl'] = "Seleccione la categoría.";
|
||||
$text['description-template_category']['es-mx'] = "Seleccione la categoría.";
|
||||
$text['description-template_category']['fr-ca'] = "Sélectionnez la catégorie";
|
||||
$text['description-template_category']['fr-fr'] = "Sélectionnez la catégorie";
|
||||
$text['description-template_category']['he-il'] = "בחרו את הקטגוריה";
|
||||
$text['description-template_category']['it-it'] = "Selezionare la categoria.";
|
||||
$text['description-template_category']['ka-ge'] = "შეიყვანეთ კატეგორია.";
|
||||
$text['description-template_category']['nl-nl'] = "Verkoop de categorie.";
|
||||
$text['description-template_category']['pl-pl'] = "Wybierz kategorię.";
|
||||
$text['description-template_category']['pt-br'] = "Selecione a categoria.";
|
||||
$text['description-template_category']['pt-pt'] = "Selecione a categoria.";
|
||||
$text['description-template_category']['ro-ro'] = "Selectați categoria.";
|
||||
$text['description-template_category']['ru-ru'] = "Выберите категорию.";
|
||||
$text['description-template_category']['sv-se'] = "Välj kategorin.";
|
||||
$text['description-template_category']['uk-ua'] = "Виберіть категорію.";
|
||||
$text['description-template_category']['tr-tr'] = "Kategoriyi seçin.";
|
||||
$text['description-template_category']['zh-cn'] = "选择类别。";
|
||||
$text['description-template_category']['ja-jp'] = "カテゴリを選択します。";
|
||||
$text['description-template_category']['ko-kr'] = "범주를 선택합니다.";
|
||||
|
||||
$text['label-template_subcategory']['en-us'] = "Subcategory";
|
||||
$text['label-template_subcategory']['en-gb'] = "Subcategory";
|
||||
$text['label-template_subcategory']['ar-eg'] = "الفئة الفرعية";
|
||||
$text['label-template_subcategory']['de-at'] = "Unterkategorie";
|
||||
$text['label-template_subcategory']['de-ch'] = "Unterkategorie";
|
||||
$text['label-template_subcategory']['de-de'] = "Unterkategorie";
|
||||
$text['label-template_subcategory']['el-gr'] = "Υποκατηγορία";
|
||||
$text['label-template_subcategory']['es-cl'] = "Subcategoría";
|
||||
$text['label-template_subcategory']['es-mx'] = "Subcategoría";
|
||||
$text['label-template_subcategory']['fr-ca'] = "Sous catégorie";
|
||||
$text['label-template_subcategory']['fr-fr'] = "Sous catégorie";
|
||||
$text['label-template_subcategory']['he-il'] = "subcategory";
|
||||
$text['label-template_subcategory']['it-it'] = "Sottocategoria";
|
||||
$text['label-template_subcategory']['ka-ge'] = "ქვეკატეგორია";
|
||||
$text['label-template_subcategory']['nl-nl'] = "Vertaling:";
|
||||
$text['label-template_subcategory']['pl-pl'] = "Podkategoria";
|
||||
$text['label-template_subcategory']['pt-br'] = "Subcategoria";
|
||||
$text['label-template_subcategory']['pt-pt'] = "Subcategoria";
|
||||
$text['label-template_subcategory']['ro-ro'] = "Subcategorie";
|
||||
$text['label-template_subcategory']['ru-ru'] = "Подкатегория";
|
||||
$text['label-template_subcategory']['sv-se'] = "Underkategori";
|
||||
$text['label-template_subcategory']['uk-ua'] = "Підкатегорія";
|
||||
$text['label-template_subcategory']['tr-tr'] = "Alt kategori";
|
||||
$text['label-template_subcategory']['zh-cn'] = "子类别";
|
||||
$text['label-template_subcategory']['ja-jp'] = "サブカテゴリ";
|
||||
$text['label-template_subcategory']['ko-kr'] = "하위 카테고리";
|
||||
|
||||
$text['description-template_subcategory']['en-us'] = "Enter the subcategory.";
|
||||
$text['description-template_subcategory']['en-gb'] = "Enter the subcategory.";
|
||||
$text['description-template_subcategory']['ar-eg'] = "أدخلوا الفئة الفرعية";
|
||||
$text['description-template_subcategory']['de-at'] = "Geben Sie die Unterkategorie ein.";
|
||||
$text['description-template_subcategory']['de-ch'] = "Geben Sie die Unterkategorie ein.";
|
||||
$text['description-template_subcategory']['de-de'] = "Geben Sie die Unterkategorie ein.";
|
||||
$text['description-template_subcategory']['el-gr'] = "Εισαγάγετε την υποκατηγορία.";
|
||||
$text['description-template_subcategory']['es-cl'] = "Entra en la subcategoría.";
|
||||
$text['description-template_subcategory']['es-mx'] = "Entra en la subcategoría.";
|
||||
$text['description-template_subcategory']['fr-ca'] = "Entrez la sous-catégorie.";
|
||||
$text['description-template_subcategory']['fr-fr'] = "Entrez la sous-catégorie.";
|
||||
$text['description-template_subcategory']['he-il'] = "היכנסו ל- Subcategory.";
|
||||
$text['description-template_subcategory']['it-it'] = "Inserisci la sottocategoria.";
|
||||
$text['description-template_subcategory']['ka-ge'] = "შეიყვანეთ ქვეკატეგორია.";
|
||||
$text['description-template_subcategory']['nl-nl'] = "Binnen de onderkaak.";
|
||||
$text['description-template_subcategory']['pl-pl'] = "Wprowadź podkategorię.";
|
||||
$text['description-template_subcategory']['pt-br'] = "Digite a subcategoria.";
|
||||
$text['description-template_subcategory']['pt-pt'] = "Digite a subcategoria.";
|
||||
$text['description-template_subcategory']['ro-ro'] = "Introduceți subcategoria.";
|
||||
$text['description-template_subcategory']['ru-ru'] = "Введите подкатегорию.";
|
||||
$text['description-template_subcategory']['sv-se'] = "Ange underkategorin.";
|
||||
$text['description-template_subcategory']['uk-ua'] = "Введіть підкатегорію.";
|
||||
$text['description-template_subcategory']['tr-tr'] = "Alt kategoriye girin.";
|
||||
$text['description-template_subcategory']['zh-cn'] = "输入子类别。";
|
||||
$text['description-template_subcategory']['ja-jp'] = "サブカテゴリを入力します。";
|
||||
$text['description-template_subcategory']['ko-kr'] = "하위 범주를 입력합니다.";
|
||||
|
||||
$text['label-template_subject']['en-us'] = "Subject";
|
||||
$text['label-template_subject']['en-gb'] = "Subject";
|
||||
$text['label-template_subject']['ar-eg'] = "الموضوع";
|
||||
$text['label-template_subject']['de-at'] = "Gegenstand";
|
||||
$text['label-template_subject']['de-ch'] = "Gegenstand";
|
||||
$text['label-template_subject']['de-de'] = "Gegenstand";
|
||||
$text['label-template_subject']['el-gr'] = "Θέμα";
|
||||
$text['label-template_subject']['es-cl'] = "Asunto";
|
||||
$text['label-template_subject']['es-mx'] = "Asunto";
|
||||
$text['label-template_subject']['fr-ca'] = "Sujet";
|
||||
$text['label-template_subject']['fr-fr'] = "Sujet";
|
||||
$text['label-template_subject']['he-il'] = "נושא";
|
||||
$text['label-template_subject']['it-it'] = "Oggetto";
|
||||
$text['label-template_subject']['ka-ge'] = "თემა";
|
||||
$text['label-template_subject']['nl-nl'] = "Vertaling:";
|
||||
$text['label-template_subject']['pl-pl'] = "Tytuł";
|
||||
$text['label-template_subject']['pt-br'] = "Assunto";
|
||||
$text['label-template_subject']['pt-pt'] = "Assunto";
|
||||
$text['label-template_subject']['ro-ro'] = "Subiect";
|
||||
$text['label-template_subject']['ru-ru'] = "Тема";
|
||||
$text['label-template_subject']['sv-se'] = "Subjekt";
|
||||
$text['label-template_subject']['uk-ua'] = "Головна";
|
||||
$text['label-template_subject']['tr-tr'] = "Ders";
|
||||
$text['label-template_subject']['zh-cn'] = "主题";
|
||||
$text['label-template_subject']['ja-jp'] = "主題";
|
||||
$text['label-template_subject']['ko-kr'] = "주제";
|
||||
|
||||
$text['description-template_subject']['en-us'] = "Enter the template subject.";
|
||||
$text['description-template_subject']['en-gb'] = "Enter the template subject.";
|
||||
$text['description-template_subject']['ar-eg'] = "أدخل موضوع النموذج";
|
||||
$text['description-template_subject']['de-at'] = "Geben Sie die Vorlage ein.";
|
||||
$text['description-template_subject']['de-ch'] = "Geben Sie die Vorlage ein.";
|
||||
$text['description-template_subject']['de-de'] = "Geben Sie die Vorlage ein.";
|
||||
$text['description-template_subject']['el-gr'] = "Εισαγάγετε το θέμα του προτύπου.";
|
||||
$text['description-template_subject']['es-cl'] = "Introduzca el tema de la plantilla.";
|
||||
$text['description-template_subject']['es-mx'] = "Introduzca el tema de la plantilla.";
|
||||
$text['description-template_subject']['fr-ca'] = "Entrez l objet du modèle";
|
||||
$text['description-template_subject']['fr-fr'] = "Entrez l objet du modèle";
|
||||
$text['description-template_subject']['he-il'] = "הזן את נושא התבנית";
|
||||
$text['description-template_subject']['it-it'] = "Inserisci l'oggetto modello.";
|
||||
$text['description-template_subject']['ka-ge'] = "შეიყვანეთ ნიმუშის თემა.";
|
||||
$text['description-template_subject']['nl-nl'] = "Breng het templade onderwerp binnen.";
|
||||
$text['description-template_subject']['pl-pl'] = "Wprowadź szablon tytułu.";
|
||||
$text['description-template_subject']['pt-br'] = "Digite o assunto do modelo.";
|
||||
$text['description-template_subject']['pt-pt'] = "Digite o assunto do modelo.";
|
||||
$text['description-template_subject']['ro-ro'] = "Introduceți subiectul șablonului.";
|
||||
$text['description-template_subject']['ru-ru'] = "Введите объект шаблона.";
|
||||
$text['description-template_subject']['sv-se'] = "Ange mallämnet.";
|
||||
$text['description-template_subject']['uk-ua'] = "Введіть тему шаблону.";
|
||||
$text['description-template_subject']['tr-tr'] = "Şablon konusunu girin.";
|
||||
$text['description-template_subject']['zh-cn'] = "输入模板主题。";
|
||||
$text['description-template_subject']['ja-jp'] = "テンプレートの件名を入力します。";
|
||||
$text['description-template_subject']['ko-kr'] = "템플릿 제목을 입력합니다.";
|
||||
|
||||
$text['label-template_body']['en-us'] = "Body";
|
||||
$text['label-template_body']['en-gb'] = "Body";
|
||||
$text['label-template_body']['ar-eg'] = "الهيئة";
|
||||
$text['label-template_body']['de-at'] = "Körper";
|
||||
$text['label-template_body']['de-ch'] = "Körper";
|
||||
$text['label-template_body']['de-de'] = "Körper";
|
||||
$text['label-template_body']['el-gr'] = "Σώμα";
|
||||
$text['label-template_body']['es-cl'] = "Cuerpo";
|
||||
$text['label-template_body']['es-mx'] = "Cuerpo";
|
||||
$text['label-template_body']['fr-ca'] = "Corps";
|
||||
$text['label-template_body']['fr-fr'] = "Corps";
|
||||
$text['label-template_body']['he-il'] = "גוף הגוף";
|
||||
$text['label-template_body']['it-it'] = "Corpo";
|
||||
$text['label-template_body']['ka-ge'] = "შემცველობა";
|
||||
$text['label-template_body']['nl-nl'] = "lichaam.";
|
||||
$text['label-template_body']['pl-pl'] = "Treść";
|
||||
$text['label-template_body']['pt-br'] = "Corpo";
|
||||
$text['label-template_body']['pt-pt'] = "Corpo";
|
||||
$text['label-template_body']['ro-ro'] = "Corp";
|
||||
$text['label-template_body']['ru-ru'] = "Cообщение";
|
||||
$text['label-template_body']['sv-se'] = "Kropp";
|
||||
$text['label-template_body']['uk-ua'] = "Тіло";
|
||||
$text['label-template_body']['tr-tr'] = "Vücut";
|
||||
$text['label-template_body']['zh-cn'] = "身体";
|
||||
$text['label-template_body']['ja-jp'] = "体";
|
||||
$text['label-template_body']['ko-kr'] = "몸";
|
||||
|
||||
$text['description-template_body']['en-us'] = "Enter the template body.";
|
||||
$text['description-template_body']['en-gb'] = "Enter the template body.";
|
||||
$text['description-template_body']['ar-eg'] = "أدخل الجسم المثالي";
|
||||
$text['description-template_body']['de-at'] = "Geben Sie die Vorlage ein.";
|
||||
$text['description-template_body']['de-ch'] = "Geben Sie die Vorlage ein.";
|
||||
$text['description-template_body']['de-de'] = "Geben Sie die Vorlage ein.";
|
||||
$text['description-template_body']['el-gr'] = "Εισαγάγετε το σώμα του προτύπου.";
|
||||
$text['description-template_body']['es-cl'] = "Introduzca el cuerpo de la plantilla.";
|
||||
$text['description-template_body']['es-mx'] = "Introduzca el cuerpo de la plantilla.";
|
||||
$text['description-template_body']['fr-ca'] = "Entrez le corps du template";
|
||||
$text['description-template_body']['fr-fr'] = "Entrez le corps du template";
|
||||
$text['description-template_body']['he-il'] = "היכנסו לגוף התבנית";
|
||||
$text['description-template_body']['it-it'] = "Inserisci il corpo del modello.";
|
||||
$text['description-template_body']['ka-ge'] = "შეიყვანეთ ნიმუშის შემცველობა.";
|
||||
$text['description-template_body']['nl-nl'] = "In het templade lichaam.";
|
||||
$text['description-template_body']['pl-pl'] = "Wprowadź szablon treści.";
|
||||
$text['description-template_body']['pt-br'] = "Digite o corpo do modelo.";
|
||||
$text['description-template_body']['pt-pt'] = "Digite o corpo do modelo.";
|
||||
$text['description-template_body']['ro-ro'] = "Introduceți corpul șablonului.";
|
||||
$text['description-template_body']['ru-ru'] = "Введите тело шаблона.";
|
||||
$text['description-template_body']['sv-se'] = "Ange mallkroppen.";
|
||||
$text['description-template_body']['uk-ua'] = "Введіть форму шаблону.";
|
||||
$text['description-template_body']['tr-tr'] = "Şablon gövdesini girin.";
|
||||
$text['description-template_body']['zh-cn'] = "输入模板正文。";
|
||||
$text['description-template_body']['ja-jp'] = "テンプレートの本文を入力します。";
|
||||
$text['description-template_body']['ko-kr'] = "템플릿 본문을 입력합니다.";
|
||||
|
||||
$text['label-template_type']['en-us'] = "Type";
|
||||
$text['label-template_type']['en-gb'] = "Type";
|
||||
$text['label-template_type']['ar-eg'] = "النوع";
|
||||
$text['label-template_type']['de-at'] = "Art";
|
||||
$text['label-template_type']['de-ch'] = "Art";
|
||||
$text['label-template_type']['de-de'] = "Art";
|
||||
$text['label-template_type']['el-gr'] = "Τύπος";
|
||||
$text['label-template_type']['es-cl'] = "Tipo";
|
||||
$text['label-template_type']['es-mx'] = "Tipo";
|
||||
$text['label-template_type']['fr-ca'] = "Type";
|
||||
$text['label-template_type']['fr-fr'] = "Type";
|
||||
$text['label-template_type']['he-il'] = "סוג";
|
||||
$text['label-template_type']['it-it'] = "Tipo";
|
||||
$text['label-template_type']['ka-ge'] = "ტიპი";
|
||||
$text['label-template_type']['nl-nl'] = "Type";
|
||||
$text['label-template_type']['pl-pl'] = "Typ";
|
||||
$text['label-template_type']['pt-br'] = "Tipo";
|
||||
$text['label-template_type']['pt-pt'] = "Tipo";
|
||||
$text['label-template_type']['ro-ro'] = "Tip";
|
||||
$text['label-template_type']['ru-ru'] = "Тип";
|
||||
$text['label-template_type']['sv-se'] = "Typ";
|
||||
$text['label-template_type']['uk-ua'] = "Тип";
|
||||
$text['label-template_type']['tr-tr'] = "Tip";
|
||||
$text['label-template_type']['zh-cn'] = "类型";
|
||||
$text['label-template_type']['ja-jp'] = "タイプ";
|
||||
$text['label-template_type']['ko-kr'] = "유형";
|
||||
|
||||
$text['description-template_type']['en-us'] = "Set the content type.";
|
||||
$text['description-template_type']['en-gb'] = "Set the content type.";
|
||||
$text['description-template_type']['ar-eg'] = "حددي نوع المحتوى";
|
||||
$text['description-template_type']['de-at'] = "Setzen Sie den Inhaltstyp.";
|
||||
$text['description-template_type']['de-ch'] = "Setzen Sie den Inhaltstyp.";
|
||||
$text['description-template_type']['de-de'] = "Setzen Sie den Inhaltstyp.";
|
||||
$text['description-template_type']['el-gr'] = "Ορίστε τον τύπο περιεχομένου.";
|
||||
$text['description-template_type']['es-cl'] = "Establecer el tipo de contenido.";
|
||||
$text['description-template_type']['es-mx'] = "Establecer el tipo de contenido.";
|
||||
$text['description-template_type']['fr-ca'] = "Définir le type";
|
||||
$text['description-template_type']['fr-fr'] = "Définir le type";
|
||||
$text['description-template_type']['he-il'] = "הגדר את סוג התוכן.";
|
||||
$text['description-template_type']['it-it'] = "Impostare il tipo di contenuto.";
|
||||
$text['description-template_type']['ka-ge'] = "შეიყვანეთ შემცველობის ტიპი.";
|
||||
$text['description-template_type']['nl-nl'] = "Zet het inhoudstype.";
|
||||
$text['description-template_type']['pl-pl'] = "Ustaw typ treści.";
|
||||
$text['description-template_type']['pt-br'] = "Defina o tipo de conteúdo.";
|
||||
$text['description-template_type']['pt-pt'] = "Defina o tipo de conteúdo.";
|
||||
$text['description-template_type']['ro-ro'] = "Setați tipul de conținut.";
|
||||
$text['description-template_type']['ru-ru'] = "Установить тип контента.";
|
||||
$text['description-template_type']['sv-se'] = "Ställ in innehållstypen.";
|
||||
$text['description-template_type']['uk-ua'] = "Встановити тип вмісту.";
|
||||
$text['description-template_type']['tr-tr'] = "İçerik türünü ayarlayın.";
|
||||
$text['description-template_type']['zh-cn'] = "设置内容类型。";
|
||||
$text['description-template_type']['ja-jp'] = "コンテンツタイプを設定します。";
|
||||
$text['description-template_type']['ko-kr'] = "콘텐츠 유형을 설정합니다.";
|
||||
|
||||
$text['label-template_text']['en-us'] = "Text";
|
||||
$text['label-template_text']['en-gb'] = "Text";
|
||||
$text['label-template_text']['ar-eg'] = "النص";
|
||||
$text['label-template_text']['de-at'] = "Text";
|
||||
$text['label-template_text']['de-ch'] = "Text";
|
||||
$text['label-template_text']['de-de'] = "Text";
|
||||
$text['label-template_text']['el-gr'] = "Κείμενο";
|
||||
$text['label-template_text']['es-cl'] = "Texto";
|
||||
$text['label-template_text']['es-mx'] = "Texto";
|
||||
$text['label-template_text']['fr-ca'] = "Texte";
|
||||
$text['label-template_text']['fr-fr'] = "Texte";
|
||||
$text['label-template_text']['he-il'] = "טקסט";
|
||||
$text['label-template_text']['it-it'] = "Testo";
|
||||
$text['label-template_text']['ka-ge'] = "ტექსტი";
|
||||
$text['label-template_text']['nl-nl'] = "Text";
|
||||
$text['label-template_text']['pl-pl'] = "Tekst";
|
||||
$text['label-template_text']['pt-br'] = "Texto";
|
||||
$text['label-template_text']['pt-pt'] = "Texto";
|
||||
$text['label-template_text']['ro-ro'] = "Text";
|
||||
$text['label-template_text']['ru-ru'] = "Текст";
|
||||
$text['label-template_text']['sv-se'] = "Text";
|
||||
$text['label-template_text']['uk-ua'] = "Текст";
|
||||
$text['label-template_text']['tr-tr'] = "Metin";
|
||||
$text['label-template_text']['zh-cn'] = "文本";
|
||||
$text['label-template_text']['ja-jp'] = "文章";
|
||||
$text['label-template_text']['ko-kr'] = "텍스트";
|
||||
|
||||
$text['label-template_enabled']['en-us'] = "Enabled";
|
||||
$text['label-template_enabled']['en-gb'] = "Enabled";
|
||||
$text['label-template_enabled']['ar-eg'] = "مُتاح";
|
||||
$text['label-template_enabled']['de-at'] = "Aktiviert";
|
||||
$text['label-template_enabled']['de-ch'] = "Aktiviert";
|
||||
$text['label-template_enabled']['de-de'] = "Aktiviert";
|
||||
$text['label-template_enabled']['el-gr'] = "Ενεργοποιημένο";
|
||||
$text['label-template_enabled']['es-cl'] = "habilitado";
|
||||
$text['label-template_enabled']['es-mx'] = "habilitado";
|
||||
$text['label-template_enabled']['fr-ca'] = "Activé";
|
||||
$text['label-template_enabled']['fr-fr'] = "Activé";
|
||||
$text['label-template_enabled']['he-il'] = "המונחים";
|
||||
$text['label-template_enabled']['it-it'] = "Abilitato";
|
||||
$text['label-template_enabled']['ka-ge'] = "ჩართულია";
|
||||
$text['label-template_enabled']['nl-nl'] = "In staat";
|
||||
$text['label-template_enabled']['pl-pl'] = "Aktywny";
|
||||
$text['label-template_enabled']['pt-br'] = "Activado";
|
||||
$text['label-template_enabled']['pt-pt'] = "Activado";
|
||||
$text['label-template_enabled']['ro-ro'] = "Activat";
|
||||
$text['label-template_enabled']['ru-ru'] = "Включено";
|
||||
$text['label-template_enabled']['sv-se'] = "aktiverad";
|
||||
$text['label-template_enabled']['uk-ua'] = "Увімкнути";
|
||||
$text['label-template_enabled']['tr-tr'] = "Etkinleştirilmiş";
|
||||
$text['label-template_enabled']['zh-cn'] = "启用";
|
||||
$text['label-template_enabled']['ja-jp'] = "有効";
|
||||
$text['label-template_enabled']['ko-kr'] = "사용";
|
||||
|
||||
$text['description-template_enabled']['en-us'] = "Set the status of the template.";
|
||||
$text['description-template_enabled']['en-gb'] = "Set the status of the template.";
|
||||
$text['description-template_enabled']['ar-eg'] = "عيّن حالة القالب.";
|
||||
$text['description-template_enabled']['de-at'] = "Legen Sie den Status der Vorlage fest.";
|
||||
$text['description-template_enabled']['de-ch'] = "Legen Sie den Status der Vorlage fest.";
|
||||
$text['description-template_enabled']['de-de'] = "Legen Sie den Status der Vorlage fest.";
|
||||
$text['description-template_enabled']['el-gr'] = "Ορίστε την κατάσταση του προτύπου.";
|
||||
$text['description-template_enabled']['es-cl'] = "Establecer el estado de la plantilla.";
|
||||
$text['description-template_enabled']['es-mx'] = "Establecer el estado de la plantilla.";
|
||||
$text['description-template_enabled']['fr-ca'] = "Définir le statut du modèle.";
|
||||
$text['description-template_enabled']['fr-fr'] = "Définir le statut du modèle.";
|
||||
$text['description-template_enabled']['he-il'] = "הגדר את הסטטוס של התבנית.";
|
||||
$text['description-template_enabled']['it-it'] = "Impostare lo stato del modello.";
|
||||
$text['description-template_enabled']['ka-ge'] = "დააყენეთ ნიმუშის სტატუსი.";
|
||||
$text['description-template_enabled']['nl-nl'] = "Zet de status van de templade.";
|
||||
$text['description-template_enabled']['pl-pl'] = "Ustaw status szablonu.";
|
||||
$text['description-template_enabled']['pt-br'] = "Defina o status do modelo.";
|
||||
$text['description-template_enabled']['pt-pt'] = "Defina o status do modelo.";
|
||||
$text['description-template_enabled']['ro-ro'] = "Setați starea șablonului.";
|
||||
$text['description-template_enabled']['ru-ru'] = "Установить статус шаблона.";
|
||||
$text['description-template_enabled']['sv-se'] = "Ställ in statusen för mallen.";
|
||||
$text['description-template_enabled']['uk-ua'] = "Встановити статус шаблону.";
|
||||
$text['description-template_enabled']['tr-tr'] = "Şablonun durumunu ayarlayın.";
|
||||
$text['description-template_enabled']['zh-cn'] = "设置模板的状态。";
|
||||
$text['description-template_enabled']['ja-jp'] = "テンプレートのステータスを設定します。";
|
||||
$text['description-template_enabled']['ko-kr'] = "템플릿의 상태를 설정합니다.";
|
||||
|
||||
$text['label-template_description']['en-us'] = "Description";
|
||||
$text['label-template_description']['en-gb'] = "Description";
|
||||
$text['label-template_description']['ar-eg'] = "الوصف";
|
||||
$text['label-template_description']['de-at'] = "Beschreibung";
|
||||
$text['label-template_description']['de-ch'] = "Beschreibung";
|
||||
$text['label-template_description']['de-de'] = "Beschreibung";
|
||||
$text['label-template_description']['el-gr'] = "Περιγραφή";
|
||||
$text['label-template_description']['es-cl'] = "Descripción";
|
||||
$text['label-template_description']['es-mx'] = "Descripción";
|
||||
$text['label-template_description']['fr-ca'] = "Description";
|
||||
$text['label-template_description']['fr-fr'] = "Description";
|
||||
$text['label-template_description']['he-il'] = "תיאור תיאור";
|
||||
$text['label-template_description']['it-it'] = "Designazione delle merci";
|
||||
$text['label-template_description']['ka-ge'] = "აღწერა";
|
||||
$text['label-template_description']['nl-nl'] = "Beschrijving";
|
||||
$text['label-template_description']['pl-pl'] = "Opis";
|
||||
$text['label-template_description']['pt-br'] = "Descrição";
|
||||
$text['label-template_description']['pt-pt'] = "Descrição";
|
||||
$text['label-template_description']['ro-ro'] = "Descriere";
|
||||
$text['label-template_description']['ru-ru'] = "Описание";
|
||||
$text['label-template_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-template_description']['uk-ua'] = "Опис";
|
||||
$text['label-template_description']['tr-tr'] = "Tanım";
|
||||
$text['label-template_description']['zh-cn'] = "描述";
|
||||
$text['label-template_description']['ja-jp'] = "説明";
|
||||
$text['label-template_description']['ko-kr'] = "설명";
|
||||
|
||||
$text['description-template_description']['en-us'] = "Enter the description.";
|
||||
$text['description-template_description']['en-gb'] = "Enter the description.";
|
||||
$text['description-template_description']['ar-eg'] = "أدخل الوصف";
|
||||
$text['description-template_description']['de-at'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-template_description']['de-ch'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-template_description']['de-de'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-template_description']['el-gr'] = "Εισαγάγετε την περιγραφή.";
|
||||
$text['description-template_description']['es-cl'] = "Introduzca la descripción.";
|
||||
$text['description-template_description']['es-mx'] = "Introduzca la descripción.";
|
||||
$text['description-template_description']['fr-ca'] = "Entrez la description";
|
||||
$text['description-template_description']['fr-fr'] = "Entrez la description";
|
||||
$text['description-template_description']['he-il'] = "הכנס את התיאור.";
|
||||
$text['description-template_description']['it-it'] = "Inserisci la descrizione.";
|
||||
$text['description-template_description']['ka-ge'] = "შეიყვანეთ აღწერა.";
|
||||
$text['description-template_description']['nl-nl'] = "Beschrijf de beschrijving.";
|
||||
$text['description-template_description']['pl-pl'] = "Wprowadź opis.";
|
||||
$text['description-template_description']['pt-br'] = "Digite a descrição.";
|
||||
$text['description-template_description']['pt-pt'] = "Digite a descrição.";
|
||||
$text['description-template_description']['ro-ro'] = "Introduceți descrierea.";
|
||||
$text['description-template_description']['ru-ru'] = "Введите описание.";
|
||||
$text['description-template_description']['sv-se'] = "Ange beskrivningen.";
|
||||
$text['description-template_description']['uk-ua'] = "Введіть опис.";
|
||||
$text['description-template_description']['tr-tr'] = "Açıklamayı girin.";
|
||||
$text['description-template_description']['zh-cn'] = "输入说明。";
|
||||
$text['description-template_description']['ja-jp'] = "説明を入力します。";
|
||||
$text['description-template_description']['ko-kr'] = "설명을 입력합니다.";
|
||||
|
||||
?>
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Email Templates";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Email Templates";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "قوالب البريد الإلكتروني";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "E-Mail-Vorlagen";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "E-Mail-Vorlagen";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "E-Mail-Vorlagen";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Plantillas de correo electrónico";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Plantillas de correo electrónico";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Modèles de courriel";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Modèles de courriel";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "תבניות אימייל";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Modelli di posta elettronica";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ელფოსტის ნიმუშები";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "E-mailsjablonen";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Szablony Email";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Modelos de e-mail";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Modelos de e-mail";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Șabloane de e-mail";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Шаблоны электронной почты";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "E-postmallar";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Шаблони електронної пошти";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "电子邮件模板";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "メール テンプレート";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "이메일 템플릿";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "5e548de3-ff1a-44e4-a2e6-f3917dac85a3";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/email_templates/email_templates.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
@@ -1,503 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2018-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('email_template_add') || permission_exists('email_template_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//action add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$email_template_uuid = $_REQUEST["id"];
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
$template_language = '';
|
||||
$template_category = '';
|
||||
$template_subcategory = '';
|
||||
$template_subject = '';
|
||||
$template_body = '';
|
||||
$template_type = '';
|
||||
$template_enabled = '';
|
||||
$template_description = '';
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
$domain_uuid = $_POST["domain_uuid"];
|
||||
$template_language = $_POST["template_language"];
|
||||
$template_category = $_POST["template_category"];
|
||||
$template_subcategory = $_POST["template_subcategory"];
|
||||
$template_subject = $_POST["template_subject"];
|
||||
$template_body = $_POST["template_body"];
|
||||
$template_type = $_POST["template_type"];
|
||||
$template_enabled = $_POST["template_enabled"] ?? 'false';
|
||||
$template_description = $_POST["template_description"];
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid from the POST
|
||||
if ($action == "update") {
|
||||
$email_template_uuid = $_POST["email_template_uuid"];
|
||||
}
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: email_templates.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (empty($template_language)) { $msg .= $text['message-required']." ".$text['label-template_language']."<br>\n"; }
|
||||
if (empty($template_category)) { $msg .= $text['message-required']." ".$text['label-template_category']."<br>\n"; }
|
||||
//if (empty($template_subcategory)) { $msg .= $text['message-required']." ".$text['label-template_subcategory']."<br>\n"; }
|
||||
if (empty($template_subject)) { $msg .= $text['message-required']." ".$text['label-template_subject']."<br>\n"; }
|
||||
if (empty($template_body)) { $msg .= $text['message-required']." ".$text['label-template_body']."<br>\n"; }
|
||||
//if (empty($domain_uuid)) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (empty($template_type)) { $msg .= $text['message-required']." ".$text['label-template_type']."<br>\n"; }
|
||||
if (empty($template_enabled)) { $msg .= $text['message-required']." ".$text['label-template_enabled']."<br>\n"; }
|
||||
//if (empty($template_description)) { $msg .= $text['message-required']." ".$text['label-template_description']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add the email_template_uuid
|
||||
if (empty($_POST["email_template_uuid"]) || !is_uuid($_POST["email_template_uuid"])) {
|
||||
$email_template_uuid = uuid();
|
||||
}
|
||||
|
||||
//prepare the array
|
||||
$array['email_templates'][0]['domain_uuid'] = $domain_uuid;
|
||||
$array['email_templates'][0]['email_template_uuid'] = $email_template_uuid;
|
||||
$array['email_templates'][0]['template_language'] = $template_language;
|
||||
$array['email_templates'][0]['template_category'] = $template_category;
|
||||
$array['email_templates'][0]['template_subcategory'] = $template_subcategory;
|
||||
$array['email_templates'][0]['template_subject'] = $template_subject;
|
||||
$array['email_templates'][0]['template_body'] = $template_body;
|
||||
$array['email_templates'][0]['template_type'] = $template_type;
|
||||
$array['email_templates'][0]['template_enabled'] = $template_enabled;
|
||||
$array['email_templates'][0]['template_description'] = $template_description;
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'email_templates';
|
||||
$database->app_uuid = '8173e738-2523-46d5-8943-13883befd2fd';
|
||||
if (!empty($email_template_uuid)) {
|
||||
$database->uuid($email_template_uuid);
|
||||
}
|
||||
$database->save($array);
|
||||
$message = $database->message;
|
||||
|
||||
//redirect the user
|
||||
if (isset($action)) {
|
||||
if ($action == "add") {
|
||||
message::add($text['message-add']);
|
||||
}
|
||||
if ($action == "update") {
|
||||
message::add($text['message-update']);
|
||||
}
|
||||
header('Location: email_template_edit.php?id='.escape($email_template_uuid));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && empty($_POST["persistformvar"])) {
|
||||
$email_template_uuid = $_GET["id"];
|
||||
$sql = "select * from v_email_templates ";
|
||||
$sql .= "where email_template_uuid = :email_template_uuid ";
|
||||
//$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['email_template_uuid'] = $email_template_uuid;
|
||||
//$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
$template_language = $row["template_language"];
|
||||
$template_category = $row["template_category"];
|
||||
$template_subcategory = $row["template_subcategory"];
|
||||
$template_subject = $row["template_subject"];
|
||||
$template_body = $row["template_body"];
|
||||
$template_type = $row["template_type"];
|
||||
$template_enabled = $row["template_enabled"];
|
||||
$template_description = $row["template_description"];
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if (empty($template_enabled)) { $template_enabled = 'true'; }
|
||||
|
||||
//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';
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include the header
|
||||
$document['title'] = $text['title-email_template'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
echo "<script language='JavaScript' type='text/javascript'>\n";
|
||||
|
||||
echo " function toggle_option(opt) {\n";
|
||||
echo " switch (opt) {\n";
|
||||
echo " case 'numbering':\n";
|
||||
echo " toggle_option_do('showLineNumbers');\n";
|
||||
echo " toggle_option_do('fadeFoldWidgets');\n";
|
||||
echo " break;\n";
|
||||
echo " case 'invisibles':\n";
|
||||
echo " toggle_option_do('showInvisibles');\n";
|
||||
echo " break;\n";
|
||||
echo " case 'indenting':\n";
|
||||
echo " toggle_option_do('displayIndentGuides');\n";
|
||||
echo " break;\n";
|
||||
echo " }\n";
|
||||
echo " focus_editor();\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " function toggle_option_do(opt_name) {\n";
|
||||
echo " var opt_val = editor.getOption(opt_name);\n";
|
||||
echo " editor.setOption(opt_name, ((opt_val) ? false : true));\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " function focus_editor() {\n";
|
||||
echo " editor.focus();\n";
|
||||
echo " }\n";
|
||||
|
||||
//copy the value from the editor on submit
|
||||
echo " function set_value() {\n";
|
||||
echo " $('#template_body').val(editor.session.getValue());\n";
|
||||
echo " }\n";
|
||||
|
||||
//load editor value from hidden textarea
|
||||
echo " function load_value() {\n";
|
||||
echo " editor.session.setValue($('#template_body').val());";
|
||||
echo " }\n";
|
||||
|
||||
echo "</script>\n";
|
||||
|
||||
echo "<style>\n";
|
||||
echo " div#editor {\n";
|
||||
echo " text-align: left;\n";
|
||||
echo " width: 100%;\n";
|
||||
echo " height: 600px;\n";
|
||||
echo " font-size: 12px;\n";
|
||||
echo " }\n";
|
||||
echo "</style>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-email_template']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'email_templates.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','onclick'=>"set_value(); $('#frm').submit();"]);
|
||||
echo " </div>\n";
|
||||
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";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_language']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='template_language' maxlength='255' value=\"".escape($template_language)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_language']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_category']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='template_category' maxlength='255' value=\"".escape($template_category)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_category']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_subcategory']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='template_subcategory' maxlength='255' value=\"".escape($template_subcategory)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_subcategory']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_subject']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='template_subject' maxlength='255' value=\"".escape($template_subject)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_subject']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_body']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <textarea class='formfld' name='template_body' id='template_body' style='display: none;'>".$template_body."</textarea>\n";
|
||||
echo " <div id='editor'></div>\n";
|
||||
echo " <table cellpadding='0' cellspacing='0' border='0' style='float: right; padding-top: 5px;'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><i class='fas fa-list-ul fa-lg ace_control' title=\"".$text['label-toggle_line_numbers']."\" onclick=\"toggle_option('numbering');\"></i></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><i class='fas fa-eye-slash fa-lg ace_control' title=\"".$text['label-toggle_invisibles']."\" onclick=\"toggle_option('invisibles');\"></i></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><i class='fas fa-indent fa-lg ace_control' title=\"".$text['label-toggle_indent_guides']."\" onclick=\"toggle_option('indenting');\"></i></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><i class='fas fa-search fa-lg ace_control' title=\"".$text['label-find_replace']."\" onclick=\"editor.execCommand('replace');\"></i></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><i class='fas fa-chevron-down fa-lg ace_control' title=\"".$text['label-go_to_line']."\" onclick=\"editor.execCommand('gotoline');\"></i></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 15px;'>\n";
|
||||
echo " <select id='size' class='formfld' onchange=\"document.getElementById('editor').style.fontSize = this.options[this.selectedIndex].value; focus_editor();\">\n";
|
||||
$sizes = explode(',','9px,10px,11px,12px,14px,16px,18px,20px');
|
||||
if (!in_array($setting_size, $sizes)) {
|
||||
echo " <option value='".$setting_size."'>".escape($setting_size)."</option>\n";
|
||||
echo " <option value='' disabled='disabled'></option>\n";
|
||||
}
|
||||
foreach ($sizes as $size) {
|
||||
$selected = $size == $setting_size ? 'selected' : null;
|
||||
echo " <option value='".$size."' ".$selected.">".escape($size)."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 4px; padding-right: 0px;'>\n";
|
||||
$themes['Light']['chrome']= 'Chrome';
|
||||
$themes['Light']['clouds']= 'Clouds';
|
||||
$themes['Light']['crimson_editor']= 'Crimson Editor';
|
||||
$themes['Light']['dawn']= 'Dawn';
|
||||
$themes['Light']['dreamweaver']= 'Dreamweaver';
|
||||
$themes['Light']['eclipse']= 'Eclipse';
|
||||
$themes['Light']['github']= 'GitHub';
|
||||
$themes['Light']['iplastic']= 'IPlastic';
|
||||
$themes['Light']['solarized_light']= 'Solarized Light';
|
||||
$themes['Light']['textmate']= 'TextMate';
|
||||
$themes['Light']['tomorrow']= 'Tomorrow';
|
||||
$themes['Light']['xcode']= 'XCode';
|
||||
$themes['Light']['kuroir']= 'Kuroir';
|
||||
$themes['Light']['katzenmilch']= 'KatzenMilch';
|
||||
$themes['Light']['sqlserver']= 'SQL Server';
|
||||
$themes['Dark']['ambiance']= 'Ambiance';
|
||||
$themes['Dark']['chaos']= 'Chaos';
|
||||
$themes['Dark']['clouds_midnight']= 'Clouds Midnight';
|
||||
$themes['Dark']['cobalt']= 'Cobalt';
|
||||
$themes['Dark']['idle_fingers']= 'idle Fingers';
|
||||
$themes['Dark']['kr_theme']= 'krTheme';
|
||||
$themes['Dark']['merbivore']= 'Merbivore';
|
||||
$themes['Dark']['merbivore_soft']= 'Merbivore Soft';
|
||||
$themes['Dark']['mono_industrial']= 'Mono Industrial';
|
||||
$themes['Dark']['monokai']= 'Monokai';
|
||||
$themes['Dark']['pastel_on_dark']= 'Pastel on dark';
|
||||
$themes['Dark']['solarized_dark']= 'Solarized Dark';
|
||||
$themes['Dark']['terminal']= 'Terminal';
|
||||
$themes['Dark']['tomorrow_night']= 'Tomorrow Night';
|
||||
$themes['Dark']['tomorrow_night_blue']= 'Tomorrow Night Blue';
|
||||
$themes['Dark']['tomorrow_night_bright']= 'Tomorrow Night Bright';
|
||||
$themes['Dark']['tomorrow_night_eighties']= 'Tomorrow Night 80s';
|
||||
$themes['Dark']['twilight']= 'Twilight';
|
||||
$themes['Dark']['vibrant_ink']= 'Vibrant Ink';
|
||||
echo " <select id='theme' class='formfld' onchange=\"editor.setTheme('ace/theme/' + this.options[this.selectedIndex].value); focus_editor();\">\n";
|
||||
foreach ($themes as $optgroup => $theme) {
|
||||
echo " <optgroup label='".$optgroup."'>\n";
|
||||
foreach ($theme as $value => $label) {
|
||||
$selected = strtolower($label) == strtolower($setting_theme) ? 'selected' : null;
|
||||
echo " <option value='".$value."' ".$selected.">".escape($label)."</option>\n";
|
||||
}
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_body']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-domain']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <select class='formfld' name='domain_uuid'>\n";
|
||||
if (!is_uuid($domain_uuid)) {
|
||||
echo " <option value='' selected='selected'>".$text['label-global']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value=''>".$text['label-global']."</option>\n";
|
||||
}
|
||||
foreach ($_SESSION['domains'] as $row) {
|
||||
if ($row['domain_uuid'] == $domain_uuid) {
|
||||
echo " <option value='".escape($row['domain_uuid'])."' selected='selected'>".escape($row['domain_name'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($row['domain_uuid'])."'>".escape($row['domain_name'])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo !empty($text['description-domain_uuid'])."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_type']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <select class='formfld' name='template_type'>\n";
|
||||
echo " <option value='html'>HTML</option>\n";
|
||||
echo " <option value='text' ".($template_type == 'text' ? "selected='selected'" : null).">".$text['label-template_text']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_type']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='template_enabled' name='template_enabled' value='true' ".($template_enabled == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
echo " </label>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' id='template_enabled' name='template_enabled'>\n";
|
||||
echo " <option value='true' ".($template_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($template_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-template_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='template_description' maxlength='255' value=\"".escape($template_description)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='email_template_uuid' value='".escape($email_template_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "<script type='text/javascript' src='".PROJECT_PATH."/resources/ace/ace.js' charset='utf-8'></script>\n";
|
||||
echo "<script type='text/javascript'>\n";
|
||||
|
||||
//load editor
|
||||
echo " var editor = ace.edit('editor');\n";
|
||||
echo " editor.setOptions({\n";
|
||||
echo " mode: 'ace/mode/html',\n";
|
||||
echo " theme: 'ace/theme/'+document.getElementById('theme').options[document.getElementById('theme').selectedIndex].value,\n";
|
||||
echo " selectionStyle: 'text',\n";
|
||||
echo " cursorStyle: 'smooth',\n";
|
||||
echo " showInvisibles: ".$setting_invisibles.",\n";
|
||||
echo " displayIndentGuides: ".$setting_indenting.",\n";
|
||||
echo " showLineNumbers: ".$setting_numbering.",\n";
|
||||
echo " showGutter: true,\n";
|
||||
echo " scrollPastEnd: true,\n";
|
||||
echo " fadeFoldWidgets: ".$setting_numbering.",\n";
|
||||
echo " showPrintMargin: false,\n";
|
||||
echo " highlightGutterLine: false,\n";
|
||||
echo " useSoftTabs: false\n";
|
||||
echo " });\n";
|
||||
echo " document.getElementById('editor').style.fontSize='".$setting_size."';\n";
|
||||
echo " focus_editor();\n";
|
||||
|
||||
//load value into editor
|
||||
echo " load_value();\n";
|
||||
|
||||
//remove certain keyboard shortcuts
|
||||
echo " editor.commands.bindKey('Ctrl-T', null);\n"; //disable transpose letters - prefer new browser tab
|
||||
echo " editor.commands.bindKey('Ctrl-F', null);\n"; //disable find - control broken with bootstrap
|
||||
echo " editor.commands.bindKey('Ctrl-H', null);\n"; //disable replace - control broken with bootstrap
|
||||
|
||||
echo "</script>\n";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
@@ -1,325 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('email_template_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$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';
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['email_templates'])) {
|
||||
$action = $_POST['action'];
|
||||
$category = $_POST['category'] ?? null;
|
||||
$search = $_POST['search'];
|
||||
$email_templates = $_POST['email_templates'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($email_templates)) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('email_template_add')) {
|
||||
$obj = new email_templates;
|
||||
$obj->copy($email_templates);
|
||||
}
|
||||
break;
|
||||
case 'toggle':
|
||||
if (permission_exists('email_template_edit')) {
|
||||
$obj = new email_templates;
|
||||
$obj->toggle($email_templates);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
if (permission_exists('email_template_delete')) {
|
||||
$obj = new email_templates;
|
||||
$obj->delete($email_templates);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
header('Location: email_templates.php?'.(!empty($search) ? '&search='.urlencode($search) : null).(!empty($category) ? '&category='.urlencode($category) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//add the category
|
||||
$category = strtolower($_GET["category"] ?? '');
|
||||
if ($category) {
|
||||
$sql_category = "and (";
|
||||
$sql_category .= " lower(template_category) = :category";
|
||||
$sql_category .= ") ";
|
||||
$parameters['category'] = $category;
|
||||
}
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= " lower(template_language) like :search ";
|
||||
//$sql_search .= " or lower(template_category) like :search ";
|
||||
$sql_search .= " or lower(template_subcategory) like :search ";
|
||||
$sql_search .= " or lower(template_subject) like :search ";
|
||||
$sql_search .= " or lower(template_body) like :search ";
|
||||
$sql_search .= " or lower(template_type) like :search ";
|
||||
$sql_search .= " or lower(template_enabled) like :search ";
|
||||
$sql_search .= " or lower(template_description) like :search ";
|
||||
$sql_search .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_email_templates where true ";
|
||||
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('email_template_all')) {
|
||||
if (!empty($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
if (!empty($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
}
|
||||
$sql .= $sql_category ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? '', 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".$search;
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('email_template_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
if ($order_by) {
|
||||
$sql .= order_by($order_by, $order);
|
||||
}
|
||||
else {
|
||||
$sql .= "order by domain_uuid, template_language asc, template_category asc, template_subcategory asc, template_type asc, template_description asc ";
|
||||
}
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? '', 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get email template categories
|
||||
$sql = "select distinct template_category from v_email_templates ";
|
||||
$sql .= "order by template_category asc ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters ?? '', 'all');
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
$template_categories[$row['template_category']] = ucwords(str_replace('_',' ',$row['template_category']));
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//additional includes
|
||||
$document['title'] = $text['title-email_templates'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-email_templates']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('email_template_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'email_template_edit.php']);
|
||||
}
|
||||
if (permission_exists('email_template_add') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
}
|
||||
if (permission_exists('email_template_edit') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','name'=>'btn_toggle','style'=>'display: none;','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('email_template_delete') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('email_template_all')) {
|
||||
if (!empty($_GET['show']) && $_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all']);
|
||||
}
|
||||
}
|
||||
echo "<select name='category' id='category' class='formfld' style='margin-left: 18px;' onchange=\"$('#form_search').submit();\">\n";
|
||||
echo "<option value='' ".(!$category ? "selected='selected'" : null)." disabled='disabled'>".$text['label-category']."...</option>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
if (!empty($template_categories)) {
|
||||
foreach ($template_categories as $template_category_value => $template_category_label) {
|
||||
echo "<option value='".$template_category_value."' ".($category == $template_category_value ? "selected='selected'" : null).">".escape($template_category_label)."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
|
||||
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'email_templates.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
}
|
||||
echo " </form>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('email_template_add') && $result) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('email_template_edit') && $result) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('email_template_delete') && $result) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['title_description-email_template']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('email_template_add') || permission_exists('email_template_edit') || permission_exists('email_template_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('email_template_all')) {
|
||||
echo "<th>".$text['label-domain']."</th>\n";
|
||||
//echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param);
|
||||
}
|
||||
echo th_order_by('template_language', $text['label-template_language'], $order_by, $order, null, "class='shrink'", $param);
|
||||
echo th_order_by('template_category', $text['label-template_category'], $order_by, $order, null, "class='pct-15'", $param);
|
||||
echo th_order_by('template_subcategory', $text['label-template_subcategory'], $order_by, $order, null, "class='pct-15'", $param);
|
||||
echo th_order_by('template_subject', $text['label-template_subject'], $order_by, $order, null, "class='hide-xs pct-30'", $param);
|
||||
echo th_order_by('template_type', $text['label-template_type'], $order_by, $order, null, null, $param);
|
||||
echo th_order_by('template_enabled', $text['label-template_enabled'], $order_by, $order, null, "class='center pct-10'", $param);
|
||||
echo th_order_by('template_description', $text['label-template_description'], $order_by, $order, null, "class='hide-sm-dn'", $param);
|
||||
if (permission_exists('email_template_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($result)) {
|
||||
$x = 0;
|
||||
foreach($result as $row) {
|
||||
if (permission_exists('email_template_edit')) {
|
||||
$list_row_url = "email_template_edit.php?id=".urlencode($row['email_template_uuid']);
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('email_template_add') || permission_exists('email_template_edit') || permission_exists('email_template_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='email_templates[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='email_templates[$x][uuid]' value='".escape($row['email_template_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('email_template_all')) {
|
||||
echo " <td>";
|
||||
if (is_uuid($row['domain_uuid'])) {
|
||||
echo escape($_SESSION['domains'][$row['domain_uuid']]['domain_name']);
|
||||
}
|
||||
else {
|
||||
echo $text['label-global'];
|
||||
}
|
||||
echo "</td>\n";
|
||||
}
|
||||
echo " <td>".escape($row['template_language'])." </td>\n";
|
||||
echo " <td>".escape($row['template_category'])." </td>\n";
|
||||
echo " <td>".escape($row['template_subcategory'])." </td>\n";
|
||||
echo " <td class='overflow hide-xs'>";
|
||||
if (permission_exists('email_template_edit')) {
|
||||
echo "<a href='".$list_row_url."'>".escape($row['template_subject'])."</a>";
|
||||
}
|
||||
else {
|
||||
echo escape($row['template_subject']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td>".escape($row['template_type'])." </td>\n";
|
||||
if (permission_exists('email_template_edit')) {
|
||||
echo " <td class='no-link center'>";
|
||||
echo button::create(['type'=>'submit','class'=>'link','label'=>$text['label-'.$row['template_enabled']],'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle'); list_form_submit('form_list')"]);
|
||||
}
|
||||
else {
|
||||
echo " <td class='center'>";
|
||||
echo $text['label-'.$row['template_enabled']];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['template_description'])."</td>\n";
|
||||
if (permission_exists('email_template_edit') && $list_row_edit_button == 'true') {
|
||||
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";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
unset($result);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>\n";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
@@ -1,249 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//define the email templates class
|
||||
if (!class_exists('email_templates')) {
|
||||
class email_templates {
|
||||
|
||||
/**
|
||||
* declare private variables
|
||||
*/
|
||||
private $app_name;
|
||||
private $app_uuid;
|
||||
private $permission_prefix;
|
||||
private $list_page;
|
||||
private $table;
|
||||
private $uuid_prefix;
|
||||
private $toggle_field;
|
||||
private $toggle_values;
|
||||
|
||||
/**
|
||||
* called when the object is created
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'email_templates';
|
||||
$this->app_uuid = '8173e738-2523-46d5-8943-13883befd2fd';
|
||||
$this->permission_prefix = 'email_template_';
|
||||
$this->list_page = 'email_templates.php';
|
||||
$this->table = 'email_templates';
|
||||
$this->uuid_prefix = 'email_template_';
|
||||
$this->toggle_field = 'template_enabled';
|
||||
$this->toggle_values = ['true','false'];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
public function delete($records) {
|
||||
if (permission_exists($this->permission_prefix.'delete')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//delete multiple records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//build the delete array
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
}
|
||||
}
|
||||
|
||||
//delete the checked rows
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* toggle records
|
||||
*/
|
||||
public function toggle($records) {
|
||||
if (permission_exists($this->permission_prefix.'edit')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//toggle the checked records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//get current toggle state
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$states[$row['uuid']] = $row['toggle'];
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
}
|
||||
|
||||
//build update array
|
||||
$x = 0;
|
||||
foreach($states as $uuid => $state) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
|
||||
$array[$this->table][$x][$this->toggle_field] = $state == $this->toggle_values[0] ? $this->toggle_values[1] : $this->toggle_values[0];
|
||||
$x++;
|
||||
}
|
||||
|
||||
//save the changes
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//set message
|
||||
message::add($text['message-toggle']);
|
||||
}
|
||||
unset($records, $states);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* copy records
|
||||
*/
|
||||
public function copy($records) {
|
||||
if (permission_exists($this->permission_prefix.'add')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//copy the checked records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//get checked records
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
//create insert array from existing data
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select * from v_".$this->table." ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $x => $row) {
|
||||
|
||||
//copy data
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
//overwrite
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = uuid();
|
||||
$array[$this->table][$x]['template_description'] = trim($row['template_description'].' ('.$text['label-copy'].')');
|
||||
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
}
|
||||
|
||||
//save the changes and set the message
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 257 B |
Binary file not shown.
|
Before Width: | Height: | Size: 224 B |
Binary file not shown.
|
Before Width: | Height: | Size: 726 B |
@@ -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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
@@ -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.";
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+7
-2
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
@@ -213,7 +213,7 @@
|
||||
//echo " <td>".$row['fax_retry_sleep']." </td>\n";
|
||||
echo " <td>".basename($row['fax_uri'])." </td>\n";
|
||||
//echo " <td>".$row['fax_epoch']." </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";
|
||||
|
||||
@@ -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']) {
|
||||
|
||||
+22
-2
@@ -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}";
|
||||
|
||||
?>
|
||||
?>
|
||||
+292
-1
@@ -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'] = "활성화됨";
|
||||
|
||||
?>
|
||||
?>
|
||||
+7
-4
@@ -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";
|
||||
|
||||
?>
|
||||
?>
|
||||
+200
-40
@@ -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";
|
||||
|
||||
@@ -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'> </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"])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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'> </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"])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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 @@
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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'])." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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(" ", " ");
|
||||
--body = body:gsub("%s+", "");
|
||||
--body = body:gsub(" ", " ");
|
||||
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(" ", " ");
|
||||
--body = body:gsub("%s+", "");
|
||||
--body = body:gsub(" ", " ");
|
||||
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
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'> </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']." </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+8
-3
@@ -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'> </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";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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'> </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'])." </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 @@
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'] = "";
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -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'] = "이메일 재전송";
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user