Compare commits

..

No commits in common. "master" and "5.3.0" have entirely different histories.

738 changed files with 18201 additions and 33092 deletions

View File

@ -38,9 +38,6 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//create the database connection
$database = database::new();
//action add or update //action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) { if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update"; $action = "update";
@ -96,17 +93,20 @@
switch ($_POST['action']) { switch ($_POST['action']) {
case 'copy': case 'copy':
if (permission_exists('access_control_add')) { if (permission_exists('access_control_add')) {
$database->copy($array); $obj = new database;
$obj->copy($array);
} }
break; break;
case 'delete': case 'delete':
if (permission_exists('access_control_delete')) { if (permission_exists('access_control_delete')) {
$database->delete($array); $obj = new database;
$obj->delete($array);
} }
break; break;
case 'toggle': case 'toggle':
if (permission_exists('access_control_update')) { if (permission_exists('access_control_update')) {
$database->toggle($array); $obj = new database;
$obj->toggle($array);
} }
break; break;
} }
@ -202,7 +202,7 @@
//attempt digs //attempt digs
if (!empty($digs) && is_array($digs)) { if (!empty($digs) && is_array($digs)) {
foreach ($digs as $dig) { foreach ($digs as $dig) {
$response = shell_exec("dig +noall +answer ".escapeshellarg(str_replace(' ', '', $dig['value']))." | awk '{ print $5 }'"); $response = shell_exec("dig +noall +answer ".$dig['value']." | awk '{ print $5 }'");
if (!empty($response)) { if (!empty($response)) {
$lines = explode("\n", $response); $lines = explode("\n", $response);
foreach ($lines as $l => $line) { foreach ($lines as $l => $line) {
@ -217,7 +217,7 @@
$array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = uuid(); $array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = uuid();
$array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $dig['type']; $array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $dig['type'];
$array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $line.'/32'; $array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $line.'/32';
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = !empty($dig['description']) ? $dig['description'] : str_replace(' ', '', $dig['value']); $array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = !empty($dig['description']) ? $dig['description'] : $dig['value'];
$y++; $y++;
} }
} }
@ -229,6 +229,7 @@
//save the data //save the data
if (is_array($array)) { if (is_array($array)) {
$database = new database;
$database->app_name = 'access controls'; $database->app_name = 'access controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array); $database->save($array);
@ -265,7 +266,7 @@
$sql = "select * from v_access_controls "; $sql = "select * from v_access_controls ";
$sql .= "where access_control_uuid = :access_control_uuid "; $sql .= "where access_control_uuid = :access_control_uuid ";
$parameters['access_control_uuid'] = $access_control_uuid; $parameters['access_control_uuid'] = $access_control_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row'); $row = $database->select($sql, $parameters, 'row');
if (!empty($row) && count($row) > 0) { if (!empty($row) && count($row) > 0) {
$access_control_name = $row["access_control_name"]; $access_control_name = $row["access_control_name"];
@ -281,6 +282,7 @@
$sql .= "where access_control_uuid = :access_control_uuid "; $sql .= "where access_control_uuid = :access_control_uuid ";
$sql .= "order by node_cidr asc"; $sql .= "order by node_cidr asc";
$parameters['access_control_uuid'] = $access_control_uuid; $parameters['access_control_uuid'] = $access_control_uuid;
$database = new database;
$access_control_nodes = $database->select($sql, $parameters, 'all'); $access_control_nodes = $database->select($sql, $parameters, 'all');
unset ($sql, $parameters); unset ($sql, $parameters);
} }
@ -324,9 +326,6 @@
if (permission_exists('access_control_node_add')) { if (permission_exists('access_control_node_add')) {
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'style'=>'margin-right: 3px;','link'=>'access_control_import.php?id='.escape($access_control_uuid)]); echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'style'=>'margin-right: 3px;','link'=>'access_control_import.php?id='.escape($access_control_uuid)]);
} }
if (permission_exists('access_control_node_view')) {
echo button::create(['type'=>'button','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'style'=>'margin-right: 3px;','link'=>'access_control_export.php?id='.escape($access_control_uuid)]);
}
if (permission_exists('access_control_node_add')) { if (permission_exists('access_control_node_add')) {
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');"]); 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');"]);
} }

View File

@ -1,185 +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-2024
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
//check permissions
if (permission_exists('access_control_node_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//initialize the database object
$database = new database;
//add multi-lingual support
$language = new text;
$text = $language->get();
//define available columns
$available_columns[] = 'node_type';
$available_columns[] = 'node_cidr';
$available_columns[] = 'node_description';
$available_columns[] = 'insert_date';
$available_columns[] = 'insert_user';
$available_columns[] = 'update_date';
$available_columns[] = 'update_user';
//action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$access_control_uuid = $_REQUEST["id"];
}
//define the functions
function array2csv(array &$array) {
if (count($array) == 0) {
return null;
}
ob_start();
$df = fopen("php://output", 'w');
fputcsv($df, array_keys(reset($array)));
foreach ($array as $row) {
fputcsv($df, $row);
}
fclose($df);
return ob_get_clean();
}
//send download headers
function download_send_headers($filename) {
// disable caching
$now = gmdate("D, d M Y H:i:s");
header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate");
header("Last-Modified: {$now} GMT");
// force download
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
// disposition / encoding on response body
header("Content-Disposition: attachment;filename={$filename}");
header("Content-Transfer-Encoding: binary");
}
//get the extensions from the database and send them as output
if (!empty($_REQUEST["column_group"]) && is_array($_REQUEST["column_group"]) && @sizeof($_REQUEST["column_group"]) != 0) {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: access_control_export.php');
exit;
}
//validate submitted columns
foreach ($_REQUEST["column_group"] as $column_name) {
if (in_array($column_name, $available_columns)) {
$selected_columns[] = $column_name;
}
}
if (!empty($access_control_uuid) && is_uuid($access_control_uuid) && is_array($selected_columns) && @sizeof($selected_columns) != 0) {
//get the child data
$sql = "select ".implode(', ', $selected_columns)." from v_access_control_nodes ";
$sql .= "where access_control_uuid = :access_control_uuid ";
$sql .= "order by node_cidr asc";
$parameters['access_control_uuid'] = $access_control_uuid;
$access_control_nodes = $database->select($sql, $parameters, 'all');
unset($sql, $parameters, $selected_columns);
//send the download headers
download_send_headers("access_control_export_".date("Y-m-d").".csv");
//output the data
echo array2csv($access_control_nodes);
exit;
}
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//include the header
$document['title'] = $text['title-access_control_export'];
require_once "resources/header.php";
//show the content
echo "<form method='post' name='frm' id='frm'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['header-access_control_export']."</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','link'=>'access_control_edit.php?id='.$access_control_uuid]);
echo button::create(['type'=>'submit','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo $text['description-access_control_export'];
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".(empty($available_columns) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
echo " <th>".$text['label-column_name']."</th>\n";
echo "</tr>\n";
if (!empty($available_columns) && is_array($available_columns) && @sizeof($available_columns) != 0) {
$x = 0;
foreach ($available_columns as $column_name) {
$list_row_onclick = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
echo "<tr class='list-row'>\n";
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='column_group[]' id='checkbox_".$x."' value=\"".$column_name."\" onclick=\"".$list_row_onclick."\">\n";
echo " </td>\n";
echo " <td onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick."\">".$column_name."</td>";
echo "</tr>";
$x++;
}
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//include the footer
require_once "resources/footer.php";
?>

View File

@ -211,12 +211,8 @@
if (!empty($access_controls) && count($access_controls) > 0) { if (!empty($access_controls) && count($access_controls) > 0) {
$x = 0; $x = 0;
foreach ($access_controls as $row) { foreach ($access_controls as $row) {
$list_row_url = '';
if (permission_exists('access_control_edit')) { if (permission_exists('access_control_edit')) {
$list_row_url = "access_control_edit.php?id=".urlencode($row['access_control_uuid']); $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"; 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')) { if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
@ -258,4 +254,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -55,6 +55,7 @@
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = "access_control_node_delete"; $apps[$x]['permissions'][$y]['name'] = "access_control_node_delete";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
//cache details //cache details
$apps[$x]['cache']['key'] = "configuration.acl.conf"; $apps[$x]['cache']['key'] = "configuration.acl.conf";
@ -72,7 +73,7 @@
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "access_control_name"; $apps[$x]['db'][$y]['fields'][$z]['name'] = "access_control_name";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true'; $apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name."; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name.";
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "access_control_default"; $apps[$x]['db'][$y]['fields'][$z]['name'] = "access_control_default";

View File

@ -33,7 +33,7 @@
if ($num_rows == 0) { if ($num_rows == 0) {
//set the directory //set the directory
$xml_dir = $settings->get('switch','conf').'/autoload_configs'; $xml_dir = $setting->get('switch','conf').'/autoload_configs';
$xml_file = $xml_dir."/acl.conf.xml"; $xml_file = $xml_dir."/acl.conf.xml";
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/acl.conf'; $xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/acl.conf';
@ -74,7 +74,7 @@
$array['access_controls'][0]['access_control_name'] = $access_control_name; $array['access_controls'][0]['access_control_name'] = $access_control_name;
$array['access_controls'][0]['access_control_default'] = $access_control_default; $array['access_controls'][0]['access_control_default'] = $access_control_default;
$p = permissions::new(); $p = new permissions;
$p->add('access_control_add', 'temp'); $p->add('access_control_add', 'temp');
$database->app_name = 'access_controls'; $database->app_name = 'access_controls';
@ -106,7 +106,7 @@
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr; $array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
$array['access_control_nodes'][0]['node_description'] = $node_description; $array['access_control_nodes'][0]['node_description'] = $node_description;
$p = permissions::new(); $p = new permissions;
$p->add('access_control_node_add', 'temp'); $p->add('access_control_node_add', 'temp');
$database->app_name = 'access_controls'; $database->app_name = 'access_controls';

View File

@ -108,59 +108,32 @@ $text['title-access_control']['zh-cn'] = "访问控制";
$text['title-access_control']['ja-jp'] = "アクセス制御"; $text['title-access_control']['ja-jp'] = "アクセス制御";
$text['title-access_control']['ko-kr'] = "액세스 제어"; $text['title-access_control']['ko-kr'] = "액세스 제어";
$text['title-access_control_export']['en-us'] = "Access Control Export"; $text['title_description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses.";
$text['title-access_control_export']['en-gb'] = "Access Control Export"; $text['title_description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses.";
$text['title-access_control_export']['ar-eg'] = ""; $text['title_description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين.";
$text['title-access_control_export']['de-at'] = ""; $text['title_description-access_controls']['de-at'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title-access_control_export']['de-ch'] = ""; $text['title_description-access_controls']['de-ch'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title-access_control_export']['de-de'] = ""; $text['title_description-access_controls']['de-de'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title-access_control_export']['ek-gr'] = ""; $text['title_description-access_controls']['el-gr'] = "Access control list can allow or deny ranges of IP addresses";
$text['title-access_control_export']['es-cl'] = ""; $text['title_description-access_controls']['es-cl'] = "Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title-access_control_export']['es-mx'] = ""; $text['title_description-access_controls']['es-mx'] = "Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title-access_control_export']['fr-ca'] = ""; $text['title_description-access_controls']['fr-ca'] = "Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title-access_control_export']['fr-fr'] = ""; $text['title_description-access_controls']['fr-fr'] = "Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title-access_control_export']['he-il'] = ""; $text['title_description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP.";
$text['title-access_control_export']['it-it'] = ""; $text['title_description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP.";
$text['title-access_control_export']['ka-ge'] = ""; $text['title_description-access_controls']['ka-ge'] = "წვდომის კონტროლის სიას IP მისამართების შუალედების დაშვება ან აკრძალვა შეუძლია";
$text['title-access_control_export']['nl-nl'] = ""; $text['title_description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden.";
$text['title-access_control_export']['pl-pl'] = ""; $text['title_description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP.";
$text['title-access_control_export']['pt-br'] = ""; $text['title_description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
$text['title-access_control_export']['pt-pt'] = ""; $text['title_description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
$text['title-access_control_export']['ro-ro'] = ""; $text['title_description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP.";
$text['title-access_control_export']['ru-ru'] = ""; $text['title_description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов.";
$text['title-access_control_export']['sv-se'] = ""; $text['title_description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser.";
$text['title-access_control_export']['uk-ua'] = ""; $text['title_description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес.";
$text['title-access_control_export']['tr-tr'] = ""; $text['title_description-access_controls']['tr-tr'] = "Erişim kontrol listesi IP adres aralıklarına izin verebilir veya reddedebilir.";
$text['title-access_control_export']['zh-cn'] = ""; $text['title_description-access_controls']['zh-cn'] = "访问控制列表可以允许或拒绝 IP 地址范围。";
$text['title-access_control_export']['ja-jp'] = ""; $text['title_description-access_controls']['ja-jp'] = "アクセス コントロール リストでは、IP アドレスの範囲を許可または拒否できます。";
$text['title-access_control_export']['ko-kr'] = ""; $text['title_description-access_controls']['ko-kr'] = "액세스 제어 목록은 IP 주소 범위를 허용하거나 거부할 수 있습니다.";
$text['header-access_control_export']['en-us'] = "Access Control Export";
$text['header-access_control_export']['en-gb'] = "Access Control Export";
$text['header-access_control_export']['ar-eg'] = "";
$text['header-access_control_export']['de-at'] = "";
$text['header-access_control_export']['de-ch'] = "";
$text['header-access_control_export']['de-de'] = "";
$text['header-access_control_export']['ek-gr'] = "";
$text['header-access_control_export']['es-cl'] = "";
$text['header-access_control_export']['es-mx'] = "";
$text['header-access_control_export']['fr-ca'] = "";
$text['header-access_control_export']['fr-fr'] = "";
$text['header-access_control_export']['he-il'] = "";
$text['header-access_control_export']['it-it'] = "";
$text['header-access_control_export']['ka-ge'] = "";
$text['header-access_control_export']['nl-nl'] = "";
$text['header-access_control_export']['pl-pl'] = "";
$text['header-access_control_export']['pt-br'] = "";
$text['header-access_control_export']['pt-pt'] = "";
$text['header-access_control_export']['ro-ro'] = "";
$text['header-access_control_export']['ru-ru'] = "";
$text['header-access_control_export']['sv-se'] = "";
$text['header-access_control_export']['uk-ua'] = "";
$text['header-access_control_export']['tr-tr'] = "";
$text['header-access_control_export']['zh-cn'] = "";
$text['header-access_control_export']['ja-jp'] = "";
$text['header-access_control_export']['ko-kr'] = "";
$text['label-node_type']['en-us'] = "Type"; $text['label-node_type']['en-us'] = "Type";
$text['label-node_type']['en-gb'] = "Type"; $text['label-node_type']['en-gb'] = "Type";
@ -432,33 +405,6 @@ $text['label-access_control_description']['zh-cn'] = "描述";
$text['label-access_control_description']['ja-jp'] = "説明"; $text['label-access_control_description']['ja-jp'] = "説明";
$text['label-access_control_description']['ko-kr'] = "설명"; $text['label-access_control_description']['ko-kr'] = "설명";
$text['title_description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses.";
$text['title_description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses.";
$text['title_description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين.";
$text['title_description-access_controls']['de-at'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['de-ch'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['de-de'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['el-gr'] = "Access control list can allow or deny ranges of IP addresses";
$text['title_description-access_controls']['es-cl'] = "Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title_description-access_controls']['es-mx'] = "Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title_description-access_controls']['fr-ca'] = "Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title_description-access_controls']['fr-fr'] = "Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title_description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP.";
$text['title_description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP.";
$text['title_description-access_controls']['ka-ge'] = "წვდომის კონტროლის სიას IP მისამართების შუალედების დაშვება ან აკრძალვა შეუძლია";
$text['title_description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden.";
$text['title_description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP.";
$text['title_description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
$text['title_description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
$text['title_description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP.";
$text['title_description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов.";
$text['title_description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser.";
$text['title_description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес.";
$text['title_description-access_controls']['tr-tr'] = "Erişim kontrol listesi IP adres aralıklarına izin verebilir veya reddedebilir.";
$text['title_description-access_controls']['zh-cn'] = "访问控制列表可以允许或拒绝 IP 地址范围。";
$text['title_description-access_controls']['ja-jp'] = "アクセス コントロール リストでは、IP アドレスの範囲を許可または拒否できます。";
$text['title_description-access_controls']['ko-kr'] = "액세스 제어 목록은 IP 주소 범위를 허용하거나 거부할 수 있습니다.";
$text['description-node_type']['en-us'] = "Select the type."; $text['description-node_type']['en-us'] = "Select the type.";
$text['description-node_type']['en-gb'] = "Select the type."; $text['description-node_type']['en-gb'] = "Select the type.";
$text['description-node_type']['ar-eg'] = "حدد نوع."; $text['description-node_type']['ar-eg'] = "حدد نوع.";
@ -648,31 +594,4 @@ $text['description-access_control_default']['zh-cn'] = "选择默认类型。";
$text['description-access_control_default']['ja-jp'] = "デフォルトのタイプを選択します。"; $text['description-access_control_default']['ja-jp'] = "デフォルトのタイプを選択します。";
$text['description-access_control_default']['ko-kr'] = "기본 유형을 선택합니다."; $text['description-access_control_default']['ko-kr'] = "기본 유형을 선택합니다.";
$text['description-access_control_export']['en-us'] = "Select the fields you wish to include in the export.";
$text['description-access_control_export']['en-gb'] = "Select the fields you wish to include in the export.";
$text['description-access_control_export']['ar-eg'] = "حدد الحقول التي ترغب في تضمينها في التصدير.";
$text['description-access_control_export']['de-at'] = "Wählen Sie die Felder aus, die Sie in den Export einbeziehen möchten.";
$text['description-access_control_export']['de-ch'] = "Wählen Sie die Felder aus, die Sie in den Export einbeziehen möchten.";
$text['description-access_control_export']['de-de'] = "Wählen Sie die Felder aus, die Sie in den Export einbeziehen möchten.";
$text['description-access_control_export']['ek-gr'] = "Επιλέξτε τα πεδία που θέλετε να συμπεριλάβετε στην εξαγωγή.";
$text['description-access_control_export']['es-cl'] = "Seleccione los campos que desea incluir en la exportación.";
$text['description-access_control_export']['es-mx'] = "Seleccione los campos que desea incluir en la exportación.";
$text['description-access_control_export']['fr-ca'] = "Sélectionnez les champs que vous souhaitez inclure dans l'exportation.";
$text['description-access_control_export']['fr-fr'] = "Sélectionnez les champs que vous souhaitez inclure dans l'exportation.";
$text['description-access_control_export']['he-il'] = "בחר את השדות שברצונך לכלול בייצוא.";
$text['description-access_control_export']['it-it'] = "Seleziona i campi che desideri includere nell'esportazione.";
$text['description-access_control_export']['ka-ge'] = "აირჩიეთ ექსპორტში ჩასასმელი ველები.";
$text['description-access_control_export']['nl-nl'] = "Selecteer de velden die u in de export wilt opnemen.";
$text['description-access_control_export']['pl-pl'] = "Wybierz pola, które chcesz uwzględnić w eksporcie.";
$text['description-access_control_export']['pt-br'] = "Selecione os campos que deseja incluir na exportação.";
$text['description-access_control_export']['pt-pt'] = "Selecione os campos que deseja incluir na exportação.";
$text['description-access_control_export']['ro-ro'] = "Selectați câmpurile pe care doriți să le includeți în export.";
$text['description-access_control_export']['ru-ru'] = "Выберите поля, которые вы хотите включить в экспорт.";
$text['description-access_control_export']['sv-se'] = "Välj de fält du vill inkludera i exporten.";
$text['description-access_control_export']['uk-ua'] = "Виберіть поля, які потрібно включити в експорт.";
$text['description-access_control_export']['tr-tr'] = "Dışa aktarmaya dahil etmek istediğiniz alanları seçin.";
$text['description-access_control_export']['zh-cn'] = "选择您希望包含在导出中的字段。";
$text['description-access_control_export']['ja-jp'] = "エクスポートに含めるフィールドを選択します。";
$text['description-access_control_export']['ko-kr'] = "내보내기에 포함할 필드를 선택합니다.";
?> ?>

View File

@ -2,7 +2,11 @@
/** /**
* access controls class * access controls class
*
* @method null download
*/ */
if (!class_exists('access_controls')) {
class access_controls { class access_controls {
/** /**
@ -65,7 +69,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('access_control_node_delete', 'temp'); $p->add('access_control_node_delete', 'temp');
//execute delete //execute delete
@ -232,7 +236,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('access_control_node_add', 'temp'); $p->add('access_control_node_add', 'temp');
//save the array //save the array
@ -260,3 +264,6 @@
} }
} }
} }
}
?>

View File

@ -192,13 +192,5 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++; $y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4f4641c3-7398-421e-a0b3-5d7960813728";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_blf_subscription_expiry";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "60";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "The expiry that Avaya phones will populate in their SUBSCRIBE messages. This should be set to equal or less than the nonce-ttl value that is set in your SIP profile.";
$y++;
?> ?>

View File

@ -65,7 +65,7 @@
//update the status //update the status
if (permission_exists("user_setting_edit")) { if (permission_exists("user_setting_edit")) {
//add the user_edit permission //add the user_edit permission
$p = permissions::new(); $p = new permissions;
$p->add("user_edit", "temp"); $p->add("user_edit", "temp");
//update the database user_status //update the database user_status
@ -153,7 +153,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//execute update //execute update

View File

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

View File

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

View File

@ -47,7 +47,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the http post data //get the http post data
if (!empty($_POST['bridges'])) { if (!empty($_POST['bridges'])) {
@ -126,7 +126,7 @@
$offset = $rows_per_page * $page; $offset = $rows_per_page * $page;
//get the list //get the list
$sql = "select d.domain_uuid, b.bridge_uuid, d.domain_name, b.bridge_name, b.bridge_destination, bridge_enabled, bridge_description "; $sql = "select 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 .= "from v_bridges as b, v_domains as d ";
$sql .= "where b.domain_uuid = d.domain_uuid "; $sql .= "where b.domain_uuid = d.domain_uuid ";
if (!empty($show) && $show == "all" && permission_exists('bridge_all')) { 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_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_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"; echo " <th class='hide-sm-dn'>".$text['label-bridge_description']."</th>\n";
if (permission_exists('bridge_edit') && $list_row_edit_button) { if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -234,12 +234,8 @@
if (!empty($bridges)) { if (!empty($bridges)) {
$x = 0; $x = 0;
foreach ($bridges as $row) { foreach ($bridges as $row) {
$list_row_url = '';
if (permission_exists('bridge_edit')) { if (permission_exists('bridge_edit')) {
$list_row_url = "bridge_edit.php?id=".urlencode($row['bridge_uuid']); $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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) { if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {
@ -270,7 +266,7 @@
} }
echo " </td>\n"; echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['bridge_description'])."</td>\n"; echo " <td class='description overflow hide-sm-dn'>".escape($row['bridge_description'])."</td>\n";
if (permission_exists('bridge_edit') && $list_row_edit_button) { if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n"; 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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";

View File

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

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data //get posted data
if (!empty($_POST['call_blocks'])) { 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('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_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"; echo "<th class='hide-md-dn pct-20'>".$text['label-description']."</th>\n";
if (permission_exists('call_block_edit') && $list_row_edit_button) { if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -309,12 +309,8 @@
if (!empty($result)) { if (!empty($result)) {
$x = 0; $x = 0;
foreach ($result as $row) { foreach ($result as $row) {
$list_row_url = '';
if (permission_exists('call_block_edit')) { if (permission_exists('call_block_edit')) {
$list_row_url = "call_block_edit.php?id=".urlencode($row['call_block_uuid']); $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"; 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')) { if (permission_exists('call_block_add') || permission_exists('call_block_edit') || permission_exists('call_block_delete')) {
@ -385,7 +381,7 @@
echo " </td>\n"; 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='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"; 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) { if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -409,4 +405,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2025 Portions created by the Initial Developer are Copyright (C) 2008-2024
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -166,7 +166,7 @@
$array['dialplans'][$index]['dialplan_enabled'] = 'true'; $array['dialplans'][$index]['dialplan_enabled'] = 'true';
} }
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
$database->save($array); $database->save($array);
@ -557,7 +557,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
} }
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n"; echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-enabled']."\n"; echo " ".$text['label-enabled']."\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
@ -674,8 +674,6 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]); echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
} }
echo "<div class='card'>\n";
foreach (['inbound','outbound'] as $direction) { foreach (['inbound','outbound'] as $direction) {
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n"; echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
echo "<tr class='list-header'>\n"; echo "<tr class='list-header'>\n";
@ -756,8 +754,6 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "</table>\n"; echo "</table>\n";
} }
echo "</div>\n";
echo "<br />\n"; echo "<br />\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n"; echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n"; echo "</form>\n";

View File

@ -2,7 +2,10 @@
/** /**
* call block class * call block class
*
* @method null download
*/ */
if (!class_exists('call_block')) {
class call_block { class call_block {
/** /**
@ -432,7 +435,7 @@
unset($rows, $parameters); unset($rows, $parameters);
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -456,3 +459,6 @@
} //method } //method
} //class } //class
}
?>

View File

@ -5,7 +5,6 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c
$array['dashboard'][$x]['dashboard_name'] = 'Call Block'; $array['dashboard'][$x]['dashboard_name'] = 'Call Block';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-ban'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-ban';
$array['dashboard'][$x]['dashboard_icon_color'] = '#EA4C46';
$array['dashboard'][$x]['dashboard_url'] = '/app/call_block/call_block.php'; $array['dashboard'][$x]['dashboard_url'] = '/app/call_block/call_block.php';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_target'] = 'self';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard'][$x]['dashboard_width'] = '';
@ -14,15 +13,14 @@ $array['dashboard'][$x]['dashboard_content'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard'][$x]['dashboard_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard'][$x]['dashboard_heading_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard'][$x]['dashboard_heading_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_heading_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_heading_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color'] = '#EA4C46';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] ='';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard'][$x]['dashboard_column_span'] = '1';

View File

@ -47,7 +47,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data //get posted data
if (!empty($_POST['call_broadcasts'])) { 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_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_start_time', $text['label-start_time'], $order_by, $order);
echo th_order_by('broadcast_description', $text['label-description'], $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) { if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -227,12 +227,8 @@
if (!empty($result)) { if (!empty($result)) {
$x = 0; $x = 0;
foreach($result as $row) { foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_broadcast_edit')) { if (permission_exists('call_broadcast_edit')) {
$list_row_url = "call_broadcast_edit.php?id=".urlencode($row['call_broadcast_uuid']); $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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) { if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) {
@ -266,7 +262,7 @@
} }
echo " <td>".escape($broadcast_start_time ?? '')."</td>\n"; echo " <td>".escape($broadcast_start_time ?? '')."</td>\n";
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</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) { if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -290,4 +286,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

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

View File

@ -221,18 +221,9 @@
$talk_time = $agent_row['talk_time']; $talk_time = $agent_row['talk_time'];
$ready_time = $agent_row['ready_time']; $ready_time = $agent_row['ready_time'];
//calcudate the length since status change and bridge end
$last_status_change_length = time() - $last_status_change;
$last_bridge_end_length = time() - $last_bridge_end;
//set the state to wrap up time
if ($last_bridge_end_length < $wrap_up_time) {
$state = 'Wrap Up Time';
}
//format the seconds to hh:mm:ss //format the seconds to hh:mm:ss
$last_status_change_length_formatted = format_seconds($last_status_change_length); $last_status_change_length = format_seconds(time() - $last_status_change);
$last_bridge_end_length_formatted = format_seconds($last_bridge_end_length); $last_bridge_end_length = format_seconds(time() - $last_bridge_end);
if (permission_exists('call_center_agent_edit')) { if (permission_exists('call_center_agent_edit')) {
$list_row_url = "../call_centers/call_center_agent_edit.php?id=".$agent_uuid; $list_row_url = "../call_centers/call_center_agent_edit.php?id=".$agent_uuid;
@ -250,8 +241,8 @@
echo "<td>".escape($agent_extension)."</td>\n"; echo "<td>".escape($agent_extension)."</td>\n";
echo "<td>".escape($status)."</td>\n"; echo "<td>".escape($status)."</td>\n";
echo "<td>".escape($state)."</td>\n"; echo "<td>".escape($state)."</td>\n";
echo "<td>".escape($last_status_change_length_formatted)."</td>\n"; echo "<td>".escape($last_status_change_length)."</td>\n";
echo "<td>".escape($last_bridge_end_length_formatted)."</td>\n"; echo "<td>".escape($last_bridge_end_length)."</td>\n";
echo "<td class='center'>".escape($no_answer_count)."</td>\n"; echo "<td class='center'>".escape($no_answer_count)."</td>\n";
echo "<td class='center'>".escape($calls_answered)."</td>\n"; echo "<td class='center'>".escape($calls_answered)."</td>\n";
echo "<td>".escape($tier_state)."</td>\n"; echo "<td>".escape($tier_state)."</td>\n";
@ -398,4 +389,4 @@
} }
?> ?>

View File

@ -128,9 +128,6 @@
$x = 0; $x = 0;
foreach($call_center_queues as $row) { 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'])); $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 "<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><a href='".$list_row_url."'>".escape($row['queue_name'])."</a></td>\n";
echo " <td>".escape($row['queue_extension'])."</td>\n"; echo " <td>".escape($row['queue_extension'])."</td>\n";
@ -162,4 +159,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -216,7 +216,7 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "record_name"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "record_name";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "\${sip_from_user}-\${sip_to_user}-\${strftime(%Y)}\${strftime(%b)}\${strftime(%d)}-\${uuid}.\${record_ext}"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "\${sip_from_user}-\${sip_to_user}-\${strftime(%Y)}\${strftime(%b)}\${strftime(%d)}.\${record_ext}";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Custom name for call recording. Options: \${record_ext}, \${sip_from_user}, \${sip_to_user}, \${caller_id_number}, \${uuid}"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Custom name for call recording. Options: \${record_ext}, \${sip_from_user}, \${sip_to_user}, \${caller_id_number}, \${uuid}";
$y++; $y++;

View File

@ -58,7 +58,7 @@ if ($domains_processed == 1) {
} }
if (!empty($array)) { if (!empty($array)) {
$p = permissions::new(); $p = new permissions;
$p->add('call_center_tier_edit', 'temp'); $p->add('call_center_tier_edit', 'temp');
$database->app_name = 'call_centers'; $database->app_name = 'call_centers';
@ -93,8 +93,8 @@ if ($domains_processed == 1) {
//add the recording path if needed //add the recording path if needed
if ($row['queue_greeting'] != '') { if ($row['queue_greeting'] != '') {
if (file_exists($settings->get('switch','recordings').'/'.$row['domain_name'].'/'.$row['queue_greeting'])) { if (file_exists($setting->get('switch','recordings').'/'.$row['domain_name'].'/'.$row['queue_greeting'])) {
$queue_greeting_path = $settings->get('switch','recordings').'/'.$row['domain_name'].'/'.$row['queue_greeting']; $queue_greeting_path = $setting->get('switch','recordings').'/'.$row['domain_name'].'/'.$row['queue_greeting'];
} }
else { else {
$queue_greeting_path = trim($row['queue_greeting']); $queue_greeting_path = trim($row['queue_greeting']);
@ -168,7 +168,7 @@ if ($domains_processed == 1) {
//save the array to the database //save the array to the database
if (!empty($array)) { if (!empty($array)) {
//add the dialplan permission //add the dialplan permission
$p = permissions::new(); $p = new permissions;
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -42,14 +42,36 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//connect to the database
$database = new database;
//set the defaults //set the defaults
$agent_id = ''; $agent_id = '';
$agent_name = ''; $agent_name = '';
$agent_password = ''; $agent_password = '';
//check for duplicates
if (!empty($_GET["check"]) && $_GET["check"] == 'duplicate') {
//agent id
if (!empty($_GET["agent_id"])) {
$sql = "select agent_name ";
$sql .= "from v_call_center_agents ";
$sql .= "where agent_id = :agent_id ";
$sql .= "and domain_uuid = :domain_uuid ";
if (!empty($_GET["agent_uuid"]) && is_uuid($_GET["agent_uuid"])) {
$sql .= " and call_center_agent_uuid <> :call_center_agent_uuid ";
$parameters['call_center_agent_uuid'] = $_GET["agent_uuid"];
}
$parameters['agent_id'] = $_GET["agent_id"];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (!empty($row) && !empty($row['agent_name'])) {
echo $text['message-duplicate_agent_id'].(if_group("superadmin") ? ": ".$row["agent_name"] : null);
}
unset($sql, $parameters);
}
exit;
}
//action add or update //action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) { if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update"; $action = "update";
@ -59,14 +81,6 @@
$action = "add"; $action = "add";
} }
//get the users array
$sql = "select * from v_users ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by username asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$users = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//get http post variables and set them to php variables //get http post variables and set them to php variables
if (!empty($_POST)) { if (!empty($_POST)) {
$call_center_agent_uuid = $_POST["call_center_agent_uuid"] ?? null; $call_center_agent_uuid = $_POST["call_center_agent_uuid"] ?? null;
@ -137,6 +151,15 @@
$call_center_agent_uuid = uuid(); $call_center_agent_uuid = uuid();
} }
//get the users array
$sql = "select * from v_users ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by username asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$users = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//change the contact string to loopback - Not recommended added for backwards comptability causes multiple problems //change the contact string to loopback - Not recommended added for backwards comptability causes multiple problems
if ($_SESSION['call_center']['agent_contact_method']['text'] == 'loopback') { if ($_SESSION['call_center']['agent_contact_method']['text'] == 'loopback') {
$agent_contact = str_replace("user/", "loopback/", $agent_contact); $agent_contact = str_replace("user/", "loopback/", $agent_contact);
@ -170,9 +193,11 @@
} }
//save to the data //save to the data
$database = new database;
$database->app_name = 'call_center'; $database->app_name = 'call_center';
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370'; $database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->save($array); $database->save($array);
//$message = $database->message;
//syncrhonize configuration //syncrhonize configuration
save_call_center_xml(); save_call_center_xml();
@ -270,6 +295,7 @@
$sql .= "and call_center_agent_uuid = :call_center_agent_uuid "; $sql .= "and call_center_agent_uuid = :call_center_agent_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid']; $parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['call_center_agent_uuid'] = $call_center_agent_uuid; $parameters['call_center_agent_uuid'] = $call_center_agent_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row'); $row = $database->select($sql, $parameters, 'row');
if (!empty($row)) { if (!empty($row)) {
$call_center_agent_uuid = $row["call_center_agent_uuid"]; $call_center_agent_uuid = $row["call_center_agent_uuid"];
@ -312,12 +338,47 @@
if ($action == "update") { if ($action == "update") {
$document['title'] = $text['title-call_center_agent_edit']; $document['title'] = $text['title-call_center_agent_edit'];
} }
//include the header
require_once "resources/header.php"; require_once "resources/header.php";
//get the list of users for this domain
$sql = "select * from v_users ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and user_enabled = 'true' ";
$sql .= "order by username asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$users = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//javascript to check for duplicates
?>
<script language="javascript">
function check_duplicates() {
//check agent id
var agent_id = document.getElementById('agent_id').value;
$("#duplicate_agent_id_response").load("call_center_agent_edit.php?check=duplicate&agent_id="+agent_id+"&agent_uuid=<?php echo escape($call_center_agent_uuid ?? ''); ?>", function() {
var duplicate_agent_id = false;
if ($("#duplicate_agent_id_response").html() != '') {
$('#agent_id').addClass('formfld_highlight_bad');
display_message($("#duplicate_agent_id_response").html(), 'negative'<?php if (if_group("superadmin")) { echo ', 3000'; } ?>);
duplicate_agent_id = true;
}
else {
$("#duplicate_agent_id_response").html('');
$('#agent_id').removeClass('formfld_highlight_bad');
duplicate_agent_id = false;
}
if (duplicate_agent_id == false) {
document.getElementById('frm').submit();
}
});
}
</script>
<?php
//show the content //show the content
echo "<form method='post' name='frm' id='frm' onsubmit=''>\n"; echo "<form method='post' name='frm' id='frm' onsubmit='check_duplicates(); return false;'>\n";
echo "<div class='action_bar' id='action_bar'>\n"; echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'>"; echo " <div class='heading'>";
@ -343,6 +404,21 @@
echo "</td>\n"; echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n"; echo "<td width='70%' class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='agent_name' maxlength='255' value=\"".escape($agent_name)."\" />\n"; echo " <input class='formfld' type='text' name='agent_name' maxlength='255' value=\"".escape($agent_name)."\" />\n";
/*
echo "<select id=\"agent_name\" name=\"agent_name\" class='formfld'>\n";
echo "<option value=\"\"></option>\n";
if (is_array($users)) {
foreach($users as $field) {
if ($field[username] == $agent_name) {
echo "<option value='".escape($field[username])."' selected='selected'>".escape($field[username])."</option>\n";
}
else {
echo "<option value='".escape($field[username])."'>".escape($field[username])."</option>\n";
}
}
}
echo "</select>";
*/
echo "<br />\n"; echo "<br />\n";
echo $text['description-agent_name']."\n"; echo $text['description-agent_name']."\n";
echo "</td>\n"; echo "</td>\n";
@ -391,6 +467,7 @@
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_id' id='agent_id' maxlength='255' min='1' step='1' value='".escape($agent_id)."'>\n"; echo " <input class='formfld' type='number' name='agent_id' id='agent_id' maxlength='255' min='1' step='1' value='".escape($agent_id)."'>\n";
echo " <div style='display: none;' id='duplicate_agent_id_response'></div>\n";
echo "<br />\n"; echo "<br />\n";
echo $text['description-agent_id']."\n"; echo $text['description-agent_id']."\n";
echo "</td>\n"; echo "</td>\n";
@ -401,7 +478,7 @@
echo " ".$text['label-agent_password']."\n"; echo " ".$text['label-agent_password']."\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld password' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='".escape($agent_password)."'>\n"; echo " <input class='formfld' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='".escape($agent_password)."'>\n";
echo "<br />\n"; echo "<br />\n";
echo $text['description-agent_password']."\n"; echo $text['description-agent_password']."\n";
echo "</td>\n"; echo "</td>\n";

View File

@ -172,7 +172,7 @@
$array['users'][0]['user_status'] = $row['agent_status']; $array['users'][0]['user_status'] = $row['agent_status'];
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$p = permissions::new(); $p = new permissions;
$p->add('user_edit', 'temp'); $p->add('user_edit', 'temp');
$database = new database; $database = new database;

View File

@ -43,7 +43,7 @@
$text = $language->get(); $text = $language->get();
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data //get posted data
if (!empty($_POST['call_center_agents'])) { 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_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_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); //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) { if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -214,12 +214,8 @@
if (!empty($result)) { if (!empty($result)) {
$x = 0; $x = 0;
foreach($result as $row) { foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_center_agent_edit')) { if (permission_exists('call_center_agent_edit')) {
$list_row_url = "call_center_agent_edit.php?id=".urlencode($row['call_center_agent_uuid']); $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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_center_agent_delete')) { if (permission_exists('call_center_agent_delete')) {
@ -270,7 +266,7 @@
//echo " <td>".$row[agent_wrap_up_time]."</td>\n"; //echo " <td>".$row[agent_wrap_up_time]."</td>\n";
//echo " <td>".$row[agent_reject_delay_time]."</td>\n"; //echo " <td>".$row[agent_reject_delay_time]."</td>\n";
//echo " <td>".$row[agent_busy_delay_time]."</td>\n"; //echo " <td>".$row[agent_busy_delay_time]."</td>\n";
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) { if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -294,4 +290,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2025 Portions created by the Initial Developer are Copyright (C) 2008-2024
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -42,10 +42,6 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//initialize database and settings
$database = database::new();
$settings = new settings(['database' => $database, $_SESSION['domain_uuid'] ?? '', $_SESSION['user_uuid'] ?? '']);
//set the defaults //set the defaults
$queue_name = ''; $queue_name = '';
$queue_extension = ''; $queue_extension = '';
@ -65,24 +61,24 @@
$action = "add"; $action = "add";
} }
//get the domain details //get the domain_uuid
$domain_uuid = $_SESSION['domain_uuid']; $domain_uuid = $_SESSION['domain_uuid'];
$domain_name = $_SESSION['domain_name'];
//initialize the destination object //initialize the destinations object
$destination = new destinations; $destination = new destinations;
//get total call center queues count from the database, check limit, if defined //get total call center queues count from the database, check limit, if defined
if ($action == 'add') { if ($action == 'add') {
if (!empty($settings->get('limit','call_center_queues', ''))) { if (!empty($_SESSION['limit']['call_center_queues']['numeric'])) {
$sql = "select count(*) from v_call_center_queues "; $sql = "select count(*) from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid "; $sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid; $parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$total_call_center_queues = $database->select($sql, $parameters, 'column'); $total_call_center_queues = $database->select($sql, $parameters, 'column');
unset($sql, $parameters); unset($sql, $parameters);
if ($total_call_center_queues >= $settings->get('limit','call_center_queues', 0)) { if ($total_call_center_queues >= $_SESSION['limit']['call_center_queues']['numeric']) {
message::add($text['message-maximum_queues'].' '.$settings->get('limit','call_center_queues', ''), 'negative'); message::add($text['message-maximum_queues'].' '.$_SESSION['limit']['call_center_queues']['numeric'], 'negative');
header('Location: call_center_queues.php'); header('Location: call_center_queues.php');
return; return;
} }
@ -128,7 +124,7 @@
$queue_context = $_POST["queue_context"]; $queue_context = $_POST["queue_context"];
} }
else if ($action == 'add') { else if ($action == 'add') {
$queue_context = $domain_name; $queue_context = $_SESSION['domain_name'];
} }
//remove invalid characters //remove invalid characters
@ -153,6 +149,7 @@
$sql .= "and t.call_center_queue_uuid = q.call_center_queue_uuid; "; $sql .= "and t.call_center_queue_uuid = q.call_center_queue_uuid; ";
$parameters['domain_uuid'] = $domain_uuid; $parameters['domain_uuid'] = $domain_uuid;
$parameters['call_center_tier_uuid'] = $call_center_tier_uuid; $parameters['call_center_tier_uuid'] = $call_center_tier_uuid;
$database = new database;
$tiers = $database->select($sql, $parameters, 'all'); $tiers = $database->select($sql, $parameters, 'all');
unset($sql, $parameters); unset($sql, $parameters);
@ -171,7 +168,7 @@
if ($esl->is_connected()) { if ($esl->is_connected()) {
//callcenter_config tier del [queue_name] [agent_name] //callcenter_config tier del [queue_name] [agent_name]
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid)) { if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid)) {
$cmd = "callcenter_config tier del ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid; $cmd = "callcenter_config tier del ".$queue_extension."@".$_SESSION['domain_name']." ".$call_center_agent_uuid;
$response = event_socket::api($cmd); $response = event_socket::api($cmd);
} }
} }
@ -181,9 +178,10 @@
$array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid; $array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid;
$array['call_center_tiers'][0]['domain_uuid'] = $domain_uuid; $array['call_center_tiers'][0]['domain_uuid'] = $domain_uuid;
$p = permissions::new(); $p = new permissions;
$p->add('call_center_tier_delete', 'temp'); $p->add('call_center_tier_delete', 'temp');
$database = new database;
$database->app_name = 'call_centers'; $database->app_name = 'call_centers';
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370'; $database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->delete($array); $database->delete($array);
@ -207,6 +205,7 @@
$sql = "select * from v_call_center_queues "; $sql = "select * from v_call_center_queues ";
$sql .= "where call_center_queue_uuid = :call_center_queue_uuid "; $sql .= "where call_center_queue_uuid = :call_center_queue_uuid ";
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid; $parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row'); $row = $database->select($sql, $parameters, 'row');
if (!empty($row)) { if (!empty($row)) {
//if (!permission_exists('call_center_queue_domain')) { //if (!permission_exists('call_center_queue_domain')) {
@ -299,8 +298,8 @@
//add the recording path if needed //add the recording path if needed
if (!empty($queue_greeting)) { if (!empty($queue_greeting)) {
if (file_exists($settings->get('switch','recordings', '').'/'.$domain_name.'/'.$queue_greeting)) { if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting)) {
$queue_greeting_path = $settings->get('switch','recordings', '').'/'.$domain_name.'/'.$queue_greeting; $queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting;
} }
else { else {
$queue_greeting_path = trim($queue_greeting); $queue_greeting_path = trim($queue_greeting);
@ -372,8 +371,8 @@
//add definable export variables can be set in default settings //add definable export variables can be set in default settings
$export_variables = 'call_center_queue_uuid,sip_h_Alert-Info'; $export_variables = 'call_center_queue_uuid,sip_h_Alert-Info';
if (!empty($settings->get('call_center','export_vars', []))) { if (!empty($_SESSION['call_center']['export_vars'])) {
foreach ($settings->get('call_center','export_vars', []) as $export_variable) { foreach ($_SESSION['call_center']['export_vars'] as $export_variable) {
$export_variables .= ','.$export_variable; $export_variables .= ','.$export_variable;
} }
} }
@ -414,7 +413,7 @@
if (!empty($queue_cc_exit_keys)) { if (!empty($queue_cc_exit_keys)) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($queue_cc_exit_keys)."\"/>\n"; $dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($queue_cc_exit_keys)."\"/>\n";
} }
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$domain_name."\"/>\n"; $dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$_SESSION["domain_name"]."\"/>\n";
if ($destination->valid($queue_timeout_app.':'.$queue_timeout_data)) { if ($destination->valid($queue_timeout_app.':'.$queue_timeout_data)) {
$dialplan_xml .= " <action application=\"".xml::sanitize($queue_timeout_app)."\" data=\"".xml::sanitize($queue_timeout_data)."\"/>\n"; $dialplan_xml .= " <action application=\"".xml::sanitize($queue_timeout_app)."\" data=\"".xml::sanitize($queue_timeout_data)."\"/>\n";
} }
@ -435,11 +434,12 @@
$array['dialplans'][0]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370"; $array['dialplans'][0]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
//add the dialplan permission //add the dialplan permission
$p = permissions::new(); $p = new permissions;
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");
//save to the data //save to the data
$database = new database;
$database->app_name = 'call_centers'; $database->app_name = 'call_centers';
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370'; $database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->save($array); $database->save($array);
@ -457,7 +457,7 @@
//clear the cache //clear the cache
$cache = new cache; $cache = new cache;
$cache->delete("dialplan:".$domain_name); $cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array //clear the destinations session array
if (isset($_SESSION['destinations']['array'])) { if (isset($_SESSION['destinations']['array'])) {
@ -496,19 +496,19 @@
*/ */
//add the agent //add the agent
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid) && is_numeric($tier_level) && is_numeric($tier_position)) { if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid) && is_numeric($tier_level) && is_numeric($tier_position)) {
$cmd = "callcenter_config tier add ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position; $cmd = "callcenter_config tier add ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
$response = event_socket::api($cmd); $response = event_socket::api($cmd);
} }
usleep(200); usleep(200);
//agent set level //agent set level
if (is_numeric($queue_extension) && is_numeric($tier_level)) { if (is_numeric($queue_extension) && is_numeric($tier_level)) {
$cmd = "callcenter_config tier set level ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid." ".$tier_level; $cmd = "callcenter_config tier set level ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level;
$response = event_socket::api($cmd); $response = event_socket::api($cmd);
} }
usleep(200); usleep(200);
//agent set position //agent set position
if (is_numeric($queue_extension) && is_numeric($tier_position)) { if (is_numeric($queue_extension) && is_numeric($tier_position)) {
$cmd = "callcenter_config tier set position ".$queue_extension."@".$domain_name." ".$tier_position; $cmd = "callcenter_config tier set position ".$queue_extension."@".$_SESSION["domain_name"]." ".$tier_position;
$response = event_socket::api($cmd); $response = event_socket::api($cmd);
} }
usleep(200); usleep(200);
@ -538,6 +538,7 @@
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid "; $sql .= "and call_center_queue_uuid = :call_center_queue_uuid ";
$parameters['domain_uuid'] = $domain_uuid; $parameters['domain_uuid'] = $domain_uuid;
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid; $parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
$database = new database;
$call_center_queues = $database->select($sql, $parameters, 'all'); $call_center_queues = $database->select($sql, $parameters, 'all');
unset($sql, $parameters); unset($sql, $parameters);
@ -586,16 +587,17 @@
$sql .= "order by tier_level asc, tier_position asc, a.agent_name asc"; $sql .= "order by tier_level asc, tier_position asc, a.agent_name asc";
$parameters['domain_uuid'] = $domain_uuid; $parameters['domain_uuid'] = $domain_uuid;
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null; $parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
$database = new database;
$tiers = $database->select($sql, $parameters, 'all'); $tiers = $database->select($sql, $parameters, 'all');
unset($sql, $parameters); unset($sql, $parameters);
//add an empty row to the tiers array //add an empty row to the tiers array
if (count($tiers) == 0) { if (count($tiers) == 0) {
$rows = $settings->get('call_center','agent_add_rows', null); $rows = $_SESSION['call_center']['agent_add_rows']['numeric'] ?? null;
$id = 0; $id = 0;
} }
if (count($tiers) > 0) { if (count($tiers) > 0) {
$rows = $settings->get('call_center','agent_edit_rows', null); $rows = $_SESSION['call_center']['agent_edit_rows']['numeric'];
$id = count($tiers)+1; $id = count($tiers)+1;
} }
for ($x = 0; $x < $rows; $x++) { for ($x = 0; $x < $rows; $x++) {
@ -613,6 +615,7 @@
$sql .= "where domain_uuid = :domain_uuid "; $sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by agent_name asc"; $sql .= "order by agent_name asc";
$parameters['domain_uuid'] = $domain_uuid; $parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$agents = $database->select($sql, $parameters, 'all'); $agents = $database->select($sql, $parameters, 'all');
unset($sql, $parameters); unset($sql, $parameters);
@ -621,7 +624,6 @@
$audio_files[0] = $sounds->get(); $audio_files[0] = $sounds->get();
unset($sounds); unset($sounds);
//get the list of sounds
if (permission_exists('call_center_announce_sound')) { if (permission_exists('call_center_announce_sound')) {
$sounds = new sounds; $sounds = new sounds;
$sounds->sound_types = ['recordings']; $sounds->sound_types = ['recordings'];
@ -644,7 +646,7 @@
if (empty($queue_tier_rule_no_agent_no_wait)) { $queue_tier_rule_no_agent_no_wait = "true"; } if (empty($queue_tier_rule_no_agent_no_wait)) { $queue_tier_rule_no_agent_no_wait = "true"; }
if (empty($queue_discard_abandoned_after)) { $queue_discard_abandoned_after = "900"; } if (empty($queue_discard_abandoned_after)) { $queue_discard_abandoned_after = "900"; }
if (empty($queue_abandoned_resume_allowed)) { $queue_abandoned_resume_allowed = "false"; } if (empty($queue_abandoned_resume_allowed)) { $queue_abandoned_resume_allowed = "false"; }
if (empty($queue_context)) { $queue_context = $domain_name; } if (empty($queue_context)) { $queue_context = $_SESSION['domain_name']; }
//create token //create token
$object = new token; $object = new token;
@ -665,8 +667,12 @@
} }
//set the record_template //set the record_template
$record_template = $settings->get('switch','recordings', '')."/".$domain_name."/archive/"; if (empty($_SESSION['call_center']['record_name']['text'])) {
$record_template .= $settings->get('call_center','record_name', "\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}"); $record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}";
}
else {
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".$_SESSION['call_center']['record_name']['text'];
}
//show the content //show the content
if (permission_exists('recording_play') || permission_exists('recording_download')) { if (permission_exists('recording_play') || permission_exists('recording_download')) {
@ -751,7 +757,7 @@
} }
echo "</div>\n"; echo "</div>\n";
echo " <div class='actions'>\n"; echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme','button_icon_back', ''),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'call_center_queues.php']); echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'call_center_queues.php']);
if ($action == "update") { if ($action == "update") {
if (permission_exists('call_center_wallboard')) { if (permission_exists('call_center_wallboard')) {
@ -759,10 +765,10 @@
} }
//echo button::create(['type'=>'button','label'=>$text['button-stop'],'icon'=>$_SESSION['theme']['button_icon_stop'],'link'=>'cmd.php?cmd=unload&id='.urlencode($call_center_queue_uuid)]); //echo button::create(['type'=>'button','label'=>$text['button-stop'],'icon'=>$_SESSION['theme']['button_icon_stop'],'link'=>'cmd.php?cmd=unload&id='.urlencode($call_center_queue_uuid)]);
//echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'link'=>'cmd.php?cmd=load&id='.urlencode($call_center_queue_uuid)]); //echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'link'=>'cmd.php?cmd=load&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$settings->get('theme','button_icon_reload', ''),'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]); echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$settings->get('theme','button_icon_view', ''),'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]); echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]);
} }
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$settings->get('theme','button_icon_save', ''),'id'=>'btn_save']); echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
echo " </div>\n"; echo " </div>\n";
echo " <div style='clear: both;'></div>\n"; echo " <div style='clear: both;'></div>\n";
echo "</div>\n"; echo "</div>\n";
@ -785,7 +791,7 @@
echo " ".$text['label-extension']."\n"; echo " ".$text['label-extension']."\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required' placeholder=\"".$settings->get('call_center','extension_range', '')."\">\n"; echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required' placeholder=\"".($_SESSION['call_center']['extension_range']['text'] ?? '')."\">\n";
echo "<br />\n"; echo "<br />\n";
echo $text['description-extension']."\n"; echo $text['description-extension']."\n";
echo "</td>\n"; echo "</td>\n";
@ -812,8 +818,8 @@
if ($key == 'recordings') { if ($key == 'recordings') {
if ( if (
!empty($instance_value) && !empty($instance_value) &&
($instance_value == $row["value"] || $instance_value == $settings->get('switch','recordings', '')."/".$domain_name.'/'.$row["value"]) && ($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
file_exists($settings->get('switch','recordings', '')."/".$domain_name.'/'.pathinfo($row["value"], PATHINFO_BASENAME)) file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
) { ) {
$selected = "selected='selected'"; $selected = "selected='selected'";
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME); $playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
@ -856,7 +862,7 @@
case 'ogg' : $mime_type = 'audio/ogg'; break; case 'ogg' : $mime_type = 'audio/ogg'; break;
} }
echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>"; echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>";
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$settings->get('theme','button_icon_play', ''),'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]); echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
unset($playable, $mime_type); unset($playable, $mime_type);
} }
echo "<br />\n"; echo "<br />\n";
@ -1312,8 +1318,8 @@
if ($key == 'recordings') { if ($key == 'recordings') {
if ( if (
!empty($instance_value) && !empty($instance_value) &&
($instance_value == $row["value"] || $instance_value == $settings->get('switch','recordings', '')."/".$domain_name.'/'.$row["value"]) && ($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
file_exists($settings->get('switch','recordings', '')."/".$domain_name.'/'.pathinfo($row["value"], PATHINFO_BASENAME)) file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
) { ) {
$selected = "selected='selected'"; $selected = "selected='selected'";
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME); $playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
@ -1356,7 +1362,7 @@
case 'ogg' : $mime_type = 'audio/ogg'; break; case 'ogg' : $mime_type = 'audio/ogg'; break;
} }
echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>"; echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>";
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$settings->get('theme','button_icon_play', ''),'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]); echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
unset($playable, $mime_type); unset($playable, $mime_type);
} }
echo "<br />\n"; echo "<br />\n";

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data //get posted data
if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) { 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_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_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'"); 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) { if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -227,12 +227,8 @@
if (!empty($result)) { if (!empty($result)) {
$x = 0; $x = 0;
foreach($result as $row) { foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_center_queue_edit')) { if (permission_exists('call_center_queue_edit')) {
$list_row_url = "call_center_queue_edit.php?id=".urlencode($row['call_center_queue_uuid']); $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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) { if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) {
@ -273,7 +269,7 @@
//echo " <td>".escape($row[queue_abandoned_resume_allowed])."&nbsp;</td>\n"; //echo " <td>".escape($row[queue_abandoned_resume_allowed])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])."&nbsp;</td>\n"; //echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])."&nbsp;</td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['queue_description'])."</td>\n"; 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) { if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -297,4 +293,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -26,8 +26,11 @@
/** /**
* cache class provides an abstracted cache * cache class provides an abstracted cache
*
* @method string dialplan - builds the dialplan for call center
*/ */
//define the call center class //define the call center class
if (!class_exists('call_center')) {
class call_center { class call_center {
/** /**
* define the variables * define the variables
@ -75,7 +78,7 @@
$array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid; $array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid;
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -213,7 +216,7 @@
$array["dialplans"][0] = $dialplan; $array["dialplans"][0] = $dialplan;
//add temporary permissions //add temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add("dialplan_add", 'temp'); $p->add("dialplan_add", 'temp');
$p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_detail_add", 'temp');
$p->add("dialplan_edit", 'temp'); $p->add("dialplan_edit", 'temp');
@ -239,7 +242,7 @@
$array['call_center_queues'][0]['dialplan_uuid'] = $this->dialplan_uuid; $array['call_center_queues'][0]['dialplan_uuid'] = $this->dialplan_uuid;
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('call_center_queue_edit', 'temp'); $p->add('call_center_queue_edit', 'temp');
//execute update //execute update
@ -346,7 +349,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('call_center_tier_delete', 'temp'); $p->add('call_center_tier_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -443,7 +446,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('call_center_tier_delete', 'temp'); $p->add('call_center_tier_delete', 'temp');
//execute delete //execute delete
@ -575,7 +578,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('call_center_tier_add', 'temp'); $p->add('call_center_tier_add', 'temp');
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
@ -608,6 +611,7 @@
} //method } //method
} //class } //class
}
/* /*
$o = new call_center; $o = new call_center;
@ -621,3 +625,5 @@ $c->destination_number = "";
$c->queue_cc_exit_keys = ""; $c->queue_cc_exit_keys = "";
$c->dialplan(); $c->dialplan();
*/ */
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2017-2025 Portions created by the Initial Developer are Copyright (C) 2017-2023
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -258,24 +258,21 @@
echo "</script>\n"; echo "</script>\n";
//show the content //show the content
echo "<div class='hud_box'>"; echo "<div class='action_bar sub'>\n";
echo " <div class='heading'><b>".$text['header-call_center_queues'].(!empty($agent['agent_name']) ? "&nbsp;&nbsp;&nbsp;</b> Agent: <strong>".$agent['agent_name']."</strong>" : "</b>")."</div>\n";
echo "<div class='hud_content' style='display: block;'>\n"; echo " <div class='actions'>\n";
echo " <div class='action_bar sub'>\n";
echo " <div class='heading' style='padding-left: 5px;'><b>".$text['header-call_center_queues'].(!empty($agent['agent_name']) ? "&nbsp;&nbsp;&nbsp;</b> Agent: <strong>".$agent['agent_name']."</strong>" : "</b>")."</div>\n";
echo " <div class='actions' style='padding-top: 2px;'>\n";
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'onclick'=>"document.getElementById('form_list_call_center_agent_dashboard').submit();"]); echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'onclick'=>"document.getElementById('form_list_call_center_agent_dashboard').submit();"]);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo " </div>\n"; echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo " <form id='form_list_call_center_agent_dashboard' method='post'>\n"; echo "<form id='form_list_call_center_agent_dashboard' method='post'>\n";
echo " <table class='list' style='padding: 0 5px;'>\n"; echo "<table class='list'>\n";
echo " <tr class='list-header'>\n"; echo "<tr class='list-header'>\n";
echo " <th>".$text['label-queue_name']."</th>\n"; echo " <th>".$text['label-queue_name']."</th>\n";
echo " <th class='shrink'>".$text['label-status']."</th>\n"; echo " <th class='shrink'>".$text['label-status']."</th>\n";
echo " </tr>\n"; echo "</tr>\n";
if (!empty($call_center_queues) && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) { if (!empty($call_center_queues) && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
$x = 0; $x = 0;
@ -298,12 +295,9 @@
unset($call_center_queues); unset($call_center_queues);
} }
echo " </table>\n"; echo "</table>\n";
echo " <br />\n"; echo "<br />\n";
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n"; echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo " </form>\n"; echo "</form>\n";
echo "</div>\n";
echo "</div>\n";
?> ?>

View File

@ -3,29 +3,6 @@
$array['dashboard'][$x]['dashboard_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261'; $array['dashboard'][$x]['dashboard_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261';
$array['dashboard'][$x]['dashboard_name'] = 'Call Center Agents'; $array['dashboard'][$x]['dashboard_name'] = 'Call Center Agents';
$array['dashboard'][$x]['dashboard_path'] = 'call_centers/call_center_agents'; $array['dashboard'][$x]['dashboard_path'] = 'call_centers/call_center_agents';
$array['dashboard'][$x]['dashboard_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = '';
$array['dashboard'][$x]['dashboard_target'] = '';
$array['dashboard'][$x]['dashboard_width'] = '';
$array['dashboard'][$x]['dashboard_height'] = '';
$array['dashboard'][$x]['dashboard_content'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#3164AD';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1';
$array['dashboard'][$x]['dashboard_row_span'] = '2';
$array['dashboard'][$x]['dashboard_details_state'] = 'none';
$array['dashboard'][$x]['dashboard_order'] = '180'; $array['dashboard'][$x]['dashboard_order'] = '180';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard'][$x]['dashboard_enabled'] = 'false';
$array['dashboard'][$x]['dashboard_description'] = 'Status for agent in a call center.'; $array['dashboard'][$x]['dashboard_description'] = 'Status for agent in a call center.';

View File

@ -27,7 +27,8 @@
//includes files //includes files
require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform; use maximal\audio\Waveform;
//check permisions //check permisions
@ -95,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::$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::$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::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom Waveform::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis 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
$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; $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 $wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
} }

View File

@ -237,7 +237,7 @@
$array["call_flows"][$i]["call_flow_description"] = $call_flow_description; $array["call_flows"][$i]["call_flow_description"] = $call_flow_description;
//add the dialplan permission //add the dialplan permission
$p = permissions::new(); $p = new permissions;
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get search //get search
$search = $_REQUEST['search'] ?? null; $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_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'"); 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) { if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -243,12 +243,8 @@
if (!empty($call_flows)) { if (!empty($call_flows)) {
$x = 0; $x = 0;
foreach ($call_flows as $row) { foreach ($call_flows as $row) {
$list_row_url = '';
if (permission_exists('call_flow_edit')) { if (permission_exists('call_flow_edit')) {
$list_row_url = "call_flow_edit.php?id=".urlencode($row['call_flow_uuid']); $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"; 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')) { if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
@ -291,7 +287,7 @@
echo escape($row['call_flow_enabled']); echo escape($row['call_flow_enabled']);
} }
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])."&nbsp;</td>\n"; echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])."&nbsp;</td>\n";
if (permission_exists('call_flow_edit') && $list_row_edit_button) { if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -315,4 +311,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -25,6 +25,7 @@
*/ */
//define the call_flows class //define the call_flows class
if (!class_exists('call_flows')) {
class call_flows { class call_flows {
/** /**
@ -120,7 +121,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -222,7 +223,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -373,7 +374,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
//save the array //save the array
@ -409,3 +410,6 @@
} //method } //method
} //class } //class
}
?>

View File

@ -27,6 +27,7 @@
//includes files //includes files
require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform; use maximal\audio\Waveform;
@ -95,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::$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::$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::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom Waveform::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis 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
$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; $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 $wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
} }

View File

@ -209,9 +209,6 @@
} }
require_once "resources/header.php"; require_once "resources/header.php";
//set the back button
$_SESSION['call_forward_back'] = $_SERVER['PHP_SELF'];
//show the content //show the content
if ($is_included) { if ($is_included) {
echo "<div class='action_bar sub'>\n"; echo "<div class='action_bar sub'>\n";
@ -241,7 +238,7 @@
} }
} }
if ($show !== 'all' && permission_exists('call_forward_all')) { 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' . (!empty($params) ? '&'.implode('&', $params) : null)]); echo button::create(['type' => 'button', 'label' => $text['button-show_all'], 'icon' => $_SESSION['theme']['button_icon_all'], 'link' => '?show=all' . $param]);
} }
echo "<form id='form_search' class='inline' method='get'>\n"; echo "<form id='form_search' class='inline' method='get'>\n";
if ($show == 'all' && permission_exists('call_forward_all')) { if ($show == 'all' && permission_exists('call_forward_all')) {
@ -296,8 +293,8 @@
echo " <th>" . $text['label-dnd'] . "</th>\n"; echo " <th>" . $text['label-dnd'] . "</th>\n";
} }
echo " <th class='" . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . $text['label-description'] . "</th>\n"; echo " <th class='" . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . $text['label-description'] . "</th>\n";
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = $_SESSION['theme']['list_row_edit_button']['boolean'] ?? 'false';
if ($list_row_edit_button) { if ( $list_row_edit_button === 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -306,9 +303,6 @@
$x = 0; $x = 0;
foreach ($extensions as $row) { 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']); $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"; echo "<tr class='list-row' href='" . $list_row_url . "'>\n";
if (!$is_included && $extensions) { if (!$is_included && $extensions) {
echo " <td class='checkbox'>\n"; echo " <td class='checkbox'>\n";
@ -402,7 +396,7 @@
echo " </td>\n"; echo " </td>\n";
} }
echo " <td class='description overflow " . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . escape($row['description']) . "&nbsp;</td>\n"; echo " <td class='description overflow " . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . escape($row['description']) . "&nbsp;</td>\n";
if ($list_row_edit_button) { if ($list_row_edit_button === 'true') {
echo " <td class='action-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 button::create(['type' => 'button', 'title' => $text['button-edit'], 'icon' => $_SESSION['theme']['button_icon_edit'], 'link' => $list_row_url]);
echo " </td>\n"; echo " </td>\n";

View File

@ -248,7 +248,7 @@
} }
//add the dialplan permission //add the dialplan permission
$p = permissions::new(); $p = new permissions;
$p->add("extension_edit", "temp"); $p->add("extension_edit", "temp");
//save the data //save the data
@ -341,7 +341,7 @@
*/ */
//send feature event notify to the phone //send feature event notify to the phone
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) { if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
$ring_count = ceil($call_timeout / 6); $ring_count = ceil($call_timeout / 6);
$feature_event_notify = new feature_event_notify; $feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name']; $feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -358,7 +358,7 @@
else { else {
$feature_event_notify->forward_all_destination = $forward_all_destination; $feature_event_notify->forward_all_destination = $forward_all_destination;
} }
if ($forward_busy_destination == "") { if ($forward_busy_destination == "") {
$feature_event_notify->forward_busy_destination = "0"; $feature_event_notify->forward_busy_destination = "0";
} }
@ -421,6 +421,7 @@
//synchronize configuration //synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) { if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension; $ext = new extension;
$ext->xml(); $ext->xml();
unset($ext); unset($ext);
@ -503,7 +504,7 @@
} }
//prepare the autocomplete //prepare the autocomplete
if(filter_var($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) { if(!empty($_SESSION['follow_me']['follow_me_autocomplete']['boolean']) && $_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n"; 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 src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
echo "<script type=\"text/javascript\">\n"; echo "<script type=\"text/javascript\">\n";
@ -532,16 +533,13 @@
$object = new token; $object = new token;
$token = $object->create($_SERVER['PHP_SELF']); $token = $object->create($_SERVER['PHP_SELF']);
//save the back button location using referer
$back_destination = "window.location.href='" . ($_SESSION['call_forward_back'] ?? "/app/call_forward/call_forward.php") . "'";
//show the content //show the content
echo "<form method='post' name='frm' id='frm'>\n"; echo "<form method='post' name='frm' id='frm'>\n";
echo "<div class='action_bar' id='action_bar'>\n"; echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-call_forward']."</b></div>\n"; echo " <div class='heading'><b>".$text['title-call_forward']."</b></div>\n";
echo " <div class='actions'>\n"; echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','onclick'=>$back_destination]); echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','onclick'=>'history.back();']);
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']); echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
echo " </div>\n"; echo " </div>\n";
echo " <div style='clear: both;'></div>\n"; echo " <div style='clear: both;'></div>\n";

View File

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

View File

@ -95,7 +95,7 @@
$array['extensions'][0]['do_not_disturb'] = $this->enabled; $array['extensions'][0]['do_not_disturb'] = $this->enabled;
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//execute update //execute update
@ -226,7 +226,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//save the array //save the array
@ -240,7 +240,7 @@
$p->delete('extension_edit', 'temp'); $p->delete('extension_edit', 'temp');
//send feature event notify to the phone //send feature event notify to the phone
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) { if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) { foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify; $feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name']; $feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -261,6 +261,7 @@
//synchronize configuration //synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) { if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension; $ext = new extension;
$ext->xml(); $ext->xml();
unset($ext); unset($ext);

View File

@ -91,7 +91,7 @@
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled; $array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy; $array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('follow_me_add', 'temp'); $p->add('follow_me_add', 'temp');
//execute insert //execute insert
$database = new database; $database = new database;
@ -115,7 +115,7 @@
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled; $array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy; $array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('follow_me_add', 'temp'); $p->add('follow_me_add', 'temp');
//execute update //execute update
$database = new database; $database = new database;
@ -135,7 +135,7 @@
//delete related follow me destinations //delete related follow me destinations
$array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid; $array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid;
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('follow_me_destination_delete', 'temp'); $p->add('follow_me_destination_delete', 'temp');
//execute delete //execute delete
$database = new database; $database = new database;
@ -210,7 +210,7 @@
} }
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('follow_me_destination_add', 'temp'); $p->add('follow_me_destination_add', 'temp');
//execute insert //execute insert
$database = new database; $database = new database;
@ -234,7 +234,7 @@
$extension_uuid = $result[0]['extension_uuid']; $extension_uuid = $result[0]['extension_uuid'];
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add("follow_me_edit", 'temp'); $p->add("follow_me_edit", 'temp');
$p->add("extension_edit", 'temp'); $p->add("extension_edit", 'temp');
@ -389,7 +389,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
$p->add('follow_me_edit', 'temp'); $p->add('follow_me_edit', 'temp');
@ -405,7 +405,7 @@
$p->delete('follow_me_edit', 'temp'); $p->delete('follow_me_edit', 'temp');
//send feature event notify to the phone //send feature event notify to the phone
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) { if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) { foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify; $feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name']; $feature_event_notify->domain_name = $_SESSION['domain_name'];
@ -426,6 +426,7 @@
//synchronize configuration //synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) { if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension; $ext = new extension;
$ext->xml(); $ext->xml();
unset($ext); unset($ext);

View File

@ -5,7 +5,6 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692f
$array['dashboard'][$x]['dashboard_name'] = 'Call Forward'; $array['dashboard'][$x]['dashboard_name'] = 'Call Forward';
$array['dashboard'][$x]['dashboard_path'] = 'call_forward/call_forward'; $array['dashboard'][$x]['dashboard_path'] = 'call_forward/call_forward';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-forward'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-forward';
$array['dashboard'][$x]['dashboard_icon_color'] = '';
$array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php'; $array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_target'] = 'self';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard'][$x]['dashboard_width'] = '';
@ -19,9 +18,9 @@ $array['dashboard'][$x]['dashboard_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] =''; $array['dashboard'][$x]['dashboard_background_color'] ='';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = '';

View File

@ -34,9 +34,6 @@
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'call_recording_download'; $apps[$x]['permissions'][$y]['name'] = 'call_recording_download';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'call_recording_transcribe';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y = 0; $y = 0;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "95cb740e-e377-4852-8894-06441c61e78b"; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "95cb740e-e377-4852-8894-06441c61e78b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_recordings"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "call_recordings";
@ -45,13 +42,4 @@
$apps[$x]['default_settings'][$y]['default_setting_value'] = "90"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "90";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of days to retain the maintenance logs in the database."; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of days to retain the maintenance logs in the database.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e329db05-2967-422a-a71f-d0175b083828";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_recordings";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "record_extension";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "mp3";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Call recording file format options: wav, mp3";
?> ?>

View File

@ -1,334 +1,356 @@
<?php <?php
/* /*
FusionPBX FusionPBX
Version: MPL 1.1 Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version 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 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 the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/ http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis, Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the for the specific language governing rights and limitations under the
License. License.
The Original Code is FusionPBX The Original Code is FusionPBX
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018-2024 Portions created by the Initial Developer are Copyright (C) 2018-2024
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
*/ */
//includes files //includes files
require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
require_once "resources/paging.php"; require_once "resources/paging.php";
//check permissions //check permissions
if (permission_exists('call_recording_view')) { if (permission_exists('call_recording_view')) {
//access granted //access granted
} }
else { else {
echo "access denied"; echo "access denied";
exit; exit;
} }
//create the database connection //add multi-lingual support
$database = new database; $language = new text;
$text = $language->get();
//add multi-lingual support
$language = new text; //add the settings object
$text = $language->get(); $settings = new settings(["domain_uuid" => $_SESSION['domain_uuid'], "user_uuid" => $_SESSION['user_uuid']]);
$transcribe_enabled = $settings->get('transcribe', 'enabled', 'false');
//add the settings object $transcribe_engine = $settings->get('transcribe', 'engine', '');
$settings = new settings(["domain_uuid" => $_SESSION['domain_uuid'], "user_uuid" => $_SESSION['user_uuid']]);
$transcribe_enabled = $settings->get('transcribe', 'enabled', false); //set additional variables
$transcribe_engine = $settings->get('transcribe', 'engine', ''); $search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//set additional variables
$search = $_GET["search"] ?? ''; //get the http post data
$show = $_GET["show"] ?? ''; if (!empty($_POST['call_recordings']) && is_array($_POST['call_recordings'])) {
$action = $_POST['action'];
//get the http post data $search = $_POST['search'];
if (!empty($_POST['call_recordings']) && is_array($_POST['call_recordings'])) { $call_recordings = $_POST['call_recordings'];
$action = $_POST['action']; }
$search = $_POST['search'];
$call_recordings = $_POST['call_recordings']; //process the http post data by action
} if (!empty($action) && is_array($call_recordings) && @sizeof($call_recordings) != 0) {
switch ($action) {
//process the http post data by action case 'download':
if (!empty($action) && is_array($call_recordings) && @sizeof($call_recordings) != 0) { if (permission_exists('call_recording_download')) {
switch ($action) { $obj = new call_recordings;
case 'download': $obj->download($call_recordings);
if (permission_exists('call_recording_download')) { }
$obj = new call_recordings; break;
$obj->download($call_recordings); case 'transcribe':
} if (permission_exists('call_recording_download')) {
break; $obj = new call_recordings;
case 'transcribe': $obj->transcribe($call_recordings);
if (permission_exists('call_recording_transcribe')) { }
$obj = new call_recordings; break;
$obj->transcribe($call_recordings); case 'delete':
} if (permission_exists('call_recording_delete')) {
break; $obj = new call_recordings;
case 'delete': $obj->delete($call_recordings);
if (permission_exists('call_recording_delete')) { }
$obj = new call_recordings; break;
$obj->delete($call_recordings); }
}
break; //redirect the user
} header('Location: call_recordings.php'.($search != '' ? '?search='.urlencode($search) : null));
exit;
//redirect the user }
header('Location: call_recordings.php'.($search != '' ? '?search='.urlencode($search) : null));
exit; //get order and order by
} $order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//get order and order by
$order_by = $_GET["order_by"] ?? ''; //add the search string
$order = $_GET["order"] ?? ''; if (!empty($search)) {
$search = strtolower($_GET["search"]);
//add the search string }
if (!empty($search)) {
$search = strtolower($_GET["search"]); //set the time zone
} if (!empty($_SESSION['domain']['time_zone']['name'])) {
$time_zone = $_SESSION['domain']['time_zone']['name'];
//set the time zone }
if (!empty($_SESSION['domain']['time_zone']['name'])) { else {
$time_zone = $_SESSION['domain']['time_zone']['name']; $time_zone = date_default_timezone_get();
} }
else { $parameters['time_zone'] = $time_zone;
$time_zone = date_default_timezone_get();
} //get the count
$parameters['time_zone'] = $time_zone; //$sql = "select count(*) ";
//$sql .= "from view_call_recordings ";
//prepare some of the paging values //$sql .= "where true ";
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50; //if ($_GET['show'] != "all" || !permission_exists('call_recording_all')) {
$page = $_GET['page'] ?? ''; // $sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
if (empty($page)) { $page = 0; $_GET['page'] = 0; } // $parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$offset = $rows_per_page * $page; //}
//if (isset($search)) {
//get the list // $sql .= "and (";
$sql = "select r.domain_uuid, d.domain_name, r.call_recording_uuid, r.call_direction, "; // $sql .= " lower(call_recording_name) like :search ";
$sql .= "r.call_recording_name, r.call_recording_path, r.call_recording_transcription, r.call_recording_length, "; // $sql .= " or lower(call_recording_path) like :search ";
$sql .= "r.caller_id_name, r.caller_id_number, r.caller_destination, r.destination_number, "; // $sql .= ") ";
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'DD Mon YYYY') as call_recording_date_formatted, \n"; // $parameters['search'] = '%'.$search.'%';
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'HH12:MI:SS am') as call_recording_time_formatted \n"; //}
$sql .= "from view_call_recordings as r, v_domains as d "; //$database = new database;
//$sql .= "from v_call_recordings as r, v_domains as d "; //$num_rows = $database->select($sql, $parameters, 'column');
$sql .= "where true ";
if ($show != "all" || !permission_exists('call_recording_all')) { //prepare some of the paging values
$sql .= "and r.domain_uuid = :domain_uuid "; $rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
$parameters['domain_uuid'] = $_SESSION['domain_uuid']; $page = $_GET['page'] ?? '';
} if (empty($page)) { $page = 0; $_GET['page'] = 0; }
$sql .= "and r.domain_uuid = d.domain_uuid "; $offset = $rows_per_page * $page;
if (!empty($search)) {
$sql .= "and ("; //get the list
$sql .= " lower(r.call_direction) like :search "; $sql = "select r.domain_uuid, d.domain_name, r.call_recording_uuid, r.call_direction, ";
$sql .= " or lower(r.caller_id_name) like :search "; $sql .= "r.call_recording_name, r.call_recording_path, r.call_recording_transcription, r.call_recording_length, ";
$sql .= " or lower(r.caller_id_number) like :search "; $sql .= "r.caller_id_name, r.caller_id_number, r.caller_destination, r.destination_number, ";
$sql .= " or lower(r.caller_destination) like :search "; $sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'DD Mon YYYY') as call_recording_date_formatted, \n";
$sql .= " or lower(r.destination_number) like :search "; $sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'HH12:MI:SS am') as call_recording_time_formatted \n";
$sql .= " or lower(r.call_recording_name) like :search "; $sql .= "from view_call_recordings as r, v_domains as d ";
$sql .= " or lower(r.call_recording_path) like :search "; //$sql .= "from v_call_recordings as r, v_domains as d ";
$sql .= ") "; $sql .= "where true ";
$parameters['search'] = '%'.$search.'%'; if ($show != "all" || !permission_exists('call_recording_all')) {
} $sql .= "and (r.domain_uuid = :domain_uuid or r.domain_uuid is null) ";
$sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc'); $parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$sql .= limit_offset($rows_per_page, $offset); }
$call_recordings = $database->select($sql, $parameters ?? null, 'all'); $sql .= "and r.domain_uuid = d.domain_uuid ";
unset($sql, $parameters); if (!empty($search)) {
$sql .= "and (";
//detect if any transcriptions available $sql .= " lower(r.call_direction) like :search ";
if ($transcribe_enabled && !empty($transcribe_engine) && !empty($call_recordings) && is_array($call_recordings)) { $sql .= " or lower(r.caller_id_name) like :search ";
$transcriptions_exists = false; $sql .= " or lower(r.caller_id_number) like :search ";
foreach ($call_recordings as $row) { $sql .= " or lower(r.caller_destination) like :search ";
if (!empty($row['call_recording_transcription'])) { $transcriptions_exists = true; } $sql .= " or lower(r.destination_number) like :search ";
} $sql .= " or lower(r.call_recording_name) like :search ";
} $sql .= " or lower(r.call_recording_path) like :search ";
$sql .= ") ";
//limit the number of results $parameters['search'] = '%'.$search.'%';
if (!empty($_SESSION['cdr']['limit']['numeric']) && $_SESSION['cdr']['limit']['numeric'] > 0) { }
$num_rows = $_SESSION['cdr']['limit']['numeric']; $sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc');
} $sql .= limit_offset($rows_per_page, $offset);
$database = new database;
//prepare to page the results $call_recordings = $database->select($sql, $parameters ?? null, 'all');
$param = "&search=".urlencode($search); unset($sql, $parameters);
if ($show == "all" && permission_exists('call_recording_all')) {
$param .= "&show=all"; //detect if any transcriptions available
} if ($transcribe_enabled == 'true' && !empty($transcribe_engine) && !empty($call_recordings) && is_array($call_recordings)) {
list($paging_controls_mini, $rows_per_page) = paging($num_rows ?? null, $param, $rows_per_page, true, $result_count); //top $transcriptions_exists = false;
list($paging_controls, $rows_per_page) = paging($num_rows ?? null, $param, $rows_per_page, false, $result_count); //bottom foreach ($call_recordings as $row) {
if (!empty($row['call_recording_transcription'])) { $transcriptions_exists = true; }
//create token }
$object = new token; }
$token = $object->create($_SERVER['PHP_SELF']);
//count the results
//include the header $result_count = is_array($call_recordings) ? sizeof($call_recordings) : 0;
$document['title'] = $text['title-call_recordings'];
require_once "resources/header.php"; //limit the number of results
if (!empty($_SESSION['cdr']['limit']['numeric']) && $_SESSION['cdr']['limit']['numeric'] > 0) {
//show the content $num_rows = $_SESSION['cdr']['limit']['numeric'];
echo "<div class='action_bar' id='action_bar'>\n"; }
echo " <div class='heading'><b>".$text['title-call_recordings']." </b></div>\n";
echo " <div class='actions'>\n"; //prepare to page the results
if (permission_exists('call_recording_download') && !empty($call_recordings)) { $param = "&search=".urlencode($search);
echo button::create(['type'=>'button','label'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'id'=>'btn_download','name'=>'btn_download','style'=>'display: none;','collapse'=>'hide-xs','onclick'=>"list_action_set('download'); list_form_submit('form_list');"]); if ($show == "all" && permission_exists('call_recording_all')) {
} $param .= "&show=all";
if (permission_exists('call_recording_transcribe') && $transcribe_enabled && !empty($transcribe_engine) && !empty($call_recordings)) { }
echo button::create(['type'=>'button','label'=>$text['button-transcribe'],'icon'=>'quote-right','id'=>'btn_transcribe','name'=>'btn_transcribe','style'=>'display: none;','collapse'=>'hide-xs','onclick'=>"list_action_set('transcribe'); list_form_submit('form_list');"]); list($paging_controls_mini, $rows_per_page) = paging($num_rows ?? null, $param, $rows_per_page, true, $result_count); //top
} list($paging_controls, $rows_per_page) = paging($num_rows ?? null, $param, $rows_per_page, false, $result_count); //bottom
if (permission_exists('call_recording_delete') && !empty($call_recordings)) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]); //create token
} $object = new token;
echo "<form id='form_search' class='inline' method='get'>\n"; $token = $object->create($_SERVER['PHP_SELF']);
if (permission_exists('call_recording_all')) {
if ($show == 'all') { //include the header
echo " <input type='hidden' name='show' value='all'>"; $document['title'] = $text['title-call_recordings'];
} require_once "resources/header.php";
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.(!empty($search) ? "&search=".urlencode($search) : null)]); //show the content
} echo "<div class='action_bar' id='action_bar'>\n";
} echo " <div class='heading'><b>".$text['title-call_recordings']." </b></div>\n";
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=\"$('#btn_reset').hide(); $('#btn_search').show();\">"; echo " <div class='actions'>\n";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>(!empty($search) ? 'display: none;' : null),'collapse'=>'hide-xs']); if (permission_exists('call_recording_download') && !empty($call_recordings)) {
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_recordings.php','style'=>(empty($search) ? 'display: none;' : null),'collapse'=>'hide-xs']); echo button::create(['type'=>'button','label'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'id'=>'btn_download','name'=>'btn_download','style'=>'display: none;','collapse'=>'hide-xs','onclick'=>"list_action_set('download'); list_form_submit('form_list');"]);
if (!empty($paging_controls_mini)) { }
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n"; if ($transcribe_enabled == 'true' && !empty($transcribe_engine) && !empty($call_recordings)) {
} echo button::create(['type'=>'button','label'=>$text['button-transcribe'],'icon'=>'quote-right','id'=>'btn_transcribe','name'=>'btn_transcribe','style'=>'display: none;','collapse'=>'hide-xs','onclick'=>"list_action_set('transcribe'); list_form_submit('form_list');"]);
echo " </form>\n"; }
echo " </div>\n"; if (permission_exists('call_recording_delete') && !empty($call_recordings)) {
echo " <div style='clear: both;'></div>\n"; echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]);
echo "</div>\n"; }
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_recording_delete') && !empty($call_recordings)) { if (permission_exists('call_recording_all')) {
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');"])]); if ($show == 'all') {
} echo " <input type='hidden' name='show' value='all'>";
}
echo $text['title_description-call_recordings']."\n"; else {
echo "<br /><br />\n"; echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.(!empty($search) ? "&search=".urlencode($search) : null)]);
}
echo "<form id='form_list' method='post'>\n"; }
echo "<input type='hidden' id='action' name='action' value=''>\n"; echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=\"$('#btn_reset').hide(); $('#btn_search').show();\">";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n"; echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>(!empty($search) ? 'display: none;' : null),'collapse'=>'hide-xs']);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_recordings.php','style'=>(empty($search) ? 'display: none;' : null),'collapse'=>'hide-xs']);
echo "<div class='card'>\n"; if (!empty($paging_controls_mini)) {
echo "<table class='list'>\n"; echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
echo "<tr class='list-header'>\n"; }
$col_count = 8; echo " </form>\n";
if ($show == "all" && permission_exists('call_recording_all')) { echo " </div>\n";
$col_count++; echo " <div style='clear: both;'></div>\n";
} echo "</div>\n";
if (permission_exists('call_recording_delete')) {
echo " <th class='checkbox'>\n"; if (permission_exists('call_recording_delete') && !empty($call_recordings)) {
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($call_recordings) ? "style='visibility: hidden;'" : null).">\n"; 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 " </th>\n"; }
$col_count++;
} echo $text['title_description-call_recordings']."\n";
if ($show == "all" && permission_exists('call_recording_all')) { echo "<br /><br />\n";
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='hide-sm-dn shrink'");
} echo "<form id='form_list' method='post'>\n";
echo th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order, null, "class='hide-sm-dn'"); echo "<input type='hidden' id='action' name='action' value=''>\n";
echo th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order, null, "class='pct-15'"); echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, "class='pct-10 hide-sm-dn'");
echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, null, "class='pct-10'"); echo "<div class='card'>\n";
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order, null, "class='pct-20 hide-sm-dn'"); echo "<table class='list'>\n";
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) { echo "<tr class='list-header'>\n";
echo "<th class='shrink center'>".$text['label-recording']."</th>\n"; $col_count = 8;
$col_count++; if ($show == "all" && permission_exists('call_recording_all')) {
} $col_count++;
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order, null, "class='right hide-sm-dn shrink'"); }
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order, null, "class='pct-20 center'"); if (permission_exists('call_recording_delete')) {
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order, null, "class='hide-sm-dn shrink'"); echo " <th class='checkbox'>\n";
if (permission_exists('xml_cdr_details')) { echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($call_recordings) ? "style='visibility: hidden;'" : null).">\n";
echo " <td class='action-button'>&nbsp;</td>\n"; echo " </th>\n";
} $col_count++;
echo "</tr>\n"; }
if ($show == "all" && permission_exists('call_recording_all')) {
if (is_array($call_recordings) && @sizeof($call_recordings) != 0) { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='hide-sm-dn shrink'");
$x = 0; }
foreach ($call_recordings as $row) { echo th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order, null, "class='hide-sm-dn'");
//playback progress bar echo th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order, null, "class='pct-15'");
if (permission_exists('call_recording_play')) { echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, "class='pct-10 hide-sm-dn'");
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;' onclick=\"recording_seek(event,'".escape($row['call_recording_uuid'])."')\"><td id='playback_progress_bar_background_".escape($row['call_recording_uuid'])."' class='playback_progress_bar_background' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['call_recording_uuid'])."'></span></td>".(permission_exists('xml_cdr_details') ? "<td class='action-button' style='border-bottom: none !important;'></td>" : null)."</tr>\n"; echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, null, "class='pct-10'");
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order, null, "class='pct-20 hide-sm-dn'");
} if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
if (permission_exists('call_recording_play')) { echo "<th class='shrink center'>".$text['label-recording']."</th>\n";
$list_row_url = "javascript:recording_play('".escape($row['call_recording_uuid'])."');"; $col_count++;
} }
echo "<tr class='list-row' href=\"".$list_row_url."\">\n"; echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order, null, "class='right hide-sm-dn shrink'");
if (permission_exists('call_recording_delete')) { echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order, null, "class='pct-20 center'");
echo " <td class='checkbox'>\n"; echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order, null, "class='hide-sm-dn shrink'");
echo " <input type='checkbox' name='call_recordings[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n"; if (permission_exists('xml_cdr_details')) {
echo " <input type='hidden' name='call_recordings[$x][uuid]' value='".escape($row['call_recording_uuid'])."' />\n"; echo " <td class='action-button'>&nbsp;</td>\n";
echo " </td>\n"; }
} echo "</tr>\n";
if ($show == "all" && permission_exists('call_recording_all')) {
echo " <td class='overflow hide-sm-dn shrink'>".escape($row['domain_name'])."</td>\n"; if (is_array($call_recordings) && @sizeof($call_recordings) != 0) {
} $x = 0;
echo " <td class='hide-sm-dn shrink'>".escape($row['caller_id_name'])."</td>\n"; foreach ($call_recordings as $row) {
echo " <td class='shrink'>".escape(format_phone(substr($row['caller_id_number'], 0, 20)))."</td>\n"; //add padding to the call recording length
echo " <td class='hide-sm-dn shrink'>".escape(format_phone(substr($row['caller_destination'], 0, 20)))."</td>\n"; $call_recording_length_padding = (!empty($row['call_recording_length'])) ? str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT) : '';
echo " <td class='shrink'>".escape(format_phone(substr($row['destination_number'], 0, 20)))."</td>\n";
echo " <td class='overflow hide-sm-dn nowrap'>".escape($row['call_recording_name'])."</td>\n"; //playback progress bar
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) { if (permission_exists('call_recording_play')) {
echo " <td class='middle button center no-link no-wrap'>"; echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;' onclick=\"recording_play('".escape($row['call_recording_uuid'])."')\"><td id='playback_progress_bar_background_".escape($row['call_recording_uuid'])."' class='playback_progress_bar_background' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['call_recording_uuid'])."'></span></td>".(permission_exists('xml_cdr_details') ? "<td class='action-button' style='border-bottom: none !important;'></td>" : null)."</tr>\n";
if (file_exists($row['call_recording_path'].'/'.$row['call_recording_name'])) { echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
if (permission_exists('call_recording_play')) { }
$recording_file_ext = pathinfo($row['call_recording_name'], PATHINFO_EXTENSION); if (permission_exists('call_recording_play')) {
switch ($recording_file_ext) { $list_row_url = "javascript:recording_play('".escape($row['call_recording_uuid'])."');";
case "wav" : $recording_type = "audio/wav"; break; }
case "mp3" : $recording_type = "audio/mpeg"; break; echo "<tr class='list-row' href=\"".$list_row_url."\">\n";
case "ogg" : $recording_type = "audio/ogg"; break; if (permission_exists('call_recording_delete')) {
} echo " <td class='checkbox'>\n";
echo "<audio id='recording_audio_".escape($row['call_recording_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['call_recording_uuid'])."')\" onended=\"recording_reset('".escape($row['call_recording_uuid'])."');\" src='download.php?id=".urlencode($row['call_recording_uuid'])."' type='".$recording_type."'></audio>"; echo " <input type='checkbox' name='call_recordings[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['call_recording_uuid']),'onclick'=>"recording_play('".escape($row['call_recording_uuid'])."')"]); echo " <input type='hidden' name='call_recordings[$x][uuid]' value='".escape($row['call_recording_uuid'])."' />\n";
} echo " </td>\n";
if (permission_exists('call_recording_download')) { }
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['call_recording_uuid']).'&binary']); if ($show == "all" && permission_exists('call_recording_all')) {
} echo " <td class='overflow hide-sm-dn shrink'>".escape($row['domain_name'])."</td>\n";
if (permission_exists('call_recording_transcribe') && $transcribe_enabled && !empty($transcribe_engine) && $transcriptions_exists === true) { }
echo button::create(['type'=>'button','title'=>$text['label-transcription'],'icon'=>'quote-right','style'=>(empty($row['call_recording_transcription']) ? 'visibility:hidden;' : null),'onclick'=>"document.getElementById('transcription_".$row['call_recording_uuid']."').style.display = document.getElementById('transcription_".$row['call_recording_uuid']."').style.display == 'none' ? 'table-row' : 'none'; this.blur(); return false;"]); echo " <td class='hide-sm-dn shrink'>".escape($row['caller_id_name'])."</td>\n";
} echo " <td class='shrink'>".escape(format_phone(substr($row['caller_id_number'], 0, 20)))."</td>\n";
} echo " <td class='hide-sm-dn shrink'>".escape(format_phone(substr($row['caller_destination'], 0, 20)))."</td>\n";
echo " </td>\n"; echo " <td class='shrink'>".escape(format_phone(substr($row['destination_number'], 0, 20)))."</td>\n";
} echo " <td class='overflow hide-sm-dn nowrap'>".escape($row['call_recording_name'])."</td>\n";
echo " <td class='right overflow hide-sm-dn shrink'>".escape(gmdate("G:i:s", $row['call_recording_length']))."</td>\n"; if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
echo " <td class='overflow center no-wrap'>".escape($row['call_recording_date_formatted'])." <span class='hide-sm-dn'>".escape($row['call_recording_time_formatted'])."</span></td>\n"; echo " <td class='middle button center no-link no-wrap'>";
echo " <td class='left hide-sm-dn shrink'>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n"; if (file_exists($row['call_recording_path'].'/'.$row['call_recording_name'])) {
if (permission_exists('xml_cdr_details')) { if (permission_exists('call_recording_play')) {
echo " <td class='action-button'>\n"; $recording_file_ext = pathinfo($row['call_recording_name'], PATHINFO_EXTENSION);
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>PROJECT_PATH.'/app/xml_cdr/xml_cdr_details.php?id='.urlencode($row['call_recording_uuid'])]); switch ($recording_file_ext) {
echo " </td>\n"; case "wav" : $recording_type = "audio/wav"; break;
} case "mp3" : $recording_type = "audio/mpeg"; break;
echo "</tr>\n"; case "ogg" : $recording_type = "audio/ogg"; break;
if (permission_exists('call_recording_transcribe') && $transcribe_enabled && !empty($transcribe_engine) && !empty($row['call_recording_transcription'])) { }
echo "<tr style='display: none;'><td></td></tr>\n"; // dummy row to maintain same background color for transcription row echo "<audio id='recording_audio_".escape($row['call_recording_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['call_recording_uuid'])."')\" onended=\"recording_reset('".escape($row['call_recording_uuid'])."');\" src='download.php?id=".urlencode($row['call_recording_uuid'])."' type='".$recording_type."'></audio>";
echo "<tr id='transcription_".$row['call_recording_uuid']."' class='list-row' style='display: none;'>\n"; echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['call_recording_uuid']),'onclick'=>"recording_play('".escape($row['call_recording_uuid'])."')"]);
echo " <td style='padding: 10px 20px 15px 20px;' colspan='".$col_count."'>\n"; }
echo " <strong style='display: inline-block; font-size: 90%; margin-bottom: 10px;'>".$text['label-transcription']."...</strong><br />\n"; if (permission_exists('call_recording_download')) {
echo escape($row['call_recording_transcription'])."\n"; echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['call_recording_uuid']).'&binary']);
echo " </td>\n"; }
echo "</tr>\n"; if ($transcribe_enabled == 'true' && !empty($transcribe_engine) && $transcriptions_exists === true) {
} echo button::create(['type'=>'button','title'=>$text['label-transcription'],'icon'=>'quote-right','style'=>(empty($row['call_recording_transcription']) ? 'visibility:hidden;' : null),'onclick'=>"document.getElementById('transcription_".$row['call_recording_uuid']."').style.display = document.getElementById('transcription_".$row['call_recording_uuid']."').style.display == 'none' ? 'table-row' : 'none'; this.blur(); return false;"]);
$x++; }
} }
unset($call_recordings); echo " </td>\n";
} }
echo " <td class='right overflow hide-sm-dn shrink'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape($call_recording_length_padding)."</td>\n";
echo "</table>\n"; echo " <td class='overflow center no-wrap'>".escape($row['call_recording_date_formatted'])." <span class='hide-sm-dn'>".escape($row['call_recording_time_formatted'])."</span></td>\n";
echo "</div>\n"; echo " <td class='left hide-sm-dn shrink'>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
echo "<br />\n"; if (permission_exists('xml_cdr_details')) {
echo "<div align='center'>".$paging_controls."</div>\n"; echo " <td class='action-button'>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n"; echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>PROJECT_PATH.'/app/xml_cdr/xml_cdr_details.php?id='.urlencode($row['call_recording_uuid'])]);
echo "</form>\n"; echo " </td>\n";
}
//include the footer echo "</tr>\n";
require_once "resources/footer.php"; if ($transcribe_enabled == 'true' && !empty($transcribe_engine) && !empty($row['call_recording_transcription'])) {
echo "<tr style='display: none;'><td></td></tr>\n"; // dummy row to maintain same background color for transcription row
?> echo "<tr id='transcription_".$row['call_recording_uuid']."' class='list-row' style='display: none;'>\n";
echo " <td style='padding: 10px 20px 15px 20px;' colspan='".$col_count."'>\n";
echo " <strong style='display: inline-block; font-size: 90%; margin-bottom: 10px;'>".$text['label-transcription']."...</strong><br />\n";
echo escape($row['call_recording_transcription'])."\n";
echo " </td>\n";
echo "</tr>\n";
}
$x++;
}
unset($call_recordings);
}
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";
?>

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@
//includes files //includes files
require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform; use maximal\audio\Waveform;
@ -83,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::$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::$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::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom Waveform::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis 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
$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; $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 $wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
} }

View File

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

View File

@ -468,8 +468,8 @@ $text['label-domain']['zh-cn'] = "领域";
$text['label-domain']['ja-jp'] = "ドメイン"; $text['label-domain']['ja-jp'] = "ドメイン";
$text['label-domain']['ko-kr'] = "도메인"; $text['label-domain']['ko-kr'] = "도메인";
$text['label-destination']['en-us'] = "Destination"; $text['label-destination']['en-us'] = "Dest";
$text['label-destination']['en-gb'] = "Destination"; $text['label-destination']['en-gb'] = "Dest";
$text['label-destination']['ar-eg'] = "الوجهة"; $text['label-destination']['ar-eg'] = "الوجهة";
$text['label-destination']['de-at'] = "Ziel"; $text['label-destination']['de-at'] = "Ziel";
$text['label-destination']['de-ch'] = "Ziel"; $text['label-destination']['de-ch'] = "Ziel";
@ -546,8 +546,8 @@ $text['label-codec']['zh-cn'] = "读/写编解码器";
$text['label-codec']['ja-jp'] = "読み取り/書き込みコーデック"; $text['label-codec']['ja-jp'] = "読み取り/書き込みコーデック";
$text['label-codec']['ko-kr'] = "읽기/쓰기 코덱"; $text['label-codec']['ko-kr'] = "읽기/쓰기 코덱";
$text['label-cid-number']['en-us'] = "Caller Number"; $text['label-cid-number']['en-us'] = "CID Number";
$text['label-cid-number']['en-gb'] = "Caller Number"; $text['label-cid-number']['en-gb'] = "CID Number";
$text['label-cid-number']['ar-eg'] = "رقم CID"; $text['label-cid-number']['ar-eg'] = "رقم CID";
$text['label-cid-number']['de-at'] = "Anrufer Nummer"; $text['label-cid-number']['de-at'] = "Anrufer Nummer";
$text['label-cid-number']['de-ch'] = "Anrufer Nummer"; $text['label-cid-number']['de-ch'] = "Anrufer Nummer";
@ -572,8 +572,8 @@ $text['label-cid-number']['zh-cn'] = "来电号码";
$text['label-cid-number']['ja-jp'] = "CID番号"; $text['label-cid-number']['ja-jp'] = "CID番号";
$text['label-cid-number']['ko-kr'] = "CID 번호"; $text['label-cid-number']['ko-kr'] = "CID 번호";
$text['label-cid-name']['en-us'] = "Caller Name"; $text['label-cid-name']['en-us'] = "CID Name";
$text['label-cid-name']['en-gb'] = "Caller Name"; $text['label-cid-name']['en-gb'] = "CID Name";
$text['label-cid-name']['ar-eg'] = "اسم CID"; $text['label-cid-name']['ar-eg'] = "اسم CID";
$text['label-cid-name']['de-at'] = "Anrufer Name"; $text['label-cid-name']['de-at'] = "Anrufer Name";
$text['label-cid-name']['de-ch'] = "Anrufer Name"; $text['label-cid-name']['de-ch'] = "Anrufer Name";
@ -650,33 +650,6 @@ $text['label-eavesdrop']['zh-cn'] = "窃听";
$text['label-eavesdrop']['ja-jp'] = "盗聴"; $text['label-eavesdrop']['ja-jp'] = "盗聴";
$text['label-eavesdrop']['ko-kr'] = "엿듣다"; $text['label-eavesdrop']['ko-kr'] = "엿듣다";
$text['label-duration']['en-us'] = "Duration";
$text['label-duration']['en-gb'] = "Duration";
$text['label-duration']['ar-eg'] = "المدة";
$text['label-duration']['de-at'] = "Dauer";
$text['label-duration']['de-ch'] = "Dauer";
$text['label-duration']['de-de'] = "Dauer";
$text['label-duration']['el-gr'] = "Διάρκεια";
$text['label-duration']['es-cl'] = "Duración";
$text['label-duration']['es-mx'] = "Duración";
$text['label-duration']['fr-ca'] = "Durée";
$text['label-duration']['fr-fr'] = "Durée";
$text['label-duration']['he-il'] = "משך השיחה";
$text['label-duration']['it-it'] = "Durata";
$text['label-duration']['ka-ge'] = "ხანგრძლივობა";
$text['label-duration']['nl-nl'] = "Duur";
$text['label-duration']['pl-pl'] = "Czas trwania";
$text['label-duration']['pt-br'] = "Duração";
$text['label-duration']['pt-pt'] = "Duração";
$text['label-duration']['ro-ro'] = "Durată";
$text['label-duration']['ru-ru'] = "Продолжительность";
$text['label-duration']['sv-se'] = "Samtalstid";
$text['label-duration']['uk-ua'] = "Тривалість";
$text['label-duration']['tr-tr'] = "Süre";
$text['label-duration']['zh-cn'] = "期间";
$text['label-duration']['ja-jp'] = "間隔";
$text['label-duration']['ko-kr'] = "지속";
$text['description-2']['en-us'] = "Use this to view all extensions and monitor and interact with active calls."; $text['description-2']['en-us'] = "Use this to view all extensions and monitor and interact with active calls.";
$text['description-2']['en-gb'] = "Use this to view all extensions and monitor and interact with active calls."; $text['description-2']['en-gb'] = "Use this to view all extensions and monitor and interact with active calls.";
$text['description-2']['ar-eg'] = "استخدم هذا لعرض جميع الملحقات ومراقبة المكالمات النشطة والتفاعل معها."; $text['description-2']['ar-eg'] = "استخدم هذا لعرض جميع الملحقات ومراقبة المكالمات النشطة والتفاعل معها.";

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2025 Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -78,12 +78,7 @@
$.ajax({ $.ajax({
url: url, url: url,
success: function(response){ success: function(response){
$("#ajax_response").html(response); $("#ajax_reponse").html(response);
const table = document.getElementById('calls_active');
var row_count = table.rows.length;
if (row_count > 0) { row_count = row_count - 1; }
const calls_active_count = document.getElementById('calls_active_count');
calls_active_count.innerHTML = row_count;
} }
}); });
timer_id = setTimeout(ajax_get, refresh); timer_id = setTimeout(ajax_get, refresh);
@ -137,70 +132,19 @@
<?php <?php
//create simple array of users own extensions //create simple array of users own extensions
unset($_SESSION['user']['extensions']); unset($_SESSION['user']['extensions']);
if (is_array($_SESSION['user']['extension'])) { if (is_array($_SESSION['user']['extension'])) {
foreach ($_SESSION['user']['extension'] as $assigned_extensions) { foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
$_SESSION['user']['extensions'][] = $assigned_extensions['user']; $_SESSION['user']['extensions'][] = $assigned_extensions['user'];
}
} }
}
//create token echo "<div id='ajax_reponse'></div>\n";
$object = new token; echo "<div id='cmd_response' style='display: none;'></div>\n";
$token = $object->create('/app/calls_active/calls_active_inc.php'); echo "<div id='time_stamp' style='visibility:hidden'>".date('Y-m-d-s')."</div>\n";
$_SESSION['app']['calls_active']['token']['name'] = $token['name']; echo "<br><br><br>";
$_SESSION['app']['calls_active']['token']['hash'] = $token['hash'];
//show the content header require_once "resources/footer.php";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title']."</b><div id='calls_active_count' class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo " <span id='refresh_state'>".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()'])."</span>";
if (permission_exists('call_active_eavesdrop') && !empty($user['extensions'])) {
if (sizeof($user['extensions']) > 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".(($_REQUEST['eavesdrop_dest'] == '') ? $user['extension'][0]['destination'] : escape($_REQUEST['eavesdrop_dest']))."\">\n";
echo " <i class='fas fa-headphones' style='margin-left: 15px; cursor: help;' title='".$text['description-eavesdrop_destination']."' align='absmiddle'></i>\n";
echo " <select class='formfld' style='margin-right: 5px;' align='absmiddle' onchange=\"document.getElementById('eavesdrop_dest').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
if (is_array($user['extensions'])) {
foreach ($user['extensions'] as $user_extension) {
echo " <option value='".escape($user_extension)."' ".(($_REQUEST['eavesdrop_dest'] == $user_extension) ? "selected" : null).">".escape($user_extension)."</option>\n";
}
}
echo " </select>\n";
}
else if (sizeof($user['extensions']) == 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".escape($user['extension'][0]['destination'])."\">\n";
}
}
if (permission_exists('call_active_hangup') && $rows) {
echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','id'=>'btn_delete','onclick'=>"refresh_stop(); modal_open('modal-hangup','btn_hangup');"]);
}
if (permission_exists('call_active_all')) {
if ($show == "all") {
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$theme_button_icon_back,'link'=>'calls_active.php','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$theme_button_icon_all,'link'=>'calls_active.php?show=all','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
}
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if (permission_exists('call_active_hangup') && $rows) {
echo modal::create(['id'=>'modal-hangup','type'=>'general','message'=>$text['confirm-hangups'],'actions'=>button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'check','id'=>'btn_hangup','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('hangup'); list_form_submit('form_list');"])]);
}
echo $text['description']."\n";
echo "<br /><br />\n";
//show the content body
echo "<div id='ajax_response'></div>\n";
echo "<div id='cmd_response' style='display: none;'></div>\n";
echo "<div id='time_stamp' style='visibility:hidden'>".date('Y-m-d-s')."</div>\n";
echo "<br><br><br>";
//show the footer
require_once "resources/footer.php";
/* /*
// deprecated functions for this page // deprecated functions for this page

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2025 Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -37,21 +37,6 @@
exit; exit;
} }
//get the session settings
$domain_uuid = $_SESSION['domain_uuid'];
$domain_name = $_SESSION['domain_name'];
$user_uuid = $_SESSION['user_uuid'];
$gateways = $_SESSION['gateways'];
$user = $_SESSION['user'];
//initialize the settings object
$settings = new settings(["domain_uuid" => $domain_uuid, "user_uuid" => $user_uuid]);
//get the settings
$template_name = $settings->get('domain', 'template', 'default');
$theme_button_icon_back = $settings->get('theme', 'button_icon_back', '');
$theme_button_icon_all = $settings->get('theme', 'button_icon_all', '');
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
@ -61,7 +46,7 @@
if ($show != "all") { $show = ''; } if ($show != "all") { $show = ''; }
//include theme config for button images //include theme config for button images
include_once("themes/".$template_name."/config.php"); include_once("themes/".$_SESSION['domain']['template']['name']."/config.php");
//set the command //set the command
$switch_cmd = 'show channels as json'; $switch_cmd = 'show channels as json';
@ -95,7 +80,7 @@
if (($show == 'all' && permission_exists('call_active_all'))) { if (($show == 'all' && permission_exists('call_active_all'))) {
$rows[] = $row; $rows[] = $row;
} }
elseif ($row['domain_name'] == $domain_name) { elseif ($row['domain_name'] == $_SESSION['domain_name']) {
$rows[] = $row; $rows[] = $row;
} }
} }
@ -103,8 +88,10 @@
} }
$num_rows = @sizeof($rows); $num_rows = @sizeof($rows);
//if the connnection is available then run it and return the results //if the connnection is available then run it and return the results
if (!$event_socket) { if (!$event_socket) {
$msg = "<div align='center'>".$text['confirm-socket']."<br /></div>"; $msg = "<div align='center'>".$text['confirm-socket']."<br /></div>";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "<table width='40%'>\n"; echo "<table width='40%'>\n";
@ -116,164 +103,172 @@
echo "</tr>\n"; echo "</tr>\n";
echo "</table>\n"; echo "</table>\n";
echo "</div>\n"; echo "</div>\n";
return;
} }
else {
//add the style //create token
echo "<style>\n"; $object = new token;
echo " /* Small screens: Hide columns with class 'hide-small' */\n"; $token = $object->create('/app/calls_active/calls_active_inc.php');
echo " @media (max-width: 600px) {\n";
echo " .hide-small {\n";
echo " display: none;\n";
echo " }\n";
echo " }\n";
echo "\n";
echo " /* Medium screens: Hide columns with class 'hide-medium' */\n";
echo "@media (max-width: 1023px) and (min-width: 601px) {\n";
echo " .hide-medium {\n";
echo " display: none;\n";
echo " }\n";
echo " }\n";
echo "\n";
echo "</style>\n";
//show the results //show content
echo "<div id='cmd_reponse'></div>\n"; echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo "<form id='form_list' method='post' action='calls_exec.php'>\n"; echo " <div class='actions'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n"; echo " <span id='refresh_state'>".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()'])."</span>";
if (permission_exists('call_active_eavesdrop') && !empty($_SESSION['user']['extensions'])) {
echo "<div class='card'>\n"; if (sizeof($_SESSION['user']['extensions']) > 1) {
echo " <table id='calls_active' class='list'>\n"; echo " <input type='hidden' id='eavesdrop_dest' value=\"".(($_REQUEST['eavesdrop_dest'] == '') ? $_SESSION['user']['extension'][0]['destination'] : escape($_REQUEST['eavesdrop_dest']))."\">\n";
echo " <tr class='list-header'>\n"; echo " <i class='fas fa-headphones' style='margin-left: 15px; cursor: help;' title='".$text['description-eavesdrop_destination']."' align='absmiddle'></i>\n";
if (permission_exists('call_active_hangup')) { echo " <select class='formfld' style='margin-right: 5px;' align='absmiddle' onchange=\"document.getElementById('eavesdrop_dest').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
echo " <th class='checkbox'>\n"; if (is_array($_SESSION['user']['extensions'])) {
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n"; foreach ($_SESSION['user']['extensions'] as $user_extension) {
echo " </th>\n"; echo " <option value='".escape($user_extension)."' ".(($_REQUEST['eavesdrop_dest'] == $user_extension) ? "selected" : null).">".escape($user_extension)."</option>\n";
} }
if (permission_exists('call_active_profile')) {
echo " <th class='hide-small'>".$text['label-profile']."</th>\n";
}
echo " <th>".$text['label-duration']."</th>\n";
if ($show == 'all') {
echo " <th>".$text['label-domain']."</th>\n";
}
echo " <th class='hide-small'>".$text['label-cid-name']."</th>\n";
echo " <th>".$text['label-cid-number']."</th>\n";
echo " <th>".$text['label-destination']."</th>\n";
if (permission_exists('call_active_application')) {
echo " <th class='hide-small hide-medium'>".$text['label-app']."</th>\n";
}
if (permission_exists('call_active_codec')) {
echo " <th class='hide-small hide-medium'>".$text['label-codec']."</th>\n";
}
if (permission_exists('call_active_secure')) {
echo " <th class='hide-small hide-medium'>".$text['label-secure']."</th>\n";
}
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <th>&nbsp;</th>\n";
}
echo " </tr>\n";
if (is_array($rows)) {
$x = 0;
foreach ($rows as $row) {
//set the php variables
foreach ($row as $key => $value) {
$$key = $value;
}
//get the sip profile
$name_array = explode("/", $name);
$sip_profile = $name_array[1];
$sip_uri = $name_array[2];
//get the number
//$temp_array = explode("@", $sip_uri);
//$tmp_number = $temp_array[0];
//$tmp_number = str_replace("sip:", "", $tmp_number);
//remove the '+' because it breaks the call recording
$cid_num = str_replace("+", "", $cid_num);
//replace gateway uuid with name
if (is_array($gateways) && sizeof($gateways) > 0) {
foreach ($gateways as $gateway_uuid => $gateway_name) {
$application_data = str_replace($gateway_uuid, $gateway_name, $application_data);
} }
echo " </select>\n";
} }
else if (sizeof($_SESSION['user']['extensions']) == 1) {
echo " <input type='hidden' id='eavesdrop_dest' value=\"".escape($_SESSION['user']['extension'][0]['destination'])."\">\n";
}
}
if (permission_exists('call_active_hangup') && $rows) {
echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','id'=>'btn_delete','onclick'=>"refresh_stop(); modal_open('modal-hangup','btn_hangup');"]);
}
if (permission_exists('call_active_all')) {
if ($show == "all") {
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'calls_active.php','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'calls_active.php?show=all','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
}
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
//calculate elapsed seconds if (permission_exists('call_active_hangup') && $rows) {
$elapsed_seconds = time() - $created_epoch; echo modal::create(['id'=>'modal-hangup','type'=>'general','message'=>$text['confirm-hangups'],'actions'=>button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'check','id'=>'btn_hangup','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('hangup'); list_form_submit('form_list');"])]);
}
//convert seconds to hours, minutes, and seconds echo $text['description']."\n";
$hours = floor($elapsed_seconds / 3600); echo "<br /><br />\n";
$minutes = floor(($elapsed_seconds % 3600) / 60);
$seconds = $elapsed_seconds % 60;
//format the elapsed time as HH:MM:SS //show the results
$elapsed_time = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); echo "<div id='cmd_reponse'></div>\n";
//reduce too long app data echo "<form id='form_list' method='post' action='calls_exec.php'>\n";
if(strlen($application_data) > 80) { echo "<input type='hidden' id='action' name='action' value=''>\n";
$application_data = substr($application_data, 0, 80) . '...';
}
//send the html echo "<div class='card'>\n";
echo " <tr class='list-row'>\n"; echo "<table class='list'>\n";
if (permission_exists('call_active_hangup')) { echo "<tr class='list-header'>\n";
echo " <td class='checkbox'>\n"; if (permission_exists('call_active_hangup')) {
echo " <input type='checkbox' name='calls[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (this.checked) { refresh_stop(); } else { document.getElementById('checkbox_all').checked = false; }\">\n"; echo " <th class='checkbox'>\n";
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n"; echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n";
echo " </td>\n"; echo " </th>\n";
} }
if (permission_exists('call_active_profile')) { echo " <th>".$text['label-profile']."</th>\n";
echo " <td class='hide-small'>".escape($sip_profile)."&nbsp;</td>\n"; echo " <th>".$text['label-created']."</th>\n";
} if ($show == 'all') {
//echo " <td>".escape($created)."&nbsp;</td>\n"; echo " <th>".$text['label-domain']."</th>\n";
echo " <td>".escape($elapsed_time)."</td>\n"; }
if ($show == 'all') { echo " <th>".$text['label-number']."</th>\n";
echo " <td>".escape($domain_name)."&nbsp;</td>\n"; echo " <th>".$text['label-cid-name']."</th>\n";
} echo " <th>".$text['label-cid-number']."</th>\n";
//echo " <td>".escape($tmp_number)."&nbsp;</td>\n"; echo " <th>".$text['label-destination']."</th>\n";
echo " <td class='hide-small'>".escape($cid_name)."&nbsp;</td>\n"; echo " <th>".$text['label-app']."</th>\n";
echo " <td>".escape($cid_num)."&nbsp;</td>\n"; echo " <th>".$text['label-codec']."</th>\n";
echo " <td>".escape($dest)."&nbsp;</td>\n"; echo " <th>".$text['label-secure']."</th>\n";
if (permission_exists('call_active_application')) { if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <td class='hide-small hide-medium' style='max-width: 200px; word-wrap: break-word;'>".(!empty($application) ? escape($application).":".escape($application_data) : null)."&nbsp;</td>\n"; echo " <th>&nbsp;</th>\n";
} }
if (permission_exists('call_active_codec')) { echo "</tr>\n";
echo " <td class='hide-small hide-medium'>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)."&nbsp;</td>\n";
}
if (permission_exists('call_active_secure')) {
echo " <td class='hide-small hide-medium'>".escape($secure)."&nbsp;</td>\n";
}
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <td class='button right' style='padding-right: 0;'>\n";
//eavesdrop
if (permission_exists('call_active_eavesdrop') && $callstate == 'ACTIVE' && !empty($user['extensions']) && !in_array($cid_num, $user['extensions'])) {
echo button::create(['type'=>'button','label'=>$text['label-eavesdrop'],'icon'=>'headphones','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-eavesdrop']."')) { eavesdrop_call('".escape($cid_num)."','".escape($uuid)."'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
//hangup
if (permission_exists('call_active_hangup')) {
echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-hangup']."')) { list_self_check('checkbox_".$x."'); list_action_set('hangup'); list_form_submit('form_list'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
echo " </td>\n";
}
echo " </tr>\n";
//unset the domain name if (is_array($rows)) {
unset($domain_name); $x = 0;
foreach ($rows as $row) {
//set the php variables
foreach ($row as $key => $value) {
$$key = $value;
}
//get the sip profile
$name_array = explode("/", $name);
$sip_profile = $name_array[1];
$sip_uri = $name_array[2];
//get the number
$temp_array = explode("@", $sip_uri);
$tmp_number = $temp_array[0];
$tmp_number = str_replace("sip:", "", $tmp_number);
//remove the '+' because it breaks the call recording
$cid_num = str_replace("+", "", $cid_num);
//replace gateway uuid with name
if (is_array($_SESSION['gateways']) && sizeof($_SESSION['gateways']) > 0) {
foreach ($_SESSION['gateways'] as $gateway_uuid => $gateway_name) {
$application_data = str_replace($gateway_uuid, $gateway_name, $application_data);
}
}
// reduce too long app data
if(strlen($application_data) > 512) {
$application_data = substr($application_data, 0, 512) . '...';
}
//send the html
echo "<tr class='list-row'>\n";
if (permission_exists('call_active_hangup')) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='calls[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (this.checked) { refresh_stop(); } else { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n";
echo " </td>\n";
}
echo " <td>".escape($sip_profile)."&nbsp;</td>\n";
echo " <td>".escape($created)."&nbsp;</td>\n";
if ($show == 'all') {
echo " <td>".escape($domain_name)."&nbsp;</td>\n";
}
echo " <td>".escape($tmp_number)."&nbsp;</td>\n";
echo " <td>".escape($cid_name)."&nbsp;</td>\n";
echo " <td>".escape($cid_num)."&nbsp;</td>\n";
echo " <td>".escape($dest)."&nbsp;</td>\n";
echo " <td>".(!empty($application) ? escape($application).":".escape($application_data) : null)."&nbsp;</td>\n";
echo " <td>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)."&nbsp;</td>\n";
echo " <td>".escape($secure)."&nbsp;</td>\n";
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
echo " <td class='button right' style='padding-right: 0;'>\n";
//eavesdrop
if (permission_exists('call_active_eavesdrop') && $callstate == 'ACTIVE' && !empty($_SESSION['user']['extensions']) && !in_array($cid_num, $_SESSION['user']['extensions'])) {
echo button::create(['type'=>'button','label'=>$text['label-eavesdrop'],'icon'=>'headphones','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-eavesdrop']."')) { eavesdrop_call('".escape($cid_num)."','".escape($uuid)."'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
//hangup
if (permission_exists('call_active_hangup')) {
echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','collapse'=>'hide-lg-dn','onclick'=>"if (confirm('".$text['confirm-hangup']."')) { list_self_check('checkbox_".$x."'); list_action_set('hangup'); list_form_submit('form_list'); } else { this.blur(); return false; }",'onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']);
}
echo "</td>\n";
}
echo "</tr>\n";
//unset the domain name
unset($domain_name);
//increment counter
$x++;
}
unset($rows);
}
echo "</table>\n";
echo "</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//increment counter
$x++;
}
} }
echo " </table>\n";
echo "</div>\n";
echo "<input type='hidden' name='".$_SESSION['app']['calls_active']['token']['name']."' value='".$_SESSION['app']['calls_active']['token']['hash']."'>\n";
echo "</form>\n";
?> ?>

View File

@ -176,13 +176,5 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA PC VLAN ID. Options 0 to 4094."; $apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA PC VLAN ID. Options 0 to 4094.";
$y++; $y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "78637de4-ec12-4d41-8c65-39afe50d2b02";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_router_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: 0:Bridge, 1:NAT.";
$y++;
?> ?>

View File

@ -164,7 +164,7 @@
$array['dialplans'][0]["app_uuid"] = "b81412e8-7253-91f4-e48e-42fc2c9a38d9"; $array['dialplans'][0]["app_uuid"] = "b81412e8-7253-91f4-e48e-42fc2c9a38d9";
//add the dialplan permission //add the dialplan permission
$p = permissions::new(); $p = new permissions;
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -49,7 +49,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data //get posted data
if (!empty($_POST['conference_centers'])) { 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_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_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'"); 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) { if (permission_exists('conference_center_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -229,12 +229,8 @@
if (!empty($conference_centers)) { if (!empty($conference_centers)) {
$x = 0; $x = 0;
foreach ($conference_centers as $row) { foreach ($conference_centers as $row) {
$list_row_url = '';
if (permission_exists('conference_center_edit')) { if (permission_exists('conference_center_edit')) {
$list_row_url = "conference_center_edit.php?id=".$row['conference_center_uuid']; $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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_center_edit') || permission_exists('conference_center_delete')) { if (permission_exists('conference_center_edit') || permission_exists('conference_center_delete')) {
@ -266,7 +262,7 @@
} }
echo " </td>\n"; echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_center_description'])."&nbsp;</td>\n"; echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_center_description'])."&nbsp;</td>\n";
if (permission_exists('conference_center_edit') && $list_row_edit_button) { if (permission_exists('conference_center_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -289,4 +285,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -188,7 +188,7 @@
$array['conference_room_users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['conference_room_users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
//un-assigne the users from the conference room //un-assigne the users from the conference room
$p = permissions::new(); $p = new permissions;
$p->add('conference_room_user_delete', 'temp'); $p->add('conference_room_user_delete', 'temp');
$database->app_name = 'conference_centers'; $database->app_name = 'conference_centers';
@ -358,7 +358,7 @@
$array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid; $array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid;
$array['conference_room_users'][0]['user_uuid'] = $_SESSION["user_uuid"]; $array['conference_room_users'][0]['user_uuid'] = $_SESSION["user_uuid"];
$p = permissions::new(); $p = new permissions;
$p->add('conference_room_user_add', 'temp'); $p->add('conference_room_user_add', 'temp');
$database->app_name = 'conference_centers'; $database->app_name = 'conference_centers';
@ -440,7 +440,7 @@
$array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid; $array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid;
$array['conference_room_users'][0]['user_uuid'] = $user_uuid; $array['conference_room_users'][0]['user_uuid'] = $user_uuid;
$p = permissions::new(); $p = new permissions;
$p->add('conference_room_user_add', 'temp'); $p->add('conference_room_user_add', 'temp');
$database->app_name = 'conference_centers'; $database->app_name = 'conference_centers';

View File

@ -49,7 +49,7 @@
$search = $_GET["search"] ?? null; $search = $_GET["search"] ?? null;
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the http post data //get the http post data
if (!empty($_POST['conference_rooms'])) { 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('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'"); 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) { if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -319,12 +319,8 @@
$participant_pin = substr($participant_pin, 0, 3) ."-". substr($participant_pin, 3, 3) ."-". substr($participant_pin, -3)."\n"; $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')) { if (permission_exists('conference_room_edit')) {
$list_row_url = "conference_room_edit.php?id=".urlencode($row['conference_room_uuid']); $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"; 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')) { if (permission_exists('conference_room_add') || permission_exists('conference_room_edit') || permission_exists('conference_room_delete')) {
@ -490,7 +486,7 @@
} }
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n"; echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
if (permission_exists('conference_room_edit') && $list_row_edit_button) { if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n"; 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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -512,4 +508,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

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

View File

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

View File

@ -26,6 +26,7 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/ */
//define the conference centers class //define the conference centers class
if (!class_exists('conference_centers')) {
class conference_centers { class conference_centers {
/** /**
@ -348,7 +349,7 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -424,7 +425,7 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_room_user_delete', 'temp'); $p->add('conference_room_user_delete', 'temp');
$p->add('conference_room_delete', 'temp'); $p->add('conference_room_delete', 'temp');
@ -488,7 +489,7 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_session_detail_delete', 'temp'); $p->add('conference_session_detail_delete', 'temp');
$p->add('conference_user_delete', 'temp'); $p->add('conference_user_delete', 'temp');
@ -577,7 +578,7 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");
//save the array //save the array
@ -799,7 +800,7 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
} //class } //class
}
//example conference center //example conference center
/* /*
@ -813,3 +814,5 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
$result = $conference_center->rooms(); $result = $conference_center->rooms();
print_r($result); print_r($result);
*/ */
?>

View File

@ -5,7 +5,6 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab
$array['dashboard'][$x]['dashboard_name'] = 'Conference Centers'; $array['dashboard'][$x]['dashboard_name'] = 'Conference Centers';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-hotel'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-hotel';
$array['dashboard'][$x]['dashboard_icon_color'] = '#5D5CE3';
$array['dashboard'][$x]['dashboard_url'] = '/app/conference_centers/conference_rooms.php'; $array['dashboard'][$x]['dashboard_url'] = '/app/conference_centers/conference_rooms.php';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_target'] = 'self';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard'][$x]['dashboard_width'] = '';
@ -15,14 +14,14 @@ $array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard'][$x]['dashboard_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard'][$x]['dashboard_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard'][$x]['dashboard_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color'] = '#5d5ce3';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] ='';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard'][$x]['dashboard_column_span'] = '1';

View File

@ -27,6 +27,7 @@
//includes files //includes files
require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
require_once "resources/classes/waveform.php";
use maximal\audio\Waveform; use maximal\audio\Waveform;
@ -95,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::$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::$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::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom Waveform::$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 = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis 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
$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; $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 $wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
} }

View File

@ -32,7 +32,7 @@
if ($num_rows == 0) { if ($num_rows == 0) {
//set the directory //set the directory
$xml_dir = $settings->get('switch','conf').'/autoload_configs'; $xml_dir = $setting->get('switch','conf').'/autoload_configs';
$xml_file = $xml_dir."/conference.conf"; $xml_file = $xml_dir."/conference.conf";
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/conference.conf'; $xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/conference.conf';
@ -65,7 +65,7 @@
$array['conference_controls'][0]['control_name'] = $control_name; $array['conference_controls'][0]['control_name'] = $control_name;
$array['conference_controls'][0]['control_enabled'] = 'true'; $array['conference_controls'][0]['control_enabled'] = 'true';
$p = permissions::new(); $p = new permissions;
$p->add('conference_control_add', 'temp'); $p->add('conference_control_add', 'temp');
$database->app_name = 'conference_controls'; $database->app_name = 'conference_controls';
@ -96,7 +96,7 @@
} }
$array['conference_control_details'][0]['control_enabled'] = $control_enabled; $array['conference_control_details'][0]['control_enabled'] = $control_enabled;
$p = permissions::new(); $p = new permissions;
$p->add('conference_control_detail_add', 'temp'); $p->add('conference_control_detail_add', 'temp');
$database->app_name = 'conference_controls'; $database->app_name = 'conference_controls';

View File

@ -43,7 +43,7 @@
$text = $language->get(); $text = $language->get();
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the http post data //get the http post data
if (!empty($_POST['conference_control_details'])) { 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_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_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); 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) { if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -200,7 +200,7 @@
echo $text['label-'.$row['control_enabled']]; echo $text['label-'.$row['control_enabled']];
} }
echo " </td>\n"; echo " </td>\n";
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button) { if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n"; 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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";

View File

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

View File

@ -26,7 +26,12 @@
/** /**
* conference_controls class * conference_controls class
*
* @method null delete
* @method null toggle
* @method null copy
*/ */
if (!class_exists('conference_controls')) {
class conference_controls { class conference_controls {
/** /**
@ -98,7 +103,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_control_detail_delete', 'temp'); $p->add('conference_control_detail_delete', 'temp');
//execute delete //execute delete
@ -421,3 +426,6 @@
} }
} }
}
?>

View File

@ -32,7 +32,7 @@
if ($num_rows == 0) { if ($num_rows == 0) {
//set the directory //set the directory
$xml_dir = $settings->get('switch','conf').'/autoload_configs'; $xml_dir = $setting->get('switch','conf').'/autoload_configs';
$xml_file = $xml_dir."/conference.conf"; $xml_file = $xml_dir."/conference.conf";
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/conference.conf'; $xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/conference.conf';
@ -65,7 +65,7 @@
$array['conference_profiles'][0]['profile_name'] = $profile_name; $array['conference_profiles'][0]['profile_name'] = $profile_name;
$array['conference_profiles'][0]['profile_enabled'] = 'true'; $array['conference_profiles'][0]['profile_enabled'] = 'true';
$p = permissions::new(); $p = new permissions;
$p->add('conference_profile_add', 'temp'); $p->add('conference_profile_add', 'temp');
$database->app_name = 'conference_profiles'; $database->app_name = 'conference_profiles';
@ -91,7 +91,7 @@
$array['conference_profile_params'][0]['profile_param_value'] = $profile_param_value; $array['conference_profile_params'][0]['profile_param_value'] = $profile_param_value;
$array['conference_profile_params'][0]['profile_param_enabled'] = $profile_param_enabled; $array['conference_profile_params'][0]['profile_param_enabled'] = $profile_param_enabled;
$p = permissions::new(); $p = new permissions;
$p->add('conference_profile_param_add', 'temp'); $p->add('conference_profile_param_add', 'temp');
$database->app_name = 'conference_profiles'; $database->app_name = 'conference_profiles';

View File

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

View File

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

View File

@ -26,7 +26,12 @@
/** /**
* conference_profiles class * conference_profiles class
*
* @method null delete
* @method null toggle
* @method null copy
*/ */
if (!class_exists('conference_profiles')) {
class conference_profiles { class conference_profiles {
/** /**
@ -98,7 +103,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_profile_param_delete', 'temp'); $p->add('conference_profile_param_delete', 'temp');
//execute delete //execute delete
@ -405,7 +410,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_profile_param_add', 'temp'); $p->add('conference_profile_param_add', 'temp');
//save the array //save the array
@ -427,3 +432,6 @@
} }
} }
}
?>

View File

@ -91,7 +91,7 @@
$user_uuid = $_REQUEST["user_uuid"]; $user_uuid = $_REQUEST["user_uuid"];
$conference_uuid = $_REQUEST["id"]; $conference_uuid = $_REQUEST["id"];
$p = permissions::new(); $p = new permissions;
$p->add('conference_user_delete', 'temp'); $p->add('conference_user_delete', 'temp');
$array['conference_users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['conference_users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
@ -124,7 +124,7 @@
$array['conference_users'][0]['conference_uuid'] = $conference_uuid; $array['conference_users'][0]['conference_uuid'] = $conference_uuid;
$array['conference_users'][0]['user_uuid'] = $user_uuid; $array['conference_users'][0]['user_uuid'] = $user_uuid;
$p = permissions::new(); $p = new permissions;
$p->add('conference_user_add', 'temp'); $p->add('conference_user_add', 'temp');
$database = new database; $database = new database;
@ -239,7 +239,7 @@
$array['dialplans'][0]['dialplan_enabled'] = $conference_enabled; $array['dialplans'][0]['dialplan_enabled'] = $conference_enabled;
$array['dialplans'][0]['dialplan_description'] = $conference_description; $array['dialplans'][0]['dialplan_description'] = $conference_description;
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');

View File

@ -46,7 +46,7 @@
$show = $_GET["show"] ?? ''; $show = $_GET["show"] ?? '';
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data //get posted data
if (!empty($_POST['conferences'])) { if (!empty($_POST['conferences'])) {
@ -223,7 +223,7 @@
echo "<th style='text-align: center;'>".$text['label-tools']."</th>\n"; 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_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'"); 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) { if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -231,12 +231,8 @@
if (!empty($conferences)) { if (!empty($conferences)) {
$x = 0; $x = 0;
foreach($conferences as $row) { foreach($conferences as $row) {
$list_row_url = '';
if (permission_exists('conference_edit')) { if (permission_exists('conference_edit')) {
$list_row_url = "conference_edit.php?id=".urlencode($row['conference_uuid']); $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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_add') || permission_exists('conference_edit') || permission_exists('conference_delete')) { if (permission_exists('conference_add') || permission_exists('conference_edit') || permission_exists('conference_delete')) {
@ -281,7 +277,7 @@
echo $text['label-'.$row['conference_enabled']]; echo $text['label-'.$row['conference_enabled']];
} }
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_description'])."&nbsp;</td>\n"; echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_description'])."&nbsp;</td>\n";
if (permission_exists('conference_edit') && $list_row_edit_button) { if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -305,4 +301,3 @@
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -25,6 +25,7 @@
*/ */
//define the conferences class //define the conferences class
if (!class_exists('conferences')) {
class conferences { class conferences {
/** /**
@ -107,7 +108,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_user_delete', 'temp'); $p->add('conference_user_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -202,7 +203,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -340,7 +341,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('conference_user_add', 'temp'); $p->add('conference_user_add', 'temp');
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
@ -373,3 +374,6 @@
} }
} }
}
?>

View File

@ -5,7 +5,6 @@ $array['dashboard'][$x]['dashboard_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db4
$array['dashboard'][$x]['dashboard_name'] = 'Conferences'; $array['dashboard'][$x]['dashboard_name'] = 'Conferences';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-comments'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-comments';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_url'] = '/app/conferences/conferences.php'; $array['dashboard'][$x]['dashboard_url'] = '/app/conferences/conferences.php';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_target'] = 'self';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard'][$x]['dashboard_width'] = '';
@ -15,14 +14,14 @@ $array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard'][$x]['dashboard_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard'][$x]['dashboard_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard'][$x]['dashboard_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard'][$x]['dashboard_number_text_color'] = '#0292FF';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] ='';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard'][$x]['dashboard_column_span'] = '1';
@ -42,4 +41,3 @@ $array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@ -22,7 +22,6 @@ $text['title-active_conferences']['ro-ro'] = "Conferințe active";
$text['title-active_conferences']['ru-ru'] = "Активные конференции"; $text['title-active_conferences']['ru-ru'] = "Активные конференции";
$text['title-active_conferences']['sv-se'] = "Aktiva Konferenser"; $text['title-active_conferences']['sv-se'] = "Aktiva Konferenser";
$text['title-active_conferences']['uk-ua'] = "Активні кноференції"; $text['title-active_conferences']['uk-ua'] = "Активні кноференції";
$text['title-active_conferences']['tr-tr'] = "Aktif Konferanslar";
$text['title-active_conferences']['zh-cn'] = "活动会议"; $text['title-active_conferences']['zh-cn'] = "活动会议";
$text['title-active_conferences']['ja-jp'] = "アクティブな会議"; $text['title-active_conferences']['ja-jp'] = "アクティブな会議";
$text['title-active_conferences']['ko-kr'] = "활성 회의"; $text['title-active_conferences']['ko-kr'] = "활성 회의";
@ -49,23 +48,22 @@ $text['message-denied']['ro-ro'] = "acces interzis";
$text['message-denied']['ru-ru'] = "Доступ запрещён"; $text['message-denied']['ru-ru'] = "Доступ запрещён";
$text['message-denied']['sv-se'] = "Tillträde Nekat"; $text['message-denied']['sv-se'] = "Tillträde Nekat";
$text['message-denied']['uk-ua'] = "в доступі відмовлено"; $text['message-denied']['uk-ua'] = "в доступі відмовлено";
$text['message-denied']['tr-tr'] = "erişim engellendi";
$text['message-denied']['zh-cn'] = "拒绝访问"; $text['message-denied']['zh-cn'] = "拒绝访问";
$text['message-denied']['ja-jp'] = "アクセス拒否"; $text['message-denied']['ja-jp'] = "アクセス拒否";
$text['message-denied']['ko-kr'] = "접근 불가"; $text['message-denied']['ko-kr'] = "접근 불가";
$text['message-connection']['en-us'] = "Connection to Event Socket failed."; $text['message-connection']['en-us'] = "Connection to Event Socket failed.";
$text['message-connection']['en-gb'] = "Connection to Event Socket failed."; $text['message-connection']['en-gb'] = "Connection to Event Socket failed.";
$text['message-connection']['ar-eg'] = "فشل الاتصال بمقبس الحدث."; $text['message-connection']['ar-eg'] = "فشل الاتصال بـ Event Socket.";
$text['message-connection']['de-at'] = "Verbindung zum Event Socket fehlgeschlagen."; $text['message-connection']['de-at'] = "Verbindung zum Event Socket fehlgeschlagen.";
$text['message-connection']['de-ch'] = "Verbindung zum Event Socket fehlgeschlagen."; $text['message-connection']['de-ch'] = "Verbindung zum Event Socket fehlgeschlagen.";
$text['message-connection']['de-de'] = "Verbindung zum Event Socket fehlgeschlagen."; $text['message-connection']['de-de'] = "Verbindung zum Event Socket fehlgeschlagen.";
$text['message-connection']['el-gr'] = "Η σύνδεση με την υποδοχή συμβάντος απέτυχε."; $text['message-connection']['el-gr'] = "Η σύνδεση στο Event Socket απέτυχε.";
$text['message-connection']['es-cl'] = "Conexión a Socket de Evento fallida."; $text['message-connection']['es-cl'] = "Conexión a Socket de Evento fallida.";
$text['message-connection']['es-mx'] = "Conexión a Socket de Evento fallida."; $text['message-connection']['es-mx'] = "Conexión a Socket de Evento fallida.";
$text['message-connection']['fr-ca'] = "Connexion à l'Event Socket en echec."; $text['message-connection']['fr-ca'] = "Connexion à l'Event Socket en echec.";
$text['message-connection']['fr-fr'] = "Connexion à l'Event Socket en echec."; $text['message-connection']['fr-fr'] = "Connexion à l'Event Socket en echec.";
$text['message-connection']['he-il'] = "החיבור לשקע אירועים נכשל."; $text['message-connection']['he-il'] = "החיבור ל-Event Socket נכשל.";
$text['message-connection']['it-it'] = "Connessione all'Event Socket fallita."; $text['message-connection']['it-it'] = "Connessione all'Event Socket fallita.";
$text['message-connection']['ka-ge'] = "მოვლენების სოკეტთან მიერთება არ განხორციელდა."; $text['message-connection']['ka-ge'] = "მოვლენების სოკეტთან მიერთება არ განხორციელდა.";
$text['message-connection']['nl-nl'] = "Verbinding met Event-Socket mislukt"; $text['message-connection']['nl-nl'] = "Verbinding met Event-Socket mislukt";
@ -76,7 +74,6 @@ $text['message-connection']['ro-ro'] = "Conexiunea la Event Socket a eșuat.";
$text['message-connection']['ru-ru'] = "Подключение к Event Socket неудачно."; $text['message-connection']['ru-ru'] = "Подключение к Event Socket неудачно.";
$text['message-connection']['sv-se'] = "Anslutning till Händelse misslyckades"; $text['message-connection']['sv-se'] = "Anslutning till Händelse misslyckades";
$text['message-connection']['uk-ua'] = "Помилка підключення до сокета подій."; $text['message-connection']['uk-ua'] = "Помилка підключення до сокета подій.";
$text['message-connection']['tr-tr'] = "Olay Soketine bağlantı başarısız oldu.";
$text['message-connection']['zh-cn'] = "与事件套接字的连接失败。"; $text['message-connection']['zh-cn'] = "与事件套接字的连接失败。";
$text['message-connection']['ja-jp'] = "イベントソケットへの接続に失敗しました。"; $text['message-connection']['ja-jp'] = "イベントソケットへの接続に失敗しました。";
$text['message-connection']['ko-kr'] = "이벤트 소켓에 연결하지 못했습니다."; $text['message-connection']['ko-kr'] = "이벤트 소켓에 연결하지 못했습니다.";
@ -103,7 +100,6 @@ $text['message-click_to_unmute']['ro-ro'] = "Faceți clic pentru a activa sunetu
$text['message-click_to_unmute']['ru-ru'] = "Нажмите, чтобы включить микрофон участника"; $text['message-click_to_unmute']['ru-ru'] = "Нажмите, чтобы включить микрофон участника";
$text['message-click_to_unmute']['sv-se'] = "Klicka för att Aktivera Deltagares Mikrofon"; $text['message-click_to_unmute']['sv-se'] = "Klicka för att Aktivera Deltagares Mikrofon";
$text['message-click_to_unmute']['uk-ua'] = "Натисніть, щоб включити учасника"; $text['message-click_to_unmute']['uk-ua'] = "Натисніть, щоб включити учасника";
$text['message-click_to_unmute']['tr-tr'] = "Üyenin Sesini Açmak İçin Tıklayın";
$text['message-click_to_unmute']['zh-cn'] = "单击以取消静音成员"; $text['message-click_to_unmute']['zh-cn'] = "单击以取消静音成员";
$text['message-click_to_unmute']['ja-jp'] = "クリックしてメンバーのミュートを解除"; $text['message-click_to_unmute']['ja-jp'] = "クリックしてメンバーのミュートを解除";
$text['message-click_to_unmute']['ko-kr'] = "회원을 음소거 해제하려면 클릭하세요."; $text['message-click_to_unmute']['ko-kr'] = "회원을 음소거 해제하려면 클릭하세요.";
@ -130,7 +126,6 @@ $text['message-click_to_mute']['ro-ro'] = "Faceți clic pentru a dezactiva sunet
$text['message-click_to_mute']['ru-ru'] = "Нажмите, чтобы отключить микрофон участника"; $text['message-click_to_mute']['ru-ru'] = "Нажмите, чтобы отключить микрофон участника";
$text['message-click_to_mute']['sv-se'] = "Klicka för att Stänga Av Deltagares Mikrofon"; $text['message-click_to_mute']['sv-se'] = "Klicka för att Stänga Av Deltagares Mikrofon";
$text['message-click_to_mute']['uk-ua'] = "Натисніть, щоб вилючити учасника"; $text['message-click_to_mute']['uk-ua'] = "Натисніть, щоб вилючити учасника";
$text['message-click_to_mute']['tr-tr'] = "Üyeyi sessize almak için tıklayın";
$text['message-click_to_mute']['zh-cn'] = "点击静音成员"; $text['message-click_to_mute']['zh-cn'] = "点击静音成员";
$text['message-click_to_mute']['ja-jp'] = "クリックしてメンバーをミュート"; $text['message-click_to_mute']['ja-jp'] = "クリックしてメンバーをミュート";
$text['message-click_to_mute']['ko-kr'] = "회원을 음소거하려면 클릭하세요."; $text['message-click_to_mute']['ko-kr'] = "회원을 음소거하려면 클릭하세요.";
@ -157,7 +152,6 @@ $text['label-conference_center_room']['ro-ro'] = "Sala Centrului de Conferințe"
$text['label-conference_center_room']['ru-ru'] = "Конференц-центр"; $text['label-conference_center_room']['ru-ru'] = "Конференц-центр";
$text['label-conference_center_room']['sv-se'] = "Konferenscenter"; $text['label-conference_center_room']['sv-se'] = "Konferenscenter";
$text['label-conference_center_room']['uk-ua'] = "Конференц-центр"; $text['label-conference_center_room']['uk-ua'] = "Конференц-центр";
$text['label-conference_center_room']['tr-tr'] = "Konferans Merkezi Odası";
$text['label-conference_center_room']['zh-cn'] = "会议中心室"; $text['label-conference_center_room']['zh-cn'] = "会议中心室";
$text['label-conference_center_room']['ja-jp'] = "カンファレンスセンタールーム"; $text['label-conference_center_room']['ja-jp'] = "カンファレンスセンタールーム";
$text['label-conference_center_room']['ko-kr'] = "컨퍼런스 센터룸"; $text['label-conference_center_room']['ko-kr'] = "컨퍼런스 센터룸";
@ -184,7 +178,6 @@ $text['label-yes']['ro-ro'] = "da";
$text['label-yes']['ru-ru'] = "Да"; $text['label-yes']['ru-ru'] = "Да";
$text['label-yes']['sv-se'] = "Ja"; $text['label-yes']['sv-se'] = "Ja";
$text['label-yes']['uk-ua'] = "Так"; $text['label-yes']['uk-ua'] = "Так";
$text['label-yes']['tr-tr'] = "Evet";
$text['label-yes']['zh-cn'] = "是的"; $text['label-yes']['zh-cn'] = "是的";
$text['label-yes']['ja-jp'] = "はい"; $text['label-yes']['ja-jp'] = "はい";
$text['label-yes']['ko-kr'] = ""; $text['label-yes']['ko-kr'] = "";
@ -211,7 +204,6 @@ $text['label-volume']['ro-ro'] = "Volum";
$text['label-volume']['ru-ru'] = "Громкость"; $text['label-volume']['ru-ru'] = "Громкость";
$text['label-volume']['sv-se'] = "Volym"; $text['label-volume']['sv-se'] = "Volym";
$text['label-volume']['uk-ua'] = "Обсяг"; $text['label-volume']['uk-ua'] = "Обсяг";
$text['label-volume']['tr-tr'] = "Hacim";
$text['label-volume']['zh-cn'] = "体积"; $text['label-volume']['zh-cn'] = "体积";
$text['label-volume']['ja-jp'] = "音量"; $text['label-volume']['ja-jp'] = "音量";
$text['label-volume']['ko-kr'] = "용량"; $text['label-volume']['ko-kr'] = "용량";
@ -238,7 +230,6 @@ $text['label-video']['ro-ro'] = "Video";
$text['label-video']['ru-ru'] = "Видео"; $text['label-video']['ru-ru'] = "Видео";
$text['label-video']['sv-se'] = "Video"; $text['label-video']['sv-se'] = "Video";
$text['label-video']['uk-ua'] = "Відео"; $text['label-video']['uk-ua'] = "Відео";
$text['label-video']['tr-tr'] = "Video";
$text['label-video']['zh-cn'] = "视频"; $text['label-video']['zh-cn'] = "视频";
$text['label-video']['ja-jp'] = "ビデオ"; $text['label-video']['ja-jp'] = "ビデオ";
$text['label-video']['ko-kr'] = "동영상"; $text['label-video']['ko-kr'] = "동영상";
@ -264,8 +255,7 @@ $text['label-unmute-all']['pt-pt'] = "Todos com som";
$text['label-unmute-all']['ro-ro'] = "Activați sunetul pe toate"; $text['label-unmute-all']['ro-ro'] = "Activați sunetul pe toate";
$text['label-unmute-all']['ru-ru'] = "Включить все микрофоны"; $text['label-unmute-all']['ru-ru'] = "Включить все микрофоны";
$text['label-unmute-all']['sv-se'] = "Aktivera Allas Mikrofoner"; $text['label-unmute-all']['sv-se'] = "Aktivera Allas Mikrofoner";
$text['label-unmute-all']['uk-ua'] = "Увімкнути всі"; $text['label-unmute-all']['uk-ua'] = "Unmute All ";
$text['label-unmute-all']['tr-tr'] = "Tümünü sessize al";
$text['label-unmute-all']['zh-cn'] = "全部取消静音"; $text['label-unmute-all']['zh-cn'] = "全部取消静音";
$text['label-unmute-all']['ja-jp'] = "すべてミュート解除"; $text['label-unmute-all']['ja-jp'] = "すべてミュート解除";
$text['label-unmute-all']['ko-kr'] = "모두 음소거 해제"; $text['label-unmute-all']['ko-kr'] = "모두 음소거 해제";
@ -291,8 +281,7 @@ $text['label-unmute']['pt-pt'] = "Com som";
$text['label-unmute']['ro-ro'] = "nori"; $text['label-unmute']['ro-ro'] = "nori";
$text['label-unmute']['ru-ru'] = "Включить микрофон"; $text['label-unmute']['ru-ru'] = "Включить микрофон";
$text['label-unmute']['sv-se'] = "Mikrofon Aktiv"; $text['label-unmute']['sv-se'] = "Mikrofon Aktiv";
$text['label-unmute']['uk-ua'] = "увімкнено звук"; $text['label-unmute']['uk-ua'] = "Unmute ";
$text['label-unmute']['tr-tr'] = "Unmute";
$text['label-unmute']['zh-cn'] = ""; $text['label-unmute']['zh-cn'] = "";
$text['label-unmute']['ja-jp'] = "雲霧て"; $text['label-unmute']['ja-jp'] = "雲霧て";
$text['label-unmute']['ko-kr'] = "구름 안개"; $text['label-unmute']['ko-kr'] = "구름 안개";
@ -319,7 +308,6 @@ $text['label-unlock']['ro-ro'] = "Deblocați";
$text['label-unlock']['ru-ru'] = "Разблокировать"; $text['label-unlock']['ru-ru'] = "Разблокировать";
$text['label-unlock']['sv-se'] = "Lås Upp"; $text['label-unlock']['sv-se'] = "Lås Upp";
$text['label-unlock']['uk-ua'] = "Розблокувати"; $text['label-unlock']['uk-ua'] = "Розблокувати";
$text['label-unlock']['tr-tr'] = "Kilidini aç";
$text['label-unlock']['zh-cn'] = "开锁"; $text['label-unlock']['zh-cn'] = "开锁";
$text['label-unlock']['ja-jp'] = "ロック解除"; $text['label-unlock']['ja-jp'] = "ロック解除";
$text['label-unlock']['ko-kr'] = "터놓다"; $text['label-unlock']['ko-kr'] = "터놓다";
@ -346,7 +334,6 @@ $text['label-undeaf']['ro-ro'] = "nesurde";
$text['label-undeaf']['ru-ru'] = "Undeaf"; $text['label-undeaf']['ru-ru'] = "Undeaf";
$text['label-undeaf']['sv-se'] = "Hörbarhet"; $text['label-undeaf']['sv-se'] = "Hörbarhet";
$text['label-undeaf']['uk-ua'] = "Неглухий"; $text['label-undeaf']['uk-ua'] = "Неглухий";
$text['label-undeaf']['tr-tr'] = "Sağır olmayan";
$text['label-undeaf']['zh-cn'] = "不聋"; $text['label-undeaf']['zh-cn'] = "不聋";
$text['label-undeaf']['ja-jp'] = "耳が聞こえない"; $text['label-undeaf']['ja-jp'] = "耳が聞こえない";
$text['label-undeaf']['ko-kr'] = "귀머거리"; $text['label-undeaf']['ko-kr'] = "귀머거리";
@ -373,7 +360,6 @@ $text['label-tools']['ro-ro'] = "Instrumente";
$text['label-tools']['ru-ru'] = "Утилиты"; $text['label-tools']['ru-ru'] = "Утилиты";
$text['label-tools']['sv-se'] = "Verktyg"; $text['label-tools']['sv-se'] = "Verktyg";
$text['label-tools']['uk-ua'] = "Параметри"; $text['label-tools']['uk-ua'] = "Параметри";
$text['label-tools']['tr-tr'] = "Aletler";
$text['label-tools']['zh-cn'] = "工具"; $text['label-tools']['zh-cn'] = "工具";
$text['label-tools']['ja-jp'] = "ツール"; $text['label-tools']['ja-jp'] = "ツール";
$text['label-tools']['ko-kr'] = "도구"; $text['label-tools']['ko-kr'] = "도구";
@ -400,7 +386,6 @@ $text['label-tool']['ro-ro'] = "Instrumente";
$text['label-tool']['ru-ru'] = "Утилиты"; $text['label-tool']['ru-ru'] = "Утилиты";
$text['label-tool']['sv-se'] = "Verktyg"; $text['label-tool']['sv-se'] = "Verktyg";
$text['label-tool']['uk-ua'] = "Параметри"; $text['label-tool']['uk-ua'] = "Параметри";
$text['label-tool']['tr-tr'] = "Aletler";
$text['label-tool']['zh-cn'] = "工具"; $text['label-tool']['zh-cn'] = "工具";
$text['label-tool']['ja-jp'] = "ツール"; $text['label-tool']['ja-jp'] = "ツール";
$text['label-tool']['ko-kr'] = "도구"; $text['label-tool']['ko-kr'] = "도구";
@ -427,7 +412,6 @@ $text['label-talking']['ro-ro'] = "Vorbind";
$text['label-talking']['ru-ru'] = "Разговривайте"; $text['label-talking']['ru-ru'] = "Разговривайте";
$text['label-talking']['sv-se'] = "Talande"; $text['label-talking']['sv-se'] = "Talande";
$text['label-talking']['uk-ua'] = "Розмова"; $text['label-talking']['uk-ua'] = "Розмова";
$text['label-talking']['tr-tr'] = "Konuşmak";
$text['label-talking']['zh-cn'] = ""; $text['label-talking']['zh-cn'] = "";
$text['label-talking']['ja-jp'] = "おしゃべり"; $text['label-talking']['ja-jp'] = "おしゃべり";
$text['label-talking']['ko-kr'] = "말하는"; $text['label-talking']['ko-kr'] = "말하는";
@ -454,7 +438,6 @@ $text['label-speak']['ro-ro'] = "Vorbi";
$text['label-speak']['ru-ru'] = "Говорите"; $text['label-speak']['ru-ru'] = "Говорите";
$text['label-speak']['sv-se'] = "Tala"; $text['label-speak']['sv-se'] = "Tala";
$text['label-speak']['uk-ua'] = "Говорити"; $text['label-speak']['uk-ua'] = "Говорити";
$text['label-speak']['tr-tr'] = "Konuşmak";
$text['label-speak']['zh-cn'] = "说话"; $text['label-speak']['zh-cn'] = "说话";
$text['label-speak']['ja-jp'] = "話す"; $text['label-speak']['ja-jp'] = "話す";
$text['label-speak']['ko-kr'] = "말하다"; $text['label-speak']['ko-kr'] = "말하다";
@ -481,7 +464,6 @@ $text['label-recording']['ro-ro'] = "Înregistrare";
$text['label-recording']['ru-ru'] = "Запись"; $text['label-recording']['ru-ru'] = "Запись";
$text['label-recording']['sv-se'] = "Inspelning"; $text['label-recording']['sv-se'] = "Inspelning";
$text['label-recording']['uk-ua'] = "Запис"; $text['label-recording']['uk-ua'] = "Запис";
$text['label-recording']['tr-tr'] = "Kayıt";
$text['label-recording']['zh-cn'] = "记录"; $text['label-recording']['zh-cn'] = "记录";
$text['label-recording']['ja-jp'] = "録音"; $text['label-recording']['ja-jp'] = "録音";
$text['label-recording']['ko-kr'] = "녹음"; $text['label-recording']['ko-kr'] = "녹음";
@ -508,7 +490,6 @@ $text['label-quiet']['ro-ro'] = "Liniște";
$text['label-quiet']['ru-ru'] = "Тихо"; $text['label-quiet']['ru-ru'] = "Тихо";
$text['label-quiet']['sv-se'] = "Tyst"; $text['label-quiet']['sv-se'] = "Tyst";
$text['label-quiet']['uk-ua'] = "Спокійно"; $text['label-quiet']['uk-ua'] = "Спокійно";
$text['label-quiet']['tr-tr'] = "Sessizlik";
$text['label-quiet']['zh-cn'] = "安静的"; $text['label-quiet']['zh-cn'] = "安静的";
$text['label-quiet']['ja-jp'] = "静かな"; $text['label-quiet']['ja-jp'] = "静かな";
$text['label-quiet']['ko-kr'] = "조용한"; $text['label-quiet']['ko-kr'] = "조용한";
@ -535,7 +516,6 @@ $text['label-participant-pin']['ro-ro'] = "PIN participant";
$text['label-participant-pin']['ru-ru'] = "PIN участника"; $text['label-participant-pin']['ru-ru'] = "PIN участника";
$text['label-participant-pin']['sv-se'] = "Pinkod Deltagare"; $text['label-participant-pin']['sv-se'] = "Pinkod Deltagare";
$text['label-participant-pin']['uk-ua'] = "PIN учасника"; $text['label-participant-pin']['uk-ua'] = "PIN учасника";
$text['label-participant-pin']['tr-tr'] = "Katılımcı PIN'i";
$text['label-participant-pin']['zh-cn'] = "参与者密码"; $text['label-participant-pin']['zh-cn'] = "参与者密码";
$text['label-participant-pin']['ja-jp'] = "参加者暗証番号"; $text['label-participant-pin']['ja-jp'] = "参加者暗証番号";
$text['label-participant-pin']['ko-kr'] = "참가자 PIN"; $text['label-participant-pin']['ko-kr'] = "참가자 PIN";
@ -562,7 +542,6 @@ $text['label-participant']['ro-ro'] = "Participant";
$text['label-participant']['ru-ru'] = "Участник"; $text['label-participant']['ru-ru'] = "Участник";
$text['label-participant']['sv-se'] = "Deltagare"; $text['label-participant']['sv-se'] = "Deltagare";
$text['label-participant']['uk-ua'] = "Учасник"; $text['label-participant']['uk-ua'] = "Учасник";
$text['label-participant']['tr-tr'] = "Katılımcı";
$text['label-participant']['zh-cn'] = "参与者"; $text['label-participant']['zh-cn'] = "参与者";
$text['label-participant']['ja-jp'] = "参加者"; $text['label-participant']['ja-jp'] = "参加者";
$text['label-participant']['ko-kr'] = "참가자"; $text['label-participant']['ko-kr'] = "참가자";
@ -589,7 +568,6 @@ $text['label-not-recording']['ro-ro'] = "Nu se înregistrează";
$text['label-not-recording']['ru-ru'] = "Не записывается"; $text['label-not-recording']['ru-ru'] = "Не записывается";
$text['label-not-recording']['sv-se'] = "Spelar inte in"; $text['label-not-recording']['sv-se'] = "Spelar inte in";
$text['label-not-recording']['uk-ua'] = "Не записується"; $text['label-not-recording']['uk-ua'] = "Не записується";
$text['label-not-recording']['tr-tr'] = "Kayıt Yapılmıyor";
$text['label-not-recording']['zh-cn'] = "不录音"; $text['label-not-recording']['zh-cn'] = "不录音";
$text['label-not-recording']['ja-jp'] = "記録しない"; $text['label-not-recording']['ja-jp'] = "記録しない";
$text['label-not-recording']['ko-kr'] = "녹음하지 않음"; $text['label-not-recording']['ko-kr'] = "녹음하지 않음";
@ -615,8 +593,7 @@ $text['label-no']['pt-pt'] = "Não";
$text['label-no']['ro-ro'] = "Nu"; $text['label-no']['ro-ro'] = "Nu";
$text['label-no']['ru-ru'] = "Нет"; $text['label-no']['ru-ru'] = "Нет";
$text['label-no']['sv-se'] = "Nej"; $text['label-no']['sv-se'] = "Nej";
$text['label-no']['uk-ua'] = "немає"; $text['label-no']['uk-ua'] = "Ні";
$text['label-no']['tr-tr'] = "HAYIR";
$text['label-no']['zh-cn'] = ""; $text['label-no']['zh-cn'] = "";
$text['label-no']['ja-jp'] = "いいえ"; $text['label-no']['ja-jp'] = "いいえ";
$text['label-no']['ko-kr'] = "아니요"; $text['label-no']['ko-kr'] = "아니요";
@ -643,7 +620,6 @@ $text['label-mute-all-alt']['ro-ro'] = "Dezactivați sunetul tuturor participan
$text['label-mute-all-alt']['ru-ru'] = "Отключить микрофоны всем участникам."; $text['label-mute-all-alt']['ru-ru'] = "Отключить микрофоны всем участникам.";
$text['label-mute-all-alt']['sv-se'] = "Stäng av Deltagares mikrofon"; $text['label-mute-all-alt']['sv-se'] = "Stäng av Deltagares mikrofon";
$text['label-mute-all-alt']['uk-ua'] = "Вимкнути звук для всіх учасників."; $text['label-mute-all-alt']['uk-ua'] = "Вимкнути звук для всіх учасників.";
$text['label-mute-all-alt']['tr-tr'] = "Tüm Katılımcıları Sessize Al.";
$text['label-mute-all-alt']['zh-cn'] = "将所有与会者静音。"; $text['label-mute-all-alt']['zh-cn'] = "将所有与会者静音。";
$text['label-mute-all-alt']['ja-jp'] = "すべての参加者をミュートします。"; $text['label-mute-all-alt']['ja-jp'] = "すべての参加者をミュートします。";
$text['label-mute-all-alt']['ko-kr'] = "모든 참가자를 음소거합니다."; $text['label-mute-all-alt']['ko-kr'] = "모든 참가자를 음소거합니다.";
@ -670,7 +646,6 @@ $text['label-mute-all']['ro-ro'] = "Dezactivați toate";
$text['label-mute-all']['ru-ru'] = "Отключить все микрофоны"; $text['label-mute-all']['ru-ru'] = "Отключить все микрофоны";
$text['label-mute-all']['sv-se'] = "Stäng av Allas mikrofon"; $text['label-mute-all']['sv-se'] = "Stäng av Allas mikrofon";
$text['label-mute-all']['uk-ua'] = "Вимкнути всі"; $text['label-mute-all']['uk-ua'] = "Вимкнути всі";
$text['label-mute-all']['tr-tr'] = "Tümünü Sessize Al";
$text['label-mute-all']['zh-cn'] = "全部静音"; $text['label-mute-all']['zh-cn'] = "全部静音";
$text['label-mute-all']['ja-jp'] = "すべてミュート"; $text['label-mute-all']['ja-jp'] = "すべてミュート";
$text['label-mute-all']['ko-kr'] = "모두 음소거"; $text['label-mute-all']['ko-kr'] = "모두 음소거";
@ -697,7 +672,6 @@ $text['label-mute']['ro-ro'] = "Mut";
$text['label-mute']['ru-ru'] = "Отключить микрофон"; $text['label-mute']['ru-ru'] = "Отключить микрофон";
$text['label-mute']['sv-se'] = "Stäng av mikrofon"; $text['label-mute']['sv-se'] = "Stäng av mikrofon";
$text['label-mute']['uk-ua'] = "Вимкнути звук"; $text['label-mute']['uk-ua'] = "Вимкнути звук";
$text['label-mute']['tr-tr'] = "Sesini kapatmak";
$text['label-mute']['zh-cn'] = "沉默的"; $text['label-mute']['zh-cn'] = "沉默的";
$text['label-mute']['ja-jp'] = "無音"; $text['label-mute']['ja-jp'] = "無音";
$text['label-mute']['ko-kr'] = "무음"; $text['label-mute']['ko-kr'] = "무음";
@ -724,7 +698,6 @@ $text['label-hand_raised']['ro-ro'] = "Mâna Ridicată";
$text['label-hand_raised']['ru-ru'] = "Поднятая рука"; $text['label-hand_raised']['ru-ru'] = "Поднятая рука";
$text['label-hand_raised']['sv-se'] = "Upphöjd hand"; $text['label-hand_raised']['sv-se'] = "Upphöjd hand";
$text['label-hand_raised']['uk-ua'] = "Піднята рука"; $text['label-hand_raised']['uk-ua'] = "Піднята рука";
$text['label-hand_raised']['tr-tr'] = "El Kaldırıldı";
$text['label-hand_raised']['zh-cn'] = "举手"; $text['label-hand_raised']['zh-cn'] = "举手";
$text['label-hand_raised']['ja-jp'] = "挙手"; $text['label-hand_raised']['ja-jp'] = "挙手";
$text['label-hand_raised']['ko-kr'] = "제기 손"; $text['label-hand_raised']['ko-kr'] = "제기 손";
@ -751,7 +724,6 @@ $text['label-moderator']['ro-ro'] = "Moderator";
$text['label-moderator']['ru-ru'] = "Модератор"; $text['label-moderator']['ru-ru'] = "Модератор";
$text['label-moderator']['sv-se'] = "Värd"; $text['label-moderator']['sv-se'] = "Värd";
$text['label-moderator']['uk-ua'] = "Модератор"; $text['label-moderator']['uk-ua'] = "Модератор";
$text['label-moderator']['tr-tr'] = "Moderatör";
$text['label-moderator']['zh-cn'] = "版主"; $text['label-moderator']['zh-cn'] = "版主";
$text['label-moderator']['ja-jp'] = "モデレータ"; $text['label-moderator']['ja-jp'] = "モデレータ";
$text['label-moderator']['ko-kr'] = "중재자"; $text['label-moderator']['ko-kr'] = "중재자";
@ -778,7 +750,6 @@ $text['label-message']['ro-ro'] = "Mesaj";
$text['label-message']['ru-ru'] = "Сообщение"; $text['label-message']['ru-ru'] = "Сообщение";
$text['label-message']['sv-se'] = "Meddelande"; $text['label-message']['sv-se'] = "Meddelande";
$text['label-message']['uk-ua'] = "Повідомлення"; $text['label-message']['uk-ua'] = "Повідомлення";
$text['label-message']['tr-tr'] = "Mesaj";
$text['label-message']['zh-cn'] = "信息"; $text['label-message']['zh-cn'] = "信息";
$text['label-message']['ja-jp'] = "メッセージ"; $text['label-message']['ja-jp'] = "メッセージ";
$text['label-message']['ko-kr'] = "메시지"; $text['label-message']['ko-kr'] = "메시지";
@ -799,13 +770,12 @@ $text['label-members']['it-it'] = "Membri";
$text['label-members']['ka-ge'] = "მონაწილე"; $text['label-members']['ka-ge'] = "მონაწილე";
$text['label-members']['nl-nl'] = "Deelnemers"; $text['label-members']['nl-nl'] = "Deelnemers";
$text['label-members']['pl-pl'] = "Uczestnicy"; $text['label-members']['pl-pl'] = "Uczestnicy";
$text['label-members']['pt-br'] = "Membros"; $text['label-members']['pt-br'] = "Total";
$text['label-members']['pt-pt'] = "Deputados"; $text['label-members']['pt-pt'] = "Deputados";
$text['label-members']['ro-ro'] = "Membrii"; $text['label-members']['ro-ro'] = "Membrii";
$text['label-members']['ru-ru'] = "Участники"; $text['label-members']['ru-ru'] = "Участники";
$text['label-members']['sv-se'] = "Deltagare"; $text['label-members']['sv-se'] = "Deltagare";
$text['label-members']['uk-ua'] = "Учасники"; $text['label-members']['uk-ua'] = "Учасники";
$text['label-members']['tr-tr'] = "Üyeler";
$text['label-members']['zh-cn'] = "成员"; $text['label-members']['zh-cn'] = "成员";
$text['label-members']['ja-jp'] = "メンバー"; $text['label-members']['ja-jp'] = "メンバー";
$text['label-members']['ko-kr'] = "회원"; $text['label-members']['ko-kr'] = "회원";
@ -832,7 +802,6 @@ $text['label-member-count']['ro-ro'] = "Număr de membri";
$text['label-member-count']['ru-ru'] = "Количество участников"; $text['label-member-count']['ru-ru'] = "Количество участников";
$text['label-member-count']['sv-se'] = "Antal Deltagare"; $text['label-member-count']['sv-se'] = "Antal Deltagare";
$text['label-member-count']['uk-ua'] = "Кількість учасиків"; $text['label-member-count']['uk-ua'] = "Кількість учасиків";
$text['label-member-count']['tr-tr'] = "Üye Sayısı";
$text['label-member-count']['zh-cn'] = "会员人数"; $text['label-member-count']['zh-cn'] = "会员人数";
$text['label-member-count']['ja-jp'] = "メンバー数"; $text['label-member-count']['ja-jp'] = "メンバー数";
$text['label-member-count']['ko-kr'] = "회원 수"; $text['label-member-count']['ko-kr'] = "회원 수";
@ -859,7 +828,6 @@ $text['label-lock']['ro-ro'] = "Lacăt";
$text['label-lock']['ru-ru'] = "Заблокировать"; $text['label-lock']['ru-ru'] = "Заблокировать";
$text['label-lock']['sv-se'] = "Lås"; $text['label-lock']['sv-se'] = "Lås";
$text['label-lock']['uk-ua'] = "Блокувати"; $text['label-lock']['uk-ua'] = "Блокувати";
$text['label-lock']['tr-tr'] = "Kilit";
$text['label-lock']['zh-cn'] = ""; $text['label-lock']['zh-cn'] = "";
$text['label-lock']['ja-jp'] = "ロック"; $text['label-lock']['ja-jp'] = "ロック";
$text['label-lock']['ko-kr'] = "잠그다"; $text['label-lock']['ko-kr'] = "잠그다";
@ -879,14 +847,13 @@ $text['label-kick']['he-il'] = "בְּעִיטָה";
$text['label-kick']['it-it'] = "Espelli"; $text['label-kick']['it-it'] = "Espelli";
$text['label-kick']['ka-ge'] = "გაგდება"; $text['label-kick']['ka-ge'] = "გაგდება";
$text['label-kick']['nl-nl'] = "Er uittrappen"; $text['label-kick']['nl-nl'] = "Er uittrappen";
$text['label-kick']['pl-pl'] = "Rzut"; $text['label-kick']['pl-pl'] = "Kick ";
$text['label-kick']['pt-br'] = "Ejetar"; $text['label-kick']['pt-br'] = "Ejetar";
$text['label-kick']['pt-pt'] = "Ejectar"; $text['label-kick']['pt-pt'] = "Ejectar";
$text['label-kick']['ro-ro'] = "Lovitură"; $text['label-kick']['ro-ro'] = "Lovitură";
$text['label-kick']['ru-ru'] = "Выкинуть"; $text['label-kick']['ru-ru'] = "Выкинуть";
$text['label-kick']['sv-se'] = "Sparka Ut"; $text['label-kick']['sv-se'] = "Sparka Ut";
$text['label-kick']['uk-ua'] = "удар ногою"; $text['label-kick']['uk-ua'] = "удар ногою";
$text['label-kick']['tr-tr'] = "Tekme atmak";
$text['label-kick']['zh-cn'] = ""; $text['label-kick']['zh-cn'] = "";
$text['label-kick']['ja-jp'] = "キック"; $text['label-kick']['ja-jp'] = "キック";
$text['label-kick']['ko-kr'] = "발 차기"; $text['label-kick']['ko-kr'] = "발 차기";
@ -913,7 +880,6 @@ $text['label-joined']['ro-ro'] = "S-a alăturat";
$text['label-joined']['ru-ru'] = "Подключился"; $text['label-joined']['ru-ru'] = "Подключился";
$text['label-joined']['sv-se'] = "Blev medlem"; $text['label-joined']['sv-se'] = "Blev medlem";
$text['label-joined']['uk-ua'] = "Приєднався"; $text['label-joined']['uk-ua'] = "Приєднався";
$text['label-joined']['tr-tr'] = "Katıldı";
$text['label-joined']['zh-cn'] = "已加入"; $text['label-joined']['zh-cn'] = "已加入";
$text['label-joined']['ja-jp'] = "参加しました"; $text['label-joined']['ja-jp'] = "参加しました";
$text['label-joined']['ko-kr'] = "가입"; $text['label-joined']['ko-kr'] = "가입";
@ -940,7 +906,6 @@ $text['label-interactive']['ro-ro'] = "Conferință interactivă";
$text['label-interactive']['ru-ru'] = "Интерактивная конференция"; $text['label-interactive']['ru-ru'] = "Интерактивная конференция";
$text['label-interactive']['sv-se'] = "Interaktiv Konferens"; $text['label-interactive']['sv-se'] = "Interaktiv Konferens";
$text['label-interactive']['uk-ua'] = "Інтерактивна конференція"; $text['label-interactive']['uk-ua'] = "Інтерактивна конференція";
$text['label-interactive']['tr-tr'] = "Etkileşimli Konferans";
$text['label-interactive']['zh-cn'] = "互动会议"; $text['label-interactive']['zh-cn'] = "互动会议";
$text['label-interactive']['ja-jp'] = "インタラクティブな会議"; $text['label-interactive']['ja-jp'] = "インタラクティブな会議";
$text['label-interactive']['ko-kr'] = "인터랙티브 컨퍼런스"; $text['label-interactive']['ko-kr'] = "인터랙티브 컨퍼런스";
@ -967,7 +932,6 @@ $text['label-id']['ro-ro'] = "ID";
$text['label-id']['ru-ru'] = "ID"; $text['label-id']['ru-ru'] = "ID";
$text['label-id']['sv-se'] = "ID"; $text['label-id']['sv-se'] = "ID";
$text['label-id']['uk-ua'] = "ID"; $text['label-id']['uk-ua'] = "ID";
$text['label-id']['tr-tr'] = "ID";
$text['label-id']['zh-cn'] = "ID"; $text['label-id']['zh-cn'] = "ID";
$text['label-id']['ja-jp'] = "ID"; $text['label-id']['ja-jp'] = "ID";
$text['label-id']['ko-kr'] = "ID"; $text['label-id']['ko-kr'] = "ID";
@ -994,7 +958,6 @@ $text['label-hear']['ro-ro'] = "Auzi";
$text['label-hear']['ru-ru'] = "Слушать"; $text['label-hear']['ru-ru'] = "Слушать";
$text['label-hear']['sv-se'] = "Höra"; $text['label-hear']['sv-se'] = "Höra";
$text['label-hear']['uk-ua'] = "Почуйте"; $text['label-hear']['uk-ua'] = "Почуйте";
$text['label-hear']['tr-tr'] = "Duymak";
$text['label-hear']['zh-cn'] = "听到"; $text['label-hear']['zh-cn'] = "听到";
$text['label-hear']['ja-jp'] = "聞く"; $text['label-hear']['ja-jp'] = "聞く";
$text['label-hear']['ko-kr'] = "듣다"; $text['label-hear']['ko-kr'] = "듣다";
@ -1008,8 +971,8 @@ $text['label-gain']['de-de'] = "Verstärkung";
$text['label-gain']['el-gr'] = "Κέρδος"; $text['label-gain']['el-gr'] = "Κέρδος";
$text['label-gain']['es-cl'] = "Ganancia"; $text['label-gain']['es-cl'] = "Ganancia";
$text['label-gain']['es-mx'] = "Ganancia"; $text['label-gain']['es-mx'] = "Ganancia";
$text['label-gain']['fr-ca'] = "Gagner"; $text['label-gain']['fr-ca'] = "Gain";
$text['label-gain']['fr-fr'] = "Gagner"; $text['label-gain']['fr-fr'] = "Gain";
$text['label-gain']['he-il'] = "לְהַשִׂיג"; $text['label-gain']['he-il'] = "לְהַשִׂיג";
$text['label-gain']['it-it'] = "Guadagno"; $text['label-gain']['it-it'] = "Guadagno";
$text['label-gain']['ka-ge'] = "გაძლიერება"; $text['label-gain']['ka-ge'] = "გაძლიერება";
@ -1021,7 +984,6 @@ $text['label-gain']['ro-ro'] = "Câştig";
$text['label-gain']['ru-ru'] = "Усиление"; $text['label-gain']['ru-ru'] = "Усиление";
$text['label-gain']['sv-se'] = "Förstärka"; $text['label-gain']['sv-se'] = "Förstärka";
$text['label-gain']['uk-ua'] = "посилення"; $text['label-gain']['uk-ua'] = "посилення";
$text['label-gain']['tr-tr'] = "Kazanmak";
$text['label-gain']['zh-cn'] = "获得"; $text['label-gain']['zh-cn'] = "获得";
$text['label-gain']['ja-jp'] = ""; $text['label-gain']['ja-jp'] = "";
$text['label-gain']['ko-kr'] = "얻다"; $text['label-gain']['ko-kr'] = "얻다";
@ -1043,12 +1005,11 @@ $text['label-floor']['ka-ge'] = "აქვს იატაკი(Has Floor)";
$text['label-floor']['nl-nl'] = "Heeft het woord"; $text['label-floor']['nl-nl'] = "Heeft het woord";
$text['label-floor']['pl-pl'] = "Posiada piętro"; $text['label-floor']['pl-pl'] = "Posiada piętro";
$text['label-floor']['pt-br'] = "Derrubar"; $text['label-floor']['pt-br'] = "Derrubar";
$text['label-floor']['pt-pt'] = "Tem Piso"; $text['label-floor']['pt-pt'] = "Floor";
$text['label-floor']['ro-ro'] = "Are podea"; $text['label-floor']['ro-ro'] = "Are podea";
$text['label-floor']['ru-ru'] = "Имеет пол"; $text['label-floor']['ru-ru'] = "Has Floor";
$text['label-floor']['sv-se'] = "Har Ordet"; $text['label-floor']['sv-se'] = "Har Ordet";
$text['label-floor']['uk-ua'] = "Має Поверх"; $text['label-floor']['uk-ua'] = "Має Поверх";
$text['label-floor']['tr-tr'] = "Zemini Var";
$text['label-floor']['zh-cn'] = "有楼层"; $text['label-floor']['zh-cn'] = "有楼层";
$text['label-floor']['ja-jp'] = "床あり"; $text['label-floor']['ja-jp'] = "床あり";
$text['label-floor']['ko-kr'] = "바닥 있음"; $text['label-floor']['ko-kr'] = "바닥 있음";
@ -1075,7 +1036,6 @@ $text['label-energy']['ro-ro'] = "Energie";
$text['label-energy']['ru-ru'] = "Энергия"; $text['label-energy']['ru-ru'] = "Энергия";
$text['label-energy']['sv-se'] = "Energi"; $text['label-energy']['sv-se'] = "Energi";
$text['label-energy']['uk-ua'] = "Енергія"; $text['label-energy']['uk-ua'] = "Енергія";
$text['label-energy']['tr-tr'] = "Enerji";
$text['label-energy']['zh-cn'] = "活力"; $text['label-energy']['zh-cn'] = "活力";
$text['label-energy']['ja-jp'] = "エネルギー"; $text['label-energy']['ja-jp'] = "エネルギー";
$text['label-energy']['ko-kr'] = "에너지"; $text['label-energy']['ko-kr'] = "에너지";
@ -1102,7 +1062,6 @@ $text['label-end-conference']['ro-ro'] = "Încheierea conferinței";
$text['label-end-conference']['ru-ru'] = "Закончить конференцию"; $text['label-end-conference']['ru-ru'] = "Закончить конференцию";
$text['label-end-conference']['sv-se'] = "Avsluta Konferens"; $text['label-end-conference']['sv-se'] = "Avsluta Konferens";
$text['label-end-conference']['uk-ua'] = "Завершити конференцію"; $text['label-end-conference']['uk-ua'] = "Завершити конференцію";
$text['label-end-conference']['tr-tr'] = "Konferans Sonu";
$text['label-end-conference']['zh-cn'] = "结束会议"; $text['label-end-conference']['zh-cn'] = "结束会议";
$text['label-end-conference']['ja-jp'] = "会議終了"; $text['label-end-conference']['ja-jp'] = "会議終了";
$text['label-end-conference']['ko-kr'] = "컨퍼런스 종료"; $text['label-end-conference']['ko-kr'] = "컨퍼런스 종료";
@ -1126,10 +1085,9 @@ $text['label-deaf']['pl-pl'] = "Głuchy";
$text['label-deaf']['pt-br'] = "Ensurdecer "; $text['label-deaf']['pt-br'] = "Ensurdecer ";
$text['label-deaf']['pt-pt'] = "Ensurdecer"; $text['label-deaf']['pt-pt'] = "Ensurdecer";
$text['label-deaf']['ro-ro'] = "Surd"; $text['label-deaf']['ro-ro'] = "Surd";
$text['label-deaf']['ru-ru'] = "Глухой"; $text['label-deaf']['ru-ru'] = "Deaf";
$text['label-deaf']['sv-se'] = "Hör inte"; $text['label-deaf']['sv-se'] = "Hör inte";
$text['label-deaf']['uk-ua'] = "Глухий"; $text['label-deaf']['uk-ua'] = "Глухий";
$text['label-deaf']['tr-tr'] = "Sağır";
$text['label-deaf']['zh-cn'] = ""; $text['label-deaf']['zh-cn'] = "";
$text['label-deaf']['ja-jp'] = "聴覚障がい"; $text['label-deaf']['ja-jp'] = "聴覚障がい";
$text['label-deaf']['ko-kr'] = "청각 장애인"; $text['label-deaf']['ko-kr'] = "청각 장애인";
@ -1156,7 +1114,6 @@ $text['label-cid-num']['ro-ro'] = "Număr CID";
$text['label-cid-num']['ru-ru'] = "Номер Caller ID"; $text['label-cid-num']['ru-ru'] = "Номер Caller ID";
$text['label-cid-num']['sv-se'] = "CID, nummerpresentation"; $text['label-cid-num']['sv-se'] = "CID, nummerpresentation";
$text['label-cid-num']['uk-ua'] = "CID Номер"; $text['label-cid-num']['uk-ua'] = "CID Номер";
$text['label-cid-num']['tr-tr'] = "CID Numarası";
$text['label-cid-num']['zh-cn'] = "来电号码"; $text['label-cid-num']['zh-cn'] = "来电号码";
$text['label-cid-num']['ja-jp'] = "CID 番号"; $text['label-cid-num']['ja-jp'] = "CID 番号";
$text['label-cid-num']['ko-kr'] = "CID 번호"; $text['label-cid-num']['ko-kr'] = "CID 번호";
@ -1183,7 +1140,6 @@ $text['label-cid-name']['ro-ro'] = "Nume CID";
$text['label-cid-name']['ru-ru'] = "CID Имя"; $text['label-cid-name']['ru-ru'] = "CID Имя";
$text['label-cid-name']['sv-se'] = "CID, Namnpresentation"; $text['label-cid-name']['sv-se'] = "CID, Namnpresentation";
$text['label-cid-name']['uk-ua'] = "CID Ім’я"; $text['label-cid-name']['uk-ua'] = "CID Ім’я";
$text['label-cid-name']['tr-tr'] = "CID Adı";
$text['label-cid-name']['zh-cn'] = "客户ID名称"; $text['label-cid-name']['zh-cn'] = "客户ID名称";
$text['label-cid-name']['ja-jp'] = "CID名"; $text['label-cid-name']['ja-jp'] = "CID名";
$text['label-cid-name']['ko-kr'] = "CID 이름"; $text['label-cid-name']['ko-kr'] = "CID 이름";
@ -1210,7 +1166,6 @@ $text['label-capabilities']['ro-ro'] = "Capabilități";
$text['label-capabilities']['ru-ru'] = "Возможности"; $text['label-capabilities']['ru-ru'] = "Возможности";
$text['label-capabilities']['sv-se'] = "Möjligheter"; $text['label-capabilities']['sv-se'] = "Möjligheter";
$text['label-capabilities']['uk-ua'] = "Можливості"; $text['label-capabilities']['uk-ua'] = "Можливості";
$text['label-capabilities']['tr-tr'] = "Yetenekler";
$text['label-capabilities']['zh-cn'] = "能力"; $text['label-capabilities']['zh-cn'] = "能力";
$text['label-capabilities']['ja-jp'] = "機能"; $text['label-capabilities']['ja-jp'] = "機能";
$text['label-capabilities']['ko-kr'] = "기능"; $text['label-capabilities']['ko-kr'] = "기능";
@ -1237,7 +1192,6 @@ $text['description-interactive']['ro-ro'] = "Utilizați aceasta pentru a monitor
$text['description-interactive']['ru-ru'] = "Используйте это, чтобы наблюдать и взаимодействовать с участниками конференции."; $text['description-interactive']['ru-ru'] = "Используйте это, чтобы наблюдать и взаимодействовать с участниками конференции.";
$text['description-interactive']['sv-se'] = "Använd detta för att Monitorera och Interagera med deltagare i Konferensen"; $text['description-interactive']['sv-se'] = "Använd detta för att Monitorera och Interagera med deltagare i Konferensen";
$text['description-interactive']['uk-ua'] = "Використовуйте це для моніторингу та взаємодії з учасниками конференції."; $text['description-interactive']['uk-ua'] = "Використовуйте це для моніторингу та взаємодії з учасниками конференції.";
$text['description-interactive']['tr-tr'] = "Bunu konferans üyelerini izlemek ve onlarla etkileşim kurmak için kullanın.";
$text['description-interactive']['zh-cn'] = "使用它来监控会议成员并与之互动。"; $text['description-interactive']['zh-cn'] = "使用它来监控会议成员并与之互动。";
$text['description-interactive']['ja-jp'] = "これを使用して、会議のメンバーを監視したり、メンバーと対話したりできます。"; $text['description-interactive']['ja-jp'] = "これを使用して、会議のメンバーを監視したり、メンバーと対話したりできます。";
$text['description-interactive']['ko-kr'] = "이를 사용하여 회의 구성원을 모니터링하고 상호 작용합니다."; $text['description-interactive']['ko-kr'] = "이를 사용하여 회의 구성원을 모니터링하고 상호 작용합니다.";
@ -1264,7 +1218,6 @@ $text['description-active']['ro-ro'] = "Listați toate conferințele care sunt a
$text['description-active']['ru-ru'] = "Список всех активных конференций с по крайней мере одним участником."; $text['description-active']['ru-ru'] = "Список всех активных конференций с по крайней мере одним участником.";
$text['description-active']['sv-se'] = "Lista alla konferenser som för närvarande är aktiva med en eller flera medlemmar."; $text['description-active']['sv-se'] = "Lista alla konferenser som för närvarande är aktiva med en eller flera medlemmar.";
$text['description-active']['uk-ua'] = "Перелічіть усі активні конференції з одним або кількома учасниками."; $text['description-active']['uk-ua'] = "Перелічіть усі активні конференції з одним або кількома учасниками.";
$text['description-active']['tr-tr'] = "Şu anda bir veya daha fazla üyesi olan aktif tüm konferansları listeleyin.";
$text['description-active']['zh-cn'] = "列出当前有一名或多名成员参加的所有会议。"; $text['description-active']['zh-cn'] = "列出当前有一名或多名成员参加的所有会议。";
$text['description-active']['ja-jp'] = "1 人以上のメンバーと現在アクティブなすべての会議を一覧表示します。"; $text['description-active']['ja-jp'] = "1 人以上のメンバーと現在アクティブなすべての会議を一覧表示します。";
$text['description-active']['ko-kr'] = "현재 한 명 이상의 구성원과 함께 활성화된 모든 회의를 나열합니다."; $text['description-active']['ko-kr'] = "현재 한 명 이상의 구성원과 함께 활성화된 모든 회의를 나열합니다.";
@ -1291,7 +1244,6 @@ $text['button-stop-rec']['ro-ro'] = "Opriți înregistrarea";
$text['button-stop-rec']['ru-ru'] = "Остановить запись"; $text['button-stop-rec']['ru-ru'] = "Остановить запись";
$text['button-stop-rec']['sv-se'] = "Stoppa Inspelning"; $text['button-stop-rec']['sv-se'] = "Stoppa Inspelning";
$text['button-stop-rec']['uk-ua'] = "Зупинити"; $text['button-stop-rec']['uk-ua'] = "Зупинити";
$text['button-stop-rec']['tr-tr'] = "Kaydı Durdur";
$text['button-stop-rec']['zh-cn'] = "停止记录"; $text['button-stop-rec']['zh-cn'] = "停止记录";
$text['button-stop-rec']['ja-jp'] = "記録の停止"; $text['button-stop-rec']['ja-jp'] = "記録の停止";
$text['button-stop-rec']['ko-kr'] = "기록 중지"; $text['button-stop-rec']['ko-kr'] = "기록 중지";
@ -1310,7 +1262,7 @@ $text['button-start-rec']['fr-fr'] = "Commencer l'Enregistrement";
$text['button-start-rec']['he-il'] = "התחל להקליט"; $text['button-start-rec']['he-il'] = "התחל להקליט";
$text['button-start-rec']['it-it'] = "Avvia Registrazione"; $text['button-start-rec']['it-it'] = "Avvia Registrazione";
$text['button-start-rec']['ka-ge'] = "ჩაწერის დაწყება"; $text['button-start-rec']['ka-ge'] = "ჩაწერის დაწყება";
$text['button-start-rec']['nl-nl'] = "Startrecord"; $text['button-start-rec']['nl-nl'] = "Start opname";
$text['button-start-rec']['pl-pl'] = "Początek nagrywania"; $text['button-start-rec']['pl-pl'] = "Początek nagrywania";
$text['button-start-rec']['pt-br'] = "Iniciar gravação"; $text['button-start-rec']['pt-br'] = "Iniciar gravação";
$text['button-start-rec']['pt-pt'] = "Começar gravação"; $text['button-start-rec']['pt-pt'] = "Começar gravação";
@ -1318,7 +1270,6 @@ $text['button-start-rec']['ro-ro'] = "Începeți înregistrarea";
$text['button-start-rec']['ru-ru'] = "Включить запись"; $text['button-start-rec']['ru-ru'] = "Включить запись";
$text['button-start-rec']['sv-se'] = "Starta Inspelning"; $text['button-start-rec']['sv-se'] = "Starta Inspelning";
$text['button-start-rec']['uk-ua'] = "Записувати"; $text['button-start-rec']['uk-ua'] = "Записувати";
$text['button-start-rec']['tr-tr'] = "Kaydı Başlat";
$text['button-start-rec']['zh-cn'] = "开始录制"; $text['button-start-rec']['zh-cn'] = "开始录制";
$text['button-start-rec']['ja-jp'] = "記録開始"; $text['button-start-rec']['ja-jp'] = "記録開始";
$text['button-start-rec']['ko-kr'] = "기록 시작"; $text['button-start-rec']['ko-kr'] = "기록 시작";

View File

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

View File

@ -1793,31 +1793,6 @@ $text['message-uploaded']['zh-cn'] = "文件已上传";
$text['message-uploaded']['ja-jp'] = "ファイルがアップロードされました"; $text['message-uploaded']['ja-jp'] = "ファイルがアップロードされました";
$text['message-uploaded']['ko-kr'] = "업로드된 파일"; $text['message-uploaded']['ko-kr'] = "업로드된 파일";
$text['message-speed_dial_exists']['en-us'] = "Speed Dial Number Already Exists";
$text['message-speed_dial_exists']['en-gb'] = "Speed Dial Number Already Exists";
$text['message-speed_dial_exists']['ar-eg'] = "رقم الاتصال السريع موجود بالفعل";
$text['message-speed_dial_exists']['de-at'] = "Kurzwahlnummer existiert bereits";
$text['message-speed_dial_exists']['de-ch'] = "Kurzwahlnummer existiert bereits";
$text['message-speed_dial_exists']['de-de'] = "Kurzwahlnummer existiert bereits";
$text['message-speed_dial_exists']['es-cl'] = "El número de marcación rápida ya existe";
$text['message-speed_dial_exists']['es-mx'] = "El número de marcación rápida ya existe";
$text['message-speed_dial_exists']['fr-ca'] = "Le numéro abrégé existe déjà";
$text['message-speed_dial_exists']['fr-fr'] = "Le numéro de numérotation rapide existe déjà";
$text['message-speed_dial_exists']['he-il'] = "מספר חיוג מהיר כבר קיים";
$text['message-speed_dial_exists']['it-it'] = "Il numero di selezione rapida esiste già";
$text['message-speed_dial_exists']['ka-ge'] = "სწრაფი აკრეფის ნომერი უკვე არსებობს";
$text['message-speed_dial_exists']['nl-nl'] = "Snelkiesnummer bestaat al";
$text['message-speed_dial_exists']['pl-pl'] = "Numer szybkiego wybierania już istnieje";
$text['message-speed_dial_exists']['pt-br'] = "Número de discagem rápida já existe";
$text['message-speed_dial_exists']['pt-pt'] = "O número de marcação rápida já existe";
$text['message-speed_dial_exists']['ro-ro'] = "Numărul de apelare rapidă există deja";
$text['message-speed_dial_exists']['ru-ru'] = "Номер быстрого набора уже существует";
$text['message-speed_dial_exists']['sv-se'] = "Snabbuppringningsnummer finns redan";
$text['message-speed_dial_exists']['uk-ua'] = "Номер швидкого набору вже існує";
$text['message-speed_dial_exists']['zh-cn'] = "快速拨号号码已存在";
$text['message-speed_dial_exists']['ja-jp'] = "短縮ダイヤル番号は既に存在します";
$text['message-speed_dial_exists']['ko-kr'] = "단축번호가 이미 존재합니다";
$text['label-voice']['en-us'] = "Voice"; $text['label-voice']['en-us'] = "Voice";
$text['label-voice']['en-gb'] = "Voice"; $text['label-voice']['en-gb'] = "Voice";
$text['label-voice']['ar-eg'] = "صوت"; $text['label-voice']['ar-eg'] = "صوت";

View File

@ -29,7 +29,7 @@
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5"; $apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal"; $apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = ""; $apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/core/contacts/contacts.php"; $apps[$x]['menu'][$y]['path'] = "/app/contacts/contacts.php";
$apps[$x]['menu'][$y]['order'] = ""; $apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin";

View File

@ -131,7 +131,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = permissions::new(); $p = new permissions;
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

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

View File

@ -26,7 +26,6 @@
//includes files //includes files
require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
@ -35,7 +34,6 @@
//get attachment uuid //get attachment uuid
$contact_attachment_uuid = $_GET['id'] ?? ''; $contact_attachment_uuid = $_GET['id'] ?? '';
$action = $_GET['action'] ?? ''; $action = $_GET['action'] ?? '';
$session_id = $_GET['sid'] ?? '';
//get media //get media
if (!empty($contact_attachment_uuid) && is_uuid($contact_attachment_uuid)) { if (!empty($contact_attachment_uuid) && is_uuid($contact_attachment_uuid)) {
@ -44,7 +42,7 @@
$sql .= "where contact_attachment_uuid = :contact_attachment_uuid "; $sql .= "where contact_attachment_uuid = :contact_attachment_uuid ";
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) "; $sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['contact_attachment_uuid'] = $contact_attachment_uuid; $parameters['contact_attachment_uuid'] = $contact_attachment_uuid;
$parameters['domain_uuid'] = $_SESSION['domain_uuid']; $parameters['domain_uuid'] = $domain_uuid;
$database = new database; $database = new database;
$attachment = $database->select($sql, $parameters ?? null, 'row'); $attachment = $database->select($sql, $parameters ?? null, 'row');
unset($sql, $parameters); unset($sql, $parameters);
@ -53,7 +51,7 @@
//determine mime type //determine mime type
$content_type = 'application/octet-stream'; //set default $content_type = 'application/octet-stream'; //set default
$allowed_attachment_types = json_decode($_SESSION['contact']['allowed_attachment_types']['text'] ?? '', true); $allowed_attachment_types = json_decode($_SESSION['contacts']['allowed_attachment_types']['text'] ?? '', true);
if (!empty($allowed_attachment_types)) { if (!empty($allowed_attachment_types)) {
if ($allowed_attachment_types[$attachment_type] != '') { if ($allowed_attachment_types[$attachment_type] != '') {
$content_type = $allowed_attachment_types[$attachment_type]; $content_type = $allowed_attachment_types[$attachment_type];
@ -65,10 +63,6 @@
header("Content-type: ".$content_type."; charset=utf-8"); header("Content-type: ".$content_type."; charset=utf-8");
header("Content-Disposition: attachment; filename=\"".$attachment['attachment_filename']."\""); header("Content-Disposition: attachment; filename=\"".$attachment['attachment_filename']."\"");
header("Content-Length: ".strlen(base64_decode($attachment['attachment_content']))); header("Content-Length: ".strlen(base64_decode($attachment['attachment_content'])));
if (!empty($session_id)) {
header("Cache-Control: max-age=86400"); // 24h
header("Expires: ". gmdate('D, d M Y H:i:s \G\M\T', time() + 86400)); // 24h
}
echo base64_decode($attachment['attachment_content']); echo base64_decode($attachment['attachment_content']);
break; break;
case 'display': case 'display':
@ -84,4 +78,4 @@
} }
?> ?>

View File

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

View File

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

View File

@ -55,7 +55,7 @@
echo "<style>\n"; echo "<style>\n";
echo " #contact_attachment_layer {\n"; echo " #contact_attachment_layer {\n";
echo " z-index: 999999;\n"; echo " z-index: 999999;\n";
echo " position: fixed;\n"; echo " position: absolute;\n";
echo " left: 0px;\n"; echo " left: 0px;\n";
echo " top: 0px;\n"; echo " top: 0px;\n";
echo " right: 0px;\n"; echo " right: 0px;\n";

View File

@ -61,7 +61,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') {
if (isset($_REQUEST['signout'])) { if (isset($_REQUEST['signout'])) {
unset($_SESSION['contact_auth']['token']); unset($_SESSION['contact_auth']['token']);
message::add($text['message-google_signed_out']); message::add($text['message-google_signed_out']);
header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/core/contacts/".$_SESSION['contact_auth']['referer']); header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']);
exit; exit;
} }
@ -117,4 +117,4 @@ else {
exit; exit;
} }
?> ?>

View File

@ -92,7 +92,7 @@
//$contact_users = $_POST["contact_users"]; //$contact_users = $_POST["contact_users"];
//$contact_groups = $_POST["contact_groups"]; //$contact_groups = $_POST["contact_groups"];
$contact_user_uuid = filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN) ? ($_POST["contact_user_uuid"] ?? $_SESSION["user_uuid"]) : ($contact_user_uuid = $_POST["contact_user_uuid"] ?? null); $contact_user_uuid = ($_SESSION['contact']['permissions']['boolean'] == "true") ? ($_POST["contact_user_uuid"] ?? $_SESSION["user_uuid"]) : ($contact_user_uuid = $_POST["contact_user_uuid"] ?? null);
$contact_group_uuid = $_POST["contact_group_uuid"] ?? null; $contact_group_uuid = $_POST["contact_group_uuid"] ?? null;
$contact_phones = $_POST["contact_phones"]; $contact_phones = $_POST["contact_phones"];
@ -367,33 +367,7 @@
if (!empty($contact_phones)) { if (!empty($contact_phones)) {
foreach ($contact_phones as $row) { foreach ($contact_phones as $row) {
if (!empty($row['phone_number'])) { if (!empty($row['phone_number'])) {
//add the speed dial
//if speed dial number already exists, empty before save
if (!empty($row["phone_speed_dial"])) {
$phone_speed_dial_exists = false;
if (is_numeric($row["phone_speed_dial"])) {
$sql = "select count(contact_phone_uuid) ";
$sql .= "from v_contact_phones ";
$sql .= "where phone_speed_dial = :phone_speed_dial ";
$sql .= "and domain_uuid = :domain_uuid ";
if ($action == "update" && is_uuid($row["contact_phone_uuid"])) {
$sql .= "and contact_phone_uuid <> :contact_phone_uuid ";
$parameters['contact_phone_uuid'] = $row["contact_phone_uuid"];
}
$parameters['phone_speed_dial'] = $row["phone_speed_dial"];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
if (!empty($database->execute($sql, $parameters, 'column'))) {
$phone_speed_dial_exists = true;
}
unset($sql, $parameters);
}
if (!is_numeric($row["phone_speed_dial"]) || $phone_speed_dial_exists) {
message::add($text['message-speed_dial_exists'],'negative');
unset($row["phone_speed_dial"]);
}
}
$array['contacts'][0]['contact_phones'][$y]['domain_uuid'] = $_SESSION['domain_uuid']; $array['contacts'][0]['contact_phones'][$y]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['contacts'][0]['contact_phones'][$y]['contact_uuid'] = $contact_uuid; $array['contacts'][0]['contact_phones'][$y]['contact_uuid'] = $contact_uuid;
$array['contacts'][0]['contact_phones'][$y]['contact_phone_uuid'] = $row["contact_phone_uuid"]; $array['contacts'][0]['contact_phones'][$y]['contact_phone_uuid'] = $row["contact_phone_uuid"];
@ -522,17 +496,19 @@
$y = 0; $y = 0;
if (!empty($contact_attachments)) { if (!empty($contact_attachments)) {
foreach ($contact_attachments as $row) { foreach ($contact_attachments as $row) {
$array['contacts'][0]['contact_attachments'][$y]['contact_attachment_uuid'] = $row["contact_attachment_uuid"]; if (!empty($row['attachment_description'])) {
$array['contacts'][0]['contact_attachments'][$y]['domain_uuid'] = $row["domain_uuid"]; $array['contacts'][0]['contact_attachments'][$y]['contact_attachment_uuid'] = $row["contact_attachment_uuid"];
$array['contacts'][0]['contact_attachments'][$y]['contact_uuid'] = $row["contact_uuid"]; $array['contacts'][0]['contact_attachments'][$y]['domain_uuid'] = $row["domain_uuid"];
$array['contacts'][0]['contact_attachments'][$y]['attachment_primary'] = $row["attachment_primary"]; $array['contacts'][0]['contact_attachments'][$y]['contact_uuid'] = $row["contact_uuid"];
//$array['contacts'][0]['contact_attachments'][$y]['attachment_filename'] = $row["attachment_filename"]; $array['contacts'][0]['contact_attachments'][$y]['attachment_primary'] = $row["attachment_primary"];
//$array['contacts'][0]['contact_attachments'][$y]['attachment_content'] = $row["attachment_content"]; //$array['contacts'][0]['contact_attachments'][$y]['attachment_filename'] = $row["attachment_filename"];
$array['contacts'][0]['contact_attachments'][$y]['attachment_description'] = $row["attachment_description"] ?? null; //$array['contacts'][0]['contact_attachments'][$y]['attachment_content'] = $row["attachment_content"];
//$array['contacts'][0]['contact_attachments'][$y]['attachment_uploaded_date'] = $row["attachment_uploaded_date"]; $array['contacts'][0]['contact_attachments'][$y]['attachment_description'] = $row["attachment_description"];
//$array['contacts'][0]['contact_attachments'][$y]['attachment_uploaded_user_uuid'] = $row["attachment_uploaded_user_uuid"]; //$array['contacts'][0]['contact_attachments'][$y]['attachment_uploaded_date'] = $row["attachment_uploaded_date"];
//$array['contacts'][0]['contact_attachments'][$y]['attachment_size'] = $row["attachment_size"]; //$array['contacts'][0]['contact_attachments'][$y]['attachment_uploaded_user_uuid'] = $row["attachment_uploaded_user_uuid"];
$y++; //$array['contacts'][0]['contact_attachments'][$y]['attachment_size'] = $row["attachment_size"];
$y++;
}
} }
} }
@ -569,7 +545,7 @@
//save the data //save the data
if (!empty($array)) { if (!empty($array)) {
//add the permission object //add the permission object
$p = permissions::new(); $p = new permissions;
$p->add('contact_add', 'temp'); $p->add('contact_add', 'temp');
$p->add('contact_phone_add', 'temp'); $p->add('contact_phone_add', 'temp');
$p->add('contact_address_add', 'temp'); $p->add('contact_address_add', 'temp');
@ -989,10 +965,10 @@
} }
}; };
if (search) { if (search) {
xhttp.open("GET", "/core/contacts/contact_json.php?search="+search, true); xhttp.open("GET", "/app/contacts/contact_json.php?search="+search, true);
} }
else { else {
xhttp.open("GET", "/core/contacts/contact_json.php", true); xhttp.open("GET", "/app/contacts/contact_json.php", true);
} }
xhttp.send(); xhttp.send();
} }
@ -1037,7 +1013,7 @@
echo "<style>"; echo "<style>";
echo " #qr_code_container {"; echo " #qr_code_container {";
echo " z-index: 999999; "; echo " z-index: 999999; ";
echo " position: fixed; "; echo " position: absolute; ";
echo " left: 0; "; echo " left: 0; ";
echo " top: 0; "; echo " top: 0; ";
echo " right: 0; "; echo " right: 0; ";
@ -1047,24 +1023,18 @@
echo " }"; echo " }";
echo " #qr_code {"; echo " #qr_code {";
echo " display: block; "; echo " display: block; ";
echo " width: 100%; "; echo " width: 650px; ";
echo " max-width: 650px; "; echo " height: 650px; ";
echo " height: auto; ";
echo " -webkit-box-shadow: 0px 1px 20px #888; "; echo " -webkit-box-shadow: 0px 1px 20px #888; ";
echo " -moz-box-shadow: 0px 1px 20px #888; "; echo " -moz-box-shadow: 0px 1px 20px #888; ";
echo " box-shadow: 0px 1px 20px #888;"; echo " box-shadow: 0px 1px 20px #888;";
echo " }"; echo " }";
echo " #qr_code > img {";
echo " width: 100%; ";
echo " max-width: 650px; ";
echo " height: auto; ";
echo " }";
echo "</style>"; echo "</style>";
echo "<script src='".PROJECT_PATH."/resources/jquery/jquery-qrcode.min.js'></script>"; echo "<script src='".PROJECT_PATH."/resources/jquery/jquery-qrcode.min.js'></script>";
echo "<script language='JavaScript' type='text/javascript'>"; echo "<script language='JavaScript' type='text/javascript'>";
echo " $(document).ready(function() {"; echo " $(document).ready(function() {";
echo " $('#qr_code').qrcode({ "; echo " $('#qr_code').qrcode({ ";
echo " render: 'image', "; echo " render: 'canvas', ";
echo " minVersion: 6, "; echo " minVersion: 6, ";
echo " maxVersion: 40, "; echo " maxVersion: 40, ";
echo " ecLevel: 'H', "; echo " ecLevel: 'H', ";
@ -1082,23 +1052,6 @@
echo " });"; echo " });";
echo "</script>"; echo "</script>";
//styles and attachment viewing layer
if (permission_exists('contact_attachment_view') && !empty($contact_attachments) && is_array($contact_attachments)) {
echo "<style>\n";
echo " #contact_attachment_layer {\n";
echo " z-index: 999999;\n";
echo " position: fixed;\n";
echo " left: 0px;\n";
echo " top: 0px;\n";
echo " right: 0px;\n";
echo " bottom: 0px;\n";
echo " text-align: center;\n";
echo " vertical-align: middle;\n";
echo " }\n";
echo "</style>\n";
echo "<div id='contact_attachment_layer' style='display: none;'></div>\n";
}
//show the content //show the content
echo "<form name='frm' id='frm' method='post' action=''>\n"; echo "<form name='frm' id='frm' method='post' action=''>\n";
echo "<input class='formfld' type='hidden' name='contact_uuid' value='".escape($contact_uuid)."'>\n"; echo "<input class='formfld' type='hidden' name='contact_uuid' value='".escape($contact_uuid)."'>\n";
@ -1529,7 +1482,7 @@ echo " </div>\n";
echo " </div>\n"; echo " </div>\n";
unset($contact_note); unset($contact_note);
if (filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) { if ($_SESSION['contact']['permissions']['boolean'] == "true") {
if (permission_exists('contact_user_view') || permission_exists('contact_group_view')) { if (permission_exists('contact_user_view') || permission_exists('contact_group_view')) {
echo " <div class='form_set card'>\n"; echo " <div class='form_set card'>\n";
echo " <div class='heading'>\n"; echo " <div class='heading'>\n";
@ -1574,7 +1527,7 @@ if (filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_V
} }
if (permission_exists('contact_user_add')) { if (permission_exists('contact_user_add')) {
echo " <div class='vtable' style='border-bottom: none;'>\n"; echo " <div class='vtable' style='border-bottom: none;'>\n";
echo " <select name='contact_user_uuid' class='formfld' style='width: 112px;'>\n"; echo " <select name='contact_user_uuid' class='formfld' style='width: auto;'>\n";
echo " <option value=''></option>\n"; echo " <option value=''></option>\n";
foreach ($users as $field) { foreach ($users as $field) {
if (!empty($contact_users_assigned) && in_array($field['user_uuid'], array_column($contact_users_assigned, 'user_uuid'))) { continue; } //skip users already assigned if (!empty($contact_users_assigned) && in_array($field['user_uuid'], array_column($contact_users_assigned, 'user_uuid'))) { continue; } //skip users already assigned
@ -1632,7 +1585,7 @@ if (filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_V
if (permission_exists('contact_group_add')) { if (permission_exists('contact_group_add')) {
if (!empty($contact_groups_available)) { if (!empty($contact_groups_available)) {
echo " <div class='vtable' style='border-bottom: none;'>\n"; echo " <div class='vtable' style='border-bottom: none;'>\n";
echo " <select name='contact_group_uuid' class='formfld' style='width: 112px;'>\n"; echo " <select name='contact_group_uuid' class='formfld' style='width: auto; margin-right: 3px;'>\n";
echo " <option value=''></option>\n"; echo " <option value=''></option>\n";
foreach ($contact_groups_available as $field) { foreach ($contact_groups_available as $field) {
if ($field['group_name'] == "superadmin" && !if_group("superadmin")) { continue; } //only show superadmin group to superadmins if ($field['group_name'] == "superadmin" && !if_group("superadmin")) { continue; } //only show superadmin group to superadmins
@ -1788,10 +1741,10 @@ if (permission_exists('contact_phone_view')) {
echo " <div class='label'>\n"; echo " <div class='label'>\n";
echo " ".$text['label-phone_type']."\n"; echo " ".$text['label-phone_type']."\n";
echo " </div>\n"; echo " </div>\n";
echo " <div class='field no-wrap' style='display: flex; flex-wrap: wrap; gap: 3px;'>\n"; echo " <div class='field no-wrap'>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_voice]' id='phone_type_voice' value='1' ".(($row['phone_type_voice']) ? "checked='checked'" : null)."> ".$text['label-voice']."</label>\n"; echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_voice]' id='phone_type_voice' value='1' ".(($row['phone_type_voice']) ? "checked='checked'" : null)."> ".$text['label-voice']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_fax]' id='phone_type_fax' value='1' ".(($row['phone_type_fax']) ? "checked='checked'" : null)."> ".$text['label-fax']."</label>\n"; echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_fax]' id='phone_type_fax' value='1' ".(($row['phone_type_fax']) ? "checked='checked'" : null)."> ".$text['label-fax']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_video]' id='phone_type_video' value='1' ".(($row['phone_type_video']) ? "checked='checked'" : null)."> ".$text['label-video']."</label>\n"; echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_video]' id='phone_type_video' value='1' ".(($row['phone_type_video']) ? "checked='checked'" : null)."> ".$text['label-video']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_text]' id='phone_type_text' value='1' ".(($row['phone_type_text']) ? "checked='checked'" : null)."> ".$text['label-text']."</label>\n"; echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_text]' id='phone_type_text' value='1' ".(($row['phone_type_text']) ? "checked='checked'" : null)."> ".$text['label-text']."</label>\n";
echo " <br />\n"; echo " <br />\n";
//echo $text['description-phone_type']."\n"; //echo $text['description-phone_type']."\n";
@ -2348,7 +2301,7 @@ if (permission_exists('contact_relation_view')) {
$x = 0; $x = 0;
foreach($contact_relations as $row) { foreach($contact_relations as $row) {
//get contact details and contact_name //get contact details and contact_name
$sql = "select contact_uuid, contact_organization, contact_name_given, contact_name_family, contact_nickname "; $sql = "select contact_uuid, contact_organization, contact_name_given, contact_name_family, contact_nickname ";
$sql .= "from v_contacts "; $sql .= "from v_contacts ";
@ -2592,6 +2545,21 @@ if (permission_exists('contact_attachment_view')) {
} }
echo " </div>\n"; echo " </div>\n";
//styles and attachment layer
echo "<style>\n";
echo " #contact_attachment_layer {\n";
echo " z-index: 999999;\n";
echo " position: absolute;\n";
echo " left: 0px;\n";
echo " top: 0px;\n";
echo " right: 0px;\n";
echo " bottom: 0px;\n";
echo " text-align: center;\n";
echo " vertical-align: middle;\n";
echo " }\n";
echo "</style>\n";
echo "<div id='contact_attachment_layer' style='display: none;'></div>\n";
//script //script
echo "<script>\n"; echo "<script>\n";
echo " function display_attachment(id) {\n"; echo " function display_attachment(id) {\n";
@ -2609,7 +2577,7 @@ if (permission_exists('contact_attachment_view')) {
//if ($action == 'update') { //if ($action == 'update') {
echo "<input type='hidden' name='attachment_filename' value=\"".escape($row['attachment_filename'])."\">\n"; echo "<input type='hidden' name='attachment_filename' value=\"".escape($row['attachment_filename'])."\">\n";
if ($attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png') { if ($attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png') {
echo "<img src='data:image/".$attachment_type.";base64,".escape($row['attachment_content'])."' style='border: none; cursor: pointer; width: 100%; height: auto;' onclick=\"display_attachment('".escape($row['contact_attachment_uuid'])."');\">"; echo "<img src='data:image/".$attachment_type.";base64,".escape($row['attachment_content'])."' style='border: none; max-width: 220px; max-height: 220px;' oncontextmenu=\"window.open('contact_attachment.php?id=".escape($row['contact_attachment_uuid'])."&action=download'); return false;\">";
} }
else { else {
echo "<a href='contact_attachment.php?id=".escape($row['contact_attachment_uuid'])."&action=download' style='font-size: 120%;'>".escape($row['attachment_filename'])."</a>"; echo "<a href='contact_attachment.php?id=".escape($row['contact_attachment_uuid'])."&action=download' style='font-size: 120%;'>".escape($row['attachment_filename'])."</a>";
@ -2646,7 +2614,7 @@ if (permission_exists('contact_attachment_view')) {
echo " </select>\n"; echo " </select>\n";
echo " </div>\n"; echo " </div>\n";
echo " <div class='label'>\n"; echo " <div class='label required'>\n";
echo " ".$text['label-description']."\n"; echo " ".$text['label-description']."\n";
echo " </div>\n"; echo " </div>\n";
echo " <div class='field no-wrap'>\n"; echo " <div class='field no-wrap'>\n";
@ -2719,9 +2687,8 @@ if (permission_exists('contact_note_view')) {
$x = 0; $x = 0;
foreach($contact_notes as $row) { foreach($contact_notes as $row) {
$contact_note = $row['contact_note']; $contact_note = $row['contact_note'];
if (!empty($contact_note)) { $contact_note = escape($contact_note);
$contact_note = htmlspecialcars($contact_note, ENT_QUOTES, 'UTF-8'); $contact_note = str_replace("\n","<br />",$contact_note);
}
if (permission_exists('contact_note_add')) { if (permission_exists('contact_note_add')) {
$list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']); $list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']);
} }

View File

@ -112,7 +112,7 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = permissions::new(); $p = new permissions;
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;
@ -239,7 +239,6 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
} }
echo "<br /><br />\n"; echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
@ -312,7 +311,6 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
echo "</tr>\n"; echo "</tr>\n";
echo "</table>"; echo "</table>";
echo "</div>\n";
echo "<br><br>"; echo "<br><br>";
echo "<input type='hidden' name='contact_uuid' value='".escape($contact_uuid ?? '')."'>\n"; echo "<input type='hidden' name='contact_uuid' value='".escape($contact_uuid ?? '')."'>\n";

View File

@ -38,7 +38,7 @@
} }
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the contact list //get the contact list
$sql = "select * from v_contact_emails "; $sql = "select * from v_contact_emails ";
@ -71,7 +71,7 @@
echo "<th class='pct-15'>".$text['label-email_label']."</th>\n"; echo "<th class='pct-15'>".$text['label-email_label']."</th>\n";
echo "<th>".$text['label-email_address']."</th>\n"; echo "<th>".$text['label-email_address']."</th>\n";
echo "<th class='hide-md-dn'>".$text['label-email_description']."</th>\n"; echo "<th class='hide-md-dn'>".$text['label-email_description']."</th>\n";
if (permission_exists('contact_email_edit') && $list_row_edit_button) { if (permission_exists('contact_email_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -79,12 +79,8 @@
if (!empty($contact_emails)) { if (!empty($contact_emails)) {
$x = 0; $x = 0;
foreach ($contact_emails as $row) { foreach ($contact_emails as $row) {
$list_row_url = '';
if (permission_exists('contact_email_edit')) { if (permission_exists('contact_email_edit')) {
$list_row_url = "contact_email_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_email_uuid']); $list_row_url = "contact_email_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_email_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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_email_delete')) { if (permission_exists('contact_email_delete')) {
@ -96,7 +92,7 @@
echo " <td>".escape($row['email_label'])." ".($row['email_primary'] ? "&nbsp;<i class='fas fa-star fa-xs' style='float: right; margin-top: 0.5em; margin-right: -0.5em;' title=\"".$text['label-primary']."\"></i>" : null)."</td>\n"; echo " <td>".escape($row['email_label'])." ".($row['email_primary'] ? "&nbsp;<i class='fas fa-star fa-xs' style='float: right; margin-top: 0.5em; margin-right: -0.5em;' title=\"".$text['label-primary']."\"></i>" : null)."</td>\n";
echo " <td class='no-link'><a href='mailto:".escape($row['email_address'])."'>".escape($row['email_address'])."</a>&nbsp;</td>\n"; echo " <td class='no-link'><a href='mailto:".escape($row['email_address'])."'>".escape($row['email_address'])."</a>&nbsp;</td>\n";
echo " <td class='description overflow hide-md-dn'>".escape($row['email_description'])."&nbsp;</td>\n"; echo " <td class='description overflow hide-md-dn'>".escape($row['email_description'])."&nbsp;</td>\n";
if (permission_exists('contact_email_edit') && $list_row_edit_button) { if (permission_exists('contact_email_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n"; 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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -114,4 +110,3 @@
} }
?> ?>

View File

@ -38,7 +38,7 @@
} }
//set from session variables //set from session variables
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL); $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the extension list //get the extension list
$sql = "select e.extension_uuid, e.extension, e.enabled, e.description "; $sql = "select e.extension_uuid, e.extension, e.enabled, e.description ";
@ -69,7 +69,7 @@
echo "<th>".$text['label-extension']."</th>\n"; echo "<th>".$text['label-extension']."</th>\n";
echo "<th class='center'>".$text['label-enabled']."</th>\n"; echo "<th class='center'>".$text['label-enabled']."</th>\n";
echo "<th class='hide-md-dn'>".$text['label-description']."</th>\n"; echo "<th class='hide-md-dn'>".$text['label-description']."</th>\n";
if (permission_exists('extension_edit') && $list_row_edit_button) { if (permission_exists('extension_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n"; echo " <td class='action-button'>&nbsp;</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
@ -77,12 +77,8 @@
if (!empty($contact_extensions)) { if (!empty($contact_extensions)) {
$x = 0; $x = 0;
foreach ($contact_extensions as $row) { foreach ($contact_extensions as $row) {
$list_row_url = '';
if (permission_exists('extension_edit')) { if (permission_exists('extension_edit')) {
$list_row_url = PROJECT_PATH.'/app/extensions/extension_edit.php?id='.urlencode($row['extension_uuid']); $list_row_url = PROJECT_PATH.'/app/extensions/extension_edit.php?id='.urlencode($row['extension_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."' ".($row['url_primary'] ? "style='font-weight: bold;'" : null).">\n"; echo "<tr class='list-row' href='".$list_row_url."' ".($row['url_primary'] ? "style='font-weight: bold;'" : null).">\n";
echo " <td>"; echo " <td>";
@ -95,7 +91,7 @@
echo " </td>\n"; echo " </td>\n";
echo " <td class='center'>".$text['label-'.escape($row['enabled'])]."&nbsp;</td>\n"; echo " <td class='center'>".$text['label-'.escape($row['enabled'])]."&nbsp;</td>\n";
echo " <td class='description overflow hide-md-dn'>".$row['description']."&nbsp;</td>\n"; echo " <td class='description overflow hide-md-dn'>".$row['description']."&nbsp;</td>\n";
if (permission_exists('extension_edit') && $list_row_edit_button) { if (permission_exists('extension_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n"; 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 button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n"; echo " </td>\n";
@ -113,4 +109,3 @@
} }
?> ?>

View File

@ -92,7 +92,7 @@
//get the schema //get the schema
$x = 0; $x = 0;
include "core/contacts/app_config.php"; include "app/contacts/app_config.php";
$i = 0; $i = 0;
foreach ($apps[0]['db'] as $table) { foreach ($apps[0]['db'] as $table) {
//get the table name and parent name //get the table name and parent name
@ -149,7 +149,8 @@
} }
//create token //create token
$token = $token->create($_SERVER['PHP_SELF']); $object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//include header //include header
$document['title'] = $text['title-contacts_import']; $document['title'] = $text['title-contacts_import'];

View File

@ -107,7 +107,7 @@ if ($_POST['a'] == 'import') {
unset($duplicate_contact_uuid); unset($duplicate_contact_uuid);
//grant temporary permissions //grant temporary permissions
$p = permissions::new(); $p = new permissions;
$p->add('contact_delete', 'temp'); $p->add('contact_delete', 'temp');
//delete duplicate contact //delete duplicate contact

View File

@ -102,7 +102,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = permissions::new(); $p = new permissions;
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -82,12 +82,8 @@
$contact_note = $row['contact_note']; $contact_note = $row['contact_note'];
$contact_note = escape($contact_note); $contact_note = escape($contact_note);
$contact_note = str_replace("\n","<br />",$contact_note); $contact_note = str_replace("\n","<br />",$contact_note);
$list_row_url = '';
if (permission_exists('contact_note_add')) { if (permission_exists('contact_note_add')) {
$list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']); $list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_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"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_note_delete')) { if (permission_exists('contact_note_delete')) {
@ -116,4 +112,3 @@
} }
?> ?>

View File

@ -132,7 +132,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = permissions::new(); $p = new permissions;
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;
@ -155,32 +155,6 @@
unset($sql, $parameters); unset($sql, $parameters);
} }
//if speed dial number already exists, empty before save
if (!empty($phone_speed_dial)) {
$phone_speed_dial_exists = false;
if (is_numeric($phone_speed_dial)) {
$sql = "select count(contact_phone_uuid) ";
$sql .= "from v_contact_phones ";
$sql .= "where phone_speed_dial = :phone_speed_dial ";
$sql .= "and domain_uuid = :domain_uuid ";
if ($action == "update" && is_uuid($contact_phone_uuid)) {
$sql .= "and contact_phone_uuid <> :contact_phone_uuid ";
$parameters['contact_phone_uuid'] = $contact_phone_uuid;
}
$parameters['phone_speed_dial'] = $phone_speed_dial;
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
if (!empty($database->execute($sql, $parameters, 'column'))) {
$phone_speed_dial_exists = true;
}
unset($sql, $parameters);
}
if (!is_numeric($phone_speed_dial) || $phone_speed_dial_exists) {
message::add($text['message-speed_dial_exists'],'negative');
unset($phone_speed_dial);
}
}
//add the phone //add the phone
if ($action == "add" && permission_exists('contact_phone_add')) { if ($action == "add" && permission_exists('contact_phone_add')) {
$contact_phone_uuid = uuid(); $contact_phone_uuid = uuid();

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