Compare commits
No commits in common. "master" and "5.0.1" have entirely different histories.
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "";
|
||||
$apps[$x]['description']['nl-nl'] = "";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
|
|
|||
|
|
@ -17,12 +17,13 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
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 - 2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -38,18 +39,14 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//create the database connection
|
||||
$database = database::new();
|
||||
|
||||
//action add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$access_control_uuid = $_REQUEST["id"];
|
||||
$id = $_REQUEST["id"];
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
$access_control_uuid = uuid();
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
|
|
@ -61,15 +58,7 @@
|
|||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
|
||||
//enforce valid data
|
||||
if ($access_control_name == 'providers' || $access_control_name == 'domains') {
|
||||
$access_control_default = 'deny';
|
||||
}
|
||||
if ($access_control_default != 'allow' && $access_control_default != 'deny') {
|
||||
$access_control_default = 'deny';
|
||||
}
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
|
|
@ -80,7 +69,7 @@
|
|||
}
|
||||
|
||||
//process the http post data by submitted action
|
||||
if (!empty($_POST['action'])) {
|
||||
if ($_POST['action'] != '' && strlen($_POST['action']) > 0) {
|
||||
|
||||
//prepare the array(s)
|
||||
$x = 0;
|
||||
|
|
@ -96,17 +85,20 @@
|
|||
switch ($_POST['action']) {
|
||||
case 'copy':
|
||||
if (permission_exists('access_control_add')) {
|
||||
$database->copy($array);
|
||||
$obj = new database;
|
||||
$obj->copy($array);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
if (permission_exists('access_control_delete')) {
|
||||
$database->delete($array);
|
||||
$obj = new database;
|
||||
$obj->delete($array);
|
||||
}
|
||||
break;
|
||||
case 'toggle':
|
||||
if (permission_exists('access_control_update')) {
|
||||
$database->toggle($array);
|
||||
$obj = new database;
|
||||
$obj->toggle($array);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -118,7 +110,10 @@
|
|||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
event_socket::api("reloadacl");
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
header('Location: access_control_edit.php?id='.$id);
|
||||
|
|
@ -128,11 +123,11 @@
|
|||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (empty($access_control_name)) { $msg .= $text['message-required']." ".$text['label-access_control_name']."<br>\n"; }
|
||||
if (empty($access_control_default)) { $msg .= $text['message-required']." ".$text['label-access_control_default']."<br>\n"; }
|
||||
//if (empty($access_control_nodes)) { $msg .= $text['message-required']." ".$text['label-access_control_nodes']."<br>\n"; }
|
||||
//if (empty($access_control_description)) { $msg .= $text['message-required']." ".$text['label-access_control_description']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
if (strlen($access_control_name) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_name']."<br>\n"; }
|
||||
if (strlen($access_control_default) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_default']."<br>\n"; }
|
||||
//if (strlen($access_control_nodes) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_nodes']."<br>\n"; }
|
||||
//if (strlen($access_control_description) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -145,101 +140,45 @@
|
|||
return;
|
||||
}
|
||||
|
||||
//add the access_control_uuid
|
||||
if (!is_uuid($_POST["access_control_uuid"])) {
|
||||
$access_control_uuid = uuid();
|
||||
}
|
||||
|
||||
//prepare the array
|
||||
$array['access_controls'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$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_description'] = $access_control_description;
|
||||
$y = 0;
|
||||
if (!empty($access_control_nodes) && is_array($access_control_nodes)) {
|
||||
if (is_array($access_control_nodes)) {
|
||||
foreach ($access_control_nodes as $row) {
|
||||
|
||||
//validate the data
|
||||
if (!is_uuid($row["access_control_node_uuid"])) { continue; }
|
||||
if ($row["node_type"] != 'allow' && $row["node_type"] != 'deny') { continue; }
|
||||
if (isset($row["node_cidr"]) && $row["node_cidr"] != '') {
|
||||
|
||||
$cidr_array = explode("/", str_replace("\\", "/", $row["node_cidr"]));
|
||||
if (filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
|
||||
if (isset($cidr_array[1]) && is_numeric($cidr_array[1])) {
|
||||
//valid IPv4 address and cidr notation
|
||||
$node_cidr = $row["node_cidr"];
|
||||
}
|
||||
else {
|
||||
//valid IPv4 address add the missing cidr notation
|
||||
$node_cidr = $row["node_cidr"].'/32';
|
||||
}
|
||||
}
|
||||
else if(filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
|
||||
//valid IPv6 address
|
||||
$node_cidr = $row["node_cidr"];
|
||||
}
|
||||
|
||||
//build the sub array
|
||||
if (!empty($node_cidr)) {
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = $row["access_control_node_uuid"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $row["node_type"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $node_cidr;
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"];
|
||||
$y++;
|
||||
|
||||
//unset values
|
||||
unset($cidr_array, $node_cidr);
|
||||
}
|
||||
//digs to attempt
|
||||
else {
|
||||
$digs[] = [
|
||||
'type'=>$row['node_type'],
|
||||
'value'=>$row['node_cidr'],
|
||||
'description'=>$row['node_description'],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//attempt digs
|
||||
if (!empty($digs) && is_array($digs)) {
|
||||
foreach ($digs as $dig) {
|
||||
$response = shell_exec("dig +noall +answer ".escapeshellarg(str_replace(' ', '', $dig['value']))." | awk '{ print $5 }'");
|
||||
if (!empty($response)) {
|
||||
$lines = explode("\n", $response);
|
||||
foreach ($lines as $l => $line) {
|
||||
if (!empty($line) && filter_var($line, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
|
||||
//check for duplicate
|
||||
if (!empty($array['access_controls'][0]['access_control_nodes']) && is_array($array['access_controls'][0]['access_control_nodes'])) {
|
||||
foreach ($array['access_controls'][0]['access_control_nodes'] as $n => $node) {
|
||||
if ($node['node_cidr'] == $line.'/32') { continue 2; }
|
||||
}
|
||||
}
|
||||
//add to array
|
||||
$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_cidr'] = $line.'/32';
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = !empty($dig['description']) ? $dig['description'] : str_replace(' ', '', $dig['value']);
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen($row['node_type']) > 0) {
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = $row["access_control_node_uuid"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $row["node_type"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $row["node_cidr"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_domain'] = $row["node_domain"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"];
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//save the data
|
||||
if (is_array($array)) {
|
||||
$database->app_name = 'access controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
}
|
||||
$database = new database;
|
||||
$database->app_name = 'access controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
event_socket::async("reloadacl");
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
if (isset($action)) {
|
||||
|
|
@ -255,19 +194,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
//set default values
|
||||
$access_control_name = '';
|
||||
$access_control_default = '';
|
||||
$access_control_description = '';
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($access_control_uuid) && is_uuid($access_control_uuid) && empty($_POST["persistformvar"])) {
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
$sql = "select * from v_access_controls ";
|
||||
$sql .= "where access_control_uuid = :access_control_uuid ";
|
||||
$parameters['access_control_uuid'] = $access_control_uuid;
|
||||
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row) && count($row) > 0) {
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$access_control_name = $row["access_control_name"];
|
||||
$access_control_default = $row["access_control_default"];
|
||||
$access_control_description = $row["access_control_description"];
|
||||
|
|
@ -276,32 +210,34 @@
|
|||
}
|
||||
|
||||
//get the child data
|
||||
if (!empty($access_control_uuid) && is_uuid($access_control_uuid)) {
|
||||
if (is_uuid($access_control_uuid)) {
|
||||
$sql = "select * 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;
|
||||
$database = new database;
|
||||
$access_control_nodes = $database->select($sql, $parameters, 'all');
|
||||
unset ($sql, $parameters);
|
||||
}
|
||||
|
||||
//add the $access_control_node_uuid
|
||||
if (empty($access_control_node_uuid)) {
|
||||
if (!is_uuid($access_control_node_uuid)) {
|
||||
$access_control_node_uuid = uuid();
|
||||
}
|
||||
|
||||
//add an empty row
|
||||
if (!empty($access_control_nodes) && count($access_control_nodes) > 0) {
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) {
|
||||
$x = count($access_control_nodes);
|
||||
}
|
||||
else {
|
||||
$access_control_nodes = array();
|
||||
$x = 0;
|
||||
}
|
||||
$access_control_nodes[$x]['access_control_uuid'] = $access_control_uuid ?? '';
|
||||
$access_control_nodes[$x]['access_control_uuid'] = $access_control_uuid;
|
||||
$access_control_nodes[$x]['access_control_node_uuid'] = uuid();
|
||||
$access_control_nodes[$x]['node_type'] = '';
|
||||
$access_control_nodes[$x]['node_cidr'] = '';
|
||||
$access_control_nodes[$x]['node_domain'] = '';
|
||||
$access_control_nodes[$x]['node_description'] = '';
|
||||
|
||||
//create token
|
||||
|
|
@ -321,12 +257,6 @@
|
|||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'access_controls.php']);
|
||||
if ($action == 'update') {
|
||||
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)]);
|
||||
}
|
||||
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')) {
|
||||
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');"]);
|
||||
}
|
||||
|
|
@ -360,7 +290,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -408,6 +337,7 @@
|
|||
echo " <tr>\n";
|
||||
echo " <th class='vtablereq'>".$text['label-node_type']."</th>\n";
|
||||
echo " <td class='vtable'>".$text['label-node_cidr']."</td>\n";
|
||||
echo " <td class='vtable'>".$text['label-node_domain']."</td>\n";
|
||||
echo " <td class='vtable'>".$text['label-node_description']."</td>\n";
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) {
|
||||
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
|
||||
|
|
@ -442,6 +372,9 @@
|
|||
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_cidr]' maxlength='255' value=\"".escape($row["node_cidr"])."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_domain]' maxlength='255' value=\"".escape($row["node_domain"])."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_description]' maxlength='255' value=\"".escape($row["node_description"])."\">\n";
|
||||
echo " </td>\n";
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) {
|
||||
|
|
@ -475,7 +408,6 @@
|
|||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
?>
|
||||
|
|
@ -1,458 +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";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('access_control_node_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduce the functionality but requires PHP 5.1.0 or higher
|
||||
if (!function_exists('str_getcsv')) {
|
||||
function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") {
|
||||
$fp = fopen("php://memory", 'r+');
|
||||
fputs($fp, $input);
|
||||
rewind($fp);
|
||||
$data = fgetcsv($fp, null, $delimiter, $enclosure); // $escape only got added in 5.3.0
|
||||
fclose($fp);
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
//set the max php execution time
|
||||
ini_set('max_execution_time', 7200);
|
||||
|
||||
//get the http get values and set them as php variables
|
||||
$action = $_POST["action"] ?? '';
|
||||
$from_row = $_POST["from_row"] ?? '';
|
||||
$delimiter = $_POST["data_delimiter"] ?? '';
|
||||
$enclosure = $_POST["data_enclosure"] ?? '';
|
||||
|
||||
//save the data to the csv file
|
||||
if (isset($_POST['data'])) {
|
||||
$file = $_SESSION['server']['temp']['dir']."/access_control_nodes-".$_SESSION['domain_name'].".csv";
|
||||
if (file_put_contents($file, $_POST['data'])) {
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if (!empty($_FILES['ulfile']['tmp_name']) && is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('access_control_node_add')) {
|
||||
if (!empty($_POST['type']) &&$_POST['type'] == 'csv') {
|
||||
$file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name'];
|
||||
if (move_uploaded_file($_FILES['ulfile']['tmp_name'], $file)) {
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the schema
|
||||
if (!empty($delimiter)) {
|
||||
//get the first line
|
||||
$line = fgets(fopen($_SESSION['file'], 'r'));
|
||||
$line_fields = explode($delimiter, $line);
|
||||
|
||||
//get the schema
|
||||
$x = 0;
|
||||
include "app/access_controls/app_config.php";
|
||||
$i = 0;
|
||||
foreach ($apps[0]['db'] as $table) {
|
||||
//get the table name and parent name
|
||||
if (is_array($table["table"]['name'])) {
|
||||
$table_name = $table["table"]['name']['text'];
|
||||
}
|
||||
else {
|
||||
$table_name = $table["table"]['name'];
|
||||
}
|
||||
$parent_name = $table["table"]['parent'];
|
||||
|
||||
//remove the v_ table prefix
|
||||
if (substr($table_name, 0, 2) == 'v_') {
|
||||
$table_name = substr($table_name, 2);
|
||||
}
|
||||
if (substr($parent_name, 0, 2) == 'v_') {
|
||||
$parent_name = substr($parent_name, 2);
|
||||
}
|
||||
|
||||
//filter for specific tables and build the schema array
|
||||
if ($table_name == 'access_control_nodes') {
|
||||
$schema[$i]['table'] = $table_name;
|
||||
$schema[$i]['parent'] = $parent_name;
|
||||
foreach($table['fields'] as $row) {
|
||||
$row['deprecated'] = $row['deprecated'] ?? '';
|
||||
if ($row['deprecated'] !== 'true') {
|
||||
if (is_array($row['name'])) {
|
||||
$field_name = $row['name']['text'];
|
||||
}
|
||||
else {
|
||||
$field_name = $row['name'];
|
||||
}
|
||||
$schema[$i]['fields'][] = $field_name;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//match the column names to the field names
|
||||
if (!empty($delimiter) && file_exists($_SESSION['file']) && $action != 'import') {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: access_control_edit.php?id='.$_GET['id']);
|
||||
exit;
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include header
|
||||
$document['title'] = $text['label-import'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//form to match the fields to the column names
|
||||
echo "<form name='frmUpload' method='post' enctype='multipart/form-data'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['label-import']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'access_control_node_edit.php?id='.$_GET['id']]);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo $text['description-import']."\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
//loop through the lines and fields
|
||||
$x = 0;
|
||||
foreach ($line_fields as $line_field) {
|
||||
$line_field = preg_replace('#[^a-zA-Z0-9_]#', '', $line_field);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo $line_field;
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='' name='fields[$x]' onchange=\"document.getElementById('labels_$x').style.display = this.options[this.selectedIndex].value == 'contact_phones.phone_number' ? 'inline' : 'none';\">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($schema as $row) {
|
||||
echo " <optgroup label='".$row['table']."'>\n";
|
||||
foreach($row['fields'] as $field) {
|
||||
$selected = '';
|
||||
if ($field == $line_field) {
|
||||
$selected = "selected='selected'";
|
||||
}
|
||||
if (substr($field, -5) != '_uuid') {
|
||||
echo " <option value='".$row['table'].".".$field."' ".$selected.">".$field."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<input name='action' type='hidden' value='import'>\n";
|
||||
echo "<input name='from_row' type='hidden' value='$from_row'>\n";
|
||||
echo "<input name='data_delimiter' type='hidden' value='$delimiter'>\n";
|
||||
echo "<input name='data_enclosure' type='hidden' value='$enclosure'>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>\n";
|
||||
|
||||
require_once "resources/footer.php";
|
||||
|
||||
//end the script
|
||||
exit;
|
||||
}
|
||||
|
||||
//get the parent table
|
||||
function get_parent($schema,$table_name) {
|
||||
foreach ($schema as $row) {
|
||||
if ($row['table'] == $table_name) {
|
||||
return $row['parent'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//upload the csv
|
||||
if (file_exists($_SESSION['file'] ?? '') && $action == 'import') {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: access_control_edit.php?id='.$_GET['id']);
|
||||
exit;
|
||||
}
|
||||
|
||||
//user selected fields, labels
|
||||
$fields = $_POST['fields'] ?? '';
|
||||
$labels = $_POST['labels'] ?? '';
|
||||
|
||||
//set the domain_uuid
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
|
||||
//get the contents of the csv file and convert them into an array
|
||||
$handle = @fopen($_SESSION['file'], "r");
|
||||
if ($handle) {
|
||||
//set the starting identifiers
|
||||
$row_id = 0;
|
||||
$row_number = 1;
|
||||
|
||||
//loop through the array
|
||||
while (($line = fgets($handle, 4096)) !== false) {
|
||||
if ($from_row <= $row_number) {
|
||||
//format the data
|
||||
$y = 0;
|
||||
foreach ($fields as $key => $value) {
|
||||
//get the line
|
||||
$result = str_getcsv($line, $delimiter, $enclosure);
|
||||
|
||||
//get the table and field name
|
||||
$field_array = explode(".",$value);
|
||||
$table_name = $field_array[0];
|
||||
$field_name = $field_array[1];
|
||||
//echo "value: $value<br />\n";
|
||||
//echo "table_name: $table_name<br />\n";
|
||||
//echo "field_name: $field_name<br />\n";
|
||||
|
||||
//get the parent table name
|
||||
$parent = get_parent($schema, $table_name);
|
||||
|
||||
//count the field names
|
||||
if (isset($field_count[$table_name][$field_name])) {
|
||||
$field_count[$table_name][$field_name]++;
|
||||
}
|
||||
else {
|
||||
$field_count[$table_name][$field_name] = 0;
|
||||
}
|
||||
|
||||
//set the ordinal ID
|
||||
$id = $field_count[$table_name][$field_name];
|
||||
|
||||
//remove formatting from the phone number
|
||||
if ($field_name == "node_cidr") {
|
||||
if (isset($result[$key]) && $result[$key] != '') {
|
||||
$cidr_array = explode("/", str_replace("\\", "/", $result[$key]));
|
||||
if (filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
|
||||
if (isset($cidr_array[1]) && is_numeric($cidr_array[1])) {
|
||||
//valid IPv4 address and cidr notation
|
||||
//$result[$key] = $result[$key];
|
||||
}
|
||||
else {
|
||||
//valid IPv4 address add the missing cidr notation
|
||||
$result[$key] = $result[$key].'/32';
|
||||
}
|
||||
}
|
||||
elseif(filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
|
||||
//valid IPv6 address
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//build the data array
|
||||
if (!empty($table_name)) {
|
||||
$array[$table_name][$row_id]['access_control_node_uuid'] = uuid();
|
||||
$array[$table_name][$row_id]['access_control_uuid'] = $_GET['id'];
|
||||
$array[$table_name][$row_id][$field_name] = $result[$key];
|
||||
}
|
||||
if (is_array($array[$parent][$row_id])) { $y++; }
|
||||
}
|
||||
|
||||
//debug information
|
||||
//view_array($field_count);
|
||||
|
||||
//process a chunk of the array
|
||||
if ($row_id === 1000) {
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
|
||||
//clear the array
|
||||
unset($array);
|
||||
|
||||
//set the row id back to 0
|
||||
$row_id = 0;
|
||||
}
|
||||
|
||||
} //if ($from_row <= $row_id)
|
||||
$row_number++;
|
||||
$row_id++;
|
||||
} //end while
|
||||
fclose($handle);
|
||||
|
||||
//debug information
|
||||
//view_array($array);
|
||||
|
||||
//save to the data
|
||||
if (!empty($array)) {
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
}
|
||||
|
||||
//send the redirect header
|
||||
header("Location: access_control_edit.php?id=".$_GET['id']);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include the header
|
||||
$document['title'] = $text['label-import'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show content
|
||||
echo "<form name='frmUpload' method='post' enctype='multipart/form-data'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['label-import']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'access_control_edit.php?id='.$_GET['id']]);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>$_SESSION['theme']['button_icon_upload'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo $text['description-import']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_data']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <textarea name='data' id='data' class='formfld' style='width: 100%; min-height: 150px;' wrap='off'></textarea>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_data']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-from_row']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='from_row'>\n";
|
||||
$i=2;
|
||||
while($i<=99) {
|
||||
$selected = ($i == $from_row) ? "selected" : null;
|
||||
echo " <option value='$i' ".$selected.">$i</option>\n";
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-from_row']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_delimiter']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='width:40px;' name='data_delimiter'>\n";
|
||||
echo " <option value=','>,</option>\n";
|
||||
echo " <option value='|'>|</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_delimiter']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_enclosure']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='width:40px;' name='data_enclosure'>\n";
|
||||
echo " <option value='\"'>\"</option>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_enclosure']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_file_upload']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input name='ulfile' type='file' class='formfld fileinput' id='ulfile'>\n";
|
||||
echo "<br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<input name='type' type='hidden' value='csv'>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
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 - 2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -41,24 +42,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//define variable
|
||||
$search = '';
|
||||
|
||||
//add the settings object
|
||||
$settings = new settings(["domain_uuid" => $_SESSION['domain_uuid'], "user_uuid" => $_SESSION['user_uuid']]);
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = $settings->get('theme', 'list_row_edit_button', 'false');
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['access_controls'])) {
|
||||
$action = $_POST['action'] ?? '';
|
||||
$search = $_POST['search'] ?? '';
|
||||
if (is_array($_POST['access_controls'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$access_controls = $_POST['access_controls'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($access_controls) && count($access_controls) > 0) {
|
||||
if ($action != '' && is_array($access_controls) && @sizeof($access_controls) != 0) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
|
|
@ -69,9 +61,8 @@
|
|||
}
|
||||
|
||||
//prepare the array
|
||||
$x = 0;
|
||||
foreach ($access_controls as $row) {
|
||||
$array['access_controls'][$x]['checked'] = $row['checked'] ?? null;
|
||||
foreach($access_controls as $row) {
|
||||
$array['access_controls'][$x]['checked'] = $row['checked'];
|
||||
$array['access_controls'][$x]['access_control_uuid'] = $row['access_control_uuid'];
|
||||
$x++;
|
||||
}
|
||||
|
|
@ -101,13 +92,13 @@
|
|||
}
|
||||
|
||||
//redirect the user
|
||||
header('Location: access_controls.php'.(!empty($search) ? '?search='.urlencode($search) : null));
|
||||
header('Location: access_controls.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
//get order and order by
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search
|
||||
if (isset($_GET["search"])) {
|
||||
|
|
@ -118,7 +109,7 @@
|
|||
//get the count
|
||||
$sql = "select count(access_control_uuid) ";
|
||||
$sql .= "from v_access_controls ";
|
||||
if (!empty($search)) {
|
||||
if (isset($_GET["search"])) {
|
||||
$sql .= "where (";
|
||||
$sql .= " lower(access_control_name) like :search ";
|
||||
$sql .= " or lower(access_control_default) like :search ";
|
||||
|
|
@ -126,7 +117,7 @@
|
|||
$sql .= ") ";
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//get the list
|
||||
$sql = "select ";
|
||||
|
|
@ -135,7 +126,7 @@
|
|||
$sql .= "access_control_default, ";
|
||||
$sql .= "access_control_description ";
|
||||
$sql .= "from v_access_controls ";
|
||||
if (!empty($search)) {
|
||||
if (isset($_GET["search"])) {
|
||||
$sql .= "where (";
|
||||
$sql .= " lower(access_control_name) like :search ";
|
||||
$sql .= " or lower(access_control_default) like :search ";
|
||||
|
|
@ -143,8 +134,9 @@
|
|||
$sql .= ") ";
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'access_control_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$access_controls = $database->select($sql, $parameters ?? null, 'all');
|
||||
$access_controls = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -157,9 +149,8 @@
|
|||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-access_controls']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-access_controls']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'type'=>'button','id'=>'button_reload','link'=>'access_controls_reload.php'.(!empty($search) ? '?search='.urlencode($search) : null),'style'=>'margin-right: 15px;']);
|
||||
if (permission_exists('access_control_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','name'=>'btn_add','link'=>'access_control_edit.php']);
|
||||
}
|
||||
|
|
@ -173,6 +164,9 @@
|
|||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
|
||||
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'access_controls.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
|
||||
}
|
||||
echo " </form>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
|
|
@ -192,31 +186,26 @@
|
|||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($access_controls) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($access_controls ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo th_order_by('access_control_name', $text['label-access_control_name'], $order_by, $order);
|
||||
echo th_order_by('access_control_default', $text['label-access_control_default'], $order_by, $order);
|
||||
echo " <th class='hide-sm-dn'>".$text['label-access_control_description']."</th>\n";
|
||||
if (permission_exists('access_control_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($access_controls) && count($access_controls) > 0) {
|
||||
if (is_array($access_controls) && @sizeof($access_controls) != 0) {
|
||||
$x = 0;
|
||||
foreach ($access_controls as $row) {
|
||||
$list_row_url = '';
|
||||
if (permission_exists('access_control_edit')) {
|
||||
$list_row_url = "access_control_edit.php?id=".urlencode($row['access_control_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
|
||||
|
|
@ -235,7 +224,7 @@
|
|||
echo " </td>\n";
|
||||
echo " <td>".escape($row['access_control_default'])."</td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['access_control_description'])."</td>\n";
|
||||
if (permission_exists('access_control_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -247,8 +236,8 @@
|
|||
}
|
||||
|
||||
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";
|
||||
|
||||
|
|
@ -258,4 +247,3 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('access_control_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//set the variables
|
||||
$search = $_REQUEST['search'] ?? '';
|
||||
|
||||
//run the command
|
||||
$result = rtrim(event_socket::api('reloadacl'));
|
||||
|
||||
//add message
|
||||
message::add($result, 'alert');
|
||||
|
||||
//redirect
|
||||
$search = preg_replace('#[^a-zA-Z0-9_\-\.]# ', '', $search);
|
||||
$location = 'access_controls.php'.($search != '' ? "?search=".urlencode($search) : null);
|
||||
|
||||
header("Location: ".$location);
|
||||
|
||||
?>
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "Gérer les listes de contrôle d'accès";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "წვდომის კონტროლის სიების მართვა";
|
||||
$apps[$x]['description']['nl-nl'] = "Beheer toegangs controle lijsten";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
|
@ -55,6 +54,7 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "access_control_node_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
//cache details
|
||||
$apps[$x]['cache']['key'] = "configuration.acl.conf";
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "access_control_name";
|
||||
$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.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "access_control_default";
|
||||
|
|
@ -84,30 +84,6 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y++;
|
||||
$apps[$x]['db'][$y]['table']['name'] = "v_access_control_nodes";
|
||||
|
|
@ -135,32 +111,12 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the IP CIDR range.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "node_domain";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the domain.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "node_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016 - 2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2016 - 2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -29,14 +29,13 @@
|
|||
|
||||
//add the access control list to the database
|
||||
$sql = "select count(*) from v_access_controls ";
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
if ($num_rows == 0) {
|
||||
|
||||
//set the directory
|
||||
$xml_dir = $settings->get('switch','conf').'/autoload_configs';
|
||||
$xml_dir = $_SESSION["switch"]["conf"]["dir"].'/autoload_configs';
|
||||
$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.'/resources/templates/conf/autoload_configs/acl.conf';
|
||||
//load the xml and save it into an array
|
||||
if (file_exists($xml_file)) {
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
|
|
@ -47,12 +46,13 @@
|
|||
else {
|
||||
$xml_string = "<configuration name=\"acl.conf\" description=\"Network Lists\">\n";
|
||||
$xml_string .= " <network-lists>\n";
|
||||
$xml_string .= " <list name=\"rfc1918\" default=\"deny\">\n";
|
||||
$xml_string .= " <list name=\"rfc1918\" default=\"allow\">\n";
|
||||
$xml_string .= " <node type=\"allow\" cidr=\"10.0.0.0/8\"/>\n";
|
||||
$xml_string .= " <node type=\"allow\" cidr=\"172.16.0.0/12\"/>\n";
|
||||
$xml_string .= " <node type=\"allow\" cidr=\"192.168.0.0/16\"/>\n";
|
||||
$xml_string .= " </list>\n";
|
||||
$xml_string .= " <list name=\"providers\" default=\"deny\">\n";
|
||||
$xml_string .= " <list name=\"domains\" default=\"deny\">\n";
|
||||
$xml_string .= " <node type=\"allow\" domain=\"".$_SESSION['domain_name']."\"/>\n";
|
||||
$xml_string .= " </list>\n";
|
||||
$xml_string .= " </network-lists>\n";
|
||||
$xml_string .= "</configuration>\n";
|
||||
|
|
@ -62,21 +62,21 @@
|
|||
$conf_array = json_decode($json, true);
|
||||
|
||||
//process the array
|
||||
if (is_array($conf_array['network-lists']['list'])) {
|
||||
foreach($conf_array['network-lists']['list'] as $list) {
|
||||
//get the attributes
|
||||
foreach($conf_array['network-lists']['list'] as $list) {
|
||||
//get the attributes
|
||||
$access_control_name = $list['@attributes']['name'];
|
||||
$access_control_default = $list['@attributes']['default'];
|
||||
|
||||
//insert the name, description
|
||||
//insert the name, description
|
||||
$access_control_uuid = uuid();
|
||||
$array['access_controls'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_controls'][0]['access_control_name'] = $access_control_name;
|
||||
$array['access_controls'][0]['access_control_default'] = $access_control_default;
|
||||
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('access_control_add', 'temp');
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array, false);
|
||||
|
|
@ -84,39 +84,42 @@
|
|||
|
||||
$p->delete('access_control_add', 'temp');
|
||||
|
||||
//normalize the array - needed because the array is inconsistent when there is only one row vs multiple
|
||||
if (!empty($list['node']['@attributes']['type'])) {
|
||||
//normalize the array - needed because the array is inconsistent when there is only one row vs multiple
|
||||
if (strlen($list['node']['@attributes']['type']) > 0) {
|
||||
$list['node'][]['@attributes'] = $list['node']['@attributes'];
|
||||
unset($list['node']['@attributes']);
|
||||
}
|
||||
|
||||
//add the nodes
|
||||
if (is_array($list['node'])) {
|
||||
foreach ($list['node'] as $row) {
|
||||
//get the name and value pair
|
||||
$node_type = $row['@attributes']['type'];
|
||||
$node_cidr = $row['@attributes']['cidr'];
|
||||
$node_description = $row['@attributes']['description'];
|
||||
|
||||
//add the profile settings into the database
|
||||
$access_control_node_uuid = uuid();
|
||||
$array['access_control_nodes'][0]['access_control_node_uuid'] = $access_control_node_uuid;
|
||||
$array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_control_nodes'][0]['node_type'] = $node_type;
|
||||
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
|
||||
$array['access_control_nodes'][0]['node_description'] = $node_description;
|
||||
|
||||
$p = permissions::new();
|
||||
$p->add('access_control_node_add', 'temp');
|
||||
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array, false);
|
||||
unset($array);
|
||||
|
||||
$p->delete('access_control_node_add', 'temp');
|
||||
//add the nodes
|
||||
foreach ($list['node'] as $row) {
|
||||
//get the name and value pair
|
||||
$node_type = $row['@attributes']['type'];
|
||||
$node_cidr = $row['@attributes']['cidr'];
|
||||
$node_domain = $row['@attributes']['domain'];
|
||||
$node_description = $row['@attributes']['description'];
|
||||
//replace $${domain}
|
||||
if (strlen($node_domain) > 0) {
|
||||
$node_domain = str_replace("\$\${domain}", $domain_name, $node_domain);
|
||||
}
|
||||
}
|
||||
//add the profile settings into the database
|
||||
$access_control_node_uuid = uuid();
|
||||
$array['access_control_nodes'][0]['access_control_node_uuid'] = $access_control_node_uuid;
|
||||
$array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_control_nodes'][0]['node_type'] = $node_type;
|
||||
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
|
||||
$array['access_control_nodes'][0]['node_domain'] = $node_domain;
|
||||
$array['access_control_nodes'][0]['node_description'] = $node_description;
|
||||
|
||||
$p = new permissions;
|
||||
$p->add('access_control_node_add', 'temp');
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array, false);
|
||||
unset($array);
|
||||
|
||||
$p->delete('access_control_node_add', 'temp');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,59 +130,6 @@
|
|||
}
|
||||
unset($sql, $num_rows);
|
||||
|
||||
//rename domains access control to providers
|
||||
$sql = "select count(*) from v_access_controls ";
|
||||
$sql .= "where access_control_name = 'domains' ";
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
if ($num_rows > 0) {
|
||||
//update the access control name
|
||||
$sql = "update v_access_controls set access_control_name = 'providers' ";
|
||||
$sql .= "where access_control_name = 'domains' ";
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
//update the sip profile settings
|
||||
$sql = "update v_sip_profile_settings set sip_profile_setting_value = 'providers' ";
|
||||
$sql .= "where (sip_profile_setting_name = 'apply-inbound-acl' or sip_profile_setting_name = 'apply-register-acl') ";
|
||||
$sql .= "and sip_profile_setting_value = 'domains'; ";
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
$cache->delete("configuration:sofia.conf:".gethostname());
|
||||
|
||||
//create the event socket connection
|
||||
$esl = event_socket::create();
|
||||
|
||||
//reload the acl
|
||||
event_socket::async("reloadacl");
|
||||
|
||||
//rescan each sip profile
|
||||
$sql = "select sip_profile_name from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_enabled = 'true'; ";
|
||||
$sip_profiles = $database->select($sql, null, 'all');
|
||||
if (is_array($sip_profiles)) {
|
||||
foreach ($sip_profiles as $row) {
|
||||
if ($esl->is_connected()) {
|
||||
$command = "sofia profile '".$row['sip_profile_name']."' rescan";
|
||||
//echo $command."\n";
|
||||
$result = event_socket::api($command);
|
||||
//echo $result."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//remove orphaned access control nodes
|
||||
$sql = "delete from v_access_control_nodes ";
|
||||
$sql .= "where access_control_uuid not in ( ";
|
||||
$sql .= " select access_control_uuid from v_access_controls ";
|
||||
$sql .= ")";
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,613 +1,438 @@
|
|||
<?php
|
||||
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
|
||||
|
||||
$text['title-access_controls']['en-us'] = "Access Controls";
|
||||
$text['title-access_controls']['en-gb'] = "Access Controls";
|
||||
$text['title-access_controls']['ar-eg'] = "عناصر التحكم في الوصول";
|
||||
$text['title-access_controls']['de-at'] = "Zugriffskontrolle";
|
||||
$text['title-access_controls']['de-ch'] = "Zugriffskontrolle";
|
||||
$text['title-access_controls']['de-de'] = "Zugriffskontrolle";
|
||||
$text['title-access_controls']['el-gr'] = "Έλεγχοι πρόσβασης";
|
||||
$text['title-access_controls']['de-at'] = " Zugriffskontrolle"; //copied from de-de
|
||||
$text['title-access_controls']['de-ch'] = " Zugriffskontrolle"; //copied from de-de
|
||||
$text['title-access_controls']['de-de'] = " Zugriffskontrolle";
|
||||
$text['title-access_controls']['es-cl'] = "Controles de acceso";
|
||||
$text['title-access_controls']['es-mx'] = "Controles de acceso";
|
||||
$text['title-access_controls']['fr-ca'] = "Contrôle d'accès";
|
||||
$text['title-access_controls']['es-mx'] = "Controles de acceso"; //copied from es-cl
|
||||
$text['title-access_controls']['fr-ca'] = "Contrôle d'accès"; //copied from fr-fr
|
||||
$text['title-access_controls']['fr-fr'] = "Contrôle d'accès";
|
||||
$text['title-access_controls']['he-il'] = "בקרת גישה";
|
||||
$text['title-access_controls']['it-it'] = "Controllo Accessi";
|
||||
$text['title-access_controls']['ka-ge'] = "წვდომების კონტროლი";
|
||||
$text['title-access_controls']['nl-nl'] = "Toegangs Controle";
|
||||
$text['title-access_controls']['pl-pl'] = "Kontrola dostępu";
|
||||
$text['title-access_controls']['pt-br'] = "Controles de Acesso";
|
||||
$text['title-access_controls']['pt-br'] = "Controles de Acesso"; //copied from pt-pt
|
||||
$text['title-access_controls']['pt-pt'] = "Controles de Acesso";
|
||||
$text['title-access_controls']['ro-ro'] = "Controale de acces";
|
||||
$text['title-access_controls']['ru-ru'] = "Контроль доступа";
|
||||
$text['title-access_controls']['sv-se'] = "Åtkomstkontroll";
|
||||
$text['title-access_controls']['uk-ua'] = "контроль доступу";
|
||||
$text['title-access_controls']['tr-tr'] = "Erişim Kontrolleri";
|
||||
$text['title-access_controls']['zh-cn'] = "访问控制";
|
||||
$text['title-access_controls']['ja-jp'] = "アクセス制御";
|
||||
$text['title-access_controls']['ko-kr'] = "액세스 제어";
|
||||
|
||||
$text['title-access_control_nodes']['en-us'] = "Nodes";
|
||||
$text['title-access_control_nodes']['en-gb'] = "Nodes";
|
||||
$text['title-access_control_nodes']['ar-eg'] = "العقد";
|
||||
$text['title-access_control_nodes']['de-at'] = "Knoten";
|
||||
$text['title-access_control_nodes']['de-ch'] = "Knoten";
|
||||
$text['title-access_control_nodes']['de-at'] = "Knoten"; //copied from de-de
|
||||
$text['title-access_control_nodes']['de-ch'] = "Knoten"; //copied from de-de
|
||||
$text['title-access_control_nodes']['de-de'] = "Knoten";
|
||||
$text['title-access_control_nodes']['el-gr'] = "Κόμβοι";
|
||||
$text['title-access_control_nodes']['es-cl'] = "Nodos";
|
||||
$text['title-access_control_nodes']['es-mx'] = "Nodos";
|
||||
$text['title-access_control_nodes']['fr-ca'] = "nœuds";
|
||||
$text['title-access_control_nodes']['fr-fr'] = "nœuds";
|
||||
$text['title-access_control_nodes']['es-mx'] = "Nodos"; //copied from es-cl
|
||||
$text['title-access_control_nodes']['fr-ca'] = " nœuds"; //copied from fr-fr
|
||||
$text['title-access_control_nodes']['fr-fr'] = " nœuds";
|
||||
$text['title-access_control_nodes']['he-il'] = "בלוטות";
|
||||
$text['title-access_control_nodes']['it-it'] = "Nodi";
|
||||
$text['title-access_control_nodes']['ka-ge'] = "კვანძები";
|
||||
$text['title-access_control_nodes']['nl-nl'] = "Knooppunten";
|
||||
$text['title-access_control_nodes']['pl-pl'] = "węzły";
|
||||
$text['title-access_control_nodes']['pt-br'] = "Nodes";
|
||||
$text['title-access_control_nodes']['pt-pt'] = "Nodes";
|
||||
$text['title-access_control_nodes']['pt-pt'] = " Nodes";
|
||||
$text['title-access_control_nodes']['ro-ro'] = "Noduri";
|
||||
$text['title-access_control_nodes']['ru-ru'] = "Узлы";
|
||||
$text['title-access_control_nodes']['sv-se'] = "Noder";
|
||||
$text['title-access_control_nodes']['uk-ua'] = "вузли";
|
||||
$text['title-access_control_nodes']['tr-tr'] = "Düğümler";
|
||||
$text['title-access_control_nodes']['zh-cn'] = "节点";
|
||||
$text['title-access_control_nodes']['ja-jp'] = "ノード";
|
||||
$text['title-access_control_nodes']['ko-kr'] = "노드";
|
||||
|
||||
$text['title-access_control_node']['en-us'] = "Node";
|
||||
$text['title-access_control_node']['en-gb'] = "Node";
|
||||
$text['title-access_control_node']['ar-eg'] = "العقدة";
|
||||
$text['title-access_control_node']['de-at'] = "Netzknoten";
|
||||
$text['title-access_control_node']['de-ch'] = "Netzknoten";
|
||||
$text['title-access_control_node']['de-at'] = "Netzknoten"; //copied from de-de
|
||||
$text['title-access_control_node']['de-ch'] = "Netzknoten"; //copied from de-de
|
||||
$text['title-access_control_node']['de-de'] = "Netzknoten";
|
||||
$text['title-access_control_node']['el-gr'] = "Κόμβος";
|
||||
$text['title-access_control_node']['es-cl'] = "Nodo";
|
||||
$text['title-access_control_node']['es-mx'] = "Nodo";
|
||||
$text['title-access_control_node']['fr-ca'] = "noeud";
|
||||
$text['title-access_control_node']['fr-fr'] = "noeud";
|
||||
$text['title-access_control_node']['es-mx'] = "Nodo"; //copied from es-cl
|
||||
$text['title-access_control_node']['fr-ca'] = " noeud"; //copied from fr-fr
|
||||
$text['title-access_control_node']['fr-fr'] = " noeud";
|
||||
$text['title-access_control_node']['he-il'] = "צומת";
|
||||
$text['title-access_control_node']['it-it'] = "Nodo";
|
||||
$text['title-access_control_node']['ka-ge'] = "კვანძი";
|
||||
$text['title-access_control_node']['nl-nl'] = "Knooppunt";
|
||||
$text['title-access_control_node']['pl-pl'] = "węzeł";
|
||||
$text['title-access_control_node']['pt-br'] = "Nó";
|
||||
$text['title-access_control_node']['pt-br'] = "Nó"; //copied from pt-pt
|
||||
$text['title-access_control_node']['pt-pt'] = "Nó";
|
||||
$text['title-access_control_node']['ro-ro'] = "Nod";
|
||||
$text['title-access_control_node']['ru-ru'] = "Узел";
|
||||
$text['title-access_control_node']['sv-se'] = "Nod";
|
||||
$text['title-access_control_node']['uk-ua'] = "вузол";
|
||||
$text['title-access_control_node']['tr-tr'] = "Düğüm";
|
||||
$text['title-access_control_node']['zh-cn'] = "节点";
|
||||
$text['title-access_control_node']['ja-jp'] = "ノード";
|
||||
$text['title-access_control_node']['ko-kr'] = "마디";
|
||||
|
||||
$text['title-access_control']['en-us'] = "Access Control";
|
||||
$text['title-access_control']['en-gb'] = "Access Control";
|
||||
$text['title-access_control']['ar-eg'] = "التحكم في الوصول";
|
||||
$text['title-access_control']['de-at'] = "Zugangskontrolle";
|
||||
$text['title-access_control']['de-ch'] = "Zugangskontrolle";
|
||||
$text['title-access_control']['de-de'] = "Zugangskontrolle";
|
||||
$text['title-access_control']['el-gr'] = "Έλεγχος πρόσβασης";
|
||||
$text['title-access_control']['de-at'] = " Zugangskontrolle"; //copied from de-de
|
||||
$text['title-access_control']['de-ch'] = " Zugangskontrolle"; //copied from de-de
|
||||
$text['title-access_control']['de-de'] = " Zugangskontrolle";
|
||||
$text['title-access_control']['es-cl'] = "Control de acceso";
|
||||
$text['title-access_control']['es-mx'] = "Control de acceso";
|
||||
$text['title-access_control']['fr-ca'] = "Contrôle d'accès";
|
||||
$text['title-access_control']['es-mx'] = "Control de acceso"; //copied from es-cl
|
||||
$text['title-access_control']['fr-ca'] = "Contrôle d'accès"; //copied from fr-fr
|
||||
$text['title-access_control']['fr-fr'] = "Contrôle d'accès";
|
||||
$text['title-access_control']['he-il'] = "בקרת גישה";
|
||||
$text['title-access_control']['it-it'] = "Controllo Accesso";
|
||||
$text['title-access_control']['ka-ge'] = "წვდომის კონტროლი";
|
||||
$text['title-access_control']['nl-nl'] = "Toegangs Controle";
|
||||
$text['title-access_control']['pl-pl'] = "Kontrola dostępu";
|
||||
$text['title-access_control']['pt-br'] = "Controle de acesso";
|
||||
$text['title-access_control']['pt-br'] = "Controle de acesso"; //copied from pt-pt
|
||||
$text['title-access_control']['pt-pt'] = "Controle de acesso";
|
||||
$text['title-access_control']['ro-ro'] = "Controlul accesului";
|
||||
$text['title-access_control']['ru-ru'] = "Управление доступом";
|
||||
$text['title-access_control']['sv-se'] = "Åtkomstkontroll";
|
||||
$text['title-access_control']['uk-ua'] = "Управління доступом";
|
||||
$text['title-access_control']['tr-tr'] = "Giriş kontrolu";
|
||||
$text['title-access_control']['zh-cn'] = "访问控制";
|
||||
$text['title-access_control']['ja-jp'] = "アクセス制御";
|
||||
$text['title-access_control']['ko-kr'] = "액세스 제어";
|
||||
|
||||
$text['title-access_control_export']['en-us'] = "Access Control Export";
|
||||
$text['title-access_control_export']['en-gb'] = "Access Control Export";
|
||||
$text['title-access_control_export']['ar-eg'] = "";
|
||||
$text['title-access_control_export']['de-at'] = "";
|
||||
$text['title-access_control_export']['de-ch'] = "";
|
||||
$text['title-access_control_export']['de-de'] = "";
|
||||
$text['title-access_control_export']['ek-gr'] = "";
|
||||
$text['title-access_control_export']['es-cl'] = "";
|
||||
$text['title-access_control_export']['es-mx'] = "";
|
||||
$text['title-access_control_export']['fr-ca'] = "";
|
||||
$text['title-access_control_export']['fr-fr'] = "";
|
||||
$text['title-access_control_export']['he-il'] = "";
|
||||
$text['title-access_control_export']['it-it'] = "";
|
||||
$text['title-access_control_export']['ka-ge'] = "";
|
||||
$text['title-access_control_export']['nl-nl'] = "";
|
||||
$text['title-access_control_export']['pl-pl'] = "";
|
||||
$text['title-access_control_export']['pt-br'] = "";
|
||||
$text['title-access_control_export']['pt-pt'] = "";
|
||||
$text['title-access_control_export']['ro-ro'] = "";
|
||||
$text['title-access_control_export']['ru-ru'] = "";
|
||||
$text['title-access_control_export']['sv-se'] = "";
|
||||
$text['title-access_control_export']['uk-ua'] = "";
|
||||
$text['title-access_control_export']['tr-tr'] = "";
|
||||
$text['title-access_control_export']['zh-cn'] = "";
|
||||
$text['title-access_control_export']['ja-jp'] = "";
|
||||
$text['title-access_control_export']['ko-kr'] = "";
|
||||
|
||||
$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-gb'] = "Type";
|
||||
$text['label-node_type']['ar-eg'] = "اكتب";
|
||||
$text['label-node_type']['de-at'] = "Art";
|
||||
$text['label-node_type']['de-ch'] = "Art";
|
||||
$text['label-node_type']['de-de'] = "Art";
|
||||
$text['label-node_type']['el-gr'] = "Τύπος";
|
||||
$text['label-node_type']['es-cl'] = "Escribe";
|
||||
$text['label-node_type']['es-mx'] = "Escribe";
|
||||
$text['label-node_type']['fr-ca'] = "Type";
|
||||
$text['label-node_type']['fr-fr'] = "Type";
|
||||
$text['label-node_type']['he-il'] = "סוג";
|
||||
$text['label-node_type']['it-it'] = "Tipo";
|
||||
$text['label-node_type']['ka-ge'] = "ტიპი";
|
||||
$text['label-node_type']['nl-nl'] = "Type";
|
||||
$text['label-node_type']['pl-pl'] = "typ";
|
||||
$text['label-node_type']['pt-br'] = "Tipo";
|
||||
$text['label-node_type']['pt-pt'] = "Tipo";
|
||||
$text['label-node_type']['ro-ro'] = "Tip";
|
||||
$text['label-node_type']['ru-ru'] = "Тип";
|
||||
$text['label-node_type']['sv-se'] = "Typ";
|
||||
$text['label-node_type']['uk-ua'] = "Тип";
|
||||
$text['label-node_type']['tr-tr'] = "Tip";
|
||||
$text['label-node_type']['zh-cn'] = "类型";
|
||||
$text['label-node_type']['ja-jp'] = "タイプ";
|
||||
$text['label-node_type']['ko-kr'] = "유형";
|
||||
|
||||
$text['label-node_domain']['en-us'] = "Domain";
|
||||
$text['label-node_domain']['en-gb'] = "Domain";
|
||||
$text['label-node_domain']['ar-eg'] = "مجال";
|
||||
$text['label-node_domain']['de-at'] = "Domäne";
|
||||
$text['label-node_domain']['de-ch'] = "Domäne";
|
||||
$text['label-node_domain']['de-de'] = "Domäne";
|
||||
$text['label-node_domain']['el-gr'] = "Τομέα";
|
||||
$text['label-node_domain']['es-cl'] = "Dominio";
|
||||
$text['label-node_domain']['es-mx'] = "Dominio";
|
||||
$text['label-node_domain']['fr-ca'] = "Domaine";
|
||||
$text['label-node_domain']['fr-fr'] = "Domaine";
|
||||
$text['label-node_domain']['he-il'] = "תחום";
|
||||
$text['label-node_domain']['it-it'] = "Dominio";
|
||||
$text['label-node_domain']['ka-ge'] = "დომენი";
|
||||
$text['label-node_domain']['nl-nl'] = "Domein";
|
||||
$text['label-node_domain']['pl-pl'] = "domeny";
|
||||
$text['label-node_domain']['pt-br'] = "Domínio";
|
||||
$text['label-node_domain']['pt-pt'] = "Domínio";
|
||||
$text['label-node_domain']['ro-ro'] = "Domeniu";
|
||||
$text['label-node_domain']['ru-ru'] = "Домен";
|
||||
$text['label-node_domain']['sv-se'] = "Domän";
|
||||
$text['label-node_domain']['uk-ua'] = "домен";
|
||||
$text['label-node_domain']['tr-tr'] = "İhtisas";
|
||||
$text['label-node_domain']['zh-cn'] = "领域";
|
||||
$text['label-node_domain']['ja-jp'] = "ドメイン";
|
||||
$text['label-node_domain']['ko-kr'] = "도메인";
|
||||
|
||||
$text['label-node_description']['en-us'] = "Description";
|
||||
$text['label-node_description']['en-gb'] = "Description";
|
||||
$text['label-node_description']['ar-eg'] = "وصف";
|
||||
$text['label-node_description']['de-at'] = "Beschreibung";
|
||||
$text['label-node_description']['de-ch'] = "Beschreibung";
|
||||
$text['label-node_description']['de-de'] = "Beschreibung";
|
||||
$text['label-node_description']['el-gr'] = "Περιγραφή";
|
||||
$text['label-node_description']['es-cl'] = "Descripción";
|
||||
$text['label-node_description']['es-mx'] = "Descripción";
|
||||
$text['label-node_description']['fr-ca'] = "Description";
|
||||
$text['label-node_description']['fr-fr'] = "Description";
|
||||
$text['label-node_description']['he-il'] = "תיאור";
|
||||
$text['label-node_description']['it-it'] = "Descrizione";
|
||||
$text['label-node_description']['ka-ge'] = "აღწერა";
|
||||
$text['label-node_description']['nl-nl'] = "Beschrijving";
|
||||
$text['label-node_description']['pl-pl'] = "opis";
|
||||
$text['label-node_description']['pt-br'] = "Descrição";
|
||||
$text['label-node_description']['pt-pt'] = "Descrição";
|
||||
$text['label-node_description']['ro-ro'] = "Descriere";
|
||||
$text['label-node_description']['ru-ru'] = "Описание";
|
||||
$text['label-node_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-node_description']['uk-ua'] = "опис";
|
||||
$text['label-node_description']['tr-tr'] = "Tanım";
|
||||
$text['label-node_description']['zh-cn'] = "描述";
|
||||
$text['label-node_description']['ja-jp'] = "説明";
|
||||
$text['label-node_description']['ko-kr'] = "설명";
|
||||
|
||||
$text['label-node_cidr']['en-us'] = "CIDR";
|
||||
$text['label-node_cidr']['en-gb'] = "CIDR";
|
||||
$text['label-node_cidr']['ar-eg'] = "CIDR";
|
||||
$text['label-node_cidr']['de-at'] = "CIDR";
|
||||
$text['label-node_cidr']['de-ch'] = "CIDR";
|
||||
$text['label-node_cidr']['de-de'] = "CIDR";
|
||||
$text['label-node_cidr']['el-gr'] = "CIDR";
|
||||
$text['label-node_cidr']['es-cl'] = "CIDR";
|
||||
$text['label-node_cidr']['es-mx'] = "CIDR";
|
||||
$text['label-node_cidr']['fr-ca'] = "CIDR";
|
||||
$text['label-node_cidr']['fr-fr'] = "CIDR";
|
||||
$text['label-node_cidr']['he-il'] = "CIDR";
|
||||
$text['label-node_cidr']['it-it'] = "CIDR";
|
||||
$text['label-node_cidr']['ka-ge'] = "CIRD";
|
||||
$text['label-node_cidr']['nl-nl'] = "CIDR";
|
||||
$text['label-node_cidr']['pl-pl'] = "CIDR";
|
||||
$text['label-node_cidr']['pt-br'] = "CIDR";
|
||||
$text['label-node_cidr']['pt-pt'] = "CIDR";
|
||||
$text['label-node_cidr']['ro-ro'] = "CIDR";
|
||||
$text['label-node_cidr']['ru-ru'] = "CIDR";
|
||||
$text['label-node_cidr']['sv-se'] = "CIDR";
|
||||
$text['label-node_cidr']['uk-ua'] = "CIDR";
|
||||
$text['label-node_cidr']['tr-tr'] = "CIDR";
|
||||
$text['label-node_cidr']['zh-cn'] = "CIDR";
|
||||
$text['label-node_cidr']['ja-jp'] = "CIDR";
|
||||
$text['label-node_cidr']['ko-kr'] = "CIDR";
|
||||
|
||||
$text['label-deny']['en-us'] = "deny";
|
||||
$text['label-deny']['en-gb'] = "deny";
|
||||
$text['label-deny']['ar-eg'] = "تنكر";
|
||||
$text['label-deny']['de-at'] = "verbieten";
|
||||
$text['label-deny']['de-ch'] = "verbieten";
|
||||
$text['label-deny']['de-de'] = "verbieten";
|
||||
$text['label-deny']['el-gr'] = "αρνούμαι";
|
||||
$text['label-deny']['es-cl'] = "Negar";
|
||||
$text['label-deny']['es-mx'] = "Negar";
|
||||
$text['label-deny']['fr-ca'] = "nier";
|
||||
$text['label-deny']['fr-fr'] = "nier";
|
||||
$text['label-deny']['he-il'] = "להכחיש";
|
||||
$text['label-deny']['it-it'] = "nega";
|
||||
$text['label-deny']['ka-ge'] = "უარყოფა";
|
||||
$text['label-deny']['nl-nl'] = "verbieden";
|
||||
$text['label-deny']['pl-pl'] = "odrzuć";
|
||||
$text['label-deny']['pt-br'] = "negar";
|
||||
$text['label-deny']['pt-pt'] = "negar";
|
||||
$text['label-deny']['ro-ro'] = "Nega";
|
||||
$text['label-deny']['ru-ru'] = "запретить";
|
||||
$text['label-deny']['sv-se'] = "förneka";
|
||||
$text['label-deny']['uk-ua'] = "правда";
|
||||
$text['label-deny']['tr-tr'] = "reddetmek";
|
||||
$text['label-deny']['zh-cn'] = "否定";
|
||||
$text['label-deny']['ja-jp'] = "拒否";
|
||||
$text['label-deny']['ko-kr'] = "부인하다";
|
||||
|
||||
$text['label-allow']['en-us'] = "allow";
|
||||
$text['label-allow']['en-gb'] = "allow";
|
||||
$text['label-allow']['ar-eg'] = "السماح";
|
||||
$text['label-allow']['de-at'] = "erlauben";
|
||||
$text['label-allow']['de-ch'] = "erlauben";
|
||||
$text['label-allow']['de-de'] = "erlauben";
|
||||
$text['label-allow']['el-gr'] = "επιτρέπω";
|
||||
$text['label-allow']['es-cl'] = "Permitir";
|
||||
$text['label-allow']['es-mx'] = "Permitir";
|
||||
$text['label-allow']['fr-ca'] = "permettre";
|
||||
$text['label-allow']['fr-fr'] = "permettre";
|
||||
$text['label-allow']['he-il'] = "לאפשר";
|
||||
$text['label-allow']['it-it'] = "permetti";
|
||||
$text['label-allow']['ka-ge'] = "დაშვება";
|
||||
$text['label-allow']['nl-nl'] = "toestaan";
|
||||
$text['label-allow']['pl-pl'] = "zezwól";
|
||||
$text['label-allow']['pt-br'] = "permitir";
|
||||
$text['label-allow']['pt-pt'] = "permitir";
|
||||
$text['label-allow']['ro-ro'] = "Permite";
|
||||
$text['label-allow']['ru-ru'] = "разрешить";
|
||||
$text['label-allow']['sv-se'] = "tillåta";
|
||||
$text['label-allow']['uk-ua'] = "дозволяти";
|
||||
$text['label-allow']['tr-tr'] = "izin vermek";
|
||||
$text['label-allow']['zh-cn'] = "允许";
|
||||
$text['label-allow']['ja-jp'] = "許可する";
|
||||
$text['label-allow']['ko-kr'] = "허용하다";
|
||||
|
||||
$text['label-access_control_name']['en-us'] = "Name";
|
||||
$text['label-access_control_name']['en-gb'] = "Name";
|
||||
$text['label-access_control_name']['ar-eg'] = "اسم";
|
||||
$text['label-access_control_name']['de-at'] = "Name";
|
||||
$text['label-access_control_name']['de-ch'] = "Name";
|
||||
$text['label-access_control_name']['de-de'] = "Name";
|
||||
$text['label-access_control_name']['el-gr'] = "Ονομα";
|
||||
$text['label-access_control_name']['es-cl'] = "Nombre";
|
||||
$text['label-access_control_name']['es-mx'] = "Nombre";
|
||||
$text['label-access_control_name']['fr-ca'] = "Nom";
|
||||
$text['label-access_control_name']['fr-fr'] = "Nom";
|
||||
$text['label-access_control_name']['he-il'] = "שם";
|
||||
$text['label-access_control_name']['it-it'] = "Nome";
|
||||
$text['label-access_control_name']['ka-ge'] = "სახელი";
|
||||
$text['label-access_control_name']['nl-nl'] = "Naam";
|
||||
$text['label-access_control_name']['pl-pl'] = "Imię";
|
||||
$text['label-access_control_name']['pt-br'] = "Nome";
|
||||
$text['label-access_control_name']['pt-pt'] = "Nome";
|
||||
$text['label-access_control_name']['ro-ro'] = "Nume";
|
||||
$text['label-access_control_name']['ru-ru'] = "Имя";
|
||||
$text['label-access_control_name']['sv-se'] = "namn";
|
||||
$text['label-access_control_name']['uk-ua'] = "ім'я";
|
||||
$text['label-access_control_name']['tr-tr'] = "İsim";
|
||||
$text['label-access_control_name']['zh-cn'] = "姓名";
|
||||
$text['label-access_control_name']['ja-jp'] = "名前";
|
||||
$text['label-access_control_name']['ko-kr'] = "이름";
|
||||
|
||||
$text['label-access_control_default']['en-us'] = "Default";
|
||||
$text['label-access_control_default']['en-gb'] = "Default";
|
||||
$text['label-access_control_default']['ar-eg'] = "افتراضي";
|
||||
$text['label-access_control_default']['de-at'] = "Standard";
|
||||
$text['label-access_control_default']['de-ch'] = "Standard";
|
||||
$text['label-access_control_default']['de-de'] = "Standard";
|
||||
$text['label-access_control_default']['el-gr'] = "Προκαθορισμένο";
|
||||
$text['label-access_control_default']['es-cl'] = "Defecto";
|
||||
$text['label-access_control_default']['es-mx'] = "Defecto";
|
||||
$text['label-access_control_default']['fr-ca'] = "Par défaut";
|
||||
$text['label-access_control_default']['fr-fr'] = "Par défaut";
|
||||
$text['label-access_control_default']['he-il'] = "ברירת מחדל";
|
||||
$text['label-access_control_default']['it-it'] = "Predefinito";
|
||||
$text['label-access_control_default']['ka-ge'] = "ნაგულისხმევი";
|
||||
$text['label-access_control_default']['nl-nl'] = "Standaard";
|
||||
$text['label-access_control_default']['pl-pl'] = "Domyślnie";
|
||||
$text['label-access_control_default']['pt-br'] = "Padrão";
|
||||
$text['label-access_control_default']['pt-pt'] = "Padrão";
|
||||
$text['label-access_control_default']['ro-ro'] = "Implicit";
|
||||
$text['label-access_control_default']['ru-ru'] = "По умолчанию";
|
||||
$text['label-access_control_default']['sv-se'] = "Standard";
|
||||
$text['label-access_control_default']['uk-ua'] = "дефолт";
|
||||
$text['label-access_control_default']['tr-tr'] = "Varsayılan";
|
||||
$text['label-access_control_default']['zh-cn'] = "默认";
|
||||
$text['label-access_control_default']['ja-jp'] = "デフォルト";
|
||||
$text['label-access_control_default']['ko-kr'] = "기본";
|
||||
|
||||
$text['label-access_control_nodes']['en-us'] = "Nodes";
|
||||
$text['label-access_control_nodes']['en-gb'] = "Nodes";
|
||||
$text['label-access_control_nodes']['ar-eg'] = "العقد";
|
||||
$text['label-access_control_nodes']['de-at'] = "Knoten";
|
||||
$text['label-access_control_nodes']['de-ch'] = "Knoten";
|
||||
$text['label-access_control_nodes']['de-de'] = "Knoten";
|
||||
$text['label-access_control_nodes']['el-gr'] = "Κόμβοι";
|
||||
$text['label-access_control_nodes']['es-cl'] = "Nodos";
|
||||
$text['label-access_control_nodes']['es-mx'] = "Nodos";
|
||||
$text['label-access_control_nodes']['fr-ca'] = "nœuds";
|
||||
$text['label-access_control_nodes']['fr-fr'] = "nœuds";
|
||||
$text['label-access_control_nodes']['he-il'] = "בלוטות";
|
||||
$text['label-access_control_nodes']['it-it'] = "Nodi";
|
||||
$text['label-access_control_nodes']['ka-ge'] = "კვანძები";
|
||||
$text['label-access_control_nodes']['nl-nl'] = "Knooppunten";
|
||||
$text['label-access_control_nodes']['pl-pl'] = "węzły";
|
||||
$text['label-access_control_nodes']['pt-br'] = "Nodes";
|
||||
$text['label-access_control_nodes']['pt-pt'] = "Nodes";
|
||||
$text['label-access_control_nodes']['ro-ro'] = "Noduri";
|
||||
$text['label-access_control_nodes']['ru-ru'] = "Узлы";
|
||||
$text['label-access_control_nodes']['sv-se'] = "Noder";
|
||||
$text['label-access_control_nodes']['uk-ua'] = "вузли";
|
||||
$text['label-access_control_nodes']['tr-tr'] = "Düğümler";
|
||||
$text['label-access_control_nodes']['zh-cn'] = "节点";
|
||||
$text['label-access_control_nodes']['ja-jp'] = "ノード";
|
||||
$text['label-access_control_nodes']['ko-kr'] = "노드";
|
||||
|
||||
$text['label-access_control_description']['en-us'] = "Description";
|
||||
$text['label-access_control_description']['en-gb'] = "Description";
|
||||
$text['label-access_control_description']['ar-eg'] = "وصف";
|
||||
$text['label-access_control_description']['de-at'] = "Beschreibung";
|
||||
$text['label-access_control_description']['de-ch'] = "Beschreibung";
|
||||
$text['label-access_control_description']['de-de'] = "Beschreibung";
|
||||
$text['label-access_control_description']['el-gr'] = "Περιγραφή";
|
||||
$text['label-access_control_description']['es-cl'] = "Descripción";
|
||||
$text['label-access_control_description']['es-mx'] = "Descripción";
|
||||
$text['label-access_control_description']['fr-ca'] = "Description";
|
||||
$text['label-access_control_description']['fr-fr'] = "Description";
|
||||
$text['label-access_control_description']['he-il'] = "תיאור";
|
||||
$text['label-access_control_description']['it-it'] = "Descrizione";
|
||||
$text['label-access_control_description']['ka-ge'] = "აღწერა";
|
||||
$text['label-access_control_description']['nl-nl'] = "Omschrijving";
|
||||
$text['label-access_control_description']['pl-pl'] = "opis";
|
||||
$text['label-access_control_description']['pt-br'] = "Descrição";
|
||||
$text['label-access_control_description']['pt-pt'] = "Descrição";
|
||||
$text['label-access_control_description']['ro-ro'] = "Descriere";
|
||||
$text['label-access_control_description']['ru-ru'] = "Описание";
|
||||
$text['label-access_control_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-access_control_description']['uk-ua'] = "опис";
|
||||
$text['label-access_control_description']['tr-tr'] = "Tanım";
|
||||
$text['label-access_control_description']['zh-cn'] = "描述";
|
||||
$text['label-access_control_description']['ja-jp'] = "説明";
|
||||
$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']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
|
||||
$text['title_description-access_controls']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
|
||||
$text['title_description-access_controls']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
|
||||
$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."; //copied from es-cl
|
||||
$text['title_description-access_controls']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from 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_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-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from 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_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['label-node_type']['en-us'] = "Type";
|
||||
$text['label-node_type']['en-gb'] = "Type";
|
||||
$text['label-node_type']['ar-eg'] = "اكتب";
|
||||
$text['label-node_type']['de-at'] = "Art"; //copied from de-de
|
||||
$text['label-node_type']['de-ch'] = "Art"; //copied from de-de
|
||||
$text['label-node_type']['de-de'] = "Art";
|
||||
$text['label-node_type']['es-cl'] = "Escribe";
|
||||
$text['label-node_type']['es-mx'] = "Escribe"; //copied from es-cl
|
||||
$text['label-node_type']['fr-ca'] = "Type"; //copied from fr-fr
|
||||
$text['label-node_type']['fr-fr'] = "Type";
|
||||
$text['label-node_type']['he-il'] = "סוג";
|
||||
$text['label-node_type']['it-it'] = "Tipo";
|
||||
$text['label-node_type']['nl-nl'] = "Type";
|
||||
$text['label-node_type']['pl-pl'] = "typ";
|
||||
$text['label-node_type']['pt-br'] = "Tipo"; //copied from pt-pt
|
||||
$text['label-node_type']['pt-pt'] = "Tipo";
|
||||
$text['label-node_type']['ro-ro'] = "Tip";
|
||||
$text['label-node_type']['ru-ru'] = "Тип";
|
||||
$text['label-node_type']['sv-se'] = "Typ";
|
||||
$text['label-node_type']['uk-ua'] = "Тип";
|
||||
|
||||
$text['label-node_domain']['en-us'] = "Domain";
|
||||
$text['label-node_domain']['en-gb'] = "Domain";
|
||||
$text['label-node_domain']['ar-eg'] = "مجال";
|
||||
$text['label-node_domain']['de-at'] = " Domäne"; //copied from de-de
|
||||
$text['label-node_domain']['de-ch'] = " Domäne"; //copied from de-de
|
||||
$text['label-node_domain']['de-de'] = " Domäne";
|
||||
$text['label-node_domain']['es-cl'] = "Dominio";
|
||||
$text['label-node_domain']['es-mx'] = "Dominio"; //copied from es-cl
|
||||
$text['label-node_domain']['fr-ca'] = "Domaine"; //copied from fr-fr
|
||||
$text['label-node_domain']['fr-fr'] = "Domaine";
|
||||
$text['label-node_domain']['he-il'] = "תחום";
|
||||
$text['label-node_domain']['it-it'] = "Dominio";
|
||||
$text['label-node_domain']['nl-nl'] = "Domein";
|
||||
$text['label-node_domain']['pl-pl'] = "domeny";
|
||||
$text['label-node_domain']['pt-br'] = "Domínio"; //copied from pt-pt
|
||||
$text['label-node_domain']['pt-pt'] = "Domínio";
|
||||
$text['label-node_domain']['ro-ro'] = "Domeniu";
|
||||
$text['label-node_domain']['ru-ru'] = "Домен";
|
||||
$text['label-node_domain']['sv-se'] = "Domän";
|
||||
$text['label-node_domain']['uk-ua'] = "домен";
|
||||
|
||||
$text['label-node_description']['en-us'] = "Description";
|
||||
$text['label-node_description']['en-gb'] = "Description";
|
||||
$text['label-node_description']['ar-eg'] = "وصف";
|
||||
$text['label-node_description']['de-at'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-node_description']['de-ch'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-node_description']['de-de'] = "Beschreibung";
|
||||
$text['label-node_description']['es-cl'] = "Descripción";
|
||||
$text['label-node_description']['es-mx'] = "Descripción"; //copied from es-cl
|
||||
$text['label-node_description']['fr-ca'] = "Description"; //copied from fr-fr
|
||||
$text['label-node_description']['fr-fr'] = "Description";
|
||||
$text['label-node_description']['he-il'] = "תיאור";
|
||||
$text['label-node_description']['it-it'] = "Descrizione";
|
||||
$text['label-node_description']['nl-nl'] = "Beschrijving";
|
||||
$text['label-node_description']['pl-pl'] = "opis";
|
||||
$text['label-node_description']['pt-br'] = "Descrição"; //copied from pt-pt
|
||||
$text['label-node_description']['pt-pt'] = "Descrição";
|
||||
$text['label-node_description']['ro-ro'] = "Descriere";
|
||||
$text['label-node_description']['ru-ru'] = "Описание";
|
||||
$text['label-node_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-node_description']['uk-ua'] = "опис";
|
||||
|
||||
$text['label-node_cidr']['en-us'] = "CIDR";
|
||||
$text['label-node_cidr']['en-gb'] = "CIDR";
|
||||
$text['label-node_cidr']['ar-eg'] = "CIDR";
|
||||
$text['label-node_cidr']['de-at'] = "CIDR"; //copied from de-de
|
||||
$text['label-node_cidr']['de-ch'] = "CIDR"; //copied from de-de
|
||||
$text['label-node_cidr']['de-de'] = "CIDR";
|
||||
$text['label-node_cidr']['es-cl'] = "CIDR";
|
||||
$text['label-node_cidr']['es-mx'] = "CIDR"; //copied from es-cl
|
||||
$text['label-node_cidr']['fr-ca'] = "CIDR"; //copied from fr-fr
|
||||
$text['label-node_cidr']['fr-fr'] = "CIDR";
|
||||
$text['label-node_cidr']['he-il'] = "CIDR";
|
||||
$text['label-node_cidr']['it-it'] = "CIDR";
|
||||
$text['label-node_cidr']['nl-nl'] = "CIDR";
|
||||
$text['label-node_cidr']['pl-pl'] = "CIDR";
|
||||
$text['label-node_cidr']['pt-br'] = "CIDR"; //copied from pt-pt
|
||||
$text['label-node_cidr']['pt-pt'] = "CIDR";
|
||||
$text['label-node_cidr']['ro-ro'] = "CIDR";
|
||||
$text['label-node_cidr']['ru-ru'] = "CIDR";
|
||||
$text['label-node_cidr']['sv-se'] = "CIDR";
|
||||
$text['label-node_cidr']['uk-ua'] = "CIDR";
|
||||
|
||||
$text['label-deny']['en-us'] = "deny";
|
||||
$text['label-deny']['en-gb'] = "deny";
|
||||
$text['label-deny']['ar-eg'] = "تنكر";
|
||||
$text['label-deny']['de-at'] = " verbieten"; //copied from de-de
|
||||
$text['label-deny']['de-ch'] = " verbieten"; //copied from de-de
|
||||
$text['label-deny']['de-de'] = " verbieten";
|
||||
$text['label-deny']['es-cl'] = "Negar";
|
||||
$text['label-deny']['es-mx'] = "Negar"; //copied from es-cl
|
||||
$text['label-deny']['fr-ca'] = " nier"; //copied from fr-fr
|
||||
$text['label-deny']['fr-fr'] = " nier";
|
||||
$text['label-deny']['he-il'] = "להכחיש";
|
||||
$text['label-deny']['it-it'] = "nega";
|
||||
$text['label-deny']['nl-nl'] = "verbieden";
|
||||
$text['label-deny']['pl-pl'] = "odrzuć";
|
||||
$text['label-deny']['pt-br'] = "negar"; //copied from pt-pt
|
||||
$text['label-deny']['pt-pt'] = "negar";
|
||||
$text['label-deny']['ro-ro'] = "Nega";
|
||||
$text['label-deny']['ru-ru'] = "запретить";
|
||||
$text['label-deny']['sv-se'] = "förneka";
|
||||
$text['label-deny']['uk-ua'] = "правда";
|
||||
|
||||
$text['label-allow']['en-us'] = "allow";
|
||||
$text['label-allow']['en-gb'] = "allow";
|
||||
$text['label-allow']['ar-eg'] = "السماح";
|
||||
$text['label-allow']['de-at'] = "erlauben"; //copied from de-de
|
||||
$text['label-allow']['de-ch'] = "erlauben"; //copied from de-de
|
||||
$text['label-allow']['de-de'] = "erlauben";
|
||||
$text['label-allow']['es-cl'] = "Permitir";
|
||||
$text['label-allow']['es-mx'] = "Permitir"; //copied from es-cl
|
||||
$text['label-allow']['fr-ca'] = " permettre"; //copied from fr-fr
|
||||
$text['label-allow']['fr-fr'] = " permettre";
|
||||
$text['label-allow']['he-il'] = "לאפשר";
|
||||
$text['label-allow']['it-it'] = "permetti";
|
||||
$text['label-allow']['nl-nl'] = "toestaan";
|
||||
$text['label-allow']['pl-pl'] = "zezwól";
|
||||
$text['label-allow']['pt-br'] = "permitir"; //copied from pt-pt
|
||||
$text['label-allow']['pt-pt'] = "permitir";
|
||||
$text['label-allow']['ro-ro'] = "Permite";
|
||||
$text['label-allow']['ru-ru'] = "разрешить";
|
||||
$text['label-allow']['sv-se'] = "tillåta";
|
||||
$text['label-allow']['uk-ua'] = "дозволяти";
|
||||
|
||||
$text['label-access_control_name']['en-us'] = "Name";
|
||||
$text['label-access_control_name']['en-gb'] = "Name";
|
||||
$text['label-access_control_name']['ar-eg'] = "اسم";
|
||||
$text['label-access_control_name']['de-at'] = "Name"; //copied from de-de
|
||||
$text['label-access_control_name']['de-ch'] = "Name"; //copied from de-de
|
||||
$text['label-access_control_name']['de-de'] = "Name";
|
||||
$text['label-access_control_name']['es-cl'] = "Nombre";
|
||||
$text['label-access_control_name']['es-mx'] = "Nombre"; //copied from es-cl
|
||||
$text['label-access_control_name']['fr-ca'] = "Nom"; //copied from fr-fr
|
||||
$text['label-access_control_name']['fr-fr'] = "Nom";
|
||||
$text['label-access_control_name']['he-il'] = "שם";
|
||||
$text['label-access_control_name']['it-it'] = "Nome";
|
||||
$text['label-access_control_name']['nl-nl'] = "Naam";
|
||||
$text['label-access_control_name']['pl-pl'] = " Imię";
|
||||
$text['label-access_control_name']['pt-br'] = "Nome"; //copied from pt-pt
|
||||
$text['label-access_control_name']['pt-pt'] = "Nome";
|
||||
$text['label-access_control_name']['ro-ro'] = "Nume";
|
||||
$text['label-access_control_name']['ru-ru'] = "Имя";
|
||||
$text['label-access_control_name']['sv-se'] = "namn";
|
||||
$text['label-access_control_name']['uk-ua'] = "ім'я";
|
||||
|
||||
$text['label-access_control_default']['en-us'] = "Default";
|
||||
$text['label-access_control_default']['en-gb'] = "Default";
|
||||
$text['label-access_control_default']['ar-eg'] = "افتراضي";
|
||||
$text['label-access_control_default']['de-at'] = "Standard"; //copied from de-de
|
||||
$text['label-access_control_default']['de-ch'] = "Standard"; //copied from de-de
|
||||
$text['label-access_control_default']['de-de'] = "Standard";
|
||||
$text['label-access_control_default']['es-cl'] = "Defecto";
|
||||
$text['label-access_control_default']['es-mx'] = "Defecto"; //copied from es-cl
|
||||
$text['label-access_control_default']['fr-ca'] = "Par défaut"; //copied from fr-fr
|
||||
$text['label-access_control_default']['fr-fr'] = "Par défaut";
|
||||
$text['label-access_control_default']['he-il'] = " ברירת מחדל";
|
||||
$text['label-access_control_default']['it-it'] = "Predefinito";
|
||||
$text['label-access_control_default']['nl-nl'] = "Standaard";
|
||||
$text['label-access_control_default']['pl-pl'] = "Domyślnie";
|
||||
$text['label-access_control_default']['pt-br'] = "Padrão"; //copied from pt-pt
|
||||
$text['label-access_control_default']['pt-pt'] = "Padrão";
|
||||
$text['label-access_control_default']['ro-ro'] = "Implicit";
|
||||
$text['label-access_control_default']['ru-ru'] = "По умолчанию";
|
||||
$text['label-access_control_default']['sv-se'] = "Standard";
|
||||
$text['label-access_control_default']['uk-ua'] = "дефолт";
|
||||
|
||||
$text['label-access_control_nodes']['en-us'] = "Nodes";
|
||||
$text['label-access_control_nodes']['en-gb'] = "Nodes";
|
||||
$text['label-access_control_nodes']['ar-eg'] = "العقد";
|
||||
$text['label-access_control_nodes']['de-at'] = "Knoten"; //copied from de-de
|
||||
$text['label-access_control_nodes']['de-ch'] = "Knoten"; //copied from de-de
|
||||
$text['label-access_control_nodes']['de-de'] = "Knoten";
|
||||
$text['label-access_control_nodes']['es-cl'] = "Nodos";
|
||||
$text['label-access_control_nodes']['es-mx'] = "Nodos"; //copied from es-cl
|
||||
$text['label-access_control_nodes']['fr-ca'] = " nœuds"; //copied from fr-fr
|
||||
$text['label-access_control_nodes']['fr-fr'] = " nœuds";
|
||||
$text['label-access_control_nodes']['he-il'] = "בלוטות";
|
||||
$text['label-access_control_nodes']['it-it'] = "Nodi";
|
||||
$text['label-access_control_nodes']['nl-nl'] = "Knooppunten";
|
||||
$text['label-access_control_nodes']['pl-pl'] = "węzły";
|
||||
$text['label-access_control_nodes']['pt-br'] = "Nodes";
|
||||
$text['label-access_control_nodes']['pt-pt'] = " Nodes";
|
||||
$text['label-access_control_nodes']['ro-ro'] = "Noduri";
|
||||
$text['label-access_control_nodes']['ru-ru'] = "Узлы";
|
||||
$text['label-access_control_nodes']['sv-se'] = "Noder";
|
||||
$text['label-access_control_nodes']['uk-ua'] = "вузли";
|
||||
|
||||
$text['label-access_control_description']['en-us'] = "Description";
|
||||
$text['label-access_control_description']['en-gb'] = "Description";
|
||||
$text['label-access_control_description']['ar-eg'] = "وصف";
|
||||
$text['label-access_control_description']['de-at'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-access_control_description']['de-ch'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-access_control_description']['de-de'] = "Beschreibung";
|
||||
$text['label-access_control_description']['es-cl'] = "Descripción";
|
||||
$text['label-access_control_description']['es-mx'] = "Descripción"; //copied from es-cl
|
||||
$text['label-access_control_description']['fr-ca'] = "Description"; //copied from fr-fr
|
||||
$text['label-access_control_description']['fr-fr'] = "Description";
|
||||
$text['label-access_control_description']['he-il'] = "תיאור";
|
||||
$text['label-access_control_description']['it-it'] = "Descrizione";
|
||||
$text['label-access_control_description']['nl-nl'] = "Omschrijving";
|
||||
$text['label-access_control_description']['pl-pl'] = "opis";
|
||||
$text['label-access_control_description']['pt-br'] = "Descrição"; //copied from pt-pt
|
||||
$text['label-access_control_description']['pt-pt'] = "Descrição";
|
||||
$text['label-access_control_description']['ro-ro'] = "Descriere";
|
||||
$text['label-access_control_description']['ru-ru'] = "Описание";
|
||||
$text['label-access_control_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-access_control_description']['uk-ua'] = "опис";
|
||||
|
||||
$text['description-node_type']['en-us'] = "Select the type.";
|
||||
$text['description-node_type']['en-gb'] = "Select the type.";
|
||||
$text['description-node_type']['ar-eg'] = "حدد نوع.";
|
||||
$text['description-node_type']['de-at'] = "Wählen Sie den Typ.";
|
||||
$text['description-node_type']['de-ch'] = "Wählen Sie den Typ.";
|
||||
$text['description-node_type']['de-de'] = "Wählen Sie den Typ.";
|
||||
$text['description-node_type']['el-gr'] = "Επιλέξτε τον τύπο";
|
||||
$text['description-node_type']['de-at'] = " Wählen Sie den Typ."; //copied from de-de
|
||||
$text['description-node_type']['de-ch'] = " Wählen Sie den Typ."; //copied from de-de
|
||||
$text['description-node_type']['de-de'] = " Wählen Sie den Typ.";
|
||||
$text['description-node_type']['es-cl'] = "Seleccione el tipo.";
|
||||
$text['description-node_type']['es-mx'] = "Seleccione el tipo.";
|
||||
$text['description-node_type']['fr-ca'] = "Sélectionnez le type";
|
||||
$text['description-node_type']['fr-fr'] = "Sélectionnez le type";
|
||||
$text['description-node_type']['he-il'] = "בחר את הסוג.";
|
||||
$text['description-node_type']['es-mx'] = "Seleccione el tipo."; //copied from es-cl
|
||||
$text['description-node_type']['fr-ca'] = " Sélectionnez le type"; //copied from fr-fr
|
||||
$text['description-node_type']['fr-fr'] = " Sélectionnez le type";
|
||||
$text['description-node_type']['he-il'] = " בחר את הסוג.";
|
||||
$text['description-node_type']['it-it'] = "Seleziona il tipo.";
|
||||
$text['description-node_type']['ka-ge'] = "აირჩიეთ ტიპი.";
|
||||
$text['description-node_type']['nl-nl'] = "Selecteer het type.";
|
||||
$text['description-node_type']['pl-pl'] = "Wybierz rodzaj.";
|
||||
$text['description-node_type']['pt-br'] = "Selecione o tipo.";
|
||||
$text['description-node_type']['pt-br'] = "Selecione o tipo."; //copied from pt-pt
|
||||
$text['description-node_type']['pt-pt'] = "Selecione o tipo.";
|
||||
$text['description-node_type']['ro-ro'] = "Selectați tipul.";
|
||||
$text['description-node_type']['ru-ru'] = "Выберите тип.";
|
||||
$text['description-node_type']['sv-se'] = "Välj typ.";
|
||||
$text['description-node_type']['uk-ua'] = "Виберіть тип.";
|
||||
$text['description-node_type']['tr-tr'] = "Türü seçin.";
|
||||
$text['description-node_type']['zh-cn'] = "选择类型。";
|
||||
$text['description-node_type']['ja-jp'] = "タイプを選択してください。";
|
||||
$text['description-node_type']['ko-kr'] = "유형을 선택합니다.";
|
||||
|
||||
$text['description-node_domain']['en-us'] = "Enter the domain name.";
|
||||
$text['description-node_domain']['en-gb'] = "Enter the domain name.";
|
||||
$text['description-node_domain']['ar-eg'] = "أدخل اسم المجال.";
|
||||
$text['description-node_domain']['de-at'] = "Geben Sie den Domain-Namen.";
|
||||
$text['description-node_domain']['de-ch'] = "Geben Sie den Domain-Namen.";
|
||||
$text['description-node_domain']['de-at'] = "Geben Sie den Domain-Namen."; //copied from de-de
|
||||
$text['description-node_domain']['de-ch'] = "Geben Sie den Domain-Namen."; //copied from de-de
|
||||
$text['description-node_domain']['de-de'] = "Geben Sie den Domain-Namen.";
|
||||
$text['description-node_domain']['el-gr'] = "Εισαγάγετε το όνομα τομέα.";
|
||||
$text['description-node_domain']['es-cl'] = "Introduzca el nombre de dominio.";
|
||||
$text['description-node_domain']['es-mx'] = "Introduzca el nombre de dominio.";
|
||||
$text['description-node_domain']['fr-ca'] = "Entrez le nom de domaine.";
|
||||
$text['description-node_domain']['es-mx'] = "Introduzca el nombre de dominio."; //copied from es-cl
|
||||
$text['description-node_domain']['fr-ca'] = "Entrez le nom de domaine."; //copied from fr-fr
|
||||
$text['description-node_domain']['fr-fr'] = "Entrez le nom de domaine.";
|
||||
$text['description-node_domain']['he-il'] = " הזן את שם הדומיין.";
|
||||
$text['description-node_domain']['it-it'] = "Inserisci il dominio.";
|
||||
$text['description-node_domain']['ka-ge'] = "შეიყვანეთ დომენის სახელი";
|
||||
$text['description-node_domain']['nl-nl'] = "Voer de domeinnaam in.";
|
||||
$text['description-node_domain']['pl-pl'] = "Wprowadź nazwę domeny.";
|
||||
$text['description-node_domain']['pt-br'] = "Digite o nome de domínio.";
|
||||
$text['description-node_domain']['pl-pl'] = " Wprowadź nazwę domeny.";
|
||||
$text['description-node_domain']['pt-br'] = "Digite o nome de domínio."; //copied from pt-pt
|
||||
$text['description-node_domain']['pt-pt'] = "Digite o nome de domínio.";
|
||||
$text['description-node_domain']['ro-ro'] = "Introduceți numele de domeniu.";
|
||||
$text['description-node_domain']['ru-ru'] = "Введите имя домена.";
|
||||
$text['description-node_domain']['sv-se'] = "Ange domännamnet.";
|
||||
$text['description-node_domain']['uk-ua'] = "Введіть ім'я домену.";
|
||||
$text['description-node_domain']['tr-tr'] = "Alan adını girin.";
|
||||
$text['description-node_domain']['zh-cn'] = "输入域名。";
|
||||
$text['description-node_domain']['ja-jp'] = "ドメイン名を入力します。";
|
||||
$text['description-node_domain']['ko-kr'] = "도메인 이름을 입력합니다.";
|
||||
|
||||
$text['description-node_description']['en-us'] = "Enter the description.";
|
||||
$text['description-node_description']['en-gb'] = "Enter the description.";
|
||||
$text['description-node_description']['ar-eg'] = "أدخل الوصف.";
|
||||
$text['description-node_description']['de-at'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-node_description']['de-ch'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-node_description']['de-at'] = "Geben Sie die Beschreibung ein."; //copied from de-de
|
||||
$text['description-node_description']['de-ch'] = "Geben Sie die Beschreibung ein."; //copied from de-de
|
||||
$text['description-node_description']['de-de'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-node_description']['el-gr'] = "Εισαγάγετε την περιγραφή.";
|
||||
$text['description-node_description']['es-cl'] = "Introduzca la descripción.";
|
||||
$text['description-node_description']['es-mx'] = "Introduzca la descripción.";
|
||||
$text['description-node_description']['fr-ca'] = "Entrez la description.";
|
||||
$text['description-node_description']['es-cl'] = " Introduzca la descripción.";
|
||||
$text['description-node_description']['es-mx'] = " Introduzca la descripción."; //copied from es-cl
|
||||
$text['description-node_description']['fr-ca'] = "Entrez la description."; //copied from fr-fr
|
||||
$text['description-node_description']['fr-fr'] = "Entrez la description.";
|
||||
$text['description-node_description']['he-il'] = " הזן את התיאור.";
|
||||
$text['description-node_description']['it-it'] = "Inserisci la descrizione.";
|
||||
$text['description-node_description']['ka-ge'] = "შეიყვანეთ აღწერა";
|
||||
$text['description-node_description']['nl-nl'] = "Voer de beschrijving in.";
|
||||
$text['description-node_description']['pl-pl'] = "Wprowadź opis.";
|
||||
$text['description-node_description']['pl-pl'] = " Wprowadź opis.";
|
||||
$text['description-node_description']['pt-br'] = "Digite a descrição.";
|
||||
$text['description-node_description']['pt-pt'] = "Digite a descrição.";
|
||||
$text['description-node_description']['pt-pt'] = " Digite a descrição.";
|
||||
$text['description-node_description']['ro-ro'] = "Introduceți descrierea.";
|
||||
$text['description-node_description']['ru-ru'] = "Введите описание.";
|
||||
$text['description-node_description']['sv-se'] = "Ange beskrivningen.";
|
||||
$text['description-node_description']['uk-ua'] = "Введіть опис.";
|
||||
$text['description-node_description']['tr-tr'] = "Açıklamayı girin.";
|
||||
$text['description-node_description']['zh-cn'] = "输入说明。";
|
||||
$text['description-node_description']['ja-jp'] = "説明を入力します。";
|
||||
$text['description-node_description']['ko-kr'] = "설명을 입력합니다.";
|
||||
|
||||
$text['description-node_cidr']['en-us'] = "Enter the IP CIDR range.";
|
||||
$text['description-node_cidr']['en-gb'] = "Enter the IP CIDR range.";
|
||||
$text['description-node_cidr']['ar-eg'] = "أدخل نطاق IP CIDR.";
|
||||
$text['description-node_cidr']['de-at'] = "Geben Sie die IP CIDR-Bereich an.";
|
||||
$text['description-node_cidr']['de-ch'] = "Geben Sie die IP CIDR-Bereich an.";
|
||||
$text['description-node_cidr']['de-de'] = "Geben Sie die IP CIDR-Bereich an.";
|
||||
$text['description-node_cidr']['el-gr'] = "Εισαγάγετε το εύρος IP CIDR.";
|
||||
$text['description-node_cidr']['es-cl'] = "Introduzca el rango de direcciones IP CIDR.";
|
||||
$text['description-node_cidr']['es-mx'] = "Introduzca el rango de direcciones IP CIDR.";
|
||||
$text['description-node_cidr']['fr-ca'] = "Entrez la plage IP CIDR.";
|
||||
$text['description-node_cidr']['de-at'] = " Geben Sie die IP CIDR-Bereich an."; //copied from de-de
|
||||
$text['description-node_cidr']['de-ch'] = " Geben Sie die IP CIDR-Bereich an."; //copied from de-de
|
||||
$text['description-node_cidr']['de-de'] = " Geben Sie die IP CIDR-Bereich an.";
|
||||
$text['description-node_cidr']['es-cl'] = " Introduzca el rango de direcciones IP CIDR.";
|
||||
$text['description-node_cidr']['es-mx'] = " Introduzca el rango de direcciones IP CIDR."; //copied from es-cl
|
||||
$text['description-node_cidr']['fr-ca'] = "Entrez la plage IP CIDR."; //copied from fr-fr
|
||||
$text['description-node_cidr']['fr-fr'] = "Entrez la plage IP CIDR.";
|
||||
$text['description-node_cidr']['he-il'] = " הזן את טווח ה- IP CIDR.";
|
||||
$text['description-node_cidr']['it-it'] = "Inserisci il range IP CIDR.";
|
||||
$text['description-node_cidr']['ka-ge'] = "შეიყვანეთ IP CIDR შუალედი(Range)";
|
||||
$text['description-node_cidr']['nl-nl'] = "Voer het IP CIDR reeks in.";
|
||||
$text['description-node_cidr']['pl-pl'] = "Wprowadź zakres IP CIDR.";
|
||||
$text['description-node_cidr']['pt-br'] = "Digite o intervalo IP CIDR.";
|
||||
$text['description-node_cidr']['pt-br'] = "Digite o intervalo IP CIDR."; //copied from pt-pt
|
||||
$text['description-node_cidr']['pt-pt'] = "Digite o intervalo IP CIDR.";
|
||||
$text['description-node_cidr']['ro-ro'] = "Introduceți intervalul de IP CIDR.";
|
||||
$text['description-node_cidr']['ru-ru'] = "Введите диапазон IP CIDR.";
|
||||
$text['description-node_cidr']['sv-se'] = "Ange IP CIDR sortimentet.";
|
||||
$text['description-node_cidr']['uk-ua'] = "Введіть діапазон IP-CIDR.";
|
||||
$text['description-node_cidr']['tr-tr'] = "IP CIDR aralığını girin.";
|
||||
$text['description-node_cidr']['zh-cn'] = "输入 IP CIDR 范围。";
|
||||
$text['description-node_cidr']['ja-jp'] = "IP CIDR 範囲を入力します。";
|
||||
$text['description-node_cidr']['ko-kr'] = "IP CIDR 범위를 입력합니다.";
|
||||
|
||||
$text['description-access_control_name']['en-us'] = "Enter the name.";
|
||||
$text['description-access_control_name']['en-gb'] = "Enter the name.";
|
||||
$text['description-access_control_name']['ar-eg'] = "أدخل اسم.";
|
||||
$text['description-access_control_name']['de-at'] = "Namen eingeben.";
|
||||
$text['description-access_control_name']['de-ch'] = "Namen eingeben.";
|
||||
$text['description-access_control_name']['de-at'] = "Namen eingeben."; //copied from de-de
|
||||
$text['description-access_control_name']['de-ch'] = "Namen eingeben."; //copied from de-de
|
||||
$text['description-access_control_name']['de-de'] = "Namen eingeben.";
|
||||
$text['description-access_control_name']['el-gr'] = "Εισαγάγετε το όνομα.";
|
||||
$text['description-access_control_name']['es-cl'] = "Introduzca el nombre.";
|
||||
$text['description-access_control_name']['es-mx'] = "Introduzca el nombre.";
|
||||
$text['description-access_control_name']['fr-ca'] = "Entrez le nom.";
|
||||
$text['description-access_control_name']['es-cl'] = " Introduzca el nombre.";
|
||||
$text['description-access_control_name']['es-mx'] = " Introduzca el nombre."; //copied from es-cl
|
||||
$text['description-access_control_name']['fr-ca'] = "Entrez le nom."; //copied from fr-fr
|
||||
$text['description-access_control_name']['fr-fr'] = "Entrez le nom.";
|
||||
$text['description-access_control_name']['he-il'] = " הזן את השם.";
|
||||
$text['description-access_control_name']['it-it'] = "Inserisci il nome.";
|
||||
$text['description-access_control_name']['ka-ge'] = "შეიყვანეთ სახელი.";
|
||||
$text['description-access_control_name']['nl-nl'] = "Voer de naam in.";
|
||||
$text['description-access_control_name']['pl-pl'] = "Wpisz nazwę.";
|
||||
$text['description-access_control_name']['pt-br'] = "Digite o nome.";
|
||||
$text['description-access_control_name']['pl-pl'] = " Wpisz nazwę.";
|
||||
$text['description-access_control_name']['pt-br'] = "Digite o nome."; //copied from pt-pt
|
||||
$text['description-access_control_name']['pt-pt'] = "Digite o nome.";
|
||||
$text['description-access_control_name']['ro-ro'] = "Introduceți numele.";
|
||||
$text['description-access_control_name']['ru-ru'] = "Введите имя.";
|
||||
$text['description-access_control_name']['sv-se'] = "Ange namnet.";
|
||||
$text['description-access_control_name']['uk-ua'] = "Введіть ім'я.";
|
||||
$text['description-access_control_name']['tr-tr'] = "Adı girin.";
|
||||
$text['description-access_control_name']['zh-cn'] = "输入名称。";
|
||||
$text['description-access_control_name']['ja-jp'] = "名前を入力します。";
|
||||
$text['description-access_control_name']['ko-kr'] = "이름을 입력하세요.";
|
||||
|
||||
$text['description-access_control_description']['en-us'] = "Enter the description";
|
||||
$text['description-access_control_description']['en-gb'] = "Enter the description";
|
||||
$text['description-access_control_description']['ar-eg'] = "دخل وصف";
|
||||
$text['description-access_control_description']['de-at'] = "Beschreibung eingeben.";
|
||||
$text['description-access_control_description']['de-ch'] = "Beschreibung eingeben.";
|
||||
$text['description-access_control_description']['de-at'] = "Beschreibung eingeben."; //copied from de-de
|
||||
$text['description-access_control_description']['de-ch'] = "Beschreibung eingeben."; //copied from de-de
|
||||
$text['description-access_control_description']['de-de'] = "Beschreibung eingeben.";
|
||||
$text['description-access_control_description']['el-gr'] = "Εισαγάγετε την περιγραφή";
|
||||
$text['description-access_control_description']['es-cl'] = "Introduzca la descripción";
|
||||
$text['description-access_control_description']['es-mx'] = "Introduzca la descripción";
|
||||
$text['description-access_control_description']['fr-ca'] = "Entrez la description.";
|
||||
$text['description-access_control_description']['es-mx'] = "Introduzca la descripción"; //copied from es-cl
|
||||
$text['description-access_control_description']['fr-ca'] = "Entrez la description."; //copied from fr-fr
|
||||
$text['description-access_control_description']['fr-fr'] = "Entrez la description.";
|
||||
$text['description-access_control_description']['he-il'] = " הזן את התיאור";
|
||||
$text['description-access_control_description']['it-it'] = "Inserisci la descrizione";
|
||||
$text['description-access_control_description']['ka-ge'] = "შეიყვანეთ აღწერა";
|
||||
$text['description-access_control_description']['nl-nl'] = "Voer de omschrijving in.";
|
||||
$text['description-access_control_description']['pl-pl'] = "Wprowadź opis";
|
||||
$text['description-access_control_description']['pt-br'] = "Digite a descrição.";
|
||||
|
|
@ -616,63 +441,26 @@ $text['description-access_control_description']['ro-ro'] = "Introduceți descrie
|
|||
$text['description-access_control_description']['ru-ru'] = "Введите описание";
|
||||
$text['description-access_control_description']['sv-se'] = "Ange en beskrivning";
|
||||
$text['description-access_control_description']['uk-ua'] = "Введіть опис";
|
||||
$text['description-access_control_description']['tr-tr'] = "Açıklamayı girin";
|
||||
$text['description-access_control_description']['zh-cn'] = "输入描述";
|
||||
$text['description-access_control_description']['ja-jp'] = "説明を入力してください";
|
||||
$text['description-access_control_description']['ko-kr'] = "설명을 입력하세요";
|
||||
|
||||
$text['description-access_control_default']['en-us'] = "Select the default type.";
|
||||
$text['description-access_control_default']['en-gb'] = "Select the default type.";
|
||||
$text['description-access_control_default']['ar-eg'] = "حدد نوع الافتراضي.";
|
||||
$text['description-access_control_default']['de-at'] = "Wählen Sie den Standardtyp.";
|
||||
$text['description-access_control_default']['de-ch'] = "Wählen Sie den Standardtyp.";
|
||||
$text['description-access_control_default']['de-de'] = "Wählen Sie den Standardtyp.";
|
||||
$text['description-access_control_default']['el-gr'] = "Επιλέξτε τον προεπιλεγμένο τύπο.";
|
||||
$text['description-access_control_default']['de-at'] = " Wählen Sie den Standardtyp."; //copied from de-de
|
||||
$text['description-access_control_default']['de-ch'] = " Wählen Sie den Standardtyp."; //copied from de-de
|
||||
$text['description-access_control_default']['de-de'] = " Wählen Sie den Standardtyp.";
|
||||
$text['description-access_control_default']['es-cl'] = "Seleccione el tipo de defecto.";
|
||||
$text['description-access_control_default']['es-mx'] = "Seleccione el tipo de defecto.";
|
||||
$text['description-access_control_default']['fr-ca'] = "Sélectionnez le type de défaut";
|
||||
$text['description-access_control_default']['es-mx'] = "Seleccione el tipo de defecto."; //copied from es-cl
|
||||
$text['description-access_control_default']['fr-ca'] = "Sélectionnez le type de défaut"; //copied from fr-fr
|
||||
$text['description-access_control_default']['fr-fr'] = "Sélectionnez le type de défaut";
|
||||
$text['description-access_control_default']['he-il'] = " בחר את סוג ברירת המחדל.";
|
||||
$text['description-access_control_default']['it-it'] = "Scegli il tipo di default.";
|
||||
$text['description-access_control_default']['ka-ge'] = "აირჩიეთ ნაგულისხმევი ტიპი.";
|
||||
$text['description-access_control_default']['nl-nl'] = "Selecteer het standaard type.";
|
||||
$text['description-access_control_default']['pl-pl'] = "Wybierz typ domyślny.";
|
||||
$text['description-access_control_default']['pt-br'] = "Selecione o tipo de padrão.";
|
||||
$text['description-access_control_default']['pt-br'] = "Selecione o tipo de padrão."; //copied from pt-pt
|
||||
$text['description-access_control_default']['pt-pt'] = "Selecione o tipo de padrão.";
|
||||
$text['description-access_control_default']['ro-ro'] = "Selectați tipul implicit.";
|
||||
$text['description-access_control_default']['ru-ru'] = "Выберите тип по умолчанию.";
|
||||
$text['description-access_control_default']['sv-se'] = "Välj standardtypen.";
|
||||
$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням.";
|
||||
$text['description-access_control_default']['tr-tr'] = "Varsayılan türü seçin.";
|
||||
$text['description-access_control_default']['zh-cn'] = "选择默认类型。";
|
||||
$text['description-access_control_default']['ja-jp'] = "デフォルトのタイプを選択します。";
|
||||
$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'] = "내보내기에 포함할 필드를 선택합니다.";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,16 +4,15 @@
|
|||
$apps[$x]['menu'][$y]['title']['en-us'] = "Access Controls";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Access Controls";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "عناصر التحكم في الوصول";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Zugriffskontrolle";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Zugriffskontrollen";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Zugriffskontrolle";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = " Zugriffskontrolle";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = " Zugriffskontrolle";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Controles de acceso";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Controles de acceso";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Contrôles d'accès";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Contrôles d'accès";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "בקרת גישה";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Controlli Accesso";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "წვდომების კონტროლი";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Toegangs Controle";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Kontrola dostępu";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Controles de Acesso";
|
||||
|
|
@ -22,16 +21,10 @@
|
|||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Контроль доступа";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "контроль доступу";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Åtkomstkontroll";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "出入控制";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "アクセス制御";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "액세스 제어";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "bd47c972-5498-4541-b44a-d4bbfac69496";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/access_controls/access_controls.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
/**
|
||||
* access controls class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('access_controls')) {
|
||||
class access_controls {
|
||||
|
||||
/**
|
||||
|
|
@ -21,9 +24,20 @@
|
|||
public function __construct() {
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'access_controls';
|
||||
$this->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$this->list_page = 'access_controls.php';
|
||||
$this->app_name = 'access_controls';
|
||||
$this->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$this->list_page = 'access_controls.php';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -32,120 +46,126 @@
|
|||
public function delete($records) {
|
||||
|
||||
//assign private variables
|
||||
$this->permission_prefix = 'access_control_';
|
||||
$this->table = 'access_controls';
|
||||
$this->uuid_prefix = 'access_control_';
|
||||
$this->permission_prefix = 'access_control_';
|
||||
$this->table = 'access_controls';
|
||||
$this->uuid_prefix = 'access_control_';
|
||||
|
||||
if (permission_exists($this->permission_prefix . 'delete')) {
|
||||
if (permission_exists($this->permission_prefix.'delete')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'], 'negative');
|
||||
header('Location: ' . $this->list_page);
|
||||
exit;
|
||||
}
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//delete multiple records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//build the delete array
|
||||
foreach ($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix . 'uuid'] = $record['uuid'];
|
||||
$array['access_control_nodes'][$x][$this->uuid_prefix . 'uuid'] = $record['uuid'];
|
||||
}
|
||||
//build the delete array
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
$array['access_control_nodes'][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
}
|
||||
}
|
||||
|
||||
//delete the checked rows
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = new permissions;
|
||||
$p->add('access_control_node_delete', 'temp');
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('access_control_node_delete', 'temp');
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
|
||||
//delete the checked rows
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p->add('access_control_node_delete', 'temp');
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('access_control_node_delete', 'temp');
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
event_socket::async("reloadacl");
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_nodes($records) {
|
||||
|
||||
//assign private variables
|
||||
$this->permission_prefix = 'access_control_node_';
|
||||
$this->table = 'access_control_nodes';
|
||||
$this->uuid_prefix = 'access_control_node_';
|
||||
$this->permission_prefix = 'access_control_node_';
|
||||
$this->table = 'access_control_nodes';
|
||||
$this->uuid_prefix = 'access_control_node_';
|
||||
|
||||
if (permission_exists($this->permission_prefix . 'delete')) {
|
||||
if (permission_exists($this->permission_prefix.'delete')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate('/app/access_controls/access_control_nodes.php')) {
|
||||
message::add($text['message-invalid_token'], 'negative');
|
||||
header('Location: ' . $this->list_page);
|
||||
exit;
|
||||
}
|
||||
$token = new token;
|
||||
if (!$token->validate('/app/access_controls/access_control_nodes.php')) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//delete multiple records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//build the delete array
|
||||
foreach ($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix . 'uuid'] = $record['uuid'];
|
||||
}
|
||||
//build the delete array
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
}
|
||||
}
|
||||
|
||||
//delete the checked rows
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
|
||||
//delete the checked rows
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
event_socket::async("reloadacl");
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,108 +175,118 @@
|
|||
public function copy($records) {
|
||||
|
||||
//assign private variables
|
||||
$this->permission_prefix = 'access_control_';
|
||||
$this->table = 'access_controls';
|
||||
$this->uuid_prefix = 'access_control_';
|
||||
$this->permission_prefix = 'access_control_';
|
||||
$this->table = 'access_controls';
|
||||
$this->uuid_prefix = 'access_control_';
|
||||
|
||||
if (permission_exists($this->permission_prefix . 'add')) {
|
||||
if (permission_exists($this->permission_prefix.'add')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'], 'negative');
|
||||
header('Location: ' . $this->list_page);
|
||||
exit;
|
||||
}
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//copy the checked records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//get checked records
|
||||
foreach ($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'" . $record['uuid'] . "'";
|
||||
}
|
||||
}
|
||||
|
||||
//create insert array from existing data
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
|
||||
//primary table
|
||||
$sql = "select * from v_" . $this->table . " ";
|
||||
$sql .= "where " . $this->uuid_prefix . "uuid in (" . implode(', ', $uuids) . ") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
$y = 0;
|
||||
foreach ($rows as $x => $row) {
|
||||
$primary_uuid = uuid();
|
||||
|
||||
//copy data
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
//overwrite
|
||||
$array[$this->table][$x][$this->uuid_prefix . 'uuid'] = $primary_uuid;
|
||||
$array[$this->table][$x]['access_control_description'] = trim($row['access_control_description'] . ' (' . $text['label-copy'] . ')');
|
||||
|
||||
//nodes sub table
|
||||
$sql_2 = "select * from v_access_control_nodes where access_control_uuid = :access_control_uuid";
|
||||
$parameters_2['access_control_uuid'] = $row['access_control_uuid'];
|
||||
$database = new database;
|
||||
$rows_2 = $database->select($sql_2, $parameters_2, 'all');
|
||||
if (is_array($rows_2) && @sizeof($rows_2) != 0) {
|
||||
foreach ($rows_2 as $row_2) {
|
||||
|
||||
//copy data
|
||||
$array['access_control_nodes'][$y] = $row_2;
|
||||
|
||||
//overwrite
|
||||
$array['access_control_nodes'][$y]['access_control_node_uuid'] = uuid();
|
||||
$array['access_control_nodes'][$y]['access_control_uuid'] = $primary_uuid;
|
||||
|
||||
//increment
|
||||
$y++;
|
||||
}
|
||||
//get checked records
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
unset($sql_2, $parameters_2, $rows_2, $row_2);
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
|
||||
//create insert array from existing data
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
|
||||
//primary table
|
||||
$sql = "select * from v_".$this->table." ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
$y = 0;
|
||||
foreach ($rows as $x => $row) {
|
||||
$primary_uuid = uuid();
|
||||
|
||||
//copy data
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
//overwrite
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $primary_uuid;
|
||||
$array[$this->table][$x]['access_control_description'] = trim($row['access_control_description'].' ('.$text['label-copy'].')');
|
||||
|
||||
//nodes sub table
|
||||
$sql_2 = "select * from v_access_control_nodes where access_control_uuid = :access_control_uuid";
|
||||
$parameters_2['access_control_uuid'] = $row['access_control_uuid'];
|
||||
$database = new database;
|
||||
$rows_2 = $database->select($sql_2, $parameters_2, 'all');
|
||||
if (is_array($rows_2) && @sizeof($rows_2) != 0) {
|
||||
foreach ($rows_2 as $row_2) {
|
||||
|
||||
//copy data
|
||||
$array['access_control_nodes'][$y] = $row_2;
|
||||
|
||||
//overwrite
|
||||
$array['access_control_nodes'][$y]['access_control_node_uuid'] = uuid();
|
||||
$array['access_control_nodes'][$y]['access_control_uuid'] = $primary_uuid;
|
||||
|
||||
//increment
|
||||
$y++;
|
||||
|
||||
}
|
||||
}
|
||||
unset($sql_2, $parameters_2, $rows_2, $row_2);
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
}
|
||||
|
||||
//save the changes and set the message
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = new permissions;
|
||||
$p->add('access_control_node_add', 'temp');
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('access_control_node_add', 'temp');
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
|
||||
//save the changes and set the message
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p->add('access_control_node_add', 'temp');
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('access_control_node_add', 'temp');
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
event_socket::async("reloadacl");
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,204 +0,0 @@
|
|||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = "Avaya";
|
||||
$apps[$x]['uuid'] = "194d9272-2fd9-4b42-8992-63915d18f8eb";
|
||||
$apps[$x]['category'] = "Vendor";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "1.0";
|
||||
$apps[$x]['license'] = "";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "";
|
||||
$apps[$x]['description']['en-gb'] = "";
|
||||
$apps[$x]['description']['ar-eg'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['es-cl'] = "";
|
||||
$apps[$x]['description']['es-mx'] = "";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "";
|
||||
$apps[$x]['description']['nl-nl'] = "";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "";
|
||||
$apps[$x]['description']['ro-ro'] = "";
|
||||
$apps[$x]['description']['ru-ru'] = "";
|
||||
$apps[$x]['description']['sv-se'] = "";
|
||||
$apps[$x]['description']['uk-ua'] = "";
|
||||
|
||||
//default settings
|
||||
$y=0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c58b1c0f-b0c9-42a2-a971-4da25fa9fafa";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j139_firmware_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Firmware filename URL for J139 Phone";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "98c04df8-35c8-4465-a52b-f1b7cdf08c30";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j179_firmware_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Firmware filename URL for J179 Phone";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d2e19a7d-d3b3-4b49-b267-938f66845bdf";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j169_firmware_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Firmware filename URL for J169 Phone";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "053f9829-1f4d-4292-a308-e447dc4483b9";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_jem24_firmware_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Firmware filename URL for JEM 24 Expansion Module";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bbc7f7c7-d8a9-4f13-bf1d-a16ee0855c36";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_dialplan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "XXX|XXXX,*XX,1XXXXXXXXXX,XXXXXXXXXX";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "|:Pattern separator, X: any single digit, []: used to specify one digit with valid digits inside the brackets. a - dash may be used for ranges.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ab3fc35c-fb8b-4dd0-ba0d-b0883cd31c45";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_time_zone";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "-5:00";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Timezone offset";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0c3b36b2-a638-4d8e-8619-8fde234e6349";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_dst_start";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2SunMar2L";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Example, 2SunMar2L which corresponds to the second Sunday in March at 2 AM local time";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "09922e2a-6d3f-4833-8a50-40b1942a7bb0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_dst_stop";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1SunNov2L";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Example, 1SunNov2L which corresponds to the first Sunday in November at 2 AM local time";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "cd9143fb-54f7-4bf7-acea-d7ea775c9876";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_key_customization";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$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'] = "Setting to allow or disallow users to change the buttons on the phone. 0 - Blocked, 1 - Limited (User customization is allowed for Applications and Contacts), 2 - Full";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b67d14cb-5d1f-46bf-baa5-2500a9135b5d";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j189_wallpaper_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "800 x 480 pixels max. JPG only. Max file size is 256KB";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "554de3b3-444a-4221-9d15-524be3ef71a8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j189_wallpaper_filename";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "The filename of the default wallpaper to be displayed";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "90222f45-3996-4b74-89bc-68f12ad78afe";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j189_secondary_wallpaper_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "240 x 320 pixels max. JPG only. Max file size is 256KB";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1b08fd61-246f-4053-a053-568e7128e3e1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j189_secondary_wallpaper_filename";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "The filename of the default wallpaper to be displayed";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "75d92d17-6096-47ec-89f6-bbf17479fb85";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j179_wallpaper_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "320 x 240 pixels max. JPG only. Max file size is 256KB";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7b45e899-53ac-41b5-94c6-b485a41f66ff";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j179_wallpaper_filename";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "The filename of the default wallpaper to be displayed";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4244f3b6-78cd-46a2-bdbd-e0d8452c4de3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j139_wallpaper_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "320 x 240 pixels max. JPG only. Max file size is 256KB";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "234e2429-11dc-4a62-be81-79737085284c";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j139_wallpaper_filename";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "The filename of the default wallpaper to be displayed";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "30cbfda7-f068-463f-80a4-aeecf8c48eaf";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j169_wallpaper_url";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "320 x 240 pixels max. JPG only. Max file size is 256KB";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7e29deec-d19a-4ff2-ab5b-513fa824e4ed";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_j169_wallpaper_filename";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "The filename of the default wallpaper to be displayed";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a53f2369-19fb-449d-8daa-189707b79cc6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "avaya_ntp_server";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$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++;
|
||||
|
||||
?>
|
||||
|
|
@ -1 +0,0 @@
|
|||
For Provisioning to work propery you will need to be on firmware 4.1.4.0.5 and greater
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "ოპერატორის პანელი სტატუსს აჩვენებს.";
|
||||
$apps[$x]['description']['nl-nl'] = "Bedieningspaneel laat de status zien";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
|
@ -73,17 +72,9 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "group_extensions";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set if extensions are grouped by call_group when viewing all extensions.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0d3b16b0-5cd6-4d0e-8b58-967972362ef8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "operator_panel";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "show_unregistered";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether unregistered extensions are displayed or not.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a9ccd174-5ae1-4f90-8ee2-b79a183a04f8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "operator_panel_main_background_color";
|
||||
|
|
|
|||
|
|
@ -1,570 +1,424 @@
|
|||
<?php
|
||||
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
|
||||
|
||||
$text['title-operator_panel']['en-us'] = "Operator Panel";
|
||||
$text['title-operator_panel']['en-gb'] = "Operator Panel";
|
||||
$text['title-operator_panel']['ar-eg'] = "لوحة المشغل";
|
||||
$text['title-operator_panel']['de-at'] = "Bedienfeld";
|
||||
$text['title-operator_panel']['de-ch'] = "Bedienfeld";
|
||||
$text['title-operator_panel']['ar-eg'] = "";
|
||||
$text['title-operator_panel']['de-at'] = "Bedienfeld"; //copied from de-de
|
||||
$text['title-operator_panel']['de-ch'] = "Bedienfeld"; //copied from de-de
|
||||
$text['title-operator_panel']['de-de'] = "Bedienfeld";
|
||||
$text['title-operator_panel']['el-gr'] = "Πίνακας χειριστή";
|
||||
$text['title-operator_panel']['es-cl'] = "Panel de Operador";
|
||||
$text['title-operator_panel']['es-mx'] = "Panel de Operador";
|
||||
$text['title-operator_panel']['fr-ca'] = "Panneau de commande";
|
||||
$text['title-operator_panel']['fr-fr'] = "Panneau de commande";
|
||||
$text['title-operator_panel']['es-mx'] = "Panel de Operador"; //copied from es-cl
|
||||
$text['title-operator_panel']['fr-ca'] = "Operator Panel"; //copied from fr-fr
|
||||
$text['title-operator_panel']['fr-fr'] = "Operator Panel";
|
||||
$text['title-operator_panel']['he-il'] = "לוח מפעיל";
|
||||
$text['title-operator_panel']['it-it'] = "Pannello Operatore";
|
||||
$text['title-operator_panel']['ka-ge'] = "ოპერატორის პანელი";
|
||||
$text['title-operator_panel']['nl-nl'] = "Operator paneel";
|
||||
$text['title-operator_panel']['pl-pl'] = "Panel operatora";
|
||||
$text['title-operator_panel']['pt-br'] = "Painel do operador";
|
||||
$text['title-operator_panel']['pt-pt'] = "Painel do Operador";
|
||||
$text['title-operator_panel']['ro-ro'] = "Panoul operator";
|
||||
$text['title-operator_panel']['ro-ro'] = "";
|
||||
$text['title-operator_panel']['ru-ru'] = "Панель Оператора";
|
||||
$text['title-operator_panel']['sv-se'] = "Telefonist Panel";
|
||||
$text['title-operator_panel']['uk-ua'] = "Оператори";
|
||||
$text['title-operator_panel']['tr-tr'] = "Operatör Paneli";
|
||||
$text['title-operator_panel']['zh-cn'] = "操作面板";
|
||||
$text['title-operator_panel']['ja-jp'] = "オペレーターパネル";
|
||||
$text['title-operator_panel']['ko-kr'] = "운영자 패널";
|
||||
$text['title-operator_panel']['uk-ua'] = "Панель оператора";
|
||||
|
||||
$text['label-status_on_demand']['en-us'] = "On Demand";
|
||||
$text['label-status_on_demand']['en-gb'] = "On Demand";
|
||||
$text['label-status_on_demand']['ar-eg'] = "على الطلب";
|
||||
$text['label-status_on_demand']['de-at'] = "Bei Bedarf";
|
||||
$text['label-status_on_demand']['de-ch'] = "Bei Bedarf";
|
||||
$text['label-status_on_demand']['ar-eg'] = "";
|
||||
$text['label-status_on_demand']['de-at'] = "Bei Bedarf"; //copied from de-de
|
||||
$text['label-status_on_demand']['de-ch'] = "Bei Bedarf"; //copied from de-de
|
||||
$text['label-status_on_demand']['de-de'] = "Bei Bedarf";
|
||||
$text['label-status_on_demand']['el-gr'] = "Κατα παραγγελια";
|
||||
$text['label-status_on_demand']['es-cl'] = "A Pedido";
|
||||
$text['label-status_on_demand']['es-mx'] = "A Pedido";
|
||||
$text['label-status_on_demand']['fr-ca'] = "Sur Demande";
|
||||
$text['label-status_on_demand']['es-mx'] = "A Pedido"; //copied from es-cl
|
||||
$text['label-status_on_demand']['fr-ca'] = "Sur Demande"; //copied from fr-fr
|
||||
$text['label-status_on_demand']['fr-fr'] = "Sur Demande";
|
||||
$text['label-status_on_demand']['he-il'] = "על פי דרישה";
|
||||
$text['label-status_on_demand']['it-it'] = "Su Richiesta";
|
||||
$text['label-status_on_demand']['ka-ge'] = "მოთხოვნით";
|
||||
$text['label-status_on_demand']['nl-nl'] = "Op Aanvraag";
|
||||
$text['label-status_on_demand']['pl-pl'] = "Na żądanie";
|
||||
$text['label-status_on_demand']['pt-br'] = "A pedido";
|
||||
$text['label-status_on_demand']['pt-pt'] = "A Pedido";
|
||||
$text['label-status_on_demand']['ro-ro'] = "La cerere";
|
||||
$text['label-status_on_demand']['ro-ro'] = "";
|
||||
$text['label-status_on_demand']['ru-ru'] = "По требованию";
|
||||
$text['label-status_on_demand']['sv-se'] = "På Begäran";
|
||||
$text['label-status_on_demand']['uk-ua'] = "На Демі";
|
||||
$text['label-status_on_demand']['tr-tr'] = "Talep üzerine";
|
||||
$text['label-status_on_demand']['zh-cn'] = "一经请求";
|
||||
$text['label-status_on_demand']['ja-jp'] = "オンデマンド";
|
||||
$text['label-status_on_demand']['ko-kr'] = "주문형";
|
||||
$text['label-status_on_demand']['uk-ua'] = "Ðа вимогу";
|
||||
|
||||
$text['label-status_on_break']['en-us'] = "On Break";
|
||||
$text['label-status_on_break']['en-gb'] = "On Break";
|
||||
$text['label-status_on_break']['ar-eg'] = "في استراحة";
|
||||
$text['label-status_on_break']['de-at'] = "In Pause";
|
||||
$text['label-status_on_break']['de-ch'] = "In Pause";
|
||||
$text['label-status_on_break']['ar-eg'] = "";
|
||||
$text['label-status_on_break']['de-at'] = "In Pause"; //copied from de-de
|
||||
$text['label-status_on_break']['de-ch'] = "In Pause"; //copied from de-de
|
||||
$text['label-status_on_break']['de-de'] = "In Pause";
|
||||
$text['label-status_on_break']['el-gr'] = "Σε διάλειμμα";
|
||||
$text['label-status_on_break']['es-cl'] = "En Pausa";
|
||||
$text['label-status_on_break']['es-mx'] = "En Pausa";
|
||||
$text['label-status_on_break']['fr-ca'] = "En Pause";
|
||||
$text['label-status_on_break']['es-mx'] = "En Pausa"; //copied from es-cl
|
||||
$text['label-status_on_break']['fr-ca'] = "En Pause"; //copied from fr-fr
|
||||
$text['label-status_on_break']['fr-fr'] = "En Pause";
|
||||
$text['label-status_on_break']['he-il'] = "בהפסקה";
|
||||
$text['label-status_on_break']['it-it'] = "In Pausa";
|
||||
$text['label-status_on_break']['ka-ge'] = "შესვენებაზე";
|
||||
$text['label-status_on_break']['nl-nl'] = "In de wacht";
|
||||
$text['label-status_on_break']['pl-pl'] = "Na przerwie";
|
||||
$text['label-status_on_break']['pt-br'] = "Em pausa";
|
||||
$text['label-status_on_break']['pt-pt'] = "Em Pausa";
|
||||
$text['label-status_on_break']['ro-ro'] = "In pauza";
|
||||
$text['label-status_on_break']['ro-ro'] = "";
|
||||
$text['label-status_on_break']['ru-ru'] = "Пауза";
|
||||
$text['label-status_on_break']['sv-se'] = "På Rast";
|
||||
$text['label-status_on_break']['uk-ua'] = "Прорив";
|
||||
$text['label-status_on_break']['tr-tr'] = "Molada";
|
||||
$text['label-status_on_break']['zh-cn'] = "休息时";
|
||||
$text['label-status_on_break']['ja-jp'] = "休んで";
|
||||
$text['label-status_on_break']['ko-kr'] = "쉬는 중";
|
||||
$text['label-status_on_break']['uk-ua'] = "Ðа перерві";
|
||||
|
||||
$text['label-status_logged_out_or_unknown']['en-us'] = "Logged Out / Unknown";
|
||||
$text['label-status_logged_out_or_unknown']['en-gb'] = "Logged Out / Unknown";
|
||||
$text['label-status_logged_out_or_unknown']['ar-eg'] = "تم تسجيل الخروج / غير معروف";
|
||||
$text['label-status_logged_out_or_unknown']['de-at'] = "Abgemeldet / Unbekannt";
|
||||
$text['label-status_logged_out_or_unknown']['de-ch'] = "Abgemeldet / Unbekannt";
|
||||
$text['label-status_logged_out_or_unknown']['ar-eg'] = "";
|
||||
$text['label-status_logged_out_or_unknown']['de-at'] = "Abgemeldet / Unbekannt"; //copied from de-de
|
||||
$text['label-status_logged_out_or_unknown']['de-ch'] = "Abgemeldet / Unbekannt"; //copied from de-de
|
||||
$text['label-status_logged_out_or_unknown']['de-de'] = "Abgemeldet / Unbekannt";
|
||||
$text['label-status_logged_out_or_unknown']['el-gr'] = "Αποσυνδέθηκε / άγνωστο";
|
||||
$text['label-status_logged_out_or_unknown']['es-cl'] = "Desconectado / Desconocido";
|
||||
$text['label-status_logged_out_or_unknown']['es-mx'] = "Desconectado / Desconocido";
|
||||
$text['label-status_logged_out_or_unknown']['fr-ca'] = "Déconnexion / Unknown";
|
||||
$text['label-status_logged_out_or_unknown']['es-mx'] = "Desconectado / Desconocido"; //copied from es-cl
|
||||
$text['label-status_logged_out_or_unknown']['fr-ca'] = "Déconnexion / Unknown"; //copied from fr-fr
|
||||
$text['label-status_logged_out_or_unknown']['fr-fr'] = "Déconnexion / Unknown";
|
||||
$text['label-status_logged_out_or_unknown']['he-il'] = "מנותק / לא ידוע";
|
||||
$text['label-status_logged_out_or_unknown']['he-il'] = "";
|
||||
$text['label-status_logged_out_or_unknown']['it-it'] = "Sloggato/Sconosciuto";
|
||||
$text['label-status_logged_out_or_unknown']['ka-ge'] = "გასული / უცნობია";
|
||||
$text['label-status_logged_out_or_unknown']['nl-nl'] = "Afgelogged / Onbekend";
|
||||
$text['label-status_logged_out_or_unknown']['pl-pl'] = "Wylogowany / Nieznany";
|
||||
$text['label-status_logged_out_or_unknown']['pt-br'] = "Desligar / Desconhecido";
|
||||
$text['label-status_logged_out_or_unknown']['pt-pt'] = "Desligado / Unknown";
|
||||
$text['label-status_logged_out_or_unknown']['ro-ro'] = "Deconectat/Necunoscut";
|
||||
$text['label-status_logged_out_or_unknown']['ro-ro'] = "";
|
||||
$text['label-status_logged_out_or_unknown']['ru-ru'] = "Вышел из системы / Неизвестен";
|
||||
$text['label-status_logged_out_or_unknown']['sv-se'] = "Utloggad / Okänd";
|
||||
$text['label-status_logged_out_or_unknown']['uk-ua'] = "Увійти / Невідомо";
|
||||
$text['label-status_logged_out_or_unknown']['tr-tr'] = "Çıkış Yapıldı / Bilinmiyor";
|
||||
$text['label-status_logged_out_or_unknown']['zh-cn'] = "注销/未知";
|
||||
$text['label-status_logged_out_or_unknown']['ja-jp'] = "ログアウト/不明";
|
||||
$text['label-status_logged_out_or_unknown']['ko-kr'] = "로그아웃됨/알 수 없음";
|
||||
$text['label-status_logged_out_or_unknown']['uk-ua'] = "Вийшов/невідомо";
|
||||
|
||||
$text['label-status_logged_out']['en-us'] = "Logged Out";
|
||||
$text['label-status_logged_out']['en-gb'] = "Logged Out";
|
||||
$text['label-status_logged_out']['ar-eg'] = "تسجيل الخروج";
|
||||
$text['label-status_logged_out']['de-at'] = "Abgemeldet";
|
||||
$text['label-status_logged_out']['de-ch'] = "Abgemeldet";
|
||||
$text['label-status_logged_out']['ar-eg'] = "";
|
||||
$text['label-status_logged_out']['de-at'] = "Abgemeldet"; //copied from de-de
|
||||
$text['label-status_logged_out']['de-ch'] = "Abgemeldet"; //copied from de-de
|
||||
$text['label-status_logged_out']['de-de'] = "Abgemeldet";
|
||||
$text['label-status_logged_out']['el-gr'] = "Αποσυνδέθηκα";
|
||||
$text['label-status_logged_out']['es-cl'] = "Desconectado";
|
||||
$text['label-status_logged_out']['es-mx'] = "Desconectado";
|
||||
$text['label-status_logged_out']['fr-ca'] = "Déconnexion";
|
||||
$text['label-status_logged_out']['es-mx'] = "Desconectado"; //copied from es-cl
|
||||
$text['label-status_logged_out']['fr-ca'] = "Déconnexion"; //copied from fr-fr
|
||||
$text['label-status_logged_out']['fr-fr'] = "Déconnexion";
|
||||
$text['label-status_logged_out']['he-il'] = "התנתק";
|
||||
$text['label-status_logged_out']['he-il'] = "";
|
||||
$text['label-status_logged_out']['it-it'] = "Sloggato";
|
||||
$text['label-status_logged_out']['ka-ge'] = "გასული";
|
||||
$text['label-status_logged_out']['nl-nl'] = "Afgelogged";
|
||||
$text['label-status_logged_out']['pl-pl'] = "Wylogowany";
|
||||
$text['label-status_logged_out']['pt-br'] = "Desligado";
|
||||
$text['label-status_logged_out']['pt-br'] = "Desligado"; //copied from pt-pt
|
||||
$text['label-status_logged_out']['pt-pt'] = "Desligado";
|
||||
$text['label-status_logged_out']['ro-ro'] = "Delogat";
|
||||
$text['label-status_logged_out']['ro-ro'] = "";
|
||||
$text['label-status_logged_out']['ru-ru'] = "Вышел из системы";
|
||||
$text['label-status_logged_out']['sv-se'] = "Utloggad";
|
||||
$text['label-status_logged_out']['uk-ua'] = "Увійти";
|
||||
$text['label-status_logged_out']['tr-tr'] = "Çıkış yapıldı";
|
||||
$text['label-status_logged_out']['zh-cn'] = "登出";
|
||||
$text['label-status_logged_out']['ja-jp'] = "ログアウトしました";
|
||||
$text['label-status_logged_out']['ko-kr'] = "로그아웃됨";
|
||||
$text['label-status_logged_out']['uk-ua'] = "Вийшов";
|
||||
|
||||
$text['label-status_do_not_disturb']['en-us'] = "Do Not Disturb";
|
||||
$text['label-status_do_not_disturb']['en-gb'] = "Do Not Disturb";
|
||||
$text['label-status_do_not_disturb']['ar-eg'] = "لا تخل";
|
||||
$text['label-status_do_not_disturb']['de-at'] = "Bitte nicht Stören";
|
||||
$text['label-status_do_not_disturb']['de-ch'] = "Bitte nicht Stören";
|
||||
$text['label-status_do_not_disturb']['ar-eg'] = "";
|
||||
$text['label-status_do_not_disturb']['de-at'] = "Bitte nicht Stören"; //copied from de-de
|
||||
$text['label-status_do_not_disturb']['de-ch'] = "Bitte nicht Stören"; //copied from de-de
|
||||
$text['label-status_do_not_disturb']['de-de'] = "Bitte nicht Stören";
|
||||
$text['label-status_do_not_disturb']['el-gr'] = "Μην ενοχλείτε";
|
||||
$text['label-status_do_not_disturb']['es-cl'] = "No Molestar";
|
||||
$text['label-status_do_not_disturb']['es-mx'] = "No Molestar";
|
||||
$text['label-status_do_not_disturb']['fr-ca'] = "Ne pas Déranger";
|
||||
$text['label-status_do_not_disturb']['es-mx'] = "No Molestar"; //copied from es-cl
|
||||
$text['label-status_do_not_disturb']['fr-ca'] = "Ne pas Déranger"; //copied from fr-fr
|
||||
$text['label-status_do_not_disturb']['fr-fr'] = "Ne pas Déranger";
|
||||
$text['label-status_do_not_disturb']['he-il'] = "נא לא להפריע";
|
||||
$text['label-status_do_not_disturb']['it-it'] = "Non Disturbare";
|
||||
$text['label-status_do_not_disturb']['ka-ge'] = "არ შემაწუხო";
|
||||
$text['label-status_do_not_disturb']['nl-nl'] = "Niet Storen";
|
||||
$text['label-status_do_not_disturb']['pl-pl'] = "Nie przeszkadzać (DND)";
|
||||
$text['label-status_do_not_disturb']['pt-br'] = "Não perturbe";
|
||||
$text['label-status_do_not_disturb']['pt-pt'] = "Não perturbe (DND)";
|
||||
$text['label-status_do_not_disturb']['ro-ro'] = "Nu deranjați";
|
||||
$text['label-status_do_not_disturb']['ro-ro'] = "";
|
||||
$text['label-status_do_not_disturb']['ru-ru'] = "Просьба не беспокоить";
|
||||
$text['label-status_do_not_disturb']['sv-se'] = "Stör Ej";
|
||||
$text['label-status_do_not_disturb']['uk-ua'] = "Не турбувати";
|
||||
$text['label-status_do_not_disturb']['tr-tr'] = "Rahatsız etmeyin";
|
||||
$text['label-status_do_not_disturb']['zh-cn'] = "请勿打扰";
|
||||
$text['label-status_do_not_disturb']['ja-jp'] = "邪魔しないでください";
|
||||
$text['label-status_do_not_disturb']['ko-kr'] = "방해하지 마";
|
||||
$text['label-status_do_not_disturb']['uk-ua'] = "Ðе турбувати";
|
||||
|
||||
$text['label-status_available_on_demand']['en-us'] = "Available (On Demand)";
|
||||
$text['label-status_available_on_demand']['en-gb'] = "Available (On Demand)";
|
||||
$text['label-status_available_on_demand']['ar-eg'] = "متاح (عند الطلب)";
|
||||
$text['label-status_available_on_demand']['de-at'] = "Verfügbar (Bei Bedarf)";
|
||||
$text['label-status_available_on_demand']['de-ch'] = "Verfügbar (Bei Bedarf)";
|
||||
$text['label-status_available_on_demand']['ar-eg'] = "";
|
||||
$text['label-status_available_on_demand']['de-at'] = "Verfügbar (Bei Bedarf)"; //copied from de-de
|
||||
$text['label-status_available_on_demand']['de-ch'] = "Verfügbar (Bei Bedarf)"; //copied from de-de
|
||||
$text['label-status_available_on_demand']['de-de'] = "Verfügbar (Bei Bedarf)";
|
||||
$text['label-status_available_on_demand']['el-gr'] = "Διαθέσιμο (κατόπιν αιτήματος)";
|
||||
$text['label-status_available_on_demand']['es-cl'] = "Disponible (A Pedido)";
|
||||
$text['label-status_available_on_demand']['es-mx'] = "Disponible (A Pedido)";
|
||||
$text['label-status_available_on_demand']['fr-ca'] = "Disponible (sur demande)";
|
||||
$text['label-status_available_on_demand']['es-mx'] = "Disponible (A Pedido)"; //copied from es-cl
|
||||
$text['label-status_available_on_demand']['fr-ca'] = "Disponible (sur demande)"; //copied from fr-fr
|
||||
$text['label-status_available_on_demand']['fr-fr'] = "Disponible (sur demande)";
|
||||
$text['label-status_available_on_demand']['he-il'] = "זמין (לפי דרישה)";
|
||||
$text['label-status_available_on_demand']['he-il'] = "";
|
||||
$text['label-status_available_on_demand']['it-it'] = "Disponibile (Su Richiesta)";
|
||||
$text['label-status_available_on_demand']['ka-ge'] = "ხელმისაწვდომია (მოთხოვნით)";
|
||||
$text['label-status_available_on_demand']['nl-nl'] = "Beschikbaar (Op Aaanvraag)";
|
||||
$text['label-status_available_on_demand']['pl-pl'] = "Dostępny (na żądanie)";
|
||||
$text['label-status_available_on_demand']['pt-br'] = "Disponivel (A pedido)";
|
||||
$text['label-status_available_on_demand']['pt-pt'] = "Disponível (A Pedido)";
|
||||
$text['label-status_available_on_demand']['ro-ro'] = "Disponibil (la cerere)";
|
||||
$text['label-status_available_on_demand']['ro-ro'] = "";
|
||||
$text['label-status_available_on_demand']['ru-ru'] = "Доступен (по требованию)";
|
||||
$text['label-status_available_on_demand']['sv-se'] = "Tillgänglig (På Begäran)";
|
||||
$text['label-status_available_on_demand']['uk-ua'] = "Доступний (на вимогу)";
|
||||
$text['label-status_available_on_demand']['tr-tr'] = "Mevcut (Talep Üzerine)";
|
||||
$text['label-status_available_on_demand']['zh-cn'] = "可用(按需)";
|
||||
$text['label-status_available_on_demand']['ja-jp'] = "あり(オンデマンド)";
|
||||
$text['label-status_available_on_demand']['ko-kr'] = "사용 가능(주문형)";
|
||||
$text['label-status_available_on_demand']['uk-ua'] = "ДоÑтупний (на вимогу)";
|
||||
|
||||
$text['label-status_available']['en-us'] = "Available";
|
||||
$text['label-status_available']['en-gb'] = "Available";
|
||||
$text['label-status_available']['ar-eg'] = "متاح";
|
||||
$text['label-status_available']['de-at'] = "Verfügbar";
|
||||
$text['label-status_available']['de-ch'] = "Verfügbar";
|
||||
$text['label-status_available']['ar-eg'] = "";
|
||||
$text['label-status_available']['de-at'] = "Verfügbar"; //copied from de-de
|
||||
$text['label-status_available']['de-ch'] = "Verfügbar"; //copied from de-de
|
||||
$text['label-status_available']['de-de'] = "Verfügbar";
|
||||
$text['label-status_available']['el-gr'] = "Διαθέσιμος";
|
||||
$text['label-status_available']['es-cl'] = "Disponible";
|
||||
$text['label-status_available']['es-mx'] = "Disponible";
|
||||
$text['label-status_available']['fr-ca'] = "Disponible";
|
||||
$text['label-status_available']['es-mx'] = "Disponible"; //copied from es-cl
|
||||
$text['label-status_available']['fr-ca'] = "Disponible"; //copied from fr-fr
|
||||
$text['label-status_available']['fr-fr'] = "Disponible";
|
||||
$text['label-status_available']['he-il'] = "זמין";
|
||||
$text['label-status_available']['it-it'] = "Disponibile";
|
||||
$text['label-status_available']['ka-ge'] = "ხელმისაწვდომია";
|
||||
$text['label-status_available']['nl-nl'] = "Beschikbaar";
|
||||
$text['label-status_available']['pl-pl'] = "Dostępny";
|
||||
$text['label-status_available']['pt-br'] = "Disponível";
|
||||
$text['label-status_available']['pt-br'] = "DisponÃvel";
|
||||
$text['label-status_available']['pt-pt'] = "Disponível";
|
||||
$text['label-status_available']['ro-ro'] = "Disponibil";
|
||||
$text['label-status_available']['ro-ro'] = "";
|
||||
$text['label-status_available']['ru-ru'] = "Доступен";
|
||||
$text['label-status_available']['sv-se'] = "Tillgänglig";
|
||||
$text['label-status_available']['uk-ua'] = "В наявності";
|
||||
$text['label-status_available']['tr-tr'] = "Mevcut";
|
||||
$text['label-status_available']['zh-cn'] = "可用的";
|
||||
$text['label-status_available']['ja-jp'] = "利用可能";
|
||||
$text['label-status_available']['ko-kr'] = "사용 가능";
|
||||
$text['label-status_available']['uk-ua'] = "ДоÑтупний";
|
||||
|
||||
$text['label-refresh_pause']['en-us'] = "Pause Refresh";
|
||||
$text['label-refresh_pause']['en-gb'] = "Pause Refresh";
|
||||
$text['label-refresh_pause']['ar-eg'] = "وقفة التحديث";
|
||||
$text['label-refresh_pause']['de-at'] = "Seite neu laden deaktivieren";
|
||||
$text['label-refresh_pause']['de-ch'] = "Seite neu laden deaktivieren";
|
||||
$text['label-refresh_pause']['ar-eg'] = "";
|
||||
$text['label-refresh_pause']['de-at'] = "Seite neu laden deaktivieren"; //copied from de-de
|
||||
$text['label-refresh_pause']['de-ch'] = "Seite neu laden deaktivieren"; //copied from de-de
|
||||
$text['label-refresh_pause']['de-de'] = "Seite neu laden deaktivieren";
|
||||
$text['label-refresh_pause']['el-gr'] = "Ανανέωση";
|
||||
$text['label-refresh_pause']['es-cl'] = "Actualizar Pausa";
|
||||
$text['label-refresh_pause']['es-mx'] = "Actualizar Pausa";
|
||||
$text['label-refresh_pause']['fr-ca'] = "Pause Actualiser";
|
||||
$text['label-refresh_pause']['es-mx'] = "Actualizar Pausa"; //copied from es-cl
|
||||
$text['label-refresh_pause']['fr-ca'] = "Pause Actualiser"; //copied from fr-fr
|
||||
$text['label-refresh_pause']['fr-fr'] = "Pause Actualiser";
|
||||
$text['label-refresh_pause']['he-il'] = "עצור רענון";
|
||||
$text['label-refresh_pause']['it-it'] = "Interrompi";
|
||||
$text['label-refresh_pause']['ka-ge'] = "განახლების შეჩერება";
|
||||
$text['label-refresh_pause']['nl-nl'] = "Stop verversen";
|
||||
$text['label-refresh_pause']['pl-pl'] = "Pauzuj odświeżanie";
|
||||
$text['label-refresh_pause']['pt-br'] = "Pausar atualização";
|
||||
$text['label-refresh_pause']['pt-pt'] = "Pausa Atualizar";
|
||||
$text['label-refresh_pause']['ro-ro'] = "Întrerupeți reîmprospătarea";
|
||||
$text['label-refresh_pause']['ro-ro'] = "";
|
||||
$text['label-refresh_pause']['ru-ru'] = "Приостановить обновление";
|
||||
$text['label-refresh_pause']['sv-se'] = "Paus Uppdatera";
|
||||
$text['label-refresh_pause']['uk-ua'] = "Пауза Refresh";
|
||||
$text['label-refresh_pause']['tr-tr'] = "Yenilemeyi Duraklat";
|
||||
$text['label-refresh_pause']['zh-cn'] = "暂停刷新";
|
||||
$text['label-refresh_pause']['ja-jp'] = "リフレッシュを一時停止";
|
||||
$text['label-refresh_pause']['ko-kr'] = "새로고침 일시중지";
|
||||
$text['label-refresh_pause']['uk-ua'] = "Припинити оновленнÑ";
|
||||
|
||||
$text['label-refresh_enable']['en-us'] = "Enable Refresh";
|
||||
$text['label-refresh_enable']['en-gb'] = "Enable Refresh";
|
||||
$text['label-refresh_enable']['ar-eg'] = "تمكين التحديث";
|
||||
$text['label-refresh_enable']['de-at'] = "Seite neu laden aktivieren";
|
||||
$text['label-refresh_enable']['de-ch'] = "Seite neu laden aktivieren";
|
||||
$text['label-refresh_enable']['ar-eg'] = "";
|
||||
$text['label-refresh_enable']['de-at'] = "Seite neu laden aktivieren"; //copied from de-de
|
||||
$text['label-refresh_enable']['de-ch'] = "Seite neu laden aktivieren"; //copied from de-de
|
||||
$text['label-refresh_enable']['de-de'] = "Seite neu laden aktivieren";
|
||||
$text['label-refresh_enable']['el-gr'] = "Ενεργοποίηση ανανέωσης";
|
||||
$text['label-refresh_enable']['es-cl'] = "Activar Actualizar";
|
||||
$text['label-refresh_enable']['es-mx'] = "Activar Actualizar";
|
||||
$text['label-refresh_enable']['fr-ca'] = "Activer Actualiser";
|
||||
$text['label-refresh_enable']['es-mx'] = "Activar Actualizar"; //copied from es-cl
|
||||
$text['label-refresh_enable']['fr-ca'] = "Activer Actualiser"; //copied from fr-fr
|
||||
$text['label-refresh_enable']['fr-fr'] = "Activer Actualiser";
|
||||
$text['label-refresh_enable']['he-il'] = "אפשר רענון";
|
||||
$text['label-refresh_enable']['it-it'] = "Abilita Aggiornamento";
|
||||
$text['label-refresh_enable']['ka-ge'] = "განახლების ჩართვა";
|
||||
$text['label-refresh_enable']['nl-nl'] = "Start verversen";
|
||||
$text['label-refresh_enable']['pl-pl'] = "Włącz odświeżanie";
|
||||
$text['label-refresh_enable']['pt-br'] = "Habilitar atualização";
|
||||
$text['label-refresh_enable']['pt-pt'] = "Habilitar Atualização";
|
||||
$text['label-refresh_enable']['ro-ro'] = "Activați Reîmprospătare";
|
||||
$text['label-refresh_enable']['ro-ro'] = "";
|
||||
$text['label-refresh_enable']['ru-ru'] = "Включить обновление";
|
||||
$text['label-refresh_enable']['sv-se'] = "Aktivera Uppdatering";
|
||||
$text['label-refresh_enable']['uk-ua'] = "Увімкнути Refresh";
|
||||
$text['label-refresh_enable']['tr-tr'] = "Yenilemeyi Etkinleştir";
|
||||
$text['label-refresh_enable']['zh-cn'] = "启用刷新";
|
||||
$text['label-refresh_enable']['ja-jp'] = "リフレッシュを有効にする";
|
||||
$text['label-refresh_enable']['ko-kr'] = "새로 고침 활성화";
|
||||
$text['label-refresh_enable']['uk-ua'] = "Включити оновленнÑ";
|
||||
|
||||
$text['label-recording']['en-us'] = "Recording";
|
||||
$text['label-recording']['en-gb'] = "Recording";
|
||||
$text['label-recording']['ar-eg'] = "تسجيل";
|
||||
$text['label-recording']['de-at'] = "Aufnahme";
|
||||
$text['label-recording']['de-ch'] = "Aufnahme";
|
||||
$text['label-recording']['ar-eg'] = "";
|
||||
$text['label-recording']['de-at'] = "Aufnahme"; //copied from de-de
|
||||
$text['label-recording']['de-ch'] = "Aufnahme"; //copied from de-de
|
||||
$text['label-recording']['de-de'] = "Aufnahme";
|
||||
$text['label-recording']['el-gr'] = "Εγγραφή";
|
||||
$text['label-recording']['es-cl'] = "Grabación de Llamadas";
|
||||
$text['label-recording']['es-mx'] = "Grabación de Llamadas";
|
||||
$text['label-recording']['fr-ca'] = "Enregistrement de L'appel";
|
||||
$text['label-recording']['es-mx'] = "Grabación de Llamadas"; //copied from es-cl
|
||||
$text['label-recording']['fr-ca'] = "Enregistrement de L'appel"; //copied from fr-fr
|
||||
$text['label-recording']['fr-fr'] = "Enregistrement de L'appel";
|
||||
$text['label-recording']['he-il'] = "מקליט";
|
||||
$text['label-recording']['it-it'] = "Registrazione";
|
||||
$text['label-recording']['ka-ge'] = "ჩაწერა";
|
||||
$text['label-recording']['nl-nl'] = "Opnemend";
|
||||
$text['label-recording']['pl-pl'] = "Nagrywanie";
|
||||
$text['label-recording']['pt-br'] = "Gravação de chamadas";
|
||||
$text['label-recording']['pt-pt'] = "Gravação de Chamadas";
|
||||
$text['label-recording']['ro-ro'] = "Înregistrare";
|
||||
$text['label-recording']['ro-ro'] = "";
|
||||
$text['label-recording']['ru-ru'] = "Запись";
|
||||
$text['label-recording']['sv-se'] = "Inspelning";
|
||||
$text['label-recording']['uk-ua'] = "Запис";
|
||||
$text['label-recording']['tr-tr'] = "Kayıt";
|
||||
$text['label-recording']['zh-cn'] = "记录";
|
||||
$text['label-recording']['ja-jp'] = "録音";
|
||||
$text['label-recording']['ko-kr'] = "녹음";
|
||||
$text['label-recording']['uk-ua'] = "ЗапиÑ";
|
||||
|
||||
$text['label-record']['en-us'] = "Record";
|
||||
$text['label-record']['en-gb'] = "Record";
|
||||
$text['label-record']['ar-eg'] = "سِجِلّ";
|
||||
$text['label-record']['de-at'] = "Aufnehmen";
|
||||
$text['label-record']['de-ch'] = "Aufnehmen";
|
||||
$text['label-record']['ar-eg'] = "";
|
||||
$text['label-record']['de-at'] = "Aufnehmen"; //copied from de-de
|
||||
$text['label-record']['de-ch'] = "Aufnehmen"; //copied from de-de
|
||||
$text['label-record']['de-de'] = "Aufnehmen";
|
||||
$text['label-record']['el-gr'] = "Ρεκόρ";
|
||||
$text['label-record']['es-cl'] = "Registro";
|
||||
$text['label-record']['es-mx'] = "Registro";
|
||||
$text['label-record']['fr-ca'] = "Enregistrer";
|
||||
$text['label-record']['es-mx'] = "Registro"; //copied from es-cl
|
||||
$text['label-record']['fr-ca'] = "Enregistrer"; //copied from fr-fr
|
||||
$text['label-record']['fr-fr'] = "Enregistrer";
|
||||
$text['label-record']['he-il'] = "הקלטה";
|
||||
$text['label-record']['it-it'] = "Registrazione";
|
||||
$text['label-record']['ka-ge'] = "ჩაწერა";
|
||||
$text['label-record']['nl-nl'] = "Opnemen";
|
||||
$text['label-record']['pl-pl'] = "Nagrywanie";
|
||||
$text['label-record']['pt-br'] = "Registro";
|
||||
$text['label-record']['pt-br'] = "Registro"; //copied from pt-pt
|
||||
$text['label-record']['pt-pt'] = "Registro";
|
||||
$text['label-record']['ro-ro'] = "Record";
|
||||
$text['label-record']['ro-ro'] = "";
|
||||
$text['label-record']['ru-ru'] = "Воспроизведение";
|
||||
$text['label-record']['sv-se'] = "Spela In";
|
||||
$text['label-record']['uk-ua'] = "Запис";
|
||||
$text['label-record']['tr-tr'] = "Kayıt";
|
||||
$text['label-record']['zh-cn'] = "记录";
|
||||
$text['label-record']['ja-jp'] = "記録";
|
||||
$text['label-record']['ko-kr'] = "기록";
|
||||
$text['label-record']['uk-ua'] = "ЗапиÑ";
|
||||
|
||||
$text['label-other_extensions']['en-us'] = "Other Extensions";
|
||||
$text['label-other_extensions']['en-gb'] = "Other Extensions";
|
||||
$text['label-other_extensions']['ar-eg'] = "ملحقات أخرى";
|
||||
$text['label-other_extensions']['de-at'] = "Andere Nebenstellen";
|
||||
$text['label-other_extensions']['de-ch'] = "Andere Nebenstellen";
|
||||
$text['label-other_extensions']['ar-eg'] = "";
|
||||
$text['label-other_extensions']['de-at'] = "Andere Nebenstellen"; //copied from de-de
|
||||
$text['label-other_extensions']['de-ch'] = "Andere Nebenstellen"; //copied from de-de
|
||||
$text['label-other_extensions']['de-de'] = "Andere Nebenstellen";
|
||||
$text['label-other_extensions']['el-gr'] = "Άλλες επεκτάσεις";
|
||||
$text['label-other_extensions']['es-cl'] = "Otras Extensiones";
|
||||
$text['label-other_extensions']['es-mx'] = "Otras Extensiones";
|
||||
$text['label-other_extensions']['fr-ca'] = "Autres Extensions";
|
||||
$text['label-other_extensions']['es-mx'] = "Otras Extensiones"; //copied from es-cl
|
||||
$text['label-other_extensions']['fr-ca'] = "Autres Extensions"; //copied from fr-fr
|
||||
$text['label-other_extensions']['fr-fr'] = "Autres Extensions";
|
||||
$text['label-other_extensions']['he-il'] = "שלוחות אחרות";
|
||||
$text['label-other_extensions']['it-it'] = "Altri Interni";
|
||||
$text['label-other_extensions']['ka-ge'] = "სხვა გაფართოებები";
|
||||
$text['label-other_extensions']['nl-nl'] = "Andere toestellen";
|
||||
$text['label-other_extensions']['pl-pl'] = "Inne numery wewnętrzne";
|
||||
$text['label-other_extensions']['pt-br'] = "Outras extensões";
|
||||
$text['label-other_extensions']['pt-pt'] = "Outros Extensions";
|
||||
$text['label-other_extensions']['ro-ro'] = "Alte extensii";
|
||||
$text['label-other_extensions']['ro-ro'] = "";
|
||||
$text['label-other_extensions']['ru-ru'] = "Другие внутренние номера";
|
||||
$text['label-other_extensions']['sv-se'] = "Annan Anknytning";
|
||||
$text['label-other_extensions']['uk-ua'] = "Інші розширення";
|
||||
$text['label-other_extensions']['tr-tr'] = "Diğer Uzantılar";
|
||||
$text['label-other_extensions']['zh-cn'] = "其他扩展";
|
||||
$text['label-other_extensions']['ja-jp'] = "その他の拡張子";
|
||||
$text['label-other_extensions']['ko-kr'] = "기타 확장";
|
||||
$text['label-other_extensions']['uk-ua'] = "Інші розширеннÑ";
|
||||
|
||||
$text['label-no_extensions_found']['en-us'] = "No extensions found.";
|
||||
$text['label-no_extensions_found']['en-gb'] = "No extensions found.";
|
||||
$text['label-no_extensions_found']['ar-eg'] = "لم يتم العثور على ملحقات.";
|
||||
$text['label-no_extensions_found']['de-at'] = "Keine Nebenstellen gefunden.";
|
||||
$text['label-no_extensions_found']['de-ch'] = "Keine Nebenstellen gefunden.";
|
||||
$text['label-no_extensions_found']['ar-eg'] = "";
|
||||
$text['label-no_extensions_found']['de-at'] = "Keine Nebenstellen gefunden."; //copied from de-de
|
||||
$text['label-no_extensions_found']['de-ch'] = "Keine Nebenstellen gefunden."; //copied from de-de
|
||||
$text['label-no_extensions_found']['de-de'] = "Keine Nebenstellen gefunden.";
|
||||
$text['label-no_extensions_found']['el-gr'] = "Δεν βρέθηκαν επεκτάσεις.";
|
||||
$text['label-no_extensions_found']['es-cl'] = "No hay extensiones encontrados.";
|
||||
$text['label-no_extensions_found']['es-mx'] = "No hay extensiones encontrados.";
|
||||
$text['label-no_extensions_found']['fr-ca'] = "Aucun extensions trouvés.";
|
||||
$text['label-no_extensions_found']['es-mx'] = "No hay extensiones encontrados."; //copied from es-cl
|
||||
$text['label-no_extensions_found']['fr-ca'] = "Aucun extensions trouvés."; //copied from fr-fr
|
||||
$text['label-no_extensions_found']['fr-fr'] = "Aucun extensions trouvés.";
|
||||
$text['label-no_extensions_found']['he-il'] = "לא נמצאו שלוחות";
|
||||
$text['label-no_extensions_found']['it-it'] = "Nessun interno trovato.";
|
||||
$text['label-no_extensions_found']['ka-ge'] = "გაფართოებები აღმოჩენილი არაა";
|
||||
$text['label-no_extensions_found']['nl-nl'] = "Geen toestellen gevonden.";
|
||||
$text['label-no_extensions_found']['pl-pl'] = "Nie znaleziono numerów wewnętrznych";
|
||||
$text['label-no_extensions_found']['pt-br'] = "Não foi encontrada nenhuma extensão";
|
||||
$text['label-no_extensions_found']['pt-pt'] = "Sem extensões encontrado.";
|
||||
$text['label-no_extensions_found']['ro-ro'] = "Nu s-au găsit extensii.";
|
||||
$text['label-no_extensions_found']['ro-ro'] = "";
|
||||
$text['label-no_extensions_found']['ru-ru'] = "Внутренних номеров не найдено.";
|
||||
$text['label-no_extensions_found']['sv-se'] = "Ingen anknytning funnen.";
|
||||
$text['label-no_extensions_found']['uk-ua'] = "Не знайдено розширення.";
|
||||
$text['label-no_extensions_found']['tr-tr'] = "Uzantı bulunamadı.";
|
||||
$text['label-no_extensions_found']['zh-cn'] = "未找到扩展。";
|
||||
$text['label-no_extensions_found']['ja-jp'] = "拡張子が見つかりません。";
|
||||
$text['label-no_extensions_found']['ko-kr'] = "확장 프로그램이 없습니다.";
|
||||
$text['label-no_extensions_found']['uk-ua'] = "Ðе знайдено розширень";
|
||||
|
||||
$text['label-hangup']['en-us'] = "Hangup";
|
||||
$text['label-hangup']['en-gb'] = "Hangup";
|
||||
$text['label-hangup']['ar-eg'] = "تشبث";
|
||||
$text['label-hangup']['de-at'] = "Abwürgen";
|
||||
$text['label-hangup']['de-ch'] = "Abwürgen";
|
||||
$text['label-hangup']['ar-eg'] = "";
|
||||
$text['label-hangup']['de-at'] = "Abwürgen"; //copied from de-de
|
||||
$text['label-hangup']['de-ch'] = "Abwürgen"; //copied from de-de
|
||||
$text['label-hangup']['de-de'] = "Abwürgen";
|
||||
$text['label-hangup']['el-gr'] = "Κονάνθρωπος";
|
||||
$text['label-hangup']['es-cl'] = "Finalizar Llamada";
|
||||
$text['label-hangup']['es-mx'] = "Finalizar Llamada";
|
||||
$text['label-hangup']['fr-ca'] = "Tuer Appel";
|
||||
$text['label-hangup']['es-mx'] = "Finalizar Llamada"; //copied from es-cl
|
||||
$text['label-hangup']['fr-ca'] = "Tuer Appel"; //copied from fr-fr
|
||||
$text['label-hangup']['fr-fr'] = "Tuer Appel";
|
||||
$text['label-hangup']['he-il'] = "הפסק";
|
||||
$text['label-hangup']['it-it'] = "Abbatti";
|
||||
$text['label-hangup']['ka-ge'] = "გათიშვა";
|
||||
$text['label-hangup']['nl-nl'] = "Ophangen";
|
||||
$text['label-hangup']['pl-pl'] = "Rozłączenie się";
|
||||
$text['label-hangup']['pt-br'] = "Chamada final";
|
||||
$text['label-hangup']['pt-pt'] = "Chamada Final";
|
||||
$text['label-hangup']['ro-ro'] = "Rezistă";
|
||||
$text['label-hangup']['ro-ro'] = "";
|
||||
$text['label-hangup']['ru-ru'] = "Убить";
|
||||
$text['label-hangup']['sv-se'] = "Lägg På";
|
||||
$text['label-hangup']['uk-ua'] = "вбити";
|
||||
$text['label-hangup']['tr-tr'] = "Telefonu kapatmak";
|
||||
$text['label-hangup']['zh-cn'] = "不挂断";
|
||||
$text['label-hangup']['ja-jp'] = "ちょっとまって";
|
||||
$text['label-hangup']['ko-kr'] = "잠깐만";
|
||||
|
||||
$text['label-eavesdrop']['en-us'] = "Eavesdrop";
|
||||
$text['label-eavesdrop']['en-gb'] = "Eavesdrop";
|
||||
$text['label-eavesdrop']['ar-eg'] = "التنصت";
|
||||
$text['label-eavesdrop']['de-at'] = "Mithören";
|
||||
$text['label-eavesdrop']['de-ch'] = "Mithören";
|
||||
$text['label-eavesdrop']['ar-eg'] = "";
|
||||
$text['label-eavesdrop']['de-at'] = "Mithören"; //copied from de-de
|
||||
$text['label-eavesdrop']['de-ch'] = "Mithören"; //copied from de-de
|
||||
$text['label-eavesdrop']['de-de'] = "Mithören";
|
||||
$text['label-eavesdrop']['el-gr'] = "Αφουγκράζομαι";
|
||||
$text['label-eavesdrop']['es-cl'] = "Escuchar";
|
||||
$text['label-eavesdrop']['es-mx'] = "Escuchar";
|
||||
$text['label-eavesdrop']['fr-ca'] = "Espionner";
|
||||
$text['label-eavesdrop']['es-mx'] = "Escuchar"; //copied from es-cl
|
||||
$text['label-eavesdrop']['fr-ca'] = "Espionner"; //copied from fr-fr
|
||||
$text['label-eavesdrop']['fr-fr'] = "Espionner";
|
||||
$text['label-eavesdrop']['he-il'] = "לְצוֹתֵת";
|
||||
$text['label-eavesdrop']['he-il'] = "";
|
||||
$text['label-eavesdrop']['it-it'] = "Ascolta";
|
||||
$text['label-eavesdrop']['ka-ge'] = "მიყურადება";
|
||||
$text['label-eavesdrop']['nl-nl'] = "Afluisteren";
|
||||
$text['label-eavesdrop']['pl-pl'] = "Podsłuchiwanie";
|
||||
$text['label-eavesdrop']['pt-br'] = "Investigar";
|
||||
$text['label-eavesdrop']['pt-pt'] = "Bisbilhotar";
|
||||
$text['label-eavesdrop']['ro-ro'] = "Trage cu urechea";
|
||||
$text['label-eavesdrop']['ro-ro'] = "";
|
||||
$text['label-eavesdrop']['ru-ru'] = "Подслушивать";
|
||||
$text['label-eavesdrop']['sv-se'] = "Medlyssning";
|
||||
$text['label-eavesdrop']['uk-ua'] = "підслуховувати";
|
||||
$text['label-eavesdrop']['tr-tr'] = "Kulak misafiri olmak";
|
||||
$text['label-eavesdrop']['zh-cn'] = "窃听";
|
||||
$text['label-eavesdrop']['ja-jp'] = "盗聴";
|
||||
$text['label-eavesdrop']['ko-kr'] = "엿듣다";
|
||||
|
||||
$text['label-call_group']['en-us'] = "Call Group";
|
||||
$text['label-call_group']['en-gb'] = "Call Group";
|
||||
$text['label-call_group']['ar-eg'] = "مجموعة الاتصال";
|
||||
$text['label-call_group']['de-at'] = "Rufgruppe";
|
||||
$text['label-call_group']['de-ch'] = "Rufgruppe";
|
||||
$text['label-call_group']['ar-eg'] = "";
|
||||
$text['label-call_group']['de-at'] = "Rufgruppe"; //copied from de-de
|
||||
$text['label-call_group']['de-ch'] = "Rufgruppe"; //copied from de-de
|
||||
$text['label-call_group']['de-de'] = "Rufgruppe";
|
||||
$text['label-call_group']['el-gr'] = "Ομάδα κλήσεων";
|
||||
$text['label-call_group']['es-cl'] = "Llamar a Grupo";
|
||||
$text['label-call_group']['es-mx'] = "Llamar a Grupo";
|
||||
$text['label-call_group']['fr-ca'] = "Groupe d'appel";
|
||||
$text['label-call_group']['es-mx'] = "Llamar a Grupo"; //copied from es-cl
|
||||
$text['label-call_group']['fr-ca'] = "Groupe d'appel"; //copied from fr-fr
|
||||
$text['label-call_group']['fr-fr'] = "Groupe d'appel";
|
||||
$text['label-call_group']['he-il'] = "קבוצת חיוג";
|
||||
$text['label-call_group']['it-it'] = "Gruppo di Chiamata";
|
||||
$text['label-call_group']['ka-ge'] = "ჯგუფური დარეკვა";
|
||||
$text['label-call_group']['nl-nl'] = "Oproep Groep";
|
||||
$text['label-call_group']['pl-pl'] = "Grupa odbiorców rozmowy";
|
||||
$text['label-call_group']['pt-br'] = "Grupo";
|
||||
$text['label-call_group']['pt-br'] = "Grupo"; //copied from pt-pt
|
||||
$text['label-call_group']['pt-pt'] = "Grupo";
|
||||
$text['label-call_group']['ro-ro'] = "Grup de apeluri";
|
||||
$text['label-call_group']['ro-ro'] = "";
|
||||
$text['label-call_group']['ru-ru'] = "Группы вызова";
|
||||
$text['label-call_group']['sv-se'] = "Ring Grupp";
|
||||
$text['label-call_group']['uk-ua'] = "груповий виклик";
|
||||
$text['label-call_group']['tr-tr'] = "Çağrı Grubu";
|
||||
$text['label-call_group']['zh-cn'] = "呼叫组";
|
||||
$text['label-call_group']['ja-jp'] = "通話グループ";
|
||||
$text['label-call_group']['ko-kr'] = "통화 그룹";
|
||||
|
||||
$text['label-call_direction']['en-us'] = "Call Direction";
|
||||
$text['label-call_direction']['en-gb'] = "Call Direction";
|
||||
$text['label-call_direction']['ar-eg'] = "اتجاه الاتصال";
|
||||
$text['label-call_direction']['de-at'] = "Anruf Richtung";
|
||||
$text['label-call_direction']['de-ch'] = "Anruf Richtung";
|
||||
$text['label-call_direction']['ar-eg'] = "";
|
||||
$text['label-call_direction']['de-at'] = "Anruf Richtung"; //copied from de-de
|
||||
$text['label-call_direction']['de-ch'] = "Anruf Richtung"; //copied from de-de
|
||||
$text['label-call_direction']['de-de'] = "Anruf Richtung";
|
||||
$text['label-call_direction']['el-gr'] = "Κατεύθυνση κλήσεων";
|
||||
$text['label-call_direction']['es-cl'] = "Dirección de la llamada";
|
||||
$text['label-call_direction']['es-mx'] = "Dirección de la llamada";
|
||||
$text['label-call_direction']['fr-ca'] = "Sens de l'appel";
|
||||
$text['label-call_direction']['es-mx'] = "Dirección de la llamada"; //copied from es-cl
|
||||
$text['label-call_direction']['fr-ca'] = "Sens de l'appel"; //copied from fr-fr
|
||||
$text['label-call_direction']['fr-fr'] = "Sens de l'appel";
|
||||
$text['label-call_direction']['he-il'] = "כיוון שיחה";
|
||||
$text['label-call_direction']['it-it'] = "Direzione Chiamata";
|
||||
$text['label-call_direction']['ka-ge'] = "ზარის მიმართულება";
|
||||
$text['label-call_direction']['nl-nl'] = "Oproep richting";
|
||||
$text['label-call_direction']['pl-pl'] = "Kierunek rozmowy";
|
||||
$text['label-call_direction']['pt-br'] = "Direção da chamada";
|
||||
$text['label-call_direction']['pt-pt'] = "Direção da chamada";
|
||||
$text['label-call_direction']['ro-ro'] = "Direcția de apel";
|
||||
$text['label-call_direction']['ro-ro'] = "";
|
||||
$text['label-call_direction']['ru-ru'] = "Направление вызова";
|
||||
$text['label-call_direction']['sv-se'] = "Samtals Riktning";
|
||||
$text['label-call_direction']['uk-ua'] = "напрямок виклику";
|
||||
$text['label-call_direction']['tr-tr'] = "Çağrı Yönü";
|
||||
$text['label-call_direction']['zh-cn'] = "呼叫方向";
|
||||
$text['label-call_direction']['ja-jp'] = "通話方向";
|
||||
$text['label-call_direction']['ko-kr'] = "통화 방향";
|
||||
|
||||
$text['label-filter']['en-us'] = "Filter...";
|
||||
$text['label-filter']['en-gb'] = "Filter...";
|
||||
$text['label-filter']['ar-eg'] = "فيلم";
|
||||
$text['label-filter']['de-at'] = "Filter...";
|
||||
$text['label-filter']['de-ch'] = "Filter...";
|
||||
$text['label-filter']['de-de'] = "Filter...";
|
||||
$text['label-filter']['el-gr'] = "Φίλτρο...";
|
||||
$text['label-filter']['es-cl'] = "Filtro...";
|
||||
$text['label-filter']['es-mx'] = "Filtro...";
|
||||
$text['label-filter']['fr-ca'] = "Filtre...";
|
||||
$text['label-filter']['fr-fr'] = "Filtre...";
|
||||
$text['label-filter']['he-il'] = "לְסַנֵן...";
|
||||
$text['label-filter']['it-it'] = "Filtro...";
|
||||
$text['label-filter']['ka-ge'] = "გაფილტვრა...";
|
||||
$text['label-filter']['nl-nl'] = "Filter...";
|
||||
$text['label-filter']['pl-pl'] = "Filter...";
|
||||
$text['label-filter']['pt-br'] = "Filtro...";
|
||||
$text['label-filter']['pt-pt'] = "Filtro...";
|
||||
$text['label-filter']['ro-ro'] = "Filtru...";
|
||||
$text['label-filter']['ru-ru'] = "Фильтр";
|
||||
$text['label-filter']['sv-se'] = "Filter...";
|
||||
$text['label-filter']['uk-ua'] = "Фільтри";
|
||||
$text['label-filter']['tr-tr'] = "Filtrele...";
|
||||
$text['label-filter']['zh-cn'] = "筛选";
|
||||
$text['label-filter']['ja-jp'] = "フィルター";
|
||||
$text['label-filter']['ko-kr'] = "필터";
|
||||
|
||||
$text['description-eavesdrop_destination']['en-us'] = "Select the Eavesdrop Destination";
|
||||
$text['description-eavesdrop_destination']['en-gb'] = "Select the Eavesdrop Destination";
|
||||
$text['description-eavesdrop_destination']['ar-eg'] = "حدد وجهة Eavesdrop";
|
||||
$text['description-eavesdrop_destination']['de-at'] = "Wählen Sie ein Ziel zum Mithören";
|
||||
$text['description-eavesdrop_destination']['de-ch'] = "Wählen Sie ein Ziel zum Mithören";
|
||||
$text['description-eavesdrop_destination']['ar-eg'] = "";
|
||||
$text['description-eavesdrop_destination']['de-at'] = "Wählen Sie ein Ziel zum Mithören"; //copied from de-de
|
||||
$text['description-eavesdrop_destination']['de-ch'] = "Wählen Sie ein Ziel zum Mithören"; //copied from de-de
|
||||
$text['description-eavesdrop_destination']['de-de'] = "Wählen Sie ein Ziel zum Mithören";
|
||||
$text['description-eavesdrop_destination']['el-gr'] = "Επιλέξτε τον προορισμό EAVESDROP";
|
||||
$text['description-eavesdrop_destination']['es-cl'] = "Seleccione el Eavesdrop Destino";
|
||||
$text['description-eavesdrop_destination']['es-mx'] = "Seleccione el Eavesdrop Destino";
|
||||
$text['description-eavesdrop_destination']['fr-ca'] = "Sélectionnez la destination d'espionnage";
|
||||
$text['description-eavesdrop_destination']['es-mx'] = "Seleccione el Eavesdrop Destino"; //copied from es-cl
|
||||
$text['description-eavesdrop_destination']['fr-ca'] = "Sélectionnez la destination d'espionnage"; //copied from fr-fr
|
||||
$text['description-eavesdrop_destination']['fr-fr'] = "Sélectionnez la destination d'espionnage";
|
||||
$text['description-eavesdrop_destination']['he-il'] = "בחר ביעד האזנת סתר";
|
||||
$text['description-eavesdrop_destination']['he-il'] = "";
|
||||
$text['description-eavesdrop_destination']['it-it'] = "Seleziona la Destinazione d'Ascolto";
|
||||
$text['description-eavesdrop_destination']['ka-ge'] = "აირჩიეთ მოსმენის სამიზნე";
|
||||
$text['description-eavesdrop_destination']['nl-nl'] = "Kies afluister bestemming";
|
||||
$text['description-eavesdrop_destination']['pl-pl'] = "Wybierz destynację podsłuchiwanych rozmów";
|
||||
$text['description-eavesdrop_destination']['pt-br'] = "Selecione o eavesdrop de destino";
|
||||
$text['description-eavesdrop_destination']['pt-pt'] = "Selecione o Eavesdrop Destino";
|
||||
$text['description-eavesdrop_destination']['ro-ro'] = "Selectați Destinația Eavesdrop";
|
||||
$text['description-eavesdrop_destination']['ro-ro'] = "";
|
||||
$text['description-eavesdrop_destination']['ru-ru'] = "Выберите подслушивание пункта назначения";
|
||||
$text['description-eavesdrop_destination']['sv-se'] = "Välj Medlyssning Destination";
|
||||
$text['description-eavesdrop_destination']['uk-ua'] = "Виберіть пункт призначення підслуховувати";
|
||||
$text['description-eavesdrop_destination']['tr-tr'] = "Dinleme Hedefini Seçin";
|
||||
$text['description-eavesdrop_destination']['zh-cn'] = "选择窃听目的地";
|
||||
$text['description-eavesdrop_destination']['ja-jp'] = "盗聴先を選択";
|
||||
$text['description-eavesdrop_destination']['ko-kr'] = "도청 대상 선택";
|
||||
|
||||
$text['button-all']['en-us'] = "All";
|
||||
$text['button-all']['en-gb'] = "All";
|
||||
$text['button-all']['ar-eg'] = "الجميع";
|
||||
$text['button-all']['de-at'] = "Alle";
|
||||
$text['button-all']['de-ch'] = "Alle";
|
||||
$text['button-all']['ar-eg'] = "";
|
||||
$text['button-all']['de-at'] = "Alle"; //copied from de-de
|
||||
$text['button-all']['de-ch'] = "Alle"; //copied from de-de
|
||||
$text['button-all']['de-de'] = "Alle";
|
||||
$text['button-all']['el-gr'] = "Ολα";
|
||||
$text['button-all']['es-cl'] = "Todos";
|
||||
$text['button-all']['es-mx'] = "Todos";
|
||||
$text['button-all']['fr-ca'] = "Tous";
|
||||
$text['button-all']['es-mx'] = "Todos"; //copied from es-cl
|
||||
$text['button-all']['fr-ca'] = "Tous"; //copied from fr-fr
|
||||
$text['button-all']['fr-fr'] = "Tous";
|
||||
$text['button-all']['he-il'] = "הכל";
|
||||
$text['button-all']['it-it'] = "Tutti";
|
||||
$text['button-all']['ka-ge'] = "ყველა";
|
||||
$text['button-all']['nl-nl'] = "Alle";
|
||||
$text['button-all']['pl-pl'] = "Wszyscy";
|
||||
$text['button-all']['pt-br'] = "Tudo";
|
||||
$text['button-all']['pt-br'] = "Tudo"; //copied from pt-pt
|
||||
$text['button-all']['pt-pt'] = "Tudo";
|
||||
$text['button-all']['ro-ro'] = "Toate";
|
||||
$text['button-all']['ro-ro'] = "";
|
||||
$text['button-all']['ru-ru'] = "Все";
|
||||
$text['button-all']['sv-se'] = "Alla";
|
||||
$text['button-all']['uk-ua'] = "Всі";
|
||||
$text['button-all']['tr-tr'] = "Tüm";
|
||||
$text['button-all']['zh-cn'] = "全部";
|
||||
$text['button-all']['ja-jp'] = "全て";
|
||||
$text['button-all']['ko-kr'] = "모두";
|
||||
$text['button-all']['uk-ua'] = "Ð’ÑÑ–";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3,36 +3,28 @@
|
|||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Operator Panel";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Operator Panel";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "لوحة المشغل";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Bedienfeld";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Bedienfeld";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Bedienfeld";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Panel del operador";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Panel del operador";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Panneau de commande";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Panneau Operateur";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "לוח מפעיל";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Pannello Operatore";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ოპერატორის პანელი";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Bedienings paneel";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Panel operatora";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Painel do operador";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Painel operador";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Panoul operator";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Панель оператора";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Telefonist Panel";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Панель оператора";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "操作面板";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "オペレータ パネル";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "운영자 패널";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "dd3d173a-5d51-4231-ab22-b18c5b712bb2";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/basic_operator_panel/index.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -181,8 +182,8 @@
|
|||
}
|
||||
|
||||
//output suggestions, if any
|
||||
if (!empty($suggestions) && is_array($suggestions) && @sizeof($suggestions) > 0) {
|
||||
$resp = "[\n";
|
||||
if (sizeof($suggestions) > 0) {
|
||||
$resp .= "[\n";
|
||||
$resp .= implode(",\n", $suggestions)."\n";
|
||||
$resp .= "]";
|
||||
|
||||
|
|
@ -191,4 +192,4 @@
|
|||
if (isset($_GET['debug'])) { echo "</pre>"; }
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* $Id$ */
|
||||
/*
|
||||
v_exec.php
|
||||
Copyright (C) 2008-2023 Mark J Crane
|
||||
Copyright (C) 2008-2019 Mark J Crane
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -27,8 +27,9 @@
|
|||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -51,16 +52,16 @@
|
|||
//process the requests
|
||||
if (count($_GET) > 0) {
|
||||
//set the variables
|
||||
$switch_cmd = trim($_GET["cmd"] ?? '');
|
||||
$action = trim($_GET["action"] ?? '');
|
||||
$data = trim($_GET["data"] ?? '');
|
||||
$direction = trim($_GET["direction"] ?? '');
|
||||
$switch_cmd = trim($_GET["cmd"]);
|
||||
$action = trim($_GET["action"]);
|
||||
$data = trim($_GET["data"]);
|
||||
$direction = trim($_GET["direction"]);
|
||||
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//allow specific commands
|
||||
if (!empty($switch_cmd)) {
|
||||
if (strlen($switch_cmd) > 0) {
|
||||
$api_cmd = '';
|
||||
$uuid_pattern = '/[^-A-Fa-f0-9]/';
|
||||
$num_pattern = '/[^-A-Za-z0-9()*#]/';
|
||||
|
|
@ -69,17 +70,14 @@ if (count($_GET) > 0) {
|
|||
$source = preg_replace($num_pattern,'',$_GET['source']);
|
||||
$destination = preg_replace($num_pattern,'',$_GET['destination']);
|
||||
$api_cmd = 'bgapi originate {sip_auto_answer=true,origination_caller_id_number=' . $source . ',sip_h_Call-Info=_undef_}user/' . $source . '@' . $_SESSION['domain_name'] . ' ' . $destination . ' XML ' . trim($_SESSION['user_context']);
|
||||
}
|
||||
else if ($switch_cmd == 'uuid_record') {
|
||||
} elseif ($switch_cmd == 'uuid_record') {
|
||||
$uuid = preg_replace($uuid_pattern,'',$_GET['uuid']);
|
||||
$api_cmd = 'uuid_record ' . $uuid . ' start ' . $_SESSION['switch']['recordings']['dir'] . '/' . $_SESSION['domain_name'] . '/archive/' . date('Y/M/d') . '/' . $uuid . '.wav';
|
||||
}
|
||||
else if ($switch_cmd == 'uuid_transfer') {
|
||||
} elseif ($switch_cmd == 'uuid_transfer') {
|
||||
$uuid = preg_replace($uuid_pattern,'',$_GET['uuid']);
|
||||
$destination = preg_replace($num_pattern,'',$_GET['destination']);
|
||||
$api_cmd = 'uuid_transfer ' . $uuid . ' ' . $destination . ' XML ' . trim($_SESSION['user_context']);
|
||||
}
|
||||
else if ($switch_cmd == 'uuid_eavesdrop') {
|
||||
} elseif ($switch_cmd == 'uuid_eavesdrop') {
|
||||
$chan_uuid = preg_replace($uuid_pattern,'',$_GET['chan_uuid']);
|
||||
$ext = preg_replace($num_pattern,'',$_GET['ext']);
|
||||
$destination = preg_replace($num_pattern,'',$_GET['destination']);
|
||||
|
|
@ -88,18 +86,16 @@ if (count($_GET) > 0) {
|
|||
$text = $language->get();
|
||||
|
||||
$api_cmd = 'bgapi originate {origination_caller_id_name=' . $text['label-eavesdrop'] . ',origination_caller_id_number=' . $ext . '}user/' . $destination . '@' . $_SESSION['domain_name'] . ' &eavesdrop(' . $chan_uuid . ')';
|
||||
}
|
||||
else if ($switch_cmd == 'uuid_kill') {
|
||||
} elseif ($switch_cmd == 'uuid_kill') {
|
||||
$call_id = preg_replace($uuid_pattern,'',$_GET['call_id']);
|
||||
$api_cmd = 'uuid_kill ' . $call_id;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo 'access denied';
|
||||
return;
|
||||
}
|
||||
|
||||
//run the command
|
||||
$switch_result = event_socket::api($api_cmd);
|
||||
$switch_result = event_socket_request($fp, 'api '.$api_cmd);
|
||||
|
||||
/*
|
||||
//record stop
|
||||
|
|
@ -125,4 +121,4 @@ if (count($_GET) > 0) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
//update the status
|
||||
if (permission_exists("user_setting_edit")) {
|
||||
//add the user_edit permission
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add("user_edit", "temp");
|
||||
|
||||
//update the database user_status
|
||||
|
|
@ -97,21 +98,21 @@
|
|||
|
||||
//update the user_status
|
||||
if (is_uuid($call_center_agent_uuid)) {
|
||||
$esl = event_socket::create();
|
||||
$switch_cmd = "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'";
|
||||
$switch_result = event_socket::api($switch_cmd);
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$switch_cmd .= "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
|
||||
//update the user state
|
||||
if (is_uuid($call_center_agent_uuid)) {
|
||||
$cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting";
|
||||
$response = event_socket::api($cmd);
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
|
||||
//update do not disturb
|
||||
if ($user_status == "Do Not Disturb") {
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $row) {
|
||||
foreach($_SESSION['user']['extension'] as $row) {
|
||||
//build the array
|
||||
$array['extensions'][$x]['extension_uuid'] = $row['extension_uuid'];
|
||||
$array['extensions'][$x]['dial_string'] = '!USER_BUSY';
|
||||
|
|
@ -119,10 +120,8 @@
|
|||
|
||||
//delete extension from the cache
|
||||
$cache = new cache;
|
||||
if (!empty($row['extension'])) {
|
||||
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
|
||||
}
|
||||
if (!empty($number_alias)) {
|
||||
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
|
||||
if(strlen($number_alias) > 0){
|
||||
$cache->delete("directory:".$row['number_alias']."@".$_SESSION['user']['domain_name']);
|
||||
}
|
||||
|
||||
|
|
@ -140,10 +139,8 @@
|
|||
|
||||
//delete extension from the cache
|
||||
$cache = new cache;
|
||||
if (!empty($row['extension'])) {
|
||||
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
|
||||
}
|
||||
if (!empty($number_alias)) {
|
||||
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
|
||||
if(strlen($number_alias) > 0){
|
||||
$cache->delete("directory:".$row['number_alias']."@".$_SESSION['user']['domain_name']);
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +150,7 @@
|
|||
}
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('extension_edit', 'temp');
|
||||
|
||||
//execute update
|
||||
|
|
@ -168,10 +165,8 @@
|
|||
|
||||
//delete extension from the cache
|
||||
$cache = new cache;
|
||||
if (!empty($extension)) {
|
||||
$cache->delete("directory:".$extension."@".$this->domain_name);
|
||||
}
|
||||
if (!empty($number_alias)) {
|
||||
$cache->delete("directory:".$extension."@".$this->domain_name);
|
||||
if(strlen($number_alias) > 0){
|
||||
$cache->delete("directory:".$number_alias."@".$this->domain_name);
|
||||
}
|
||||
}
|
||||
|
|
@ -260,7 +255,7 @@ unset($refresh_default);
|
|||
|
||||
if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
|
||||
//this.el.innerHTML = this.xmlHttp.responseText;
|
||||
document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
|
||||
document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
|
||||
if (document.getElementById('sort')) {
|
||||
if (document.getElementById('sort').value != "")
|
||||
document.getElementById('sort1').value=document.getElementById('sort').value;
|
||||
|
|
@ -272,7 +267,8 @@ unset($refresh_default);
|
|||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||
url += '&filter=' + ((document.getElementById('search')) ? document.getElementById('search').value : '');
|
||||
url += '&extension_filter=' + ((document.getElementById('extension_filter')) ? document.getElementById('extension_filter').value : '');
|
||||
url += '&name_filter=' + ((document.getElementById('name_filter')) ? document.getElementById('name_filter').value : '');
|
||||
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
||||
if (document.getElementById('sort1'))
|
||||
if (document.getElementById('sort1').value == '1') url += '&sort';
|
||||
|
|
@ -281,7 +277,7 @@ unset($refresh_default);
|
|||
echo "url += '&debug';";
|
||||
}
|
||||
?>
|
||||
new loadXmlHttp(url, 'ajax_response');
|
||||
new loadXmlHttp(url, 'ajax_reponse');
|
||||
refresh_start();
|
||||
}
|
||||
|
||||
|
|
@ -349,18 +345,19 @@ unset($refresh_default);
|
|||
//refresh controls
|
||||
function refresh_stop() {
|
||||
clearInterval(interval_timer_id);
|
||||
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<?php echo button::create(['type'=>'button','title'=>$text['label-refresh_enable'],'icon'=>'pause','onclick'=>'refresh_start()']); ?>"; }
|
||||
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<img src='resources/images/refresh_paused.png' style='width: 16px; height: 16px; border: none; margin-top: 1px; cursor: pointer;' onclick='refresh_start();' alt=\"<?php echo $text['label-refresh_enable']?>\" title=\"<?php echo $text['label-refresh_enable']?>\">"; }
|
||||
}
|
||||
|
||||
function refresh_start() {
|
||||
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<?php echo button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()']); ?>"; }
|
||||
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<img src='resources/images/refresh_active.gif' style='width: 16px; height: 16px; border: none; margin-top: 3px; cursor: pointer;' alt=\"<?php echo $text['label-refresh_pause']?>\" title=\"<?php echo $text['label-refresh_pause']?>\">"; }
|
||||
refresh_stop();
|
||||
interval_timer_id = setInterval( function() {
|
||||
url = source_url;
|
||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||
url += '&filter=' + ((document.getElementById('search')) ? document.getElementById('search').value : '');
|
||||
url += '&extension_filter=' + ((document.getElementById('extension_filter')) ? document.getElementById('extension_filter').value : '');
|
||||
url += '&name_filter=' + ((document.getElementById('name_filter')) ? document.getElementById('name_filter').value : '');
|
||||
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
||||
if (document.getElementById('sort1'))
|
||||
if (document.getElementById('sort1').value == '1') url += '&sort';
|
||||
|
|
@ -369,7 +366,7 @@ unset($refresh_default);
|
|||
echo "url += '&debug';";
|
||||
}
|
||||
?>
|
||||
new loadXmlHttp(url, 'ajax_response');
|
||||
new loadXmlHttp(url, 'ajax_reponse');
|
||||
}, refresh);
|
||||
}
|
||||
|
||||
|
|
@ -405,7 +402,7 @@ unset($refresh_default);
|
|||
if (ext != '' && chan_uuid != '') {
|
||||
cmd = get_eavesdrop_cmd(ext, chan_uuid, document.getElementById('eavesdrop_dest').value);
|
||||
if (cmd != '') {
|
||||
send_cmd(cmd);
|
||||
send_cmd(cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -430,7 +427,7 @@ unset($refresh_default);
|
|||
}
|
||||
xmlhttp.open("GET",url,false);
|
||||
xmlhttp.send(null);
|
||||
document.getElementById('cmd_response').innerHTML=xmlhttp.responseText;
|
||||
document.getElementById('cmd_reponse').innerHTML=xmlhttp.responseText;
|
||||
}
|
||||
|
||||
//hide/show destination input field
|
||||
|
|
@ -588,11 +585,15 @@ if (is_array($_SESSION['user']['extension'])) {
|
|||
}
|
||||
}
|
||||
|
||||
echo "<div id='ajax_response'></div>\n";
|
||||
echo "<div id='cmd_response' style='display: none;'></div>\n";
|
||||
echo "<br><br>\n";
|
||||
?>
|
||||
|
||||
<div id='ajax_reponse'></div>
|
||||
<div id='cmd_reponse' style='display: none;'></div>
|
||||
<br><br>
|
||||
|
||||
<?php
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
/**
|
||||
* Define the operator_panel class
|
||||
*/
|
||||
if (!class_exists('basic_operator_panel')) {
|
||||
class basic_operator_panel {
|
||||
|
||||
/**
|
||||
|
|
@ -43,6 +44,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the call activity
|
||||
*/
|
||||
|
|
@ -56,6 +67,7 @@
|
|||
$sql .= "e.extension, ";
|
||||
$sql .= "e.number_alias, ";
|
||||
$sql .= "e.effective_caller_id_name, ";
|
||||
$sql .= "lower(e.effective_caller_id_name) as filter_name, ";
|
||||
$sql .= "e.effective_caller_id_number, ";
|
||||
$sql .= "e.call_group, ";
|
||||
$sql .= "e.description, ";
|
||||
|
|
@ -76,7 +88,7 @@
|
|||
|
||||
//store extension status by user uuid
|
||||
if (isset($extensions)) {
|
||||
foreach ($extensions as $row) {
|
||||
foreach($extensions as &$row) {
|
||||
if ($row['user_uuid'] != '') {
|
||||
$ext_user_status[$row['user_uuid']] = $row['user_status'];
|
||||
unset($row['user_status']);
|
||||
|
|
@ -85,20 +97,18 @@
|
|||
}
|
||||
|
||||
//send the command
|
||||
$switch_result = event_socket::api('show channels as json');
|
||||
if ($switch_result !== false) {
|
||||
$fp = true;
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_result = event_socket_request($fp, 'api show channels as json');
|
||||
$json_array = json_decode($switch_result, true);
|
||||
} else {
|
||||
$fp = false;
|
||||
}
|
||||
|
||||
//build the response
|
||||
$x = 0;
|
||||
if (isset($extensions)) {
|
||||
foreach ($extensions as $row) {
|
||||
foreach($extensions as &$row) {
|
||||
$user = $row['extension'];
|
||||
if (!empty($row['number_alias'])) {
|
||||
if (strlen($row['number_alias']) >0 ) {
|
||||
$user = $row['number_alias'];
|
||||
}
|
||||
|
||||
|
|
@ -142,11 +152,11 @@
|
|||
//add the active call details
|
||||
$found = false;
|
||||
if (isset($json_array['rows'])) {
|
||||
foreach ($json_array['rows'] as $field) {
|
||||
foreach($json_array['rows'] as &$field) {
|
||||
$presence_id = $field['presence_id'];
|
||||
$presence = explode("@", $presence_id);
|
||||
$presence_id = $presence[0];
|
||||
$presence_domain = $presence[1] ?? '';
|
||||
$presence_domain = $presence[1];
|
||||
if ($user == $presence_id) {
|
||||
if ($presence_domain == $_SESSION['domain_name']) {
|
||||
$found = true;
|
||||
|
|
@ -206,10 +216,8 @@
|
|||
if ($fp) {
|
||||
if (is_uuid($field['uuid'])) {
|
||||
$switch_cmd = 'uuid_dump '.$field['uuid'].' json';
|
||||
$dump_result = event_socket::api($switch_cmd);
|
||||
if ($dump_result !== false) {
|
||||
$dump_array = json_decode($dump_result, true);
|
||||
}
|
||||
$dump_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
$dump_array = json_decode($dump_result, true);
|
||||
if (is_array($dump_array)) {
|
||||
foreach ($dump_array as $dump_var_name => $dump_var_value) {
|
||||
$array[$x][$dump_var_name] = $dump_var_value;
|
||||
|
|
@ -244,3 +252,6 @@
|
|||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
//application details
|
||||
$apps[$x]['name'] = 'Bridges';
|
||||
$apps[$x]['uuid'] = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
|
||||
$apps[$x]['category'] = 'switch';
|
||||
$apps[$x]['category'] = '';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '1.2';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en-us'] = '';
|
||||
|
|
@ -36,9 +36,6 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'bridge_import';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
|
||||
//destination details
|
||||
$y = 0;
|
||||
|
|
@ -49,7 +46,6 @@
|
|||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and bridge_enabled = 'true'";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "bridge_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['bridge_uuid'] = "bridge_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['uuid'] = "bridge_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "bridge_name";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "bridge_description";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "bridge_destination";
|
||||
|
|
@ -97,86 +93,5 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
//default settings
|
||||
$y=0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ebe37151-bbd0-4bf3-9c01-7a831943cb86";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'user';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9a64c041-0dcd-4eee-b196-6f300b87dff8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'gateway';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a082511d-cc2f-4b8a-a49c-f505971ef80f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'profile';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f5b659a5-a375-4207-b3d1-cad5b3336f2e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'loopback';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b97e4810-8a04-4305-9cd8-a43c57c71703";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "variable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'accountcode';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0d1b5374-9c7a-46a5-9a08-d32fd42d6f06";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "variable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'effective_caller_id_number';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bdf5e430-ac50-4a15-b59d-b0c8a78fd410";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "bridge";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "variable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'call_direction=outbound';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,625 +1,257 @@
|
|||
<?php
|
||||
|
||||
$text['title-bridges']['en-us'] = "Bridges";
|
||||
$text['title-bridges']['en-gb'] = "Bridges";
|
||||
$text['title-bridges']['ar-eg'] = "الجسور";
|
||||
$text['title-bridges']['de-at'] = "Brücken";
|
||||
$text['title-bridges']['de-ch'] = "Brücken";
|
||||
$text['title-bridges']['de-de'] = "Brücken";
|
||||
$text['title-bridges']['el-gr'] = "Γέφυρες";
|
||||
$text['title-bridges']['es-cl'] = "Puentes";
|
||||
$text['title-bridges']['es-mx'] = "Puentes";
|
||||
$text['title-bridges']['fr-ca'] = "Ponts";
|
||||
$text['title-bridges']['fr-fr'] = "Ponts";
|
||||
$text['title-bridges']['he-il'] = "גשרים";
|
||||
$text['title-bridges']['it-it'] = "Ponti";
|
||||
$text['title-bridges']['ka-ge'] = "ხიდები";
|
||||
$text['title-bridges']['nl-nl'] = "Bruggen";
|
||||
$text['title-bridges']['pl-pl'] = "Mostki";
|
||||
$text['title-bridges']['pt-br'] = "pontes";
|
||||
$text['title-bridges']['pt-pt'] = "pontes";
|
||||
$text['title-bridges']['ro-ro'] = "Poduri";
|
||||
$text['title-bridges']['ru-ru'] = "Мосты";
|
||||
$text['title-bridges']['sv-se'] = "Broar";
|
||||
$text['title-bridges']['uk-ua'] = "Мости";
|
||||
$text['title-bridges']['tr-tr'] = "Köprüler";
|
||||
$text['title-bridges']['zh-cn'] = "桥梁";
|
||||
$text['title-bridges']['ja-jp'] = "橋";
|
||||
$text['title-bridges']['ko-kr'] = "교량";
|
||||
//Bridges
|
||||
$text['title-bridges']['en-us'] = 'Bridges';
|
||||
$text['title-bridges']['en-gb'] = 'Bridges';
|
||||
$text['title-bridges']['ar-eg'] = '';
|
||||
$text['title-bridges']['de-at'] = '';
|
||||
$text['title-bridges']['de-ch'] = '';
|
||||
$text['title-bridges']['de-de'] = '';
|
||||
$text['title-bridges']['es-cl'] = '';
|
||||
$text['title-bridges']['es-mx'] = '';
|
||||
$text['title-bridges']['fr-ca'] = 'Ponts';
|
||||
$text['title-bridges']['fr-fr'] = 'Ponts';
|
||||
$text['title-bridges']['he-il'] = '';
|
||||
$text['title-bridges']['it-it'] = '';
|
||||
$text['title-bridges']['nl-nl'] = 'Bruggen';
|
||||
$text['title-bridges']['pl-pl'] = 'Mostki';
|
||||
$text['title-bridges']['pt-br'] = '';
|
||||
$text['title-bridges']['pt-pt'] = '';
|
||||
$text['title-bridges']['ro-ro'] = '';
|
||||
$text['title-bridges']['ru-ru'] = '';
|
||||
$text['title-bridges']['sv-se'] = '';
|
||||
$text['title-bridges']['uk-ua'] = '';
|
||||
|
||||
$text['title-bridge']['en-us'] = "Bridge";
|
||||
$text['title-bridge']['en-gb'] = "Bridge";
|
||||
$text['title-bridge']['ar-eg'] = "كوبري";
|
||||
$text['title-bridge']['de-at'] = "Brücke";
|
||||
$text['title-bridge']['de-ch'] = "Brücke";
|
||||
$text['title-bridge']['de-de'] = "Brücke";
|
||||
$text['title-bridge']['el-gr'] = "Γέφυρα";
|
||||
$text['title-bridge']['es-cl'] = "Puente";
|
||||
$text['title-bridge']['es-mx'] = "Puente";
|
||||
$text['title-bridge']['fr-ca'] = "Pont";
|
||||
$text['title-bridge']['fr-fr'] = "Pont";
|
||||
$text['title-bridge']['he-il'] = "לְגַשֵׁר";
|
||||
$text['title-bridge']['it-it'] = "Ponte";
|
||||
$text['title-bridge']['ka-ge'] = "ხიდი";
|
||||
$text['title-bridge']['nl-nl'] = "Brug";
|
||||
$text['title-bridge']['pl-pl'] = "Mostek";
|
||||
$text['title-bridge']['pt-br'] = "Ponte";
|
||||
$text['title-bridge']['pt-pt'] = "Ponte";
|
||||
$text['title-bridge']['ro-ro'] = "Pod";
|
||||
$text['title-bridge']['ru-ru'] = "Мост";
|
||||
$text['title-bridge']['sv-se'] = "Bro";
|
||||
$text['title-bridge']['uk-ua'] = "Міст";
|
||||
$text['title-bridge']['tr-tr'] = "Köprü";
|
||||
$text['title-bridge']['zh-cn'] = "桥";
|
||||
$text['title-bridge']['ja-jp'] = "橋";
|
||||
$text['title-bridge']['ko-kr'] = "다리";
|
||||
$text['title-bridge']['en-us'] = 'Bridge';
|
||||
$text['title-bridge']['en-gb'] = 'Bridge';
|
||||
$text['title-bridge']['ar-eg'] = '';
|
||||
$text['title-bridge']['de-at'] = '';
|
||||
$text['title-bridge']['de-ch'] = '';
|
||||
$text['title-bridge']['de-de'] = '';
|
||||
$text['title-bridge']['es-cl'] = '';
|
||||
$text['title-bridge']['es-mx'] = '';
|
||||
$text['title-bridge']['fr-ca'] = 'Pont';
|
||||
$text['title-bridge']['fr-fr'] = 'Pont';
|
||||
$text['title-bridge']['he-il'] = '';
|
||||
$text['title-bridge']['it-it'] = '';
|
||||
$text['title-bridge']['nl-nl'] = 'Brug';
|
||||
$text['title-bridge']['pl-pl'] = 'Mostek';
|
||||
$text['title-bridge']['pt-br'] = '';
|
||||
$text['title-bridge']['pt-pt'] = '';
|
||||
$text['title-bridge']['ro-ro'] = '';
|
||||
$text['title-bridge']['ru-ru'] = '';
|
||||
$text['title-bridge']['sv-se'] = '';
|
||||
$text['title-bridge']['uk-ua'] = '';
|
||||
|
||||
$text['title_description-bridge']['en-us'] = "Add bridge statements to destination select list.";
|
||||
$text['title_description-bridge']['en-gb'] = "Add bridge statements to destination select list.";
|
||||
$text['title_description-bridge']['ar-eg'] = "إضافة عبارات الجسر إلى قائمة تحديد الوجهة.";
|
||||
$text['title_description-bridge']['de-at'] = "Bridge-Anweisungen zur Zielauswahlliste hinzufügen.";
|
||||
$text['title_description-bridge']['de-ch'] = "Bridge-Anweisungen zur Zielauswahlliste hinzufügen.";
|
||||
$text['title_description-bridge']['de-de'] = "Bridge-Anweisungen zur Zielauswahlliste hinzufügen.";
|
||||
$text['title_description-bridge']['el-gr'] = "Προσθέστε δηλώσεις γέφυρας στη λίστα επιλογής προορισμού.";
|
||||
$text['title_description-bridge']['es-cl'] = "Agregue declaraciones de puente a la lista de selección de destino.";
|
||||
$text['title_description-bridge']['es-mx'] = "Agregue declaraciones de puente a la lista de selección de destino.";
|
||||
$text['title_description-bridge']['fr-ca'] = "Ajouter des déclarations de pont à la liste de sélection";
|
||||
$text['title_description-bridge']['fr-fr'] = "Ajouter des déclarations de pont à la liste de sélection";
|
||||
$text['title_description-bridge']['he-il'] = "הוסף הצהרות גשר לרשימת בחירת היעד.";
|
||||
$text['title_description-bridge']['it-it'] = "Aggiungi istruzioni bridge allelenco di selezione della destinazione.";
|
||||
$text['title_description-bridge']['ka-ge'] = "დაამატეთ ხიდის ოპერატორები სამიზნის არჩევის სიაში";
|
||||
$text['title_description-bridge']['nl-nl'] = "Voeg bridge opdrachten toe aan bestemmings lijst.";
|
||||
$text['title_description-bridge']['pl-pl'] = "Dodaj wyrażenia mostkowania do listy wyboru destynacji.";
|
||||
$text['title_description-bridge']['pt-br'] = "Adicione instruções de ponte à lista de seleção de destino.";
|
||||
$text['title_description-bridge']['pt-pt'] = "Adicione instruções de ponte à lista de seleção de destino.";
|
||||
$text['title_description-bridge']['ro-ro'] = "Adăugați declarații bridge la lista de selectare a destinației.";
|
||||
$text['title_description-bridge']['ru-ru'] = "Добавьте операторы моста в список выбора места назначения.";
|
||||
$text['title_description-bridge']['sv-se'] = "Lägg till bryggsatser till destinationsvallistan.";
|
||||
$text['title_description-bridge']['uk-ua'] = "Додайте оператори моста до списку вибору призначення.";
|
||||
$text['title_description-bridge']['tr-tr'] = "Hedef seçim listesine köprü ifadeleri ekleyin.";
|
||||
$text['title_description-bridge']['zh-cn'] = "将桥接语句添加到目标选择列表。";
|
||||
$text['title_description-bridge']['ja-jp'] = "宛先選択リストにブリッジ ステートメントを追加します。";
|
||||
$text['title_description-bridge']['ko-kr'] = "대상 선택 목록에 브리지 문을 추가합니다.";
|
||||
$text['title_description-bridge']['en-us'] = 'Add bridge statements to destination select list.';
|
||||
$text['title_description-bridge']['en-gb'] = 'Add bridge statements to destination select list.';
|
||||
$text['title_description-bridge']['ar-eg'] = '';
|
||||
$text['title_description-bridge']['de-at'] = '';
|
||||
$text['title_description-bridge']['de-ch'] = '';
|
||||
$text['title_description-bridge']['de-de'] = '';
|
||||
$text['title_description-bridge']['es-cl'] = '';
|
||||
$text['title_description-bridge']['es-mx'] = '';
|
||||
$text['title_description-bridge']['fr-ca'] = 'Ajouter des déclarations de pont à la liste de sélection';
|
||||
$text['title_description-bridge']['fr-fr'] = 'Ajouter des déclarations de pont à la liste de sélection';
|
||||
$text['title_description-bridge']['he-il'] = '';
|
||||
$text['title_description-bridge']['it-it'] = '';
|
||||
$text['title_description-bridge']['nl-nl'] = 'Voeg brug opdrachten toe aan bestemmings lijst.';
|
||||
$text['title_description-bridge']['pl-pl'] = 'Dodaj wyrażenia mostkowania do listy wyboru destynacji.';
|
||||
$text['title_description-bridge']['pt-br'] = '';
|
||||
$text['title_description-bridge']['pt-pt'] = '';
|
||||
$text['title_description-bridge']['ro-ro'] = '';
|
||||
$text['title_description-bridge']['ru-ru'] = '';
|
||||
$text['title_description-bridge']['sv-se'] = '';
|
||||
$text['title_description-bridge']['uk-ua'] = '';
|
||||
|
||||
$text['label-bridge_import']['en-us'] = "Bridge Import";
|
||||
$text['label-bridge_import']['en-gb'] = "Bridge Import";
|
||||
$text['label-bridge_import']['ar-eg'] = "استيراد الجسر";
|
||||
$text['label-bridge_import']['de-at'] = "Bridge-Import";
|
||||
$text['label-bridge_import']['de-ch'] = "Bridge-Import";
|
||||
$text['label-bridge_import']['de-de'] = "Bridge-Import";
|
||||
$text['label-bridge_import']['el-gr'] = "Εισαγωγή Γέφυρας";
|
||||
$text['label-bridge_import']['es-cl'] = "Importación de puente";
|
||||
$text['label-bridge_import']['es-mx'] = "Importación de puente";
|
||||
$text['label-bridge_import']['fr-ca'] = "Importation de pont";
|
||||
$text['label-bridge_import']['fr-fr'] = "Importation de pont";
|
||||
$text['label-bridge_import']['he-il'] = "ייבוא גשר";
|
||||
$text['label-bridge_import']['it-it'] = "Importazione del ponte";
|
||||
$text['label-bridge_import']['ka-ge'] = "ხიდის იმპორტი";
|
||||
$text['label-bridge_import']['nl-nl'] = "Bridge importeren";
|
||||
$text['label-bridge_import']['pl-pl'] = "Import mostu";
|
||||
$text['label-bridge_import']['pt-br'] = "Importação de ponte";
|
||||
$text['label-bridge_import']['pt-pt'] = "Importação de ponte";
|
||||
$text['label-bridge_import']['ro-ro'] = "Import de pod";
|
||||
$text['label-bridge_import']['ru-ru'] = "Импорт моста";
|
||||
$text['label-bridge_import']['sv-se'] = "Bridge Import";
|
||||
$text['label-bridge_import']['uk-ua'] = "Імпорт міст";
|
||||
$text['label-bridge_import']['tr-tr'] = "Köprü İçe Aktarımı";
|
||||
$text['label-bridge_import']['zh-cn'] = "桥导入";
|
||||
$text['label-bridge_import']['ja-jp'] = "ブリッジインポート";
|
||||
$text['label-bridge_import']['ko-kr'] = "브릿지 임포트";
|
||||
$text['label-bridge_name']['en-us'] = 'Name';
|
||||
$text['label-bridge_name']['en-gb'] = 'Name';
|
||||
$text['label-bridge_name']['ar-eg'] = '';
|
||||
$text['label-bridge_name']['de-at'] = '';
|
||||
$text['label-bridge_name']['de-ch'] = '';
|
||||
$text['label-bridge_name']['de-de'] = '';
|
||||
$text['label-bridge_name']['es-cl'] = '';
|
||||
$text['label-bridge_name']['es-mx'] = '';
|
||||
$text['label-bridge_name']['fr-ca'] = 'Nom';
|
||||
$text['label-bridge_name']['fr-fr'] = 'Nom';
|
||||
$text['label-bridge_name']['he-il'] = '';
|
||||
$text['label-bridge_name']['it-it'] = '';
|
||||
$text['label-bridge_name']['nl-nl'] = 'Naam';
|
||||
$text['label-bridge_name']['pl-pl'] = 'Nazwa';
|
||||
$text['label-bridge_name']['pt-br'] = '';
|
||||
$text['label-bridge_name']['pt-pt'] = '';
|
||||
$text['label-bridge_name']['ro-ro'] = '';
|
||||
$text['label-bridge_name']['ru-ru'] = '';
|
||||
$text['label-bridge_name']['sv-se'] = '';
|
||||
$text['label-bridge_name']['uk-ua'] = '';
|
||||
|
||||
$text['label-bridge_name']['en-us'] = "Name";
|
||||
$text['label-bridge_name']['en-gb'] = "Name";
|
||||
$text['label-bridge_name']['ar-eg'] = "اسم";
|
||||
$text['label-bridge_name']['de-at'] = "Name";
|
||||
$text['label-bridge_name']['de-ch'] = "Name";
|
||||
$text['label-bridge_name']['de-de'] = "Name";
|
||||
$text['label-bridge_name']['el-gr'] = "Ονομα";
|
||||
$text['label-bridge_name']['es-cl'] = "Nombre";
|
||||
$text['label-bridge_name']['es-mx'] = "Nombre";
|
||||
$text['label-bridge_name']['fr-ca'] = "Nom";
|
||||
$text['label-bridge_name']['fr-fr'] = "Nom";
|
||||
$text['label-bridge_name']['he-il'] = "שֵׁם";
|
||||
$text['label-bridge_name']['it-it'] = "Nome";
|
||||
$text['label-bridge_name']['ka-ge'] = "სახელი";
|
||||
$text['label-bridge_name']['nl-nl'] = "Naam";
|
||||
$text['label-bridge_name']['pl-pl'] = "Nazwa";
|
||||
$text['label-bridge_name']['pt-br'] = "Nome";
|
||||
$text['label-bridge_name']['pt-pt'] = "Nome";
|
||||
$text['label-bridge_name']['ro-ro'] = "Nume";
|
||||
$text['label-bridge_name']['ru-ru'] = "Имя";
|
||||
$text['label-bridge_name']['sv-se'] = "namn";
|
||||
$text['label-bridge_name']['uk-ua'] = "Імя";
|
||||
$text['label-bridge_name']['tr-tr'] = "İsim";
|
||||
$text['label-bridge_name']['zh-cn'] = "姓名";
|
||||
$text['label-bridge_name']['ja-jp'] = "名前";
|
||||
$text['label-bridge_name']['ko-kr'] = "이름";
|
||||
$text['description-bridge_name']['en-us'] = 'Enter the name.';
|
||||
$text['description-bridge_name']['en-gb'] = 'Enter the name.';
|
||||
$text['description-bridge_name']['ar-eg'] = '';
|
||||
$text['description-bridge_name']['de-at'] = '';
|
||||
$text['description-bridge_name']['de-ch'] = '';
|
||||
$text['description-bridge_name']['de-de'] = '';
|
||||
$text['description-bridge_name']['es-cl'] = '';
|
||||
$text['description-bridge_name']['es-mx'] = '';
|
||||
$text['description-bridge_name']['fr-ca'] = 'Entrez le nom';
|
||||
$text['description-bridge_name']['fr-fr'] = 'Entrez le nom';
|
||||
$text['description-bridge_name']['he-il'] = '';
|
||||
$text['description-bridge_name']['it-it'] = '';
|
||||
$text['description-bridge_name']['nl-nl'] = 'Voer naam in.';
|
||||
$text['description-bridge_name']['pl-pl'] = 'Wprowadź nazwę.';
|
||||
$text['description-bridge_name']['pt-br'] = '';
|
||||
$text['description-bridge_name']['pt-pt'] = '';
|
||||
$text['description-bridge_name']['ro-ro'] = '';
|
||||
$text['description-bridge_name']['ru-ru'] = '';
|
||||
$text['description-bridge_name']['sv-se'] = '';
|
||||
$text['description-bridge_name']['uk-ua'] = '';
|
||||
|
||||
$text['description-bridge_name']['en-us'] = "Enter the name.";
|
||||
$text['description-bridge_name']['en-gb'] = "Enter the name.";
|
||||
$text['description-bridge_name']['ar-eg'] = "أدخل الاسم.";
|
||||
$text['description-bridge_name']['de-at'] = "Geben Sie den Namen ein.";
|
||||
$text['description-bridge_name']['de-ch'] = "Geben Sie den Namen ein.";
|
||||
$text['description-bridge_name']['de-de'] = "Geben Sie den Namen ein.";
|
||||
$text['description-bridge_name']['el-gr'] = "Εισαγάγετε το όνομα.";
|
||||
$text['description-bridge_name']['es-cl'] = "Introduzca el nombre.";
|
||||
$text['description-bridge_name']['es-mx'] = "Introduzca el nombre.";
|
||||
$text['description-bridge_name']['fr-ca'] = "Entrez le nom";
|
||||
$text['description-bridge_name']['fr-fr'] = "Entrez le nom";
|
||||
$text['description-bridge_name']['he-il'] = "הזן את השם.";
|
||||
$text['description-bridge_name']['it-it'] = "Inserisci il nome.";
|
||||
$text['description-bridge_name']['ka-ge'] = "შეიყვანეთ სახელი";
|
||||
$text['description-bridge_name']['nl-nl'] = "Voer naam in.";
|
||||
$text['description-bridge_name']['pl-pl'] = "Wprowadź nazwę.";
|
||||
$text['description-bridge_name']['pt-br'] = "Digite o nome.";
|
||||
$text['description-bridge_name']['pt-pt'] = "Digite o nome.";
|
||||
$text['description-bridge_name']['ro-ro'] = "Introduceți numele.";
|
||||
$text['description-bridge_name']['ru-ru'] = "Введите имя.";
|
||||
$text['description-bridge_name']['sv-se'] = "Ange namnet.";
|
||||
$text['description-bridge_name']['uk-ua'] = "Введіть назву.";
|
||||
$text['description-bridge_name']['tr-tr'] = "Adı girin.";
|
||||
$text['description-bridge_name']['zh-cn'] = "输入名称。";
|
||||
$text['description-bridge_name']['ja-jp'] = "名前を入力します。";
|
||||
$text['description-bridge_name']['ko-kr'] = "이름을 입력하세요.";
|
||||
$text['label-bridge_destination']['en-us'] = 'Destination';
|
||||
$text['label-bridge_destination']['en-gb'] = 'Destination';
|
||||
$text['label-bridge_destination']['ar-eg'] = '';
|
||||
$text['label-bridge_destination']['de-at'] = '';
|
||||
$text['label-bridge_destination']['de-ch'] = '';
|
||||
$text['label-bridge_destination']['de-de'] = '';
|
||||
$text['label-bridge_destination']['es-cl'] = '';
|
||||
$text['label-bridge_destination']['es-mx'] = '';
|
||||
$text['label-bridge_destination']['fr-ca'] = 'Destination';
|
||||
$text['label-bridge_destination']['fr-fr'] = 'Destination';
|
||||
$text['label-bridge_destination']['he-il'] = '';
|
||||
$text['label-bridge_destination']['it-it'] = '';
|
||||
$text['label-bridge_destination']['nl-nl'] = 'Bestemming';
|
||||
$text['label-bridge_destination']['pl-pl'] = 'Destynacja';
|
||||
$text['label-bridge_destination']['pt-br'] = '';
|
||||
$text['label-bridge_destination']['pt-pt'] = '';
|
||||
$text['label-bridge_destination']['ro-ro'] = '';
|
||||
$text['label-bridge_destination']['ru-ru'] = '';
|
||||
$text['label-bridge_destination']['sv-se'] = '';
|
||||
$text['label-bridge_destination']['uk-ua'] = '';
|
||||
|
||||
$text['label-bridge_action']['en-us'] = "Action";
|
||||
$text['label-bridge_action']['en-gb'] = "Action";
|
||||
$text['label-bridge_action']['ar-eg'] = "الإجراء";
|
||||
$text['label-bridge_action']['de-at'] = "Aktion";
|
||||
$text['label-bridge_action']['de-ch'] = "Aktion";
|
||||
$text['label-bridge_action']['de-de'] = "Aktion";
|
||||
$text['label-bridge_action']['el-gr'] = "Δράση";
|
||||
$text['label-bridge_action']['es-cl'] = "Acción";
|
||||
$text['label-bridge_action']['es-mx'] = "Acción";
|
||||
$text['label-bridge_action']['fr-ca'] = "Action";
|
||||
$text['label-bridge_action']['fr-fr'] = "Action";
|
||||
$text['label-bridge_action']['he-il'] = "פעולה";
|
||||
$text['label-bridge_action']['it-it'] = "Azione";
|
||||
$text['label-bridge_action']['ka-ge'] = "ქმედება";
|
||||
$text['label-bridge_action']['nl-nl'] = "Aktie";
|
||||
$text['label-bridge_action']['pl-pl'] = "Operacja";
|
||||
$text['label-bridge_action']['pt-br'] = "Ação";
|
||||
$text['label-bridge_action']['pt-pt'] = "Acção";
|
||||
$text['label-bridge_action']['ro-ro'] = "Acțiune";
|
||||
$text['label-bridge_action']['ru-ru'] = "Действие";
|
||||
$text['label-bridge_action']['sv-se'] = "Aktion";
|
||||
$text['label-bridge_action']['uk-ua'] = "Дія";
|
||||
$text['label-bridge_action']['tr-tr'] = "Aksiyon";
|
||||
$text['label-bridge_action']['zh-cn'] = "行动";
|
||||
$text['label-bridge_action']['ja-jp'] = "アクション";
|
||||
$text['label-bridge_action']['ko-kr'] = "행동";
|
||||
$text['description-bridge_destination']['en-us'] = 'Enter the destination.';
|
||||
$text['description-bridge_destination']['en-gb'] = 'Enter the destination.';
|
||||
$text['description-bridge_destination']['ar-eg'] = '';
|
||||
$text['description-bridge_destination']['de-at'] = '';
|
||||
$text['description-bridge_destination']['de-ch'] = '';
|
||||
$text['description-bridge_destination']['de-de'] = '';
|
||||
$text['description-bridge_destination']['es-cl'] = '';
|
||||
$text['description-bridge_destination']['es-mx'] = '';
|
||||
$text['description-bridge_destination']['fr-ca'] = 'Entrer la destination';
|
||||
$text['description-bridge_destination']['fr-fr'] = 'Entrer la destination';
|
||||
$text['description-bridge_destination']['he-il'] = '';
|
||||
$text['description-bridge_destination']['it-it'] = '';
|
||||
$text['description-bridge_destination']['nl-nl'] = 'Voer de bestemming in.';
|
||||
$text['description-bridge_destination']['pl-pl'] = 'Wprowadź destynację.';
|
||||
$text['description-bridge_destination']['pt-br'] = '';
|
||||
$text['description-bridge_destination']['pt-pt'] = '';
|
||||
$text['description-bridge_destination']['ro-ro'] = '';
|
||||
$text['description-bridge_destination']['ru-ru'] = '';
|
||||
$text['description-bridge_destination']['sv-se'] = '';
|
||||
$text['description-bridge_destination']['uk-ua'] = '';
|
||||
|
||||
$text['description-bridge_action']['en-us'] = "Select the bridge action.";
|
||||
$text['description-bridge_action']['en-gb'] = "Select the bridge action.";
|
||||
$text['description-bridge_action']['ar-eg'] = "حدد إجراء الجسر.";
|
||||
$text['description-bridge_action']['de-at'] = "Wählen Sie die Bridge-Aktion aus.";
|
||||
$text['description-bridge_action']['de-ch'] = "Wählen Sie die Bridge-Aktion aus.";
|
||||
$text['description-bridge_action']['de-de'] = "Wählen Sie die Bridge-Aktion aus.";
|
||||
$text['description-bridge_action']['el-gr'] = "Επιλέξτε τη δράση γέφυρας.";
|
||||
$text['description-bridge_action']['es-cl'] = "Seleccione la acción del puente.";
|
||||
$text['description-bridge_action']['es-mx'] = "Seleccione la acción del puente.";
|
||||
$text['description-bridge_action']['fr-ca'] = "Sélectionnez l'action de pont.";
|
||||
$text['description-bridge_action']['fr-fr'] = "Sélectionnez l'action de pont.";
|
||||
$text['description-bridge_action']['he-il'] = "בחר את פעולת הגשר.";
|
||||
$text['description-bridge_action']['it-it'] = "Seleziona l'azione del ponte.";
|
||||
$text['description-bridge_action']['ka-ge'] = "აირჩიეთ ხიდის ქმედება.";
|
||||
$text['description-bridge_action']['nl-nl'] = "Selecteer de brugactie.";
|
||||
$text['description-bridge_action']['pl-pl'] = "Wybierz akcję mostu.";
|
||||
$text['description-bridge_action']['pt-br'] = "Selecione a ação da ponte.";
|
||||
$text['description-bridge_action']['pt-pt'] = "Selecione a ação da ponte.";
|
||||
$text['description-bridge_action']['ro-ro'] = "Selectați acțiunea bridge.";
|
||||
$text['description-bridge_action']['ru-ru'] = "Выберите действие моста.";
|
||||
$text['description-bridge_action']['sv-se'] = "Välj broåtgärd.";
|
||||
$text['description-bridge_action']['uk-ua'] = "Виберіть дію моста.";
|
||||
$text['description-bridge_action']['tr-tr'] = "Köprü eylemini seçin.";
|
||||
$text['description-bridge_action']['zh-cn'] = "选择桥接动作。";
|
||||
$text['description-bridge_action']['ja-jp'] = "ブリッジアクションを選択します。";
|
||||
$text['description-bridge_action']['ko-kr'] = "브리지 작업을 선택합니다.";
|
||||
$text['label-bridge_enabled']['en-us'] = 'Enabled';
|
||||
$text['label-bridge_enabled']['en-gb'] = 'Enabled';
|
||||
$text['label-bridge_enabled']['ar-eg'] = '';
|
||||
$text['label-bridge_enabled']['de-at'] = '';
|
||||
$text['label-bridge_enabled']['de-ch'] = '';
|
||||
$text['label-bridge_enabled']['de-de'] = '';
|
||||
$text['label-bridge_enabled']['es-cl'] = '';
|
||||
$text['label-bridge_enabled']['es-mx'] = '';
|
||||
$text['label-bridge_enabled']['fr-ca'] = 'Activé';
|
||||
$text['label-bridge_enabled']['fr-fr'] = 'Activé';
|
||||
$text['label-bridge_enabled']['he-il'] = '';
|
||||
$text['label-bridge_enabled']['it-it'] = '';
|
||||
$text['label-bridge_enabled']['nl-nl'] = 'Geactiveerd';
|
||||
$text['label-bridge_enabled']['pl-pl'] = 'Aktywny';
|
||||
$text['label-bridge_enabled']['pt-br'] = '';
|
||||
$text['label-bridge_enabled']['pt-pt'] = '';
|
||||
$text['label-bridge_enabled']['ro-ro'] = '';
|
||||
$text['label-bridge_enabled']['ru-ru'] = '';
|
||||
$text['label-bridge_enabled']['sv-se'] = '';
|
||||
$text['label-bridge_enabled']['uk-ua'] = '';
|
||||
|
||||
$text['label-bridge_destination']['en-us'] = "Destination";
|
||||
$text['label-bridge_destination']['en-gb'] = "Destination";
|
||||
$text['label-bridge_destination']['ar-eg'] = "وجهة";
|
||||
$text['label-bridge_destination']['de-at'] = "Ziel";
|
||||
$text['label-bridge_destination']['de-ch'] = "Ziel";
|
||||
$text['label-bridge_destination']['de-de'] = "Ziel";
|
||||
$text['label-bridge_destination']['el-gr'] = "Προορισμός";
|
||||
$text['label-bridge_destination']['es-cl'] = "Destino";
|
||||
$text['label-bridge_destination']['es-mx'] = "Destino";
|
||||
$text['label-bridge_destination']['fr-ca'] = "Destination";
|
||||
$text['label-bridge_destination']['fr-fr'] = "Destination";
|
||||
$text['label-bridge_destination']['he-il'] = "יַעַד";
|
||||
$text['label-bridge_destination']['it-it'] = "Destinazione";
|
||||
$text['label-bridge_destination']['ka-ge'] = "დანიშნულების პუნქტი";
|
||||
$text['label-bridge_destination']['nl-nl'] = "Bestemming";
|
||||
$text['label-bridge_destination']['pl-pl'] = "Destynacja";
|
||||
$text['label-bridge_destination']['pt-br'] = "Destino";
|
||||
$text['label-bridge_destination']['pt-pt'] = "Destino";
|
||||
$text['label-bridge_destination']['ro-ro'] = "Destinaţie";
|
||||
$text['label-bridge_destination']['ru-ru'] = "Место назначения";
|
||||
$text['label-bridge_destination']['sv-se'] = "Destination";
|
||||
$text['label-bridge_destination']['uk-ua'] = "Пункт призначення";
|
||||
$text['label-bridge_destination']['tr-tr'] = "Varış noktası";
|
||||
$text['label-bridge_destination']['zh-cn'] = "目的地";
|
||||
$text['label-bridge_destination']['ja-jp'] = "行き先";
|
||||
$text['label-bridge_destination']['ko-kr'] = "목적지";
|
||||
$text['description-bridge_enabled']['en-us'] = 'Select to enable or disable.';
|
||||
$text['description-bridge_enabled']['en-gb'] = 'Select to enable or disable.';
|
||||
$text['description-bridge_enabled']['ar-eg'] = '';
|
||||
$text['description-bridge_enabled']['de-at'] = '';
|
||||
$text['description-bridge_enabled']['de-ch'] = '';
|
||||
$text['description-bridge_enabled']['de-de'] = '';
|
||||
$text['description-bridge_enabled']['es-cl'] = '';
|
||||
$text['description-bridge_enabled']['es-mx'] = '';
|
||||
$text['description-bridge_enabled']['fr-ca'] = 'Sélectionnez pour activer ou désactiver';
|
||||
$text['description-bridge_enabled']['fr-fr'] = 'Sélectionnez pour activer ou désactiver';
|
||||
$text['description-bridge_enabled']['he-il'] = '';
|
||||
$text['description-bridge_enabled']['it-it'] = '';
|
||||
$text['description-bridge_enabled']['nl-nl'] = 'Kies aktiveer/deactiveer.';
|
||||
$text['description-bridge_enabled']['pl-pl'] = 'Wybierz czy aktywować lub dezaktywować.';
|
||||
$text['description-bridge_enabled']['pt-br'] = '';
|
||||
$text['description-bridge_enabled']['pt-pt'] = '';
|
||||
$text['description-bridge_enabled']['ro-ro'] = '';
|
||||
$text['description-bridge_enabled']['ru-ru'] = '';
|
||||
$text['description-bridge_enabled']['sv-se'] = '';
|
||||
$text['description-bridge_enabled']['uk-ua'] = '';
|
||||
|
||||
$text['description-bridge_destination']['en-us'] = "Enter the destination.";
|
||||
$text['description-bridge_destination']['en-gb'] = "Enter the destination.";
|
||||
$text['description-bridge_destination']['ar-eg'] = "أدخل الوجهة.";
|
||||
$text['description-bridge_destination']['de-at'] = "Geben Sie das Ziel ein.";
|
||||
$text['description-bridge_destination']['de-ch'] = "Geben Sie das Ziel ein.";
|
||||
$text['description-bridge_destination']['de-de'] = "Geben Sie das Ziel ein.";
|
||||
$text['description-bridge_destination']['el-gr'] = "Εισαγάγετε τον προορισμό.";
|
||||
$text['description-bridge_destination']['es-cl'] = "Introduce el destino.";
|
||||
$text['description-bridge_destination']['es-mx'] = "Introduce el destino.";
|
||||
$text['description-bridge_destination']['fr-ca'] = "Entrer la destination";
|
||||
$text['description-bridge_destination']['fr-fr'] = "Entrer la destination";
|
||||
$text['description-bridge_destination']['he-il'] = "הזן את היעד.";
|
||||
$text['description-bridge_destination']['it-it'] = "Inserisci la destinazione.";
|
||||
$text['description-bridge_destination']['ka-ge'] = "შეიყვანეთ დანიშნულების პუნქტი";
|
||||
$text['description-bridge_destination']['nl-nl'] = "Voer de bestemming in.";
|
||||
$text['description-bridge_destination']['pl-pl'] = "Wprowadź destynację.";
|
||||
$text['description-bridge_destination']['pt-br'] = "Insira o destino.";
|
||||
$text['description-bridge_destination']['pt-pt'] = "Insira o destino.";
|
||||
$text['description-bridge_destination']['ro-ro'] = "Introduceți destinația.";
|
||||
$text['description-bridge_destination']['ru-ru'] = "Введите пункт назначения.";
|
||||
$text['description-bridge_destination']['sv-se'] = "Ange destinationen.";
|
||||
$text['description-bridge_destination']['uk-ua'] = "Введіть пункт призначення.";
|
||||
$text['description-bridge_destination']['tr-tr'] = "Hedefi girin.";
|
||||
$text['description-bridge_destination']['zh-cn'] = "输入目的地。";
|
||||
$text['description-bridge_destination']['ja-jp'] = "目的地を入力します。";
|
||||
$text['description-bridge_destination']['ko-kr'] = "목적지를 입력하세요.";
|
||||
$text['label-bridge_description']['en-us'] = 'Description';
|
||||
$text['label-bridge_description']['en-gb'] = 'Description';
|
||||
$text['label-bridge_description']['ar-eg'] = '';
|
||||
$text['label-bridge_description']['de-at'] = '';
|
||||
$text['label-bridge_description']['de-ch'] = '';
|
||||
$text['label-bridge_description']['de-de'] = '';
|
||||
$text['label-bridge_description']['es-cl'] = '';
|
||||
$text['label-bridge_description']['es-mx'] = '';
|
||||
$text['label-bridge_description']['fr-ca'] = 'La description';
|
||||
$text['label-bridge_description']['fr-fr'] = 'La description';
|
||||
$text['label-bridge_description']['he-il'] = '';
|
||||
$text['label-bridge_description']['it-it'] = '';
|
||||
$text['label-bridge_description']['nl-nl'] = 'Omschrijving';
|
||||
$text['label-bridge_description']['pl-pl'] = 'Opis';
|
||||
$text['label-bridge_description']['pt-br'] = '';
|
||||
$text['label-bridge_description']['pt-pt'] = '';
|
||||
$text['label-bridge_description']['ro-ro'] = '';
|
||||
$text['label-bridge_description']['ru-ru'] = '';
|
||||
$text['label-bridge_description']['sv-se'] = '';
|
||||
$text['label-bridge_description']['uk-ua'] = '';
|
||||
|
||||
$text['label-bridge_enabled']['en-us'] = "Enabled";
|
||||
$text['label-bridge_enabled']['en-gb'] = "Enabled";
|
||||
$text['label-bridge_enabled']['ar-eg'] = "ممكن";
|
||||
$text['label-bridge_enabled']['de-at'] = "Aktiviert";
|
||||
$text['label-bridge_enabled']['de-ch'] = "Aktiviert";
|
||||
$text['label-bridge_enabled']['de-de'] = "Aktiviert";
|
||||
$text['label-bridge_enabled']['el-gr'] = "Ενεργοποιημένος";
|
||||
$text['label-bridge_enabled']['es-cl'] = "Activada";
|
||||
$text['label-bridge_enabled']['es-mx'] = "Activada";
|
||||
$text['label-bridge_enabled']['fr-ca'] = "Activé";
|
||||
$text['label-bridge_enabled']['fr-fr'] = "Activé";
|
||||
$text['label-bridge_enabled']['he-il'] = "מופעל";
|
||||
$text['label-bridge_enabled']['it-it'] = "Abilitato";
|
||||
$text['label-bridge_enabled']['ka-ge'] = "ჩართულია";
|
||||
$text['label-bridge_enabled']['nl-nl'] = "Geactiveerd";
|
||||
$text['label-bridge_enabled']['pl-pl'] = "Aktywny";
|
||||
$text['label-bridge_enabled']['pt-br'] = "Habilitado";
|
||||
$text['label-bridge_enabled']['pt-pt'] = "Habilitado";
|
||||
$text['label-bridge_enabled']['ro-ro'] = "Activat";
|
||||
$text['label-bridge_enabled']['ru-ru'] = "Включено";
|
||||
$text['label-bridge_enabled']['sv-se'] = "Aktiverad";
|
||||
$text['label-bridge_enabled']['uk-ua'] = "Увімкнено";
|
||||
$text['label-bridge_enabled']['tr-tr'] = "Etkinleştirilmiş";
|
||||
$text['label-bridge_enabled']['zh-cn'] = "启用";
|
||||
$text['label-bridge_enabled']['ja-jp'] = "有効";
|
||||
$text['label-bridge_enabled']['ko-kr'] = "사용";
|
||||
$text['description-bridge_description']['en-us'] = 'Enter the description. ';
|
||||
$text['description-bridge_description']['en-gb'] = 'Enter the description. ';
|
||||
$text['description-bridge_description']['ar-eg'] = '';
|
||||
$text['description-bridge_description']['de-at'] = '';
|
||||
$text['description-bridge_description']['de-ch'] = '';
|
||||
$text['description-bridge_description']['de-de'] = '';
|
||||
$text['description-bridge_description']['es-cl'] = '';
|
||||
$text['description-bridge_description']['es-mx'] = '';
|
||||
$text['description-bridge_description']['fr-ca'] = 'Entrez la description';
|
||||
$text['description-bridge_description']['fr-fr'] = 'Entrez la description';
|
||||
$text['description-bridge_description']['he-il'] = '';
|
||||
$text['description-bridge_description']['it-it'] = '';
|
||||
$text['description-bridge_description']['nl-nl'] = 'Voer omschrijving in.';
|
||||
$text['description-bridge_description']['pl-pl'] = 'Wprowadź opis.';
|
||||
$text['description-bridge_description']['pt-br'] = '';
|
||||
$text['description-bridge_description']['pt-pt'] = '';
|
||||
$text['description-bridge_description']['ro-ro'] = '';
|
||||
$text['description-bridge_description']['ru-ru'] = '';
|
||||
$text['description-bridge_description']['sv-se'] = '';
|
||||
$text['description-bridge_description']['uk-ua'] = '';
|
||||
|
||||
$text['description-bridge_enabled']['en-us'] = "Select to enable or disable.";
|
||||
$text['description-bridge_enabled']['en-gb'] = "Select to enable or disable.";
|
||||
$text['description-bridge_enabled']['ar-eg'] = "حدد للتمكين أو التعطيل.";
|
||||
$text['description-bridge_enabled']['de-at'] = "Wählen Sie zum Aktivieren oder Deaktivieren.";
|
||||
$text['description-bridge_enabled']['de-ch'] = "Wählen Sie zum Aktivieren oder Deaktivieren.";
|
||||
$text['description-bridge_enabled']['de-de'] = "Wählen Sie zum Aktivieren oder Deaktivieren.";
|
||||
$text['description-bridge_enabled']['el-gr'] = "Επιλέξτε για να ενεργοποιήσετε ή να απενεργοποιήσετε.";
|
||||
$text['description-bridge_enabled']['es-cl'] = "Seleccione para habilitar o deshabilitar.";
|
||||
$text['description-bridge_enabled']['es-mx'] = "Seleccione para habilitar o deshabilitar.";
|
||||
$text['description-bridge_enabled']['fr-ca'] = "Sélectionnez pour activer ou désactiver";
|
||||
$text['description-bridge_enabled']['fr-fr'] = "Sélectionnez pour activer ou désactiver";
|
||||
$text['description-bridge_enabled']['he-il'] = "בחר כדי להפעיל או להשבית.";
|
||||
$text['description-bridge_enabled']['it-it'] = "Selezionare per abilitare o disabilitare.";
|
||||
$text['description-bridge_enabled']['ka-ge'] = "მონიშნეთ, რათა ჩართოთ, ან გამორთოთ";
|
||||
$text['description-bridge_enabled']['nl-nl'] = "Kies aktiveer/deactiveer.";
|
||||
$text['description-bridge_enabled']['pl-pl'] = "Wybierz czy aktywować lub dezaktywować.";
|
||||
$text['description-bridge_enabled']['pt-br'] = "Selecione para habilitar ou desabilitar.";
|
||||
$text['description-bridge_enabled']['pt-pt'] = "Selecione para habilitar ou desabilitar.";
|
||||
$text['description-bridge_enabled']['ro-ro'] = "Selectați pentru a activa sau dezactiva.";
|
||||
$text['description-bridge_enabled']['ru-ru'] = "Выберите, чтобы включить или отключить.";
|
||||
$text['description-bridge_enabled']['sv-se'] = "Välj för att aktivera eller inaktivera.";
|
||||
$text['description-bridge_enabled']['uk-ua'] = "Виберіть, щоб увімкнути або вимкнути.";
|
||||
$text['description-bridge_enabled']['tr-tr'] = "Etkinleştirmek veya devre dışı bırakmak için seçin.";
|
||||
$text['description-bridge_enabled']['zh-cn'] = "选择启用或禁用。";
|
||||
$text['description-bridge_enabled']['ja-jp'] = "有効または無効を選択します。";
|
||||
$text['description-bridge_enabled']['ko-kr'] = "활성화 또는 비활성화를 선택합니다.";
|
||||
|
||||
$text['label-bridge_description']['en-us'] = "Description";
|
||||
$text['label-bridge_description']['en-gb'] = "Description";
|
||||
$text['label-bridge_description']['ar-eg'] = "وصف";
|
||||
$text['label-bridge_description']['de-at'] = "Beschreibung";
|
||||
$text['label-bridge_description']['de-ch'] = "Beschreibung";
|
||||
$text['label-bridge_description']['de-de'] = "Beschreibung";
|
||||
$text['label-bridge_description']['el-gr'] = "Περιγραφή";
|
||||
$text['label-bridge_description']['es-cl'] = "Descripción";
|
||||
$text['label-bridge_description']['es-mx'] = "Descripción";
|
||||
$text['label-bridge_description']['fr-ca'] = "Description";
|
||||
$text['label-bridge_description']['fr-fr'] = "Description";
|
||||
$text['label-bridge_description']['he-il'] = "תיאור";
|
||||
$text['label-bridge_description']['it-it'] = "Descrizione";
|
||||
$text['label-bridge_description']['ka-ge'] = "აღწერა";
|
||||
$text['label-bridge_description']['nl-nl'] = "Omschrijving";
|
||||
$text['label-bridge_description']['pl-pl'] = "Opis";
|
||||
$text['label-bridge_description']['pt-br'] = "Descrição";
|
||||
$text['label-bridge_description']['pt-pt'] = "Descripção";
|
||||
$text['label-bridge_description']['ro-ro'] = "Descriere";
|
||||
$text['label-bridge_description']['ru-ru'] = "Описание";
|
||||
$text['label-bridge_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-bridge_description']['uk-ua'] = "Опис";
|
||||
$text['label-bridge_description']['tr-tr'] = "Açıklama";
|
||||
$text['label-bridge_description']['tr-tr'] = "Tanım";
|
||||
$text['label-bridge_description']['zh-cn'] = "描述";
|
||||
$text['label-bridge_description']['ja-jp'] = "説明";
|
||||
$text['label-bridge_description']['ko-kr'] = "설명";
|
||||
|
||||
$text['description-bridge_description']['en-us'] = "Enter the description. ";
|
||||
$text['description-bridge_description']['en-gb'] = "Enter the description. ";
|
||||
$text['description-bridge_description']['ar-eg'] = "أدخل الوصف.";
|
||||
$text['description-bridge_description']['de-at'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-bridge_description']['de-ch'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-bridge_description']['de-de'] = "Geben Sie die Beschreibung ein.";
|
||||
$text['description-bridge_description']['el-gr'] = "Εισαγάγετε την περιγραφή.";
|
||||
$text['description-bridge_description']['es-cl'] = "Introduce la descripción.";
|
||||
$text['description-bridge_description']['es-mx'] = "Introduce la descripción.";
|
||||
$text['description-bridge_description']['fr-ca'] = "Entrez la description";
|
||||
$text['description-bridge_description']['fr-fr'] = "Entrez la description";
|
||||
$text['description-bridge_description']['he-il'] = "הזן את התיאור.";
|
||||
$text['description-bridge_description']['it-it'] = "Inserisci la descrizione.";
|
||||
$text['description-bridge_description']['ka-ge'] = "შეიყვანეთ აღწერა";
|
||||
$text['description-bridge_description']['nl-nl'] = "Voer omschrijving in.";
|
||||
$text['description-bridge_description']['pl-pl'] = "Wprowadź opis.";
|
||||
$text['description-bridge_description']['pt-br'] = "Digite a descrição.";
|
||||
$text['description-bridge_description']['pt-pt'] = "Digite a descrição.";
|
||||
$text['description-bridge_description']['ro-ro'] = "Introduceți descrierea.";
|
||||
$text['description-bridge_description']['ru-ru'] = "Введите описание.";
|
||||
$text['description-bridge_description']['sv-se'] = "Ange beskrivningen.";
|
||||
$text['description-bridge_description']['uk-ua'] = "Введіть опис.";
|
||||
$text['description-bridge_description']['tr-tr'] = "Açıklamayı girin.";
|
||||
$text['description-bridge_description']['zh-cn'] = "输入说明。";
|
||||
$text['description-bridge_description']['ja-jp'] = "説明を入力します。";
|
||||
$text['description-bridge_description']['ko-kr'] = "설명을 입력합니다.";
|
||||
|
||||
$text['label-bridge_profile']['en-us'] = "Profile";
|
||||
$text['label-bridge_profile']['en-gb'] = "Profile";
|
||||
$text['label-bridge_profile']['ar-eg'] = "موجز";
|
||||
$text['label-bridge_profile']['de-at'] = "Profil";
|
||||
$text['label-bridge_profile']['de-ch'] = "Profil";
|
||||
$text['label-bridge_profile']['de-de'] = "Profil";
|
||||
$text['label-bridge_profile']['el-gr'] = "Προφίλ";
|
||||
$text['label-bridge_profile']['es-cl'] = "Perfil";
|
||||
$text['label-bridge_profile']['es-mx'] = "Perfil";
|
||||
$text['label-bridge_profile']['fr-ca'] = "Profile";
|
||||
$text['label-bridge_profile']['fr-fr'] = "Profile";
|
||||
$text['label-bridge_profile']['he-il'] = "פרופיל";
|
||||
$text['label-bridge_profile']['it-it'] = "Profilo";
|
||||
$text['label-bridge_profile']['ka-ge'] = "პროფილი";
|
||||
$text['label-bridge_profile']['nl-nl'] = "Profiel";
|
||||
$text['label-bridge_profile']['pl-pl'] = "Profil";
|
||||
$text['label-bridge_profile']['pt-br'] = "Perfil";
|
||||
$text['label-bridge_profile']['pt-pt'] = "Perfil";
|
||||
$text['label-bridge_profile']['ro-ro'] = "Profil";
|
||||
$text['label-bridge_profile']['ru-ru'] = "Профиль";
|
||||
$text['label-bridge_profile']['sv-se'] = "Profil";
|
||||
$text['label-bridge_profile']['uk-ua'] = "Профіль";
|
||||
$text['label-bridge_profile']['tr-tr'] = "Profil";
|
||||
$text['label-bridge_profile']['zh-cn'] = "轮廓";
|
||||
$text['label-bridge_profile']['ja-jp'] = "プロフィール";
|
||||
$text['label-bridge_profile']['ko-kr'] = "프로필";
|
||||
|
||||
$text['description-bridge_profile']['en-us'] = "Enter the profile here.";
|
||||
$text['description-bridge_profile']['en-gb'] = "Enter the profile here.";
|
||||
$text['description-bridge_profile']['ar-eg'] = "أدخل ملف التعريف هنا.ا";
|
||||
$text['description-bridge_profile']['de-at'] = "Definieren Sie die Einstellungen für dieses Profil.";
|
||||
$text['description-bridge_profile']['de-ch'] = "Definieren Sie die Einstellungen für dieses Profil.";
|
||||
$text['description-bridge_profile']['de-de'] = "Definieren Sie die Einstellungen für dieses Profil.";
|
||||
$text['description-bridge_profile']['el-gr'] = "Εισαγάγετε το προφίλ εδώ.";
|
||||
$text['description-bridge_profile']['es-cl'] = "Ingrese el perfil aquí.";
|
||||
$text['description-bridge_profile']['es-mx'] = "Ingrese el perfil aquí.";
|
||||
$text['description-bridge_profile']['fr-ca'] = "Sélectionnez le profil à utiliser pour cette passerelle";
|
||||
$text['description-bridge_profile']['fr-fr'] = "Sélectionnez le profil à utiliser pour cette passerelle";
|
||||
$text['description-bridge_profile']['he-il'] = "היכנסו לפרופיל כאן.";
|
||||
$text['description-bridge_profile']['it-it'] = "Inserire qui il profilo.";
|
||||
$text['description-bridge_profile']['ka-ge'] = "შეიყვანეთ პროფილი აქ.";
|
||||
$text['description-bridge_profile']['nl-nl'] = "Voer het profiel hier in.";
|
||||
$text['description-bridge_profile']['pl-pl'] = "Zdefiniuj ustawienia tego profilu";
|
||||
$text['description-bridge_profile']['pt-br'] = "Defina as configurações para este perfil";
|
||||
$text['description-bridge_profile']['pt-pt'] = "Insira o perfil aqui.";
|
||||
$text['description-bridge_profile']['ro-ro'] = "Introduceți profilul aici.";
|
||||
$text['description-bridge_profile']['ru-ru'] = "Выберите профиль, используемый для этого шлюза.";
|
||||
$text['description-bridge_profile']['sv-se'] = "Definiera inställningar för denna profil.";
|
||||
$text['description-bridge_profile']['uk-ua'] = "Введіть профіль тут.";
|
||||
$text['description-bridge_profile']['tr-tr'] = "Profili buraya girin.";
|
||||
$text['description-bridge_profile']['zh-cn'] = "在此处输入个人资料。";
|
||||
$text['description-bridge_profile']['ja-jp'] = "ここにプロフィールを入力します。";
|
||||
$text['description-bridge_profile']['ko-kr'] = "여기에 프로필을 입력하세요.";
|
||||
|
||||
$text['label-bridge_variables']['en-us'] = "Variables";
|
||||
$text['label-bridge_variables']['en-gb'] = "Variables";
|
||||
$text['label-bridge_variables']['ar-eg'] = "المتغيرات";
|
||||
$text['label-bridge_variables']['de-at'] = "Variablen";
|
||||
$text['label-bridge_variables']['de-ch'] = "Variablen";
|
||||
$text['label-bridge_variables']['de-de'] = "Variablen";
|
||||
$text['label-bridge_variables']['el-gr'] = "Μεταβλητές";
|
||||
$text['label-bridge_variables']['es-cl'] = "variables";
|
||||
$text['label-bridge_variables']['es-mx'] = "variables";
|
||||
$text['label-bridge_variables']['fr-ca'] = "Variables";
|
||||
$text['label-bridge_variables']['fr-fr'] = "Variables";
|
||||
$text['label-bridge_variables']['he-il'] = "משתנים";
|
||||
$text['label-bridge_variables']['it-it'] = "Variabili";
|
||||
$text['label-bridge_variables']['ka-ge'] = "ცვლადები";
|
||||
$text['label-bridge_variables']['nl-nl'] = "Variabelen";
|
||||
$text['label-bridge_variables']['pl-pl'] = "Zmienne";
|
||||
$text['label-bridge_variables']['pt-br'] = "Variáveis";
|
||||
$text['label-bridge_variables']['pt-pt'] = "Variáveis";
|
||||
$text['label-bridge_variables']['ro-ro'] = "Variabile";
|
||||
$text['label-bridge_variables']['ru-ru'] = "Переменные";
|
||||
$text['label-bridge_variables']['sv-se'] = "Variabler";
|
||||
$text['label-bridge_variables']['uk-ua'] = "Змінні";
|
||||
$text['label-bridge_variables']['tr-tr'] = "Değişkenler";
|
||||
$text['label-bridge_variables']['zh-cn'] = "变量";
|
||||
$text['label-bridge_variables']['ja-jp'] = "変数";
|
||||
$text['label-bridge_variables']['ko-kr'] = "변수";
|
||||
|
||||
$text['description-bridge_variables']['en-us'] = "Set a value for the variable.";
|
||||
$text['description-bridge_variables']['en-gb'] = "Set a value for the variable.";
|
||||
$text['description-bridge_variables']['ar-eg'] = "قم بتعيين قيمة للمتغير.";
|
||||
$text['description-bridge_variables']['de-at'] = "Legen Sie einen Wert für die Variable fest.";
|
||||
$text['description-bridge_variables']['de-ch'] = "Legen Sie einen Wert für die Variable fest.";
|
||||
$text['description-bridge_variables']['de-de'] = "Legen Sie einen Wert für die Variable fest.";
|
||||
$text['description-bridge_variables']['el-gr'] = "Ορίστε μια τιμή για τη μεταβλητή.";
|
||||
$text['description-bridge_variables']['es-cl'] = "Establezca un valor para la variable.";
|
||||
$text['description-bridge_variables']['es-mx'] = "Establezca un valor para la variable.";
|
||||
$text['description-bridge_variables']['fr-ca'] = "Définissez une valeur pour la variable.";
|
||||
$text['description-bridge_variables']['fr-fr'] = "Définissez une valeur pour la variable.";
|
||||
$text['description-bridge_variables']['he-il'] = "הגדר ערך עבור המשתנה.";
|
||||
$text['description-bridge_variables']['it-it'] = "Impostare un valore per la variabile.";
|
||||
$text['description-bridge_variables']['ka-ge'] = "დააყენეთ ცვლადის მნიშვნელობა";
|
||||
$text['description-bridge_variables']['nl-nl'] = "Stel een waarde in voor de variabele.";
|
||||
$text['description-bridge_variables']['pl-pl'] = "Ustaw wartość zmiennej.";
|
||||
$text['description-bridge_variables']['pt-br'] = "Defina um valor para a variável.";
|
||||
$text['description-bridge_variables']['pt-pt'] = "Defina um valor para a variável.";
|
||||
$text['description-bridge_variables']['ro-ro'] = "Setați o valoare pentru variabilă.";
|
||||
$text['description-bridge_variables']['ru-ru'] = "Установите значение для переменной.";
|
||||
$text['description-bridge_variables']['sv-se'] = "Ställ in ett värde för variabeln.";
|
||||
$text['description-bridge_variables']['uk-ua'] = "Установіть значення для змінної.";
|
||||
$text['description-bridge_variables']['tr-tr'] = "Değişken için bir değer belirleyin.";
|
||||
$text['description-bridge_variables']['zh-cn'] = "为变量设置一个值。";
|
||||
$text['description-bridge_variables']['ja-jp'] = "変数の値を設定します。";
|
||||
$text['description-bridge_variables']['ko-kr'] = "변수의 값을 설정합니다.";
|
||||
|
||||
$text['label-bridge_gateways']['en-us'] = "Gateways";
|
||||
$text['label-bridge_gateways']['en-gb'] = "Gateways";
|
||||
$text['label-bridge_gateways']['ar-eg'] = "البوابات";
|
||||
$text['label-bridge_gateways']['de-at'] = "Gateways";
|
||||
$text['label-bridge_gateways']['de-ch'] = "Gateways";
|
||||
$text['label-bridge_gateways']['de-de'] = "Gateways";
|
||||
$text['label-bridge_gateways']['el-gr'] = "Πύλες";
|
||||
$text['label-bridge_gateways']['es-cl'] = "Pasarelas";
|
||||
$text['label-bridge_gateways']['es-mx'] = "Pasarelas";
|
||||
$text['label-bridge_gateways']['fr-ca'] = "Passerelles";
|
||||
$text['label-bridge_gateways']['fr-fr'] = "Passerelles";
|
||||
$text['label-bridge_gateways']['he-il'] = "שערות";
|
||||
$text['label-bridge_gateways']['it-it'] = "Gateways";
|
||||
$text['label-bridge_gateways']['ka-ge'] = "კვანძები";
|
||||
$text['label-bridge_gateways']['nl-nl'] = "Gateways";
|
||||
$text['label-bridge_gateways']['pl-pl'] = "Bramy wyjściowe (gateways)";
|
||||
$text['label-bridge_gateways']['pt-br'] = "Troncos";
|
||||
$text['label-bridge_gateways']['pt-pt'] = "Gateways";
|
||||
$text['label-bridge_gateways']['ro-ro'] = "portal";
|
||||
$text['label-bridge_gateways']['ru-ru'] = "Шлюзы";
|
||||
$text['label-bridge_gateways']['sv-se'] = "Gateways";
|
||||
$text['label-bridge_gateways']['uk-ua'] = "Шлюзи";
|
||||
$text['label-bridge_gateways']['tr-tr'] = "Ağ geçitleri";
|
||||
$text['label-bridge_gateways']['zh-cn'] = "网关";
|
||||
$text['label-bridge_gateways']['ja-jp'] = "ゲートウェイ";
|
||||
$text['label-bridge_gateways']['ko-kr'] = "게이트웨이";
|
||||
|
||||
$text['description-bridge_gateways']['en-us'] = "Select the gateway.";
|
||||
$text['description-bridge_gateways']['en-gb'] = "Select the gateway.";
|
||||
$text['description-bridge_gateways']['ar-eg'] = "حدد البوابة.";
|
||||
$text['description-bridge_gateways']['de-at'] = "Wählen Sie das Gateway aus.";
|
||||
$text['description-bridge_gateways']['de-ch'] = "Wählen Sie das Gateway aus.";
|
||||
$text['description-bridge_gateways']['de-de'] = "Wählen Sie das Gateway aus.";
|
||||
$text['description-bridge_gateways']['el-gr'] = "Επιλέξτε την πύλη.";
|
||||
$text['description-bridge_gateways']['es-cl'] = "Seleccione la puerta de enlace.";
|
||||
$text['description-bridge_gateways']['es-mx'] = "Seleccione la puerta de enlace.";
|
||||
$text['description-bridge_gateways']['fr-ca'] = "Sélectionnez la passerelle.";
|
||||
$text['description-bridge_gateways']['fr-fr'] = "Sélectionnez la passerelle.";
|
||||
$text['description-bridge_gateways']['he-il'] = "בחר את השער.";
|
||||
$text['description-bridge_gateways']['it-it'] = "Seleziona il gateway.";
|
||||
$text['description-bridge_gateways']['ka-ge'] = "აირჩიეთ კვანძი";
|
||||
$text['description-bridge_gateways']['nl-nl'] = "Selecteer de gateway.";
|
||||
$text['description-bridge_gateways']['pl-pl'] = "Wybierz bramę.";
|
||||
$text['description-bridge_gateways']['pt-br'] = "Selecione o gateway.";
|
||||
$text['description-bridge_gateways']['pt-pt'] = "Selecione o gateway.";
|
||||
$text['description-bridge_gateways']['ro-ro'] = "Selectați poarta de acces.";
|
||||
$text['description-bridge_gateways']['ru-ru'] = "Выберите шлюз.";
|
||||
$text['description-bridge_gateways']['sv-se'] = "Välj gateway.";
|
||||
$text['description-bridge_gateways']['uk-ua'] = "Виберіть шлюз.";
|
||||
$text['description-bridge_gateways']['tr-tr'] = "Ağ geçidini seçin.";
|
||||
$text['description-bridge_gateways']['zh-cn'] = "选择网关。";
|
||||
$text['description-bridge_gateways']['ja-jp'] = "ゲートウェイを選択します。";
|
||||
$text['description-bridge_gateways']['ko-kr'] = "게이트웨이를 선택합니다.";
|
||||
|
||||
$text['description-bridge_variables']['en-us'] = "Set a value for the variable.";
|
||||
$text['description-bridge_variables']['en-gb'] = "Set a value for the variable.";
|
||||
$text['description-bridge_variables']['ar-eg'] = "قم بتعيين قيمة للمتغير.";
|
||||
$text['description-bridge_variables']['de-at'] = "Legen Sie einen Wert für die Variable fest.";
|
||||
$text['description-bridge_variables']['de-ch'] = "Legen Sie einen Wert für die Variable fest.";
|
||||
$text['description-bridge_variables']['de-de'] = "Legen Sie einen Wert für die Variable fest.";
|
||||
$text['description-bridge_variables']['el-gr'] = "Ορίστε μια τιμή για τη μεταβλητή.";
|
||||
$text['description-bridge_variables']['es-cl'] = "Establezca un valor para la variable.";
|
||||
$text['description-bridge_variables']['es-mx'] = "Establezca un valor para la variable.";
|
||||
$text['description-bridge_variables']['fr-ca'] = "Définissez une valeur pour la variable.";
|
||||
$text['description-bridge_variables']['fr-fr'] = "Définissez une valeur pour la variable.";
|
||||
$text['description-bridge_variables']['he-il'] = "הגדר ערך עבור המשתנה.";
|
||||
$text['description-bridge_variables']['it-it'] = "Impostare un valore per la variabile.";
|
||||
$text['description-bridge_variables']['ka-ge'] = "დააყენეთ მნიშვნელობა ცვლადისთვის.";
|
||||
$text['description-bridge_variables']['nl-nl'] = "Stel een waarde in voor de variabele.";
|
||||
$text['description-bridge_variables']['pl-pl'] = "Ustaw wartość zmiennej.";
|
||||
$text['description-bridge_variables']['pt-br'] = "Defina um valor para a variável.";
|
||||
$text['description-bridge_variables']['pt-pt'] = "Defina um valor para a variável.";
|
||||
$text['description-bridge_variables']['ro-ro'] = "Setați o valoare pentru variabilă.";
|
||||
$text['description-bridge_variables']['ru-ru'] = "Установите значение для переменной.";
|
||||
$text['description-bridge_variables']['sv-se'] = "Ställ in ett värde för variabeln.";
|
||||
$text['description-bridge_variables']['uk-ua'] = "Установіть значення для змінної.";
|
||||
$text['description-bridge_variables']['tr-tr'] = "Değişken için bir değer belirleyin.";
|
||||
$text['description-bridge_variables']['zh-cn'] = "为变量设置一个值。";
|
||||
$text['description-bridge_variables']['ja-jp'] = "変数の値を設定します。";
|
||||
$text['description-bridge_variables']['ko-kr'] = "변수의 값을 설정합니다.";
|
||||
|
||||
$text['label-destination_number']['en-us'] = "Destination Number";
|
||||
$text['label-destination_number']['en-gb'] = "Destination Number";
|
||||
$text['label-destination_number']['ar-eg'] = "رقم الوجهة";
|
||||
$text['label-destination_number']['de-at'] = "Zielnummer";
|
||||
$text['label-destination_number']['de-ch'] = "Zielnummer";
|
||||
$text['label-destination_number']['de-de'] = "Zielnummer";
|
||||
$text['label-destination_number']['el-gr'] = "Αριθμός προορισμού";
|
||||
$text['label-destination_number']['es-cl'] = "Número de destino";
|
||||
$text['label-destination_number']['es-mx'] = "Número de destino";
|
||||
$text['label-destination_number']['fr-ca'] = "Numéro du destinataire";
|
||||
$text['label-destination_number']['fr-fr'] = "Numéro du destinataire";
|
||||
$text['label-destination_number']['he-il'] = "מספר יעד";
|
||||
$text['label-destination_number']['it-it'] = "Numero di destinazione";
|
||||
$text['label-destination_number']['ka-ge'] = "დანიშნულების პუნქტის ნომერი";
|
||||
$text['label-destination_number']['nl-nl'] = "Bestemmings nummer";
|
||||
$text['label-destination_number']['pl-pl'] = "Numer docelowy";
|
||||
$text['label-destination_number']['pt-br'] = "Número de destino";
|
||||
$text['label-destination_number']['pt-pt'] = "Número de destino";
|
||||
$text['label-destination_number']['ro-ro'] = "Numarul destinatiei";
|
||||
$text['label-destination_number']['ru-ru'] = "Номер назначения";
|
||||
$text['label-destination_number']['sv-se'] = "Destinationsnummer";
|
||||
$text['label-destination_number']['uk-ua'] = "Номер призначення";
|
||||
$text['label-destination_number']['tr-tr'] = "Hedef numara";
|
||||
$text['label-destination_number']['zh-cn'] = "目的地号码";
|
||||
$text['label-destination_number']['ja-jp'] = "宛先番号";
|
||||
$text['label-destination_number']['ko-kr'] = "대상 번호";
|
||||
|
||||
$text['description-destination_number']['en-us'] = "Set the destination number for the action.";
|
||||
$text['description-destination_number']['en-gb'] = "Set the destination number for the action.";
|
||||
$text['description-destination_number']['ar-eg'] = "قم بتعيين رقم الوجهة للإجراء.";
|
||||
$text['description-destination_number']['de-at'] = "Legen Sie die Zielnummer für die Aktion fest.";
|
||||
$text['description-destination_number']['de-ch'] = "Legen Sie die Zielnummer für die Aktion fest.";
|
||||
$text['description-destination_number']['de-de'] = "Legen Sie die Zielnummer für die Aktion fest.";
|
||||
$text['description-destination_number']['el-gr'] = "Ρυθμίστε τον αριθμό προορισμού για τη δράση.";
|
||||
$text['description-destination_number']['es-cl'] = "Establezca el número de destino de la acción.";
|
||||
$text['description-destination_number']['es-mx'] = "Establezca el número de destino de la acción.";
|
||||
$text['description-destination_number']['fr-ca'] = "Définissez le numéro de destination de l'action.";
|
||||
$text['description-destination_number']['fr-fr'] = "Définissez le numéro de destination de l'action.";
|
||||
$text['description-destination_number']['he-il'] = "הגדר את מספר היעד לפעולה.";
|
||||
$text['description-destination_number']['it-it'] = "Imposta il numero di destinazione per l'azione.";
|
||||
$text['description-destination_number']['ka-ge'] = "დააყენეთ დანიშნულების პუნქტის ნომერი ქმედებისთვის.";
|
||||
$text['description-destination_number']['nl-nl'] = "Stel het bestemmingsnummer voor de actie in.";
|
||||
$text['description-destination_number']['pl-pl'] = "Ustaw numer docelowy akcji.";
|
||||
$text['description-destination_number']['pt-br'] = "Defina o número de destino para a ação.";
|
||||
$text['description-destination_number']['pt-pt'] = "Defina o número de destino para a ação.";
|
||||
$text['description-destination_number']['ro-ro'] = "Setați numărul de destinație pentru acțiune.";
|
||||
$text['description-destination_number']['ru-ru'] = "Установите номер назначения для действия.";
|
||||
$text['description-destination_number']['sv-se'] = "Ställ in destinationsnumret för åtgärden.";
|
||||
$text['description-destination_number']['uk-ua'] = "Встановіть номер призначення для дії.";
|
||||
$text['description-destination_number']['tr-tr'] = "Eylemin hedef numarasını ayarlayın.";
|
||||
$text['description-destination_number']['zh-cn'] = "设置操作的目标号码。";
|
||||
$text['description-destination_number']['ja-jp'] = "アクションの宛先番号を設定します。";
|
||||
$text['description-destination_number']['ko-kr'] = "작업의 대상 번호를 설정합니다.";
|
||||
$text['label-bridge_description']['en-us'] = "Description";
|
||||
$text['label-bridge_description']['en-gb'] = "Description";
|
||||
$text['label-bridge_description']['ar-eg'] = "";
|
||||
$text['label-bridge_description']['de-at'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-bridge_description']['de-ch'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-bridge_description']['de-de'] = "Beschreibung";
|
||||
$text['label-bridge_description']['es-cl'] = "Descripción";
|
||||
$text['label-bridge_description']['es-mx'] = "Descripción"; //copied from es-cl
|
||||
$text['label-bridge_description']['fr-ca'] = "Description"; //copied from fr-fr
|
||||
$text['label-bridge_description']['fr-fr'] = "Description";
|
||||
$text['label-bridge_description']['he-il'] = "";
|
||||
$text['label-bridge_description']['it-it'] = "Descrizione";
|
||||
$text['label-bridge_description']['nl-nl'] = "Omschrijving";
|
||||
$text['label-bridge_description']['pl-pl'] = "Opis";
|
||||
$text['label-bridge_description']['pt-br'] = "Descrição";
|
||||
$text['label-bridge_description']['pt-pt'] = "Descripção";
|
||||
$text['label-bridge_description']['ro-ro'] = "";
|
||||
$text['label-bridge_description']['ru-ru'] = "Описание";
|
||||
$text['label-bridge_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-bridge_description']['uk-ua'] = "Опис";
|
||||
$text['label-bridge_description']['tr-tr'] = "Açıklama";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,37 +1,21 @@
|
|||
<?php
|
||||
|
||||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Bridges";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Bridges";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "الجسور";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Brücken";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Brücken";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Brücken";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Puentes";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Puentes";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Ponts";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Ponts";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "גשרים";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Ponti";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ხიდები";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Bridges";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Mostkowania";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "pontes";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "pontes";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Poduri";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Мосты";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Broar";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Міста";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "桥梁";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "ブリッジ";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "교량";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "345f0aad-8321-4a8b-9f08-c4730297660c";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/bridges/bridges.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['menu'][0]['title']['en-us'] = 'Bridges';
|
||||
$apps[$x]['menu'][0]['title']['en-gb'] = 'Bridges';
|
||||
$apps[$x]['menu'][0]['title']['es-cl'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr-fr'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr-ca'] = '';
|
||||
$apps[$x]['menu'][0]['title']['nl-nl'] = 'Bruggen';
|
||||
$apps[$x]['menu'][0]['title']['pl'] = 'Mostkowania';
|
||||
$apps[$x]['menu'][0]['title']['sv-se'] = '';
|
||||
$apps[$x]['menu'][0]['title']['uk'] = '';
|
||||
$apps[$x]['menu'][0]['title']['de-at'] = '';
|
||||
$apps[$x]['menu'][0]['uuid'] = '345f0aad-8321-4a8b-9f08-c4730297660c';
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
|
||||
$apps[$x]['menu'][0]['category'] = 'internal';
|
||||
$apps[$x]['menu'][0]['path'] = '/app/bridges/bridges.php';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['menu'][0]['groups'][] = 'admin';
|
||||
//$apps[$x]['menu'][0]['groups'][] = 'user';
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,12 +17,13 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
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 - 2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//action add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$bridge_uuid = $_REQUEST["id"];
|
||||
$id = $_REQUEST["id"];
|
||||
|
|
@ -45,29 +46,17 @@
|
|||
$action = "add";
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
$bridge_uuid = '';
|
||||
$bridge_name = '';
|
||||
$bridge_destination = '';
|
||||
$bridge_enabled = '';
|
||||
$bridge_description = '';
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
if (is_array($_POST)) {
|
||||
$bridge_uuid = $_POST["bridge_uuid"];
|
||||
$bridge_name = $_POST["bridge_name"];
|
||||
$bridge_action = $_POST["bridge_action"];
|
||||
$bridge_profile = $_POST["bridge_profile"];
|
||||
$bridge_variables = $_POST["bridge_variables"];
|
||||
$bridge_gateways = $_POST["bridge_gateways"];
|
||||
$destination_number = $_POST["destination_number"];
|
||||
$bridge_destination = $_POST["bridge_destination"];
|
||||
$bridge_enabled = $_POST["bridge_enabled"] ?? 'false';
|
||||
$bridge_enabled = $_POST["bridge_enabled"];
|
||||
$bridge_description = $_POST["bridge_description"];
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//delete the bridge
|
||||
if (permission_exists('bridge_delete')) {
|
||||
|
|
@ -99,10 +88,10 @@
|
|||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (empty($bridge_name)) { $msg .= $text['message-required']." ".$text['label-bridge_name']."<br>\n"; }
|
||||
//if (empty($bridge_destination)) { $msg .= $text['message-required']." ".$text['label-bridge_destination']."<br>\n"; }
|
||||
if (empty($bridge_enabled)) { $msg .= $text['message-required']." ".$text['label-bridge_enabled']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
if (strlen($bridge_name) == 0) { $msg .= $text['message-required']." ".$text['label-bridge_name']."<br>\n"; }
|
||||
if (strlen($bridge_destination) == 0) { $msg .= $text['message-required']." ".$text['label-bridge_destination']."<br>\n"; }
|
||||
if (strlen($bridge_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-bridge_enabled']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -115,49 +104,11 @@
|
|||
return;
|
||||
}
|
||||
|
||||
//add the bridge_uuid
|
||||
if (empty($bridge_uuid)) {
|
||||
//add the bridge_uuid
|
||||
if (strlen($bridge_uuid) == 0) {
|
||||
$bridge_uuid = uuid();
|
||||
}
|
||||
|
||||
//build the bridge statement for action user
|
||||
if ($bridge_action == 'user' || $bridge_action == 'loopback') {
|
||||
$bridge_destination = $bridge_action.'/'.$destination_number;
|
||||
}
|
||||
|
||||
//build the bridge statement for gateway, or profiles - build the bridge statement
|
||||
if ($bridge_action == 'gateway' || $bridge_action == 'profile') {
|
||||
//create the main bridge statement
|
||||
$bridge_base = '';
|
||||
if (!empty($bridge_gateways)) {
|
||||
foreach($bridge_gateways as $gateway) {
|
||||
if (!empty($gateway)) {
|
||||
$gateway_array = explode(':', $gateway);
|
||||
$bridge_base .= ',sofia/gateway/'.$gateway_array[0].'/'.$destination_number;
|
||||
}
|
||||
}
|
||||
if (!empty($bridge_base)) {
|
||||
$bridge_destination = trim($bridge_base, ',');
|
||||
}
|
||||
}
|
||||
if ($bridge_action == 'profile' && empty($bridge_destination)) {
|
||||
$bridge_destination = 'sofia/'.$bridge_profile.'/'.$destination_number;
|
||||
}
|
||||
|
||||
//add the variables back into the bridge_destination value
|
||||
if (!empty($bridge_variables)) {
|
||||
$variables = '';
|
||||
foreach($bridge_variables as $key => $value) {
|
||||
if (!empty($value)) {
|
||||
$variables .= ','.trim($key).'='.trim($value);
|
||||
}
|
||||
}
|
||||
if (!empty($variables)) {
|
||||
$bridge_destination = '{'.trim($variables, ',').'}'.$bridge_destination;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//prepare the array
|
||||
$array['bridges'][0]['bridge_uuid'] = $bridge_uuid;
|
||||
$array['bridges'][0]['domain_uuid'] = $_SESSION["domain_uuid"];
|
||||
|
|
@ -192,14 +143,14 @@
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($_GET) && is_array($_GET) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) {
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
$bridge_uuid = $_GET["id"];
|
||||
$sql = "select * from v_bridges ";
|
||||
$sql .= "where bridge_uuid = :bridge_uuid ";
|
||||
$parameters['bridge_uuid'] = $bridge_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$bridge_name = $row["bridge_name"];
|
||||
$bridge_destination = $row["bridge_destination"];
|
||||
$bridge_enabled = $row["bridge_enabled"];
|
||||
|
|
@ -208,158 +159,6 @@
|
|||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//build the bridge_actions array from the session actions
|
||||
$i = 0;
|
||||
foreach($_SESSION['bridge']['action'] as $variable) {
|
||||
$bridge_actions[$i]['action'] = $variable;
|
||||
$bridge_actions[$i]['label'] = ucwords($variable);
|
||||
$i++;
|
||||
}
|
||||
|
||||
//initialize the bridge_variables array from session bridge variables
|
||||
$session_variables = []; $i = 0;
|
||||
if (!empty($_SESSION['bridge']['variable'])) {
|
||||
foreach($_SESSION['bridge']['variable'] as $variable) {
|
||||
if (!empty($variable)) {
|
||||
$variable = explode("=", $variable);
|
||||
$session_variables[$i]['name'] = $variable[0];
|
||||
$session_variables[$i]['value'] = $variable[1] ?? '';
|
||||
$session_variables[$i]['label'] = ucwords(str_replace('_', ' ', $variable[0]));
|
||||
$session_variables[$i]['label'] = str_replace('Effective Caller Id', 'Caller ID', $session_variables[$i]['label']);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the bridge variables from the database bridge_destination value
|
||||
$database_variables = []; $x = 0;
|
||||
if (!empty($bridge_destination)) {
|
||||
//get the variables from inside the { and } brackets
|
||||
preg_match('/^\{([^}]+)\}/', $bridge_destination, $matches);
|
||||
|
||||
if (!empty($matches) && is_array($matches) && @sizeof($matches) != 0) {
|
||||
|
||||
//create a variables array from the comma delimitted string
|
||||
$variables = explode(",", $matches[1]);
|
||||
|
||||
//strip the variables from the $bridge_destination variable
|
||||
$bridge_destination = str_replace("{$matches[0]}", '', $bridge_destination);
|
||||
|
||||
}
|
||||
|
||||
//build a bridge variables data set
|
||||
$x = 0;
|
||||
if (!empty($variables) && is_array($variables)) {
|
||||
foreach($variables as $variable) {
|
||||
$pairs = explode("=", $variable);
|
||||
$database_variables[$x]['name'] = $pairs[0];
|
||||
$database_variables[$x]['value'] = $pairs[1];
|
||||
$database_variables[$x]['label'] = ucwords(str_replace('_', ' ', $pairs[0]));
|
||||
$database_variables[$x]['label'] = str_replace('Effective Caller Id', 'Caller ID', $database_variables[$x]['label']);
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the bridge_action from the bridge_destination
|
||||
if (!empty($bridge_destination)) {
|
||||
if (substr($bridge_destination, 0, 1) == '{') {
|
||||
$bridge_parts = explode('}', $bridge_destination);
|
||||
|
||||
//get the variables from inside the { and } brackets
|
||||
preg_match('/^\{([^}]+)\}/', $bridge_destination, $matches);
|
||||
|
||||
//strip the variables from the $bridge_destination variable
|
||||
$bridge_destination = str_replace("{$matches[0]}", '', $bridge_destination);
|
||||
}
|
||||
$bridge_array = explode("/", $bridge_destination);
|
||||
if ($bridge_array[0] == 'sofia') {
|
||||
if ($bridge_array[1] == 'gateway') {
|
||||
$bridge_action = 'gateway';
|
||||
}
|
||||
else {
|
||||
$bridge_action = 'profile';
|
||||
$bridge_profile = $bridge_array[1];
|
||||
$destination_number = $bridge_array[2];
|
||||
}
|
||||
}
|
||||
elseif ($bridge_array[0] == 'user') {
|
||||
$bridge_action = 'user';
|
||||
$destination_number = $bridge_array[1];
|
||||
}
|
||||
elseif ($bridge_array[0] == 'loopback') {
|
||||
$bridge_action = 'loopback';
|
||||
$destination_number = $bridge_array[1];
|
||||
}
|
||||
}
|
||||
|
||||
//merge the session and database bridge arrays together
|
||||
$bridge_variables = $session_variables;
|
||||
foreach($database_variables as $row) {
|
||||
$found = false;
|
||||
$i = 0;
|
||||
foreach($bridge_variables as $field) {
|
||||
if ($row['name'] == $field['name']) {
|
||||
//matching row found
|
||||
$found = true;
|
||||
|
||||
//override session value with the value from the database
|
||||
if (!empty($row['value'])) {
|
||||
$bridge_variables[$i]['value'] = $row['value'];
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if (!$found) {
|
||||
if (!empty($row['name'])) {
|
||||
$bridge_variables[] = $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the gateways
|
||||
$actions = explode(',', $bridge_destination);
|
||||
foreach ($actions as $action) {
|
||||
$action_array = explode('/',$action);
|
||||
if (!empty($action_array) && is_array($action_array) && !empty($action_array[1]) && $action_array[1] == 'gateway') {
|
||||
$bridge_gateways[] = $action_array[2];
|
||||
$destination_number = $action_array[3];
|
||||
}
|
||||
}
|
||||
|
||||
//get the gateways
|
||||
$sql = "select * from v_gateways ";
|
||||
$sql .= "where enabled = 'true' ";
|
||||
if (permission_exists('outbound_route_any_gateway')) {
|
||||
$sql .= "order by domain_uuid = :domain_uuid DESC, gateway ";
|
||||
}
|
||||
else {
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
}
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$gateways = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the domains
|
||||
$sql = "select * from v_domains ";
|
||||
$sql .= "where domain_enabled = 'true' ";
|
||||
$database = new database;
|
||||
$domains = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
//get the sip profiles
|
||||
$sql = "select sip_profile_name ";
|
||||
$sql .= "from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_enabled = 'true' ";
|
||||
$sql .= "order by sip_profile_name asc ";
|
||||
$database = new database;
|
||||
$sip_profiles = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
//set the defaults
|
||||
if (empty($bridge_enabled)) { $bridge_enabled = 'true'; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
|
@ -368,39 +167,6 @@
|
|||
$document['title'] = $text['title-bridge'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show or hide form elements based on the bridge action
|
||||
echo "<script type='text/javascript'>\n";
|
||||
echo " function action_control(action) {\n";
|
||||
echo " if (action == 'gateway') {\n";
|
||||
echo " if (document.getElementById('tr_bridge_gateways')) { document.getElementById('tr_bridge_gateways').style.display = ''; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_profile')) { document.getElementById('tr_bridge_profile').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_variables')) { document.getElementById('tr_bridge_variables').style.display = ''; }\n";
|
||||
echo " }\n";
|
||||
echo " else if (action == 'user') {\n";
|
||||
echo " if (document.getElementById('tr_bridge_gateways')) { document.getElementById('tr_bridge_gateways').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_profile')) { document.getElementById('tr_bridge_profile').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_variables')) { document.getElementById('tr_bridge_variables').style.display = 'none'; }\n";
|
||||
echo " }\n";
|
||||
echo " else if (action == 'profile') {\n";
|
||||
echo " if (document.getElementById('tr_bridge_gateways')) { document.getElementById('tr_bridge_gateways').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_profile')) { document.getElementById('tr_bridge_profile').style.display = ''; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_variables')) { document.getElementById('tr_bridge_variables').style.display = ''; }\n";
|
||||
echo " }\n";
|
||||
echo " else if (action == 'loopback') {\n";
|
||||
echo " if (document.getElementById('tr_bridge_gateways')) { document.getElementById('tr_bridge_gateways').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_profile')) { document.getElementById('tr_bridge_profile').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_bridge_variables')) { document.getElementById('tr_bridge_variables').style.display = 'none'; }\n";
|
||||
echo " }\n";
|
||||
echo " ";
|
||||
echo " }\n";
|
||||
echo "\n";
|
||||
if (!empty($bridge_action)) {
|
||||
echo " window.onload = function() {\n";
|
||||
echo " action_control('".$bridge_action."');\n";
|
||||
echo " };\n";
|
||||
}
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post'>\n";
|
||||
|
||||
|
|
@ -420,7 +186,6 @@
|
|||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -434,156 +199,36 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-bridge_action']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <select class='formfld' id='bridge_action' name='bridge_action' onchange='action_control(this.options[this.selectedIndex].value);'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
$i = 0;
|
||||
foreach($bridge_actions as $row) {
|
||||
echo " <option value='".$row['action']."' ".(!empty($bridge_action) && $bridge_action == $row['action'] ? "selected='selected'" : null).">".$row['label']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-bridge_action']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($bridge_variables)) {
|
||||
echo "<tr id='tr_bridge_variables'>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-bridge_variables']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$i = 0;
|
||||
foreach($bridge_variables as $row) {
|
||||
if ($i > 0) { echo "<br >\n"; }
|
||||
echo " <input class='formfld' type='text' name='bridge_variables[".$row['name']."]' placeholder='".$row['label']."' maxlength='255' value='".escape($row['value'])."'>\n";
|
||||
$i++;
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-bridge_variables']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr id='tr_bridge_profile'>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-bridge_profile']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='bridge_profile'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($sip_profiles as $row) {
|
||||
if (!empty($bridge_profile) && $bridge_profile == $row["sip_profile_name"]) {
|
||||
echo " <option value='".$row['sip_profile_name']."' selected='selected'>".escape($row["sip_profile_name"])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($row["sip_profile_name"])."'>".escape($row["sip_profile_name"])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-bridge_profile']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr id='tr_bridge_gateways'>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-bridge_gateways']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' style='position: relative;' align='left'>\n";
|
||||
for ($x = 0; $x <= 2; $x++) {
|
||||
if ($x > 0) { echo "<br />\n"; }
|
||||
echo "<select name='bridge_gateways[]' id='gateway' class='formfld' ".($onchange ?? '').">\n";
|
||||
echo "<option value=''></option>\n";
|
||||
echo "<optgroup label='".$text['label-bridge_gateways']."'>\n";
|
||||
$previous_domain_uuid = '';
|
||||
foreach($gateways as $row) {
|
||||
if (permission_exists('outbound_route_any_gateway')) {
|
||||
if ($previous_domain_uuid != $row['domain_uuid']) {
|
||||
$domain_name = '';
|
||||
foreach($domains as $field) {
|
||||
if ($row['domain_uuid'] == $field['domain_uuid']) {
|
||||
$domain_name = $field['domain_name'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (empty($domain_name)) { $domain_name = $text['label-global']; }
|
||||
echo "</optgroup>";
|
||||
echo "<optgroup label=' ".$domain_name."'>\n";
|
||||
}
|
||||
if (!empty($bridge_gateways) && is_array($bridge_gateways) && $row['gateway_uuid'] == $bridge_gateways[$x]) {
|
||||
echo "<option value=\"".escape($row['gateway_uuid']).":".escape($row['gateway'])."\" selected=\"selected\">".escape($row['gateway'])."</option>\n"; //." db:".$row['gateway_uuid']." bg:".$bridge_gateways[$x]
|
||||
}
|
||||
else {
|
||||
echo "<option value=\"".escape($row['gateway_uuid']).":".escape($row['gateway'])."\">".escape($row['gateway'])."</option>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!empty($bridge_gateways) && is_array($bridge_gateways) && $row['gateway_uuid'] == $bridge_gateways[$x]) {
|
||||
echo "<option value=\"".escape($row['gateway_uuid']).":".escape($row['gateway'])."\" $onchange selected=\"selected\">".escape($row['gateway'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value=\"".escape($row['gateway_uuid']).":".escape($row['gateway'])."\">".escape($row['gateway'])."</option>\n";
|
||||
}
|
||||
}
|
||||
$previous_domain_uuid = $row['domain_uuid'];
|
||||
}
|
||||
//echo " </optgroup>\n";
|
||||
//echo " <optgroup label='".$text['label-add-options']."Options'>\n";
|
||||
//echo " <option value=\"loopback\">loopback</option>\n";
|
||||
//echo " <option value=\"freetdm\">freetdm</option>\n";
|
||||
//echo " <option value=\"xmpp\">xmpp</option>\n";
|
||||
//echo " </optgroup>\n";
|
||||
echo "</select>\n";
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-bridge_gateways']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_number']."\n";
|
||||
echo " ".$text['label-bridge_destination']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <textarea class='formfld' name='destination_number'>".escape($destination_number ?? '')."</textarea>\n";
|
||||
echo " <input class='formfld' type='text' name='bridge_destination' maxlength='255' value='".escape($bridge_destination)."'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-destination_number']."\n";
|
||||
echo $text['description-bridge_destination']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
//echo "<tr>\n";
|
||||
//echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
//echo " ".$text['label-bridge_destination']."\n";
|
||||
//echo "</td>\n";
|
||||
//echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
//echo " <textarea class='formfld' name='bridge_destination'>".escape($bridge_destination)."</textarea>\n";
|
||||
//echo "<br />\n";
|
||||
//echo $text['description-bridge_destination']."\n";
|
||||
//echo "</td>\n";
|
||||
//echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-bridge_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='bridge_enabled' name='bridge_enabled' value='true' ".(!empty($bridge_enabled) && $bridge_enabled == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
echo " </label>\n";
|
||||
echo " <select class='formfld' name='bridge_enabled'>\n";
|
||||
if ($bridge_enabled == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' id='bridge_enabled' name='bridge_enabled'>\n";
|
||||
echo " <option value='true' ".($bridge_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($bridge_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($bridge_enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-bridge_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -600,11 +245,10 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />\n";
|
||||
echo "</table>";
|
||||
echo "<br /><br />";
|
||||
|
||||
if (!empty($bridge_uuid)) {
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='bridge_uuid' value='".escape($bridge_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
|
@ -614,4 +258,4 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -1,440 +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) 2019-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";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('bridge_import')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduct the functionality but requirs PHP 5.1.0 or higher
|
||||
if (!function_exists('str_getcsv')) {
|
||||
function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") {
|
||||
$fp = fopen("php://memory", 'r+');
|
||||
fputs($fp, $input);
|
||||
rewind($fp);
|
||||
$data = fgetcsv($fp, null, $delimiter, $enclosure); // $escape only got added in 5.3.0
|
||||
fclose($fp);
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
//set the max php execution time
|
||||
ini_set('max_execution_time', 7200);
|
||||
|
||||
//get the http get values and set them as php variables
|
||||
$action = $_POST["action"] ?? '';
|
||||
$from_row = $_POST["from_row"] ?? '';
|
||||
$delimiter = $_POST["data_delimiter"] ?? '';
|
||||
$enclosure = $_POST["data_enclosure"] ?? '';
|
||||
|
||||
//save the data to the csv file
|
||||
if (isset($_POST['data'])) {
|
||||
$file = $_SESSION['server']['temp']['dir']."/bridges-".$_SESSION['domain_name'].".csv";
|
||||
file_put_contents($file, $_POST['data']);
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
|
||||
//copy the csv file
|
||||
if (!empty($_FILES['ulfile']['tmp_name']) && is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('bridge_import')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']);
|
||||
$save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']);
|
||||
//system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*');
|
||||
unset($_POST['txtCommand']);
|
||||
$file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name'];
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
//get the schema
|
||||
if (!empty($delimiter)) {
|
||||
//get the first line
|
||||
$line = fgets(fopen($_SESSION['file'], 'r'));
|
||||
$line_fields = explode($delimiter, $line);
|
||||
|
||||
//get the schema
|
||||
$x = 0;
|
||||
include ("app/bridges/app_config.php");
|
||||
$i = 0;
|
||||
foreach ($apps[0]['db'] as $table) {
|
||||
//get the table name and parent name
|
||||
if (is_array($table["table"]['name'])) {
|
||||
$table_name = $table["table"]['name']['text'];
|
||||
}
|
||||
else {
|
||||
$table_name = $table["table"]['name'];
|
||||
}
|
||||
$parent_name = $table["table"]['parent'];
|
||||
|
||||
//remove the v_ table prefix
|
||||
if (substr($table_name, 0, 2) == 'v_') {
|
||||
$table_name = substr($table_name, 2);
|
||||
}
|
||||
if (substr($parent_name, 0, 2) == 'v_') {
|
||||
$parent_name = substr($parent_name, 2);
|
||||
}
|
||||
|
||||
//filter for specific tables and build the schema array
|
||||
if ($table_name == "bridges") {
|
||||
$schema[$i]['table'] = $table_name;
|
||||
$schema[$i]['parent'] = $parent_name;
|
||||
foreach($table['fields'] as $row) {
|
||||
$row['deprecated'] = $row['deprecated'] ?? '';
|
||||
if ($row['deprecated'] !== 'true') {
|
||||
if (is_array($row['name'])) {
|
||||
$field_name = $row['name']['text'];
|
||||
}
|
||||
else {
|
||||
$field_name = $row['name'];
|
||||
}
|
||||
$schema[$i]['fields'][] = $field_name;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//match the column names to the field names
|
||||
if (!empty($delimiter) && file_exists($_SESSION['file']) && $action != 'import') {
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include header
|
||||
$document['title'] = $text['label-bridge_import'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//form to match the fields to the column names
|
||||
echo "<form name='frmUpload' method='post' enctype='multipart/form-data'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['label-bridge_import']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'bridges.php']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo $text['description-import']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
//loop through user columns
|
||||
$x = 0;
|
||||
foreach ($line_fields as $line_field) {
|
||||
$line_field = preg_replace('#[^a-zA-Z0-9_]#', '', $line_field);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
//echo " ".$text['label-zzz']."\n";
|
||||
echo $line_field;
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='' name='fields[$x]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($schema as $row) {
|
||||
echo " <optgroup label='".$row['table']."'>\n";
|
||||
foreach($row['fields'] as $field) {
|
||||
$selected = '';
|
||||
if ($field == $line_field) {
|
||||
$selected = "selected='selected'";
|
||||
}
|
||||
if ($field !== 'domain_uuid') {
|
||||
echo " <option value='".$row['table'].".".$field."' ".$selected.">".$field."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
//echo "<br />\n";
|
||||
//echo $text['description-zzz']."\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<input name='action' type='hidden' value='import'>\n";
|
||||
echo "<input name='from_row' type='hidden' value='$from_row'>\n";
|
||||
echo "<input name='data_delimiter' type='hidden' value='$delimiter'>\n";
|
||||
echo "<input name='data_enclosure' type='hidden' value='$enclosure'>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>\n";
|
||||
|
||||
require_once "resources/footer.php";
|
||||
|
||||
//normalize the column names
|
||||
//$line = strtolower($line);
|
||||
//$line = str_replace("-", "_", $line);
|
||||
//$line = str_replace($delimiter."title".$delimiter, $delimiter."contact_title".$delimiter, $line);
|
||||
//$line = str_replace("firstname", "name_given", $line);
|
||||
//$line = str_replace("lastname", "name_family", $line);
|
||||
//$line = str_replace("company", "organization", $line);
|
||||
//$line = str_replace("company", "contact_email", $line);
|
||||
|
||||
//end the script
|
||||
exit;
|
||||
}
|
||||
|
||||
//get the parent table
|
||||
function get_parent($schema,$table_name) {
|
||||
foreach ($schema as $row) {
|
||||
if ($row['table'] == $table_name) {
|
||||
return $row['parent'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//upload the csv
|
||||
if (file_exists($_SESSION['file'] ?? '') && $action == 'import') {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: extension_imports.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//user selected fields
|
||||
$fields = $_POST['fields'];
|
||||
|
||||
//set the domain_uuid
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
|
||||
//get the contents of the csv file and convert them into an array
|
||||
$handle = @fopen($_SESSION['file'], "r");
|
||||
if ($handle) {
|
||||
//set the starting identifiers
|
||||
$row_id = 0;
|
||||
$row_number = 1;
|
||||
|
||||
//loop through the array
|
||||
while (($line = fgets($handle, 4096)) !== false) {
|
||||
if ($from_row <= $row_number) {
|
||||
//format the data
|
||||
$y = 0;
|
||||
foreach ($fields as $key => $value) {
|
||||
//get the line
|
||||
$result = str_getcsv($line, $delimiter, $enclosure);
|
||||
|
||||
//get the table and field name
|
||||
$field_array = explode(".",$value);
|
||||
$table_name = $field_array[0];
|
||||
$field_name = $field_array[1];
|
||||
//echo "value: $value<br />\n";
|
||||
//echo "table_name: $table_name<br />\n";
|
||||
//echo "field_name: $field_name<br />\n";
|
||||
|
||||
//get the parent table name
|
||||
$parent = get_parent($schema, $table_name);
|
||||
|
||||
//remove formatting from the phone number
|
||||
if ($field_name == "phone_number") {
|
||||
$result[$key] = preg_replace('{\D}', '', $result[$key]);
|
||||
}
|
||||
|
||||
//set the voicemail_local_after_email, voicemail_tutorial, and voicemail_enabled to lower case
|
||||
if ($field_name == 'voicemail_local_after_email' || $field_name == 'voicemail_tutorial' || $field_name == 'voicemail_enabled') {
|
||||
$result[$key] = strtolower($result[$key]);
|
||||
}
|
||||
|
||||
//build the data array
|
||||
if (!empty($table_name)) {
|
||||
if (empty($parent)) {
|
||||
$array[$table_name][$row_id]['domain_uuid'] = $domain_uuid;
|
||||
$array[$table_name][$row_id][$field_name] = $result[$key];
|
||||
}
|
||||
else {
|
||||
$array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//process a chunk of the array
|
||||
if ($row_id === 1000) {
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'bridges';
|
||||
$database->app_uuid = 'b523c2d2-64cd-46f1-9520-ca4b4098e044';
|
||||
$database->save($array);
|
||||
|
||||
//clear the array
|
||||
unset($array);
|
||||
|
||||
//set the row id back to 0
|
||||
$row_id = 0;
|
||||
}
|
||||
|
||||
} //if ($from_row <= $row_number)
|
||||
$row_number++;
|
||||
$row_id++;
|
||||
} //end while
|
||||
fclose($handle);
|
||||
|
||||
//save to the data
|
||||
if (!empty($array) && is_array($array)) {
|
||||
$database = new database;
|
||||
$database->app_name = 'bridges';
|
||||
$database->app_uuid = 'b523c2d2-64cd-46f1-9520-ca4b4098e044';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
}
|
||||
|
||||
//send the redirect header
|
||||
header("Location: bridges.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include the header
|
||||
$document['title'] = $text['label-bridge_import'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show content
|
||||
echo "<form name='frmUpload' method='post' enctype='multipart/form-data'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['label-bridge_import']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'bridges.php']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>$_SESSION['theme']['button_icon_upload'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo $text['description-import']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_data']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <textarea name='data' id='data' class='formfld' style='width: 100%; min-height: 150px;' wrap='off'></textarea>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_data']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-from_row']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='from_row'>\n";
|
||||
$i=2;
|
||||
while($i<=99) {
|
||||
$selected = ($i == $from_row) ? "selected" : null;
|
||||
echo " <option value='$i' ".$selected.">$i</option>\n";
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-from_row']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_delimiter']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='width:40px;' name='data_delimiter'>\n";
|
||||
echo " <option value=','>,</option>\n";
|
||||
echo " <option value='|'>|</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_delimiter']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_enclosure']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='width:40px;' name='data_enclosure'>\n";
|
||||
echo " <option value='\"'>\"</option>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_enclosure']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_file_upload']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input name='ulfile' type='file' class='formfld fileinput' id='ulfile'>\n";
|
||||
echo "<br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<input name='type' type='hidden' value='csv'>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
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 - 2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -42,22 +43,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$search = $_GET["search"] ?? '';
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['bridges'])) {
|
||||
if (is_array($_POST['bridges'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$bridges = $_POST['bridges'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($bridges)) {
|
||||
if ($action != '' && is_array($bridges) && @sizeof($bridges) != 0) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('bridge_add')) {
|
||||
|
|
@ -79,16 +73,16 @@
|
|||
break;
|
||||
}
|
||||
|
||||
header('Location: bridges.php'.(!empty($search) ? '?search='.urlencode($search) : null));
|
||||
header('Location: bridges.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
//get order and order by
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search string
|
||||
if (!empty($search)) {
|
||||
if (isset($_GET["search"])) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
$sql_search = " (";
|
||||
$sql_search .= " lower(bridge_name) like :search ";
|
||||
|
|
@ -101,7 +95,7 @@
|
|||
|
||||
//get the count
|
||||
$sql = "select count(bridge_uuid) from v_bridges ";
|
||||
if (!empty($show) && $show == "all" && permission_exists('bridge_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('bridge_all')) {
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "where ".$sql_search;
|
||||
}
|
||||
|
|
@ -114,37 +108,23 @@
|
|||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = !empty($search) ? "&search=".$search : null;
|
||||
$param = (isset($_GET['show']) && $_GET['show'] == 'all' && permission_exists('bridge_all')) ? "&show=all" : null;
|
||||
$page = isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$param = $search ? "&search=".$search : null;
|
||||
$param = ($_GET['show'] == 'all' && permission_exists('bridge_all')) ? "&show=all" : null;
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select d.domain_uuid, b.bridge_uuid, d.domain_name, b.bridge_name, b.bridge_destination, bridge_enabled, bridge_description ";
|
||||
$sql .= "from v_bridges as b, v_domains as d ";
|
||||
$sql .= "where b.domain_uuid = d.domain_uuid ";
|
||||
if (!empty($show) && $show == "all" && permission_exists('bridge_all')) {
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$sql .= "and (b.domain_uuid = :domain_uuid or b.domain_uuid is null) ";
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
}
|
||||
$sql = str_replace('count(bridge_uuid)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order, 'bridge_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$bridges = $database->select($sql, $parameters ?? null, 'all');
|
||||
$bridges = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -157,11 +137,8 @@
|
|||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-bridges']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-bridges']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('bridge_import')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'style'=>'margin-right: 15px;','link'=>'bridge_imports.php']);
|
||||
}
|
||||
if (permission_exists('bridge_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'bridge_edit.php']);
|
||||
}
|
||||
|
|
@ -176,7 +153,7 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('bridge_all')) {
|
||||
if (isset($show) && $show == 'all') {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>\n";
|
||||
}
|
||||
else {
|
||||
|
|
@ -207,7 +184,6 @@
|
|||
echo $text['title_description-bridge']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
|
@ -216,30 +192,26 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($bridges) ? "style='visibility: hidden;'" : null).">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($bridges ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if (!empty($show) && $show == 'all' && permission_exists('bridge_all')) {
|
||||
if ($_GET['show'] == 'all' && permission_exists('bridge_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
|
||||
}
|
||||
echo th_order_by('bridge_name', $text['label-bridge_name'], $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 class='hide-sm-dn'>".$text['label-bridge_description']."</th>\n";
|
||||
if (permission_exists('bridge_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('bridge_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($bridges)) {
|
||||
if (is_array($bridges) && @sizeof($bridges) != 0) {
|
||||
$x = 0;
|
||||
foreach ($bridges as $row) {
|
||||
$list_row_url = '';
|
||||
if (permission_exists('bridge_edit')) {
|
||||
$list_row_url = "bridge_edit.php?id=".urlencode($row['bridge_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {
|
||||
|
|
@ -248,8 +220,8 @@
|
|||
echo " <input type='hidden' name='bridges[$x][uuid]' value='".escape($row['bridge_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('bridge_all')) {
|
||||
echo " <td>".escape($row['domain_name'])."</td>\n";
|
||||
if ($_GET['show'] == 'all' && permission_exists('bridge_all')) {
|
||||
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
|
||||
}
|
||||
echo " <td>\n";
|
||||
if (permission_exists('bridge_edit')) {
|
||||
|
|
@ -270,7 +242,7 @@
|
|||
}
|
||||
echo " </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') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -286,7 +258,6 @@
|
|||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
//define the bridges class
|
||||
if (!class_exists('bridges')) {
|
||||
class bridges {
|
||||
|
||||
/**
|
||||
|
|
@ -56,6 +57,16 @@
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
|
|
@ -79,7 +90,7 @@
|
|||
|
||||
//build the delete array
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -131,7 +142,7 @@
|
|||
|
||||
//get current toggle state
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -205,7 +216,7 @@
|
|||
|
||||
//get checked records
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -254,3 +265,6 @@
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2018
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
$apps[$x]['uuid'] = "9ed63276-e085-4897-839c-4f2e36d92d6c";
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "1.1";
|
||||
$apps[$x]['version'] = "1.0";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "A tool to block incoming numbers.";
|
||||
|
|
@ -21,7 +21,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "Outil pour bloquer des numéros d'appelant.";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "ხელსაწყო შემომავალი ნომრების დასაბლოკად";
|
||||
$apps[$x]['description']['nl-nl'] = "Gereedschap om inkommende nummers te blokkeren.";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "Uma ferramenta para bloquear números que entram.";
|
||||
|
|
@ -40,14 +39,6 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "50";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of recent calls to show.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "47914bd9-e1c0-4e3d-87e0-41f95d58ce98";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_block";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "save_call_detail_record";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Choose whether to save the call detail record when the call is blocked.";
|
||||
|
||||
//permission details
|
||||
$y=0;
|
||||
|
|
@ -74,6 +65,7 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_block_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_block_extension";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
|
@ -91,9 +83,6 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_block_domain";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "view_call_block";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
|
|
@ -177,29 +166,5 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -27,20 +27,22 @@
|
|||
if ($domains_processed == 1) {
|
||||
|
||||
//create a view for call block
|
||||
$database = new database;
|
||||
$database->execute("DROP VIEW view_call_block;", null);
|
||||
$sql = "CREATE VIEW view_call_block AS ( \n";
|
||||
$sql .= " select c.domain_uuid, call_block_uuid, c.call_block_direction, c.extension_uuid, c.call_block_name, c.call_block_country_code, \n";
|
||||
$sql .= " c.call_block_number, e.extension, e.number_alias, c.call_block_count, c.call_block_app, c.call_block_data, c.date_added, \n";
|
||||
$sql .= " c.call_block_enabled, c.call_block_description, c.insert_date, c.insert_user, c.update_date, c.update_user \n";
|
||||
$sql .= " c.call_block_number, e.extension, e.number_alias, c.call_block_count, c.call_block_app, c.call_block_data, c.date_added, c.call_block_enabled, c.call_block_description \n";
|
||||
$sql .= " from v_call_block as c \n";
|
||||
$sql .= " left join v_extensions as e \n";
|
||||
$sql .= " on c.extension_uuid = e.extension_uuid \n";
|
||||
$sql .= "); \n";
|
||||
$database = new database;
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
//set call blocks to inbound if no direction defined
|
||||
$sql = "update v_call_block set call_block_direction = 'inbound' where call_block_direction is null ";
|
||||
$database = new database;
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -5,16 +5,15 @@
|
|||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Block";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "حظر المكالمات";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Sperrlisten";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Einloggen";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Sperrlisten";
|
||||
$apps[$x]['menu'][$y]['title']['el-gr'] = "Λίστα απορρίψεων";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Bloqueo de llamadas";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Block";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Call Block";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Liste Noire";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "חסימת מספר";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Blocco Chiamate";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ზარების დაბლოკვა";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep blokkade";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Blokowanie rozmów";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Bloqueio de chamadas";
|
||||
|
|
@ -23,18 +22,12 @@
|
|||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Черный список";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Blockera Samtal";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Блокування дзвінків";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "呼叫块";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コール ブロック";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 차단";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "29295c90-b1b9-440b-9c7E-c8363c6e8975";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_block/call_block.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,18 +17,19 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
|
||||
The original Call Block was written by Gerrit Visser <gerrit308@gmail.com>
|
||||
The original Call Block was written by Gerrit Visser <gerrit308@gmail.com>
|
||||
All of it has been rewritten over years.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -41,22 +42,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$search = $_GET["search"] ?? '';
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_blocks'])) {
|
||||
if (is_array($_POST['call_blocks'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$call_blocks = $_POST['call_blocks'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($call_blocks)) {
|
||||
if ($action != '' && is_array($call_blocks) && @sizeof($call_blocks) != 0) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('call_block_add')) {
|
||||
|
|
@ -83,38 +77,33 @@
|
|||
}
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
if (!empty($_GET["search"])) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
}
|
||||
|
||||
//set the time zone
|
||||
if (isset($_SESSION['domain']['time_zone']['name'])) {
|
||||
$time_zone = $_SESSION['domain']['time_zone']['name'];
|
||||
}
|
||||
else {
|
||||
$time_zone = date_default_timezone_get();
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(call_block_name) like :search ";
|
||||
$sql_search .= "or call_block_country_code like :search ";
|
||||
$sql_search .= "or lower(call_block_number) like :search ";
|
||||
$sql_search .= "or lower(call_block_description) like :search ";
|
||||
$sql_search .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from view_call_block ";
|
||||
$sql .= "where true ";
|
||||
if ($show == "all" && permission_exists('call_block_all')) {
|
||||
//show all records across all domains
|
||||
}
|
||||
else {
|
||||
$sql .= "and ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!permission_exists('call_block_extension') && !empty($_SESSION['user']['extension'])) {
|
||||
else {
|
||||
$sql .= "and (domain_uuid = :domain_uuid) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and extension_uuid in (";
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $field) {
|
||||
|
|
@ -125,62 +114,37 @@
|
|||
}
|
||||
$sql .= ") ";
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and (";
|
||||
$sql .= " lower(call_block_name) like :search ";
|
||||
$sql .= " or lower(call_block_direction) like :search ";
|
||||
$sql .= " or lower(call_block_number) like :search ";
|
||||
$sql .= " or lower(call_block_app) like :search ";
|
||||
$sql .= " or lower(call_block_data) like :search ";
|
||||
$sql .= " or lower(call_block_description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($parameters);
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".$search;
|
||||
if ($show == "all" && permission_exists('call_block_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select domain_uuid, call_block_uuid, call_block_direction, extension_uuid, call_block_name, ";
|
||||
$sql .= " call_block_country_code, call_block_number, extension, number_alias, call_block_count, ";
|
||||
$sql .= " call_block_app, call_block_data, ";
|
||||
$sql .= " to_char(timezone(:time_zone, insert_date), 'DD Mon YYYY') as date_formatted, \n";
|
||||
if (date(!empty($_SESSION['domain']['time_format']['text']) == '12h')) {
|
||||
$sql .= " to_char(timezone(:time_zone, insert_date), 'HH12:MI:SS am') as time_formatted, \n";
|
||||
}
|
||||
else {
|
||||
$sql .= " to_char(timezone(:time_zone, insert_date), 'HH24:MI:SS am') as time_formatted, \n";
|
||||
}
|
||||
$sql .= " call_block_enabled, call_block_description, insert_date, insert_user, update_date, update_user ";
|
||||
$sql .= "from view_call_block ";
|
||||
$sql = "select * from view_call_block ";
|
||||
$sql .= "where true ";
|
||||
$parameters['time_zone'] = $time_zone;
|
||||
if ($show == "all" && permission_exists('call_block_all')) {
|
||||
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
else {
|
||||
$sql .= "and ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!permission_exists('call_block_extension') && !empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
else {
|
||||
$sql .= "and (domain_uuid = :domain_uuid) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and extension_uuid in (";
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $field) {
|
||||
|
|
@ -191,42 +155,26 @@
|
|||
}
|
||||
$sql .= ") ";
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and (";
|
||||
$sql .= " lower(call_block_name) like :search ";
|
||||
$sql .= " or lower(call_block_direction) like :search ";
|
||||
$sql .= " or lower(call_block_number) like :search ";
|
||||
$sql .= " or lower(call_block_app) like :search ";
|
||||
$sql .= " or lower(call_block_data) like :search ";
|
||||
$sql .= " or lower(call_block_description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$sql .= order_by($order_by, $order, ['domain_uuid','call_block_country_code','call_block_number']);
|
||||
$sql .= order_by($order_by, $order, ['call_block_country_code','call_block_number']);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//determine if any global
|
||||
$global_call_blocks = false;
|
||||
if (permission_exists('call_block_domain') && !empty($result) && is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $row) {
|
||||
if (!is_uuid($row['domain_uuid'])) { $global_call_blocks = true; break; }
|
||||
}
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include the header
|
||||
$document['title'] = $text['title-call_block'];
|
||||
$document['title'] = $text['title-call-block'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_block']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call-block']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('call_block_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'call_block_edit.php']);
|
||||
|
|
@ -241,18 +189,18 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_block_all')) {
|
||||
if ($show == 'all') {
|
||||
if (permission_exists('call_forward_all')) {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.($search != '' ? "&search=".urlencode($search ?? '') : null)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type).'&show=all'.($search != '' ? "&search=".urlencode($search) : null)]);
|
||||
}
|
||||
}
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
|
||||
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_block.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if (!empty($paging_controls_mini)) {
|
||||
if ($paging_controls_mini != '') {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
}
|
||||
echo " </form>\n";
|
||||
|
|
@ -277,20 +225,16 @@
|
|||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('call_block_add') || permission_exists('call_block_edit') || permission_exists('call_block_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($show == 'all' && permission_exists('domain_all')) {
|
||||
if ($_GET['show'] == 'all' && permission_exists('domain_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
|
||||
}
|
||||
else if (permission_exists('call_block_domain') && $global_call_blocks) {
|
||||
echo th_order_by('domain_uuid', $text['label-domain'], $order_by, $order, null, "style='width: 1%;' class='center'");
|
||||
}
|
||||
echo th_order_by('call_block_direction', $text['label-direction'], $order_by, $order, null, "style='width: 1%;' class='center'");
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('call_block_name', $text['label-name'], $order_by, $order);
|
||||
|
|
@ -299,22 +243,18 @@
|
|||
echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "class='center hide-sm-dn'");
|
||||
echo th_order_by('call_block_action', $text['label-action'], $order_by, $order);
|
||||
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('date_added', $text['label-date-added'], $order_by, $order, null, "class='shrink no-wrap'");
|
||||
echo "<th class='hide-md-dn pct-20'>".$text['label-description']."</th>\n";
|
||||
if (permission_exists('call_block_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_block_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($result)) {
|
||||
if (is_array($result)) {
|
||||
$x = 0;
|
||||
foreach ($result as $row) {
|
||||
$list_row_url = '';
|
||||
foreach($result as $row) {
|
||||
if (permission_exists('call_block_edit')) {
|
||||
$list_row_url = "call_block_edit.php?id=".urlencode($row['call_block_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('call_block_add') || permission_exists('call_block_edit') || permission_exists('call_block_delete')) {
|
||||
|
|
@ -323,23 +263,8 @@
|
|||
echo " <input type='hidden' name='call_blocks[".$x."][uuid]' value='".escape($row['call_block_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if (!empty($show) && $show == 'all' && permission_exists('domain_all')) {
|
||||
if (!empty($row['domain_uuid']) && is_uuid($row['domain_uuid'])) {
|
||||
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td>".$text['label-global']."</td>\n";
|
||||
}
|
||||
}
|
||||
else if ($global_call_blocks) {
|
||||
if (permission_exists('call_block_domain') && !is_uuid($row['domain_uuid'])) {
|
||||
echo " <td>".$text['label-global'];
|
||||
}
|
||||
else {
|
||||
echo " <td class='overflow'>";
|
||||
echo escape($_SESSION['domains'][$row['domain_uuid']]['domain_name']);
|
||||
}
|
||||
echo "</td>\n";
|
||||
if ($_GET['show'] == 'all' && permission_exists('domain_all')) {
|
||||
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
|
||||
}
|
||||
echo " <td class='center'>";
|
||||
switch ($row['call_block_direction']) {
|
||||
|
|
@ -348,7 +273,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='center'>";
|
||||
if (empty($row['extension'])) {
|
||||
if (strlen($row['extension']) == 0) {
|
||||
echo $text['label-all'];
|
||||
}
|
||||
else {
|
||||
|
|
@ -383,9 +308,9 @@
|
|||
echo $text['label-'.$row['call_block_enabled']];
|
||||
}
|
||||
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'>".date('j M Y', $row['date_added'])." <span class='hide-sm-dn'>".date(($_SESSION['domain']['time_format']['text'] == '12h' ? 'h:i:s a' : 'H:i:s'), $row['date_added'])."</span></td>\n";
|
||||
echo " <td class='description overflow hide-md-dn'>".escape($row['call_block_description'])."</td>\n";
|
||||
if (permission_exists('call_block_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_block_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -397,7 +322,6 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
|
|
@ -409,4 +333,3 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -27,8 +27,9 @@
|
|||
Original version of Call Block was written by Gerrit Visser <gerrit308@gmail.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -40,17 +41,8 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//initialize the database object
|
||||
$database = new database;
|
||||
|
||||
//set the defaults
|
||||
$call_block_name = '';
|
||||
$call_block_country_code = '';
|
||||
$call_block_number = '';
|
||||
$call_block_description = '';
|
||||
|
||||
//action add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$call_block_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -58,38 +50,26 @@
|
|||
$action = "add";
|
||||
}
|
||||
|
||||
//get order and order by and sanitize the values
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
//get the variables from the http post
|
||||
$domain_uuid = permission_exists('call_block_domain') ? $_POST["domain_uuid"] : $_SESSION['domain_uuid'];
|
||||
if (count($_POST) > 0) {
|
||||
$call_block_direction = $_POST["call_block_direction"];
|
||||
$extension_uuid = $_POST["extension_uuid"];
|
||||
$call_block_name = $_POST["call_block_name"] ?? null;
|
||||
$call_block_country_code = $_POST["call_block_country_code"] ?? null;
|
||||
$call_block_number = $_POST["call_block_number"] ?? null;
|
||||
$call_block_enabled = $_POST["call_block_enabled"] ?? 'false';
|
||||
$call_block_description = $_POST["call_block_description"] ?? null;
|
||||
|
||||
//get the call block app and data
|
||||
$call_block_name = $_POST["call_block_name"];
|
||||
$call_block_country_code = $_POST["call_block_country_code"];
|
||||
$call_block_number = $_POST["call_block_number"];
|
||||
$call_block_enabled = $_POST["call_block_enabled"];
|
||||
$call_block_description = $_POST["call_block_description"];
|
||||
|
||||
$action_array = explode(':', $_POST["call_block_action"]);
|
||||
$call_block_app = $action_array[0];
|
||||
$call_block_data = $action_array[1] ?? null;
|
||||
|
||||
//sanitize the data
|
||||
$extension_uuid = preg_replace("#[^a-fA-F0-9./]#", "", $extension_uuid);
|
||||
$call_block_country_code = preg_replace('#[^0-9./]#', '', $call_block_country_code ?? '');
|
||||
$call_block_number = preg_replace('#[^0-9./]#', '', $call_block_number ?? '');
|
||||
$call_block_data = $action_array[1];
|
||||
}
|
||||
|
||||
//handle the http post
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//handle action
|
||||
if (!empty($_POST['action'])) {
|
||||
if ($_POST['action'] != '') {
|
||||
switch ($_POST['action']) {
|
||||
case 'delete':
|
||||
if (permission_exists('call_block_delete') && is_uuid($call_block_uuid)) {
|
||||
|
|
@ -102,8 +82,8 @@
|
|||
}
|
||||
break;
|
||||
case 'add':
|
||||
$xml_cdrs = $_POST['xml_cdrs'] ?? null;
|
||||
if (!empty($xml_cdrs) && permission_exists('call_block_add')) {
|
||||
$xml_cdrs = $_POST['xml_cdrs'];
|
||||
if (permission_exists('call_block_add') && is_array($xml_cdrs) && @sizeof($xml_cdrs) != 0) {
|
||||
$obj = new call_block;
|
||||
$obj->call_block_direction = $call_block_direction;
|
||||
$obj->extension_uuid = $extension_uuid;
|
||||
|
|
@ -128,10 +108,10 @@
|
|||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (empty($call_block_name)) { $msg .= $text['label-provide-name']."<br>\n"; }
|
||||
//if (empty($call_block_number)) { $msg .= $text['label-provide-number']."<br>\n"; }
|
||||
if (empty($call_block_enabled)) { $msg .= $text['label-provide-enabled']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
//if (strlen($call_block_name) == 0) { $msg .= $text['label-provide-name']."<br>\n"; }
|
||||
//if (strlen($call_block_number) == 0) { $msg .= $text['label-provide-number']."<br>\n"; }
|
||||
if (strlen($call_block_enabled) == 0) { $msg .= $text['label-provide-enabled']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -145,30 +125,28 @@
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (is_array($_POST) && sizeof($_POST) != 0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
//ensure call block is enabled in the dialplan
|
||||
if ($action == "add" || $action == "update") {
|
||||
$sql = "select dialplan_uuid from v_dialplans where true ";
|
||||
if (!empty($domain_uuid) && is_uuid($domain_uuid)) {
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
}
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$sql .= "and app_uuid = 'b1b31930-d0ee-4395-a891-04df94599f1f' ";
|
||||
$sql .= "and dialplan_enabled <> 'true' ";
|
||||
if (!empty($domain_uuid) && is_uuid($domain_uuid)) {
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
}
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters);
|
||||
|
||||
if (!empty($rows)) {
|
||||
if (is_array($rows) && sizeof($rows) != 0) {
|
||||
foreach ($rows as $index => $row) {
|
||||
$array['dialplans'][$index]['dialplan_uuid'] = $row['dialplan_uuid'];
|
||||
$array['dialplans'][$index]['dialplan_enabled'] = 'true';
|
||||
}
|
||||
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_edit', 'temp');
|
||||
|
||||
$database = new database;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
|
|
@ -177,16 +155,16 @@
|
|||
}
|
||||
|
||||
//if user doesn't have call block all then use the assigned extension_uuid
|
||||
if (!permission_exists('call_block_extension')) {
|
||||
if (!permission_exists('call_block_all')) {
|
||||
$extension_uuid = $_SESSION['user']['extension'][0]['extension_uuid'];
|
||||
}
|
||||
|
||||
//save the data to the database
|
||||
if ($action == "add") {
|
||||
$array['call_block'][0]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][0]['domain_uuid'] = $domain_uuid;
|
||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
||||
if (!empty($extension_uuid) && is_uuid($extension_uuid)) {
|
||||
if (is_uuid($extension_uuid)) {
|
||||
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
||||
}
|
||||
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
||||
|
|
@ -199,9 +177,11 @@
|
|||
$array['call_block'][0]['date_added'] = time();
|
||||
$array['call_block'][0]['call_block_description'] = $call_block_description;
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'call_block';
|
||||
$database->app_uuid = '9ed63276-e085-4897-839c-4f2e36d92d6c';
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
message::add($text['label-add-complete']);
|
||||
|
|
@ -209,23 +189,16 @@
|
|||
return;
|
||||
}
|
||||
if ($action == "update") {
|
||||
if (!empty($domain_uuid) && is_uuid($domain_uuid)) {
|
||||
$sql = "select c.call_block_country_code, c.call_block_number, d.domain_name ";
|
||||
$sql .= "from v_call_block as c ";
|
||||
$sql .= "join v_domains as d on c.domain_uuid = d.domain_uuid ";
|
||||
$sql .= "where c.domain_uuid = :domain_uuid ";
|
||||
$sql .= "and c.call_block_uuid = :call_block_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
else {
|
||||
$sql = "select c.call_block_country_code, c.call_block_number, domain_name as 'global' ";
|
||||
$sql .= "from v_call_block as c ";
|
||||
$sql .= "where c.domain_uuid is null ";
|
||||
$sql .= "and c.call_block_uuid = :call_block_uuid ";
|
||||
}
|
||||
$sql = "select c.call_block_country_code, c.call_block_number, d.domain_name ";
|
||||
$sql .= "from v_call_block as c ";
|
||||
$sql .= "join v_domains as d on c.domain_uuid = d.domain_uuid ";
|
||||
$sql .= "where c.domain_uuid = :domain_uuid ";
|
||||
$sql .= "and c.call_block_uuid = :call_block_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['call_block_uuid'] = $call_block_uuid;
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters);
|
||||
if (!empty($result)) {
|
||||
if (is_array($result) && sizeof($result) != 0) {
|
||||
//set the domain_name
|
||||
$domain_name = $result[0]["domain_name"];
|
||||
|
||||
|
|
@ -236,9 +209,9 @@
|
|||
unset($sql, $parameters);
|
||||
|
||||
$array['call_block'][0]['call_block_uuid'] = $call_block_uuid;
|
||||
$array['call_block'][0]['domain_uuid'] = $domain_uuid;
|
||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
||||
if (!empty($extension_uuid) && is_uuid($extension_uuid)) {
|
||||
if (is_uuid($extension_uuid)) {
|
||||
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
||||
}
|
||||
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
||||
|
|
@ -250,9 +223,11 @@
|
|||
$array['call_block'][0]['date_added'] = time();
|
||||
$array['call_block'][0]['call_block_description'] = $call_block_description;
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'call_block';
|
||||
$database->app_uuid = '9ed63276-e085-4897-839c-4f2e36d92d6c';
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
message::add($text['label-update-complete']);
|
||||
|
|
@ -263,21 +238,16 @@
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$call_block_uuid = $_GET["id"];
|
||||
$sql = "select * from v_call_block ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and call_block_uuid = :call_block_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['call_block_uuid'] = $call_block_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$call_block_direction = $row["call_block_direction"];
|
||||
$extension_uuid = $row["extension_uuid"];
|
||||
$call_block_name = $row["call_block_name"];
|
||||
|
|
@ -291,66 +261,47 @@
|
|||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if (empty($call_block_enabled)) { $call_block_enabled = 'true'; }
|
||||
|
||||
//get the extensions
|
||||
if (permission_exists('call_block_all') || permission_exists('call_block_extension')) {
|
||||
$sql = "select extension_uuid, extension, number_alias, user_context, description from v_extensions ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
$sql .= "order by extension asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$extensions = $database->select($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the ivr's
|
||||
if (permission_exists('call_block_all') || permission_exists('call_block_ivr')) {
|
||||
$sql = "select ivr_menu_uuid,ivr_menu_name, ivr_menu_extension, ivr_menu_description from v_ivr_menus ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
// $sql .= "and enabled = 'true' ";
|
||||
$sql .= "order by ivr_menu_extension asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$ivrs = $database->select($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the ring groups
|
||||
if (permission_exists('call_block_all') || permission_exists('call_block_ring_group')) {
|
||||
$sql = "select ring_group_uuid,ring_group_name, ring_group_extension, ring_group_description from v_ring_groups ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
// $sql .= "and ring_group_enabled = 'true' ";
|
||||
$sql .= "order by ring_group_extension asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$ring_groups = $database->select($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the voicemails
|
||||
$sql = "select voicemail_uuid, voicemail_id, voicemail_description ";
|
||||
$sql .= "from v_voicemails ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and voicemail_enabled = 'true' ";
|
||||
$sql .= "order by voicemail_id asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$voicemails = $database->select($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -358,7 +309,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//show the header
|
||||
$document['title'] = $text['title-call_block'];
|
||||
$document['title'] = $text['title-call-block'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show the content
|
||||
|
|
@ -396,7 +347,6 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
}
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -406,7 +356,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='call_block_direction'>\n";
|
||||
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
|
||||
echo " <option value='outbound' ".(!empty($call_block_direction) && $call_block_direction == "outbound" ? "selected" : null).">".$text['label-outbound']."</option>\n";
|
||||
echo " <option value='outbound' ".($call_block_direction == "outbound" ? "selected" : null).">".$text['label-outbound']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-direction']."\n";
|
||||
|
|
@ -414,7 +364,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('call_block_extension')) {
|
||||
if (permission_exists('call_block_all')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-extension']."\n";
|
||||
|
|
@ -422,9 +372,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='extension_uuid'>\n";
|
||||
echo " <option value=''>".$text['label-all']."</option>\n";
|
||||
if (!empty($extensions)) {
|
||||
if (is_array($extensions) && sizeof($extensions) != 0) {
|
||||
foreach ($extensions as $row) {
|
||||
$selected = !empty($extension_uuid) && $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
|
||||
$selected = $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
|
||||
echo " <option value='".urlencode($row["extension_uuid"])."' ".$selected.">".escape($row['extension'])." ".escape($row['description'])."</option>\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -490,9 +440,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo " <option value='hold'>".$text['label-hold']."</option>\n";
|
||||
}
|
||||
if (permission_exists('call_block_extension')) {
|
||||
if (!empty($extensions)) {
|
||||
if (is_array($extensions) && sizeof($extensions) != 0) {
|
||||
echo " <optgroup label='".$text['label-extension']."'>\n";
|
||||
foreach ($extensions as $row) {
|
||||
foreach ($extensions as &$row) {
|
||||
$selected = ($call_block_app == 'extension' && $call_block_data == $row['extension']) ? "selected='selected'" : null;
|
||||
echo " <option value='extension:".urlencode($row["extension"])."' ".$selected.">".escape($row['extension'])." ".escape($row['description'])."</option>\n";
|
||||
}
|
||||
|
|
@ -500,9 +450,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
}
|
||||
}
|
||||
if (permission_exists('call_block_ivr')) {
|
||||
if (!empty($ivrs)) {
|
||||
if (is_array($ivrs) && sizeof($ivrs) != 0) {
|
||||
echo " <optgroup label='".$text['label-ivr_menus']."'>\n";
|
||||
foreach ($ivrs as $row) {
|
||||
foreach ($ivrs as &$row) {
|
||||
$selected = ($call_block_app == 'ivr' && $call_block_data == $row['ivr_menu_extension']) ? "selected='selected'" : null;
|
||||
echo " <option value='ivr:".urlencode($row["ivr_menu_extension"])."' ".$selected.">".escape($row['ivr_menu_name'])." ".escape($row['ivr_menu_extension'])."</option>\n";
|
||||
}
|
||||
|
|
@ -510,9 +460,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
}
|
||||
}
|
||||
if (permission_exists('call_block_ring_group')) {
|
||||
if (!empty($ring_groups)) {
|
||||
if (is_array($ring_groups) && sizeof($ring_groups) != 0) {
|
||||
echo " <optgroup label='".$text['label-ring_groups']."'>\n";
|
||||
foreach ($ring_groups as $row) {
|
||||
foreach ($ring_groups as &$row) {
|
||||
$selected = ($call_block_app == 'ring_group' && $call_block_data == $row['ring_group_extension']) ? "selected='selected'" : null;
|
||||
echo " <option value='ring_group:".urlencode($row["ring_group_extension"])."' ".$selected.">".escape($row['ring_group_name'])." ".escape($row['ring_group_extension'])."</option>\n";
|
||||
}
|
||||
|
|
@ -520,9 +470,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
}
|
||||
}
|
||||
if (permission_exists('call_block_voicemail')) {
|
||||
if (!empty($voicemails)) {
|
||||
if (is_array($voicemails) && sizeof($voicemails) != 0) {
|
||||
echo " <optgroup label='".$text['label-voicemail']."'>\n";
|
||||
foreach ($voicemails as $row) {
|
||||
foreach ($voicemails as &$row) {
|
||||
$selected = ($call_block_app == 'voicemail' && $call_block_data == $row['voicemail_id']) ? "selected='selected'" : null;
|
||||
echo " <option value='voicemail:".urlencode($row["voicemail_id"])."' ".$selected.">".escape($row['voicemail_id'])." ".escape($row['voicemail_description'])."</option>\n";
|
||||
}
|
||||
|
|
@ -538,41 +488,15 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('call_block_domain')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-domain']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='domain_uuid'>\n";
|
||||
echo " <option value=''>".$text['label-global']."</option>\n";
|
||||
foreach ($_SESSION['domains'] as $row) {
|
||||
echo " <option value='".escape($row['domain_uuid'])."' ".($row['domain_uuid'] == $domain_uuid ? "selected='selected'" : null).">".escape($row['domain_name'])."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-domain_name']."\n";
|
||||
echo "</td>\n";
|
||||
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 "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='call_block_enabled' name='call_block_enabled' value='true' ".($call_block_enabled == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
echo " </label>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' id='call_block_enabled' name='call_block_enabled'>\n";
|
||||
echo " <option value='true' ".($call_block_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($call_block_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " <select class='formfld' name='call_block_enabled'>\n";
|
||||
echo " <option value='true' ".(($call_block_enabled == "true") ? "selected" : null).">".$text['label-true']."</option>\n";
|
||||
echo " <option value='false' ".(($call_block_enabled == "false") ? "selected" : null).">".$text['label-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-enable']."\n";
|
||||
echo "\n";
|
||||
|
|
@ -591,7 +515,6 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>\n";
|
||||
echo "<br><br>";
|
||||
|
||||
if ($action == "update") {
|
||||
|
|
@ -602,36 +525,37 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "</form>";
|
||||
|
||||
//get recent calls from the db (if not editing an existing call block record)
|
||||
if (empty($_REQUEST["id"])) {
|
||||
if (!is_uuid($_REQUEST["id"])) {
|
||||
|
||||
//without block all permission, limit to assigned extension(s)
|
||||
if (!permission_exists('call_block_extension') && !empty($_SESSION['user']['extension'])) {
|
||||
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension'])) {
|
||||
foreach ($_SESSION['user']['extension'] as $assigned_extension) {
|
||||
$assigned_extensions[$assigned_extension['extension_uuid']] = $assigned_extension['user'];
|
||||
}
|
||||
if (!empty($assigned_extensions)) {
|
||||
if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) {
|
||||
$x = 0;
|
||||
foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) {
|
||||
$sql_where_array[] = "extension_uuid = :extension_uuid_".$x;
|
||||
$parameters['extension_uuid_'.$x] = $assigned_extension_uuid;
|
||||
$x++;
|
||||
}
|
||||
if (!empty($sql_where_array)) {
|
||||
if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) {
|
||||
$sql_where .= "and (".implode(' or ', $sql_where_array).") ";
|
||||
}
|
||||
unset($sql_where_array);
|
||||
}
|
||||
}
|
||||
|
||||
//get the recent calls
|
||||
//get recent calls
|
||||
$sql = "select caller_id_name, caller_id_number, caller_destination, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
|
||||
$sql .= "from v_xml_cdr where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and direction <> 'local' ";
|
||||
$sql .= $sql_where ?? null;
|
||||
$sql .= $sql_where;
|
||||
$sql .= "order by start_stamp desc ";
|
||||
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$recent_calls = $database->select($sql, $parameters);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
|
|
@ -648,15 +572,15 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo " </div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'collapse'=>'hide-xs','style'=>'display: none;','link'=>'call_block.php']);
|
||||
if ($recent_calls) {
|
||||
if ($result) {
|
||||
$select_margin = 'margin-left: 15px;';
|
||||
if (permission_exists('call_block_extension')) {
|
||||
if (permission_exists('call_block_all')) {
|
||||
echo "<select class='formfld' style='".$select_margin."' name='extension_uuid'>\n";
|
||||
echo " <option value='' disabled='disabled'>".$text['label-extension']."</option>\n";
|
||||
echo " <option value='' selected='selected'>".$text['label-all']."</option>\n";
|
||||
if (!empty($extensions)) {
|
||||
if (is_array($extensions) && sizeof($extensions) != 0) {
|
||||
foreach ($extensions as $row) {
|
||||
$selected = !empty($extension_uuid) && $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
|
||||
$selected = $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
|
||||
echo " <option value='".urlencode($row["extension_uuid"])."' ".$selected.">".escape($row['extension'])." ".escape($row['description'])."</option>\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -670,39 +594,37 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ($recent_calls) {
|
||||
if ($result) {
|
||||
echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
|
||||
foreach (['inbound','outbound'] as $direction) {
|
||||
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all_".$direction."' name='checkbox_all' onclick=\"list_all_toggle('".$direction."');\" ".(empty($result) ? "style='visibility: hidden;'" : null).">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all_".$direction."' name='checkbox_all' onclick=\"list_all_toggle('".$direction."');\" ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
echo "<th style='width: 1%;'> </th>\n";
|
||||
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('caller_destination', $text['label-destination'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-destination'], $order_by, $order);
|
||||
echo th_order_by('start_stamp', $text['label-called'], $order_by, $order);
|
||||
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "class='right hide-sm-dn'");
|
||||
echo "</tr>";
|
||||
|
||||
if (!empty($recent_calls)) {
|
||||
foreach ($recent_calls as $x => $row) {
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => $row) {
|
||||
if ($row['direction'] == $direction) {
|
||||
$list_row_onclick_uncheck = "if (!this.checked) { document.getElementById('checkbox_all_".$direction."').checked = false; }";
|
||||
$list_row_onclick_toggle = "onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick_uncheck."\"";
|
||||
if (strlen($row['caller_id_number']) >= 7) {
|
||||
if (!empty($_SESSION['domain']['time_format']['text']) && $_SESSION['domain']['time_format']['text'] == '24h') {
|
||||
if ($_SESSION['domain']['time_format']['text'] == '24h') {
|
||||
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('H:i:s', $row['start_epoch']).'</span>';
|
||||
}
|
||||
else {
|
||||
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('h:i:s a', $row['start_epoch']).'</span>';
|
||||
}
|
||||
echo "<tr class='list-row row_".$row['direction']."' href=''>\n";
|
||||
echo "<tr class='list-row row_".$row['direction']."' href='".$list_row_url."'>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' class='checkbox_".$row['direction']."' name='xml_cdrs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"".$list_row_onclick_uncheck."\">\n";
|
||||
echo " <input type='hidden' name='xml_cdrs[$x][uuid]' value='".escape($row['xml_cdr_uuid'])."' />\n";
|
||||
|
|
@ -713,7 +635,6 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_failed.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_answered.png")
|
||||
) {
|
||||
$title_mod = null;
|
||||
echo " <td class='center' ".$list_row_onclick_toggle.">";
|
||||
switch ($row['direction']) {
|
||||
case "inbound":
|
||||
|
|
@ -755,8 +676,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
unset($result);
|
||||
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
|
@ -772,7 +692,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo " document.getElementById('list_' + direction_other).style.display='none';\n";
|
||||
|
||||
echo " //uncheck all checkboxes\n";
|
||||
echo " var checkboxes = document.querySelectorAll(\"input[type='checkbox']:not(#call_block_enabled)\")\n";
|
||||
echo " var checkboxes = document.querySelectorAll(\"input[type='checkbox']\")\n";
|
||||
echo " if (checkboxes.length > 0) {\n";
|
||||
echo " for (var i = 0; i < checkboxes.length; ++i) {\n";
|
||||
echo " checkboxes[i].checked = false;\n";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
/**
|
||||
* call block class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('call_block')) {
|
||||
class call_block {
|
||||
|
||||
/**
|
||||
|
|
@ -16,7 +19,6 @@
|
|||
private $uuid_prefix;
|
||||
private $toggle_field;
|
||||
private $toggle_values;
|
||||
private $database;
|
||||
|
||||
/**
|
||||
* declare public variables
|
||||
|
|
@ -31,9 +33,6 @@
|
|||
*/
|
||||
public function __construct() {
|
||||
|
||||
//initialize the database
|
||||
$this->database = new database;
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'call_block';
|
||||
$this->app_uuid = '9ed63276-e085-4897-839c-4f2e36d92d6c';
|
||||
|
|
@ -46,6 +45,16 @@
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
|
|
@ -69,7 +78,7 @@
|
|||
|
||||
//filter out unchecked, build where clause for below
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -77,15 +86,11 @@
|
|||
//get necessary call block details
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, call_block_number from v_".$this->table." ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " domain_uuid = :domain_uuid ";
|
||||
if (permission_exists('call_block_domain')) {
|
||||
$sql .= " or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$rows = $this->database->select($sql, $parameters, 'all');
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$call_block_numbers[$row['uuid']] = $row['call_block_number'];
|
||||
|
|
@ -98,9 +103,7 @@
|
|||
$x = 0;
|
||||
foreach ($call_block_numbers as $call_block_uuid => $call_block_number) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $call_block_uuid;
|
||||
if (!permission_exists('call_block_domain')) {
|
||||
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$x++;
|
||||
}
|
||||
|
||||
|
|
@ -108,9 +111,10 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//execute delete
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
$this->database->delete($array);
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//clear the cache
|
||||
|
|
@ -150,7 +154,7 @@
|
|||
|
||||
//get current toggle state
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -159,7 +163,8 @@
|
|||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$rows = $this->database->select($sql, $parameters, 'all');
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$states[$row['uuid']] = $row['toggle'];
|
||||
|
|
@ -181,9 +186,10 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//save the array
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
$this->database->save($array);
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//clear the cache
|
||||
|
|
@ -224,7 +230,7 @@
|
|||
|
||||
//get checked records
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -235,7 +241,8 @@
|
|||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$rows = $this->database->select($sql, $parameters, 'all');
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $x => $row) {
|
||||
|
||||
|
|
@ -255,9 +262,10 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//save the array
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
$this->database->save($array);
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//set message
|
||||
|
|
@ -293,73 +301,26 @@
|
|||
|
||||
//filter checked records
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
//get the caller id info from call detail records
|
||||
//get the caller id info from cdrs
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select caller_id_name, caller_id_number, caller_destination from v_xml_cdr ";
|
||||
$sql .= "where xml_cdr_uuid in (".implode(', ', $uuids).") ";
|
||||
$rows = $this->database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the caller id info from call detail records
|
||||
if (isset($_SESSION['domain_uuid']) && is_uuid($_SESSION['domain_uuid'])) {
|
||||
//get the destination country code
|
||||
$sql = "select distinct(destination_prefix), ";
|
||||
$sql .= "(select count(destination_prefix) from v_destinations where domain_uuid = :domain_uuid and destination_prefix = d.destination_prefix) as count ";
|
||||
$sql .= "from v_destinations as d ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and destination_prefix <> '' ";
|
||||
$sql .= "and destination_enabled = 'true' ";
|
||||
$sql .= "order by count desc limit 1; ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$destination_country_code = $this->database->select($sql, $parameters ?? null, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//use the the destination country code to set the country code
|
||||
if (!empty($destination_country_code)) {
|
||||
$destination_country_code = trim($destination_country_code, "+ ");
|
||||
$country_code = $destination_country_code;
|
||||
}
|
||||
}
|
||||
|
||||
//get the users that are assigned to the extension
|
||||
if (!permission_exists('call_block_extension')) {
|
||||
$sql = "select extension_uuid from v_extension_users ";
|
||||
$sql .= "where user_uuid = :user_uuid ";
|
||||
$parameters['user_uuid'] = $_SESSION['user_uuid'];
|
||||
$user_extensions = $this->database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the country code from default settings
|
||||
if (!empty($_SESSION['domain']['country_code']['numeric'])) {
|
||||
$country_code = $_SESSION['domain']['country_code']['numeric'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//loop through records
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $x => $row) {
|
||||
|
||||
//remove e.164 and country code
|
||||
if (substr($row["caller_id_number"],0,1) == "+") {
|
||||
//format e.164
|
||||
$call_block_number = str_replace("+".trim($country_code), "", trim($row["caller_id_number"]));
|
||||
}
|
||||
elseif (!empty($row["caller_id_number"])) {
|
||||
//remove the country code if its the first in the string
|
||||
$call_block_number = ltrim(trim($row["caller_id_number"]), $country_code ?? '');
|
||||
}
|
||||
else {
|
||||
$call_block_number = '';
|
||||
}
|
||||
|
||||
//build insert array
|
||||
if (permission_exists('call_block_extension')) {
|
||||
if (permission_exists('call_block_all')) {
|
||||
$array['call_block'][$x]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][$x]['call_block_direction'] = $this->call_block_direction;
|
||||
|
|
@ -367,8 +328,12 @@
|
|||
$array['call_block'][$x]['extension_uuid'] = $this->extension_uuid;
|
||||
}
|
||||
if ($this->call_block_direction == 'inbound') {
|
||||
$array['call_block'][$x]['call_block_name'] = '';
|
||||
$array['call_block'][$x]['call_block_country_code'] = trim($country_code ?? '');
|
||||
//remove e.164 and country code
|
||||
$call_block_number = str_replace("+".trim($_SESSION['domain']['country_code']['numeric']), "", trim($row["caller_id_number"]));
|
||||
|
||||
//build the array
|
||||
$array['call_block'][$x]['call_block_country_code'] = trim($_SESSION['domain']['country_code']['numeric']);
|
||||
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
|
||||
$array['call_block'][$x]['call_block_number'] = $call_block_number;
|
||||
$array['call_block'][$x]['call_block_description'] = trim($row["caller_id_name"]);
|
||||
}
|
||||
|
|
@ -383,16 +348,19 @@
|
|||
$x++;
|
||||
}
|
||||
else {
|
||||
if (is_array($user_extensions)) {
|
||||
foreach ($user_extensions as $field) {
|
||||
if (is_array($_SESSION['user']['extension'])) {
|
||||
foreach ($_SESSION['user']['extension'] as $field) {
|
||||
if (is_uuid($field['extension_uuid'])) {
|
||||
$array['call_block'][$x]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][$x]['call_block_direction'] = $this->call_block_direction;
|
||||
$array['call_block'][$x]['extension_uuid'] = $field['extension_uuid'];
|
||||
if ($this->call_block_direction == 'inbound') {
|
||||
$array['call_block'][$x]['call_block_name'] = '';
|
||||
$array['call_block'][$x]['call_block_country_code'] = trim($country_code ?? '');
|
||||
//remove e.164 and country code
|
||||
$call_block_number = str_replace("+".trim($_SESSION['domain']['country_code']['numeric']), "", trim($row["caller_id_number"]));
|
||||
|
||||
//build the array
|
||||
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
|
||||
$array['call_block'][$x]['call_block_number'] = $call_block_number;
|
||||
$array['call_block'][$x]['call_block_description'] = trim($row["caller_id_name"]);
|
||||
}
|
||||
|
|
@ -422,7 +390,8 @@
|
|||
$sql .= "and app_uuid = '".$this->app_uuid."' ";
|
||||
$sql .= "and dialplan_enabled <> 'true' ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$rows = $this->database->select($sql, $parameters);
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters);
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $x => $row) {
|
||||
$array['dialplans'][$x]['dialplan_uuid'] = $row['dialplan_uuid'];
|
||||
|
|
@ -432,14 +401,15 @@
|
|||
unset($rows, $parameters);
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_edit', 'temp');
|
||||
|
||||
//save the array
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
$this->database->save($array);
|
||||
$response = $this->database->message;
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
|
|
@ -456,3 +426,6 @@
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
//call block icon
|
||||
$array['dashboard'][$x]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
|
||||
$array['dashboard'][$x]['dashboard_name'] = 'Call Block';
|
||||
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon';
|
||||
$array['dashboard'][$x]['dashboard_icon'] = 'fa-ban';
|
||||
$array['dashboard'][$x]['dashboard_icon_color'] = '#EA4C46';
|
||||
$array['dashboard'][$x]['dashboard_url'] = '/app/call_block/call_block.php';
|
||||
$array['dashboard'][$x]['dashboard_target'] = 'self';
|
||||
$array['dashboard'][$x]['dashboard_width'] = '';
|
||||
$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'] = '#444444';
|
||||
$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_text_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
|
||||
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
|
||||
$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'] = '1';
|
||||
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled';
|
||||
$array['dashboard'][$x]['dashboard_order'] = '50';
|
||||
$array['dashboard'][$x]['dashboard_enabled'] = 'false';
|
||||
$array['dashboard'][$x]['dashboard_description'] = '';
|
||||
$y = 0;
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '7919f503-397c-4f98-a661-a60a738a1b1c';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin';
|
||||
$y++;
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '8f9f1b96-660b-469c-ab02-fbdf65f994f1';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin';
|
||||
$y++;
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '2f8cb6c2-c4cb-4602-af3e-713196c4965b';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
$apps[$x]['uuid'] = "efc11f6b-ed73-9955-4d4d-3a1bed75a056";
|
||||
$apps[$x]['category'] = "Switch";;
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "1.1";
|
||||
$apps[$x]['version'] = "1.0";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Schedule to immediately make multiple calls to the extension, an IVR Menu, Conference Room, or any other number.";
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "Programmation de campagnes d'appels vers des extensions, IVR, salles de conferences ou tout autre numéro.";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "დაგეგმეთ მრავალჯერადი ზარების განხორციელება შიდა ნომერთან, IVR მენიუ, საკონფერებციო ოთახი, ან ნებისმერი სხვა ნომერი";
|
||||
$apps[$x]['description']['nl-nl'] = "Methode om direct meerdere parallele oproepen naar toestellen, IVR menu, Conferentie, of een ander nummer te maken.";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "Programação para imediatamente realizar várias chamadas para uma extensão, um menu IVR, Sala de Conferência ou qualquer outro número.";
|
||||
|
|
@ -45,24 +44,10 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_send";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_start_time";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_accountcode";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_timeout";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
|
@ -79,7 +64,7 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_phone_numbers";
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_phone_number_list";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
|
@ -87,7 +72,18 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_toll_allow";
|
||||
$apps[$x]['permissions'][$y]['name'] = "broadcast_toll_allow";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_send";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
|
|
@ -96,6 +92,14 @@
|
|||
$apps[$x]['db'][$y]['table']['name'] = "v_call_broadcasts";
|
||||
$apps[$x]['db'][$y]['table']['parent'] = "";
|
||||
$z=0;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "call_broadcast_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "call_broadcast_uuid";
|
||||
//$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][0] = "call_call_broadcast_uuid";
|
||||
//$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][1] = "broadcast_uuid";
|
||||
|
|
@ -114,6 +118,11 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "broadcast_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
|
|
@ -182,27 +191,4 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,36 +3,29 @@
|
|||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "اتصل بالإذاعة";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Rundrufe";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Rundrufe";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Rundrufe";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Llamada Broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Téléphone";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Campagne d'Appels";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "שידור שיחה";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Chiamate Multiple";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ზარების მაუწყებლობა";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Omroep";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Rozsyłanie rozmów";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Chamada em broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Chamada em Broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Apel Broadcast";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Массовые вызовы";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Samtalsdistribution";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Трансляція дзвінка";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "电话广播";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールブロードキャスト";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 브로드캐스트";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "50153bbf-78c5-b49e-7bd9-4b3e4b1134e6";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_broadcast/call_broadcast.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_broadcast/call_broadcast.php";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -42,22 +43,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$search = $_GET["search"] ?? '';
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_broadcasts'])) {
|
||||
if (is_array($_POST['call_broadcasts'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$call_broadcasts = $_POST['call_broadcasts'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && is_array($call_broadcasts)) {
|
||||
if ($action != '' && is_array($call_broadcasts) && @sizeof($call_broadcasts) != 0) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('call_broadcast_add')) {
|
||||
|
|
@ -78,75 +72,53 @@
|
|||
}
|
||||
|
||||
//get the http get variables and set them to php variables
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
if (!empty($search)) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= " lower(broadcast_name) like :search ";
|
||||
$sql_search .= " or lower(broadcast_description) like :search ";
|
||||
$sql_search .= " or lower(broadcast_caller_id_name) like :search ";
|
||||
$sql_search .= " or lower(broadcast_caller_id_number) like :search ";
|
||||
$sql_search .= " or lower(broadcast_phone_numbers) like :search ";
|
||||
$sql_search .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
//get the count
|
||||
$sql = "select count(*) from v_call_broadcasts ";
|
||||
$sql .= "where true ";
|
||||
if ($show != "all" || !permission_exists('call_broadcast_all')) {
|
||||
if ($_GET['show'] != "all" || !permission_exists('call_broadcast_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and (";
|
||||
$sql .= " lower(broadcast_name) like :search ";
|
||||
$sql .= " or lower(broadcast_description) like :search ";
|
||||
$sql .= " or lower(broadcast_caller_id_name) like :search ";
|
||||
$sql .= " or lower(broadcast_caller_id_number) like :search ";
|
||||
$sql .= " or lower(broadcast_phone_numbers) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare the paging
|
||||
$param = '';
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
if (!empty($search)) {
|
||||
$param .= "&search=".urlencode($search);
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_broadcast_all')) {
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($_GET['show'] == "all" && permission_exists('call_broadcast_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param ?? null, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param ?? null, $rows_per_page, true);
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the call broadcasts
|
||||
$sql = "select call_broadcast_uuid, domain_uuid, broadcast_name, ";
|
||||
$sql .= "broadcast_description, broadcast_start_time, broadcast_timeout, ";
|
||||
$sql .= "broadcast_concurrent_limit, recording_uuid, broadcast_caller_id_name, ";
|
||||
$sql .= "broadcast_caller_id_number, broadcast_destination_type, broadcast_phone_numbers, ";
|
||||
$sql .= "broadcast_avmd, broadcast_destination_data, broadcast_accountcode, broadcast_toll_allow ";
|
||||
$sql .= "from v_call_broadcasts ";
|
||||
$sql .= "where true ";
|
||||
if ($show != "all" || !permission_exists('call_broadcast_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and (";
|
||||
$sql .= " lower(broadcast_name) like :search ";
|
||||
$sql .= " or lower(broadcast_description) like :search ";
|
||||
$sql .= " or lower(broadcast_caller_id_name) like :search ";
|
||||
$sql .= " or lower(broadcast_caller_id_number) like :search ";
|
||||
$sql .= " or lower(broadcast_phone_numbers) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'broadcast_name', 'asc');
|
||||
$sql = str_replace('count(*)','*', $sql);
|
||||
$sql .= order_by($order_by, $order);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -159,7 +131,7 @@
|
|||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_broadcast']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_broadcast']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('call_broadcast_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'call_broadcast_edit.php']);
|
||||
|
|
@ -172,11 +144,11 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_broadcast_all')) {
|
||||
if ($show == 'all') {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.(!empty($search) ? "&search=".urlencode($search ?? '') : null)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type).'&show=all'.($search != '' ? "&search=".urlencode($search) : null)]);
|
||||
}
|
||||
}
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
|
|
@ -204,35 +176,29 @@
|
|||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_broadcast_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_broadcast_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('broadcast_name', $text['label-name'], $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_description', $text['label-description'], $order_by, $order);
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_broadcast_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($result)) {
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
$x = 0;
|
||||
foreach($result as $row) {
|
||||
$list_row_url = '';
|
||||
if (permission_exists('call_broadcast_edit')) {
|
||||
$list_row_url = "call_broadcast_edit.php?id=".urlencode($row['call_broadcast_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) {
|
||||
|
|
@ -241,8 +207,8 @@
|
|||
echo " <input type='hidden' name='call_broadcasts[$x][uuid]' value='".escape($row['call_broadcast_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_broadcast_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_broadcast_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
|
|
@ -252,21 +218,15 @@
|
|||
}
|
||||
echo " <td>";
|
||||
if (permission_exists('call_broadcast_edit')) {
|
||||
echo "<a href='".$list_row_url."'>".escape($row['broadcast_name'] ?? '')."</a>";
|
||||
echo "<a href='".$list_row_url."'>".escape($row['broadcast_name'])."</a>";
|
||||
}
|
||||
else {
|
||||
echo escape($row['broadcast_name']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td>".escape($row['broadcast_concurrent_limit'])."</td>\n";
|
||||
//determine start date and time
|
||||
$broadcast_start_reference = !empty($row['update_date']) ?: !empty($row['insert_date']);
|
||||
if ($row['broadcast_start_time'] && $broadcast_start_reference) {
|
||||
$broadcast_start_time = date('Y-m-d H:i', strtotime($broadcast_start_reference) + $row['broadcast_start_time']);
|
||||
}
|
||||
echo " <td>".escape($broadcast_start_time ?? '')."</td>\n";
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</td>\n";
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_broadcast_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -278,7 +238,6 @@
|
|||
unset($result);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
|
|
@ -290,4 +249,3 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -43,7 +44,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set the action with add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$call_broadcast_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -51,18 +52,6 @@
|
|||
$action = "add";
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
$broadcast_name = '';
|
||||
$broadcast_start_time = '';
|
||||
$broadcast_timeout = '';
|
||||
$broadcast_concurrent_limit = '';
|
||||
$broadcast_caller_id_name = '';
|
||||
$broadcast_caller_id_number = '';
|
||||
$broadcast_accountcode = '';
|
||||
$broadcast_destination_data = '';
|
||||
$broadcast_description = '';
|
||||
$broadcast_toll_allow = '';
|
||||
|
||||
//function to Upload CSV/TXT file
|
||||
function upload_file($sql, $broadcast_phone_numbers) {
|
||||
$upload_csv = $sql = '';
|
||||
|
|
@ -80,7 +69,7 @@
|
|||
$separator = $getData[0];
|
||||
$separator .= (isset($getData[1]) && $getData[1] != '')? '|'.$getData[1] : '';
|
||||
$separator .= (isset($getData[2]) && $getData[2] != '')? ','.$getData[2] : '';
|
||||
$separator .= PHP_EOL;
|
||||
$separator .= '\n';
|
||||
$upload_csv .= $separator;
|
||||
}
|
||||
fclose($file);
|
||||
|
|
@ -102,14 +91,14 @@
|
|||
}
|
||||
|
||||
//get the http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
if (count($_POST)>0) {
|
||||
$broadcast_name = $_POST["broadcast_name"];
|
||||
$broadcast_start_time = $_POST["broadcast_start_time"];
|
||||
$broadcast_timeout = $_POST["broadcast_timeout"];
|
||||
$broadcast_concurrent_limit = $_POST["broadcast_concurrent_limit"];
|
||||
$broadcast_caller_id_name = $_POST["broadcast_caller_id_name"];
|
||||
$broadcast_caller_id_number = $_POST["broadcast_caller_id_number"];
|
||||
//$broadcast_destination_type = $_POST["broadcast_destination_type"];
|
||||
$broadcast_destination_type = $_POST["broadcast_destination_type"];
|
||||
$broadcast_phone_numbers = $_POST["broadcast_phone_numbers"];
|
||||
$broadcast_avmd = $_POST["broadcast_avmd"];
|
||||
$broadcast_destination_data = $_POST["broadcast_destination_data"];
|
||||
|
|
@ -136,11 +125,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//delete the call broadcast
|
||||
if (permission_exists('call_broadcast_delete')) {
|
||||
if (!empty($_POST['action']) && $_POST['action'] == 'delete' && is_uuid($call_broadcast_uuid)) {
|
||||
if ($_POST['action'] == 'delete' && is_uuid($call_broadcast_uuid)) {
|
||||
//prepare
|
||||
$call_broadcasts[0]['checked'] = 'true';
|
||||
$call_broadcasts[0]['uuid'] = $call_broadcast_uuid;
|
||||
|
|
@ -167,18 +156,18 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
|
||||
//check for all required data
|
||||
if (empty($broadcast_name)) { $msg .= "".$text['confirm-name']."<br>\n"; }
|
||||
//if (empty($broadcast_description)) { $msg .= "Please provide: Description<br>\n"; }
|
||||
//if (empty($broadcast_timeout)) { $msg .= "Please provide: Timeout<br>\n"; }
|
||||
//if (empty($broadcast_concurrent_limit)) { $msg .= "Please provide: Concurrent Limit<br>\n"; }
|
||||
//if (empty($recording_uuid)) { $msg .= "Please provide: Recording<br>\n"; }
|
||||
//if (empty($broadcast_caller_id_name)) { $msg .= "Please provide: Caller ID Name<br>\n"; }
|
||||
//if (empty($broadcast_caller_id_number)) { $msg .= "Please provide: Caller ID Number<br>\n"; }
|
||||
//if (empty($broadcast_destination_type)) { $msg .= "Please provide: Type<br>\n"; }
|
||||
//if (empty($broadcast_phone_numbers)) { $msg .= "Please provide: Phone Number List<br>\n"; }
|
||||
//if (empty($broadcast_avmd)) { $msg .= "Please provide: Voicemail Detection<br>\n"; }
|
||||
//if (empty($broadcast_destination_data)) { $msg .= "Please provide: Destination<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
if (strlen($broadcast_name) == 0) { $msg .= "".$text['confirm-name']."<br>\n"; }
|
||||
//if (strlen($broadcast_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
//if (strlen($broadcast_timeout) == 0) { $msg .= "Please provide: Timeout<br>\n"; }
|
||||
//if (strlen($broadcast_concurrent_limit) == 0) { $msg .= "Please provide: Concurrent Limit<br>\n"; }
|
||||
//if (strlen($recording_uuid) == 0) { $msg .= "Please provide: Recording<br>\n"; }
|
||||
//if (strlen($broadcast_caller_id_name) == 0) { $msg .= "Please provide: Caller ID Name<br>\n"; }
|
||||
//if (strlen($broadcast_caller_id_number) == 0) { $msg .= "Please provide: Caller ID Number<br>\n"; }
|
||||
//if (strlen($broadcast_destination_type) == 0) { $msg .= "Please provide: Type<br>\n"; }
|
||||
//if (strlen($broadcast_phone_numbers) == 0) { $msg .= "Please provide: Phone Number List<br>\n"; }
|
||||
//if (strlen($broadcast_avmd) == 0) { $msg .= "Please provide: Voicemail Detection<br>\n"; }
|
||||
//if (strlen($broadcast_destination_data) == 0) { $msg .= "Please provide: Destination<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -192,7 +181,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if (empty($_POST["persistformvar"])) {
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//prep insert
|
||||
if ($action == "add" && permission_exists('call_broadcast_add')) {
|
||||
|
|
@ -220,10 +209,10 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
|
||||
//execute
|
||||
if (!empty($array)) {
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//add file selection and download sample
|
||||
$file_res = upload_file($sql ?? '', $broadcast_phone_numbers);
|
||||
$file_res = upload_file($sql, $broadcast_phone_numbers);
|
||||
if ($file_res['code'] != true) {
|
||||
$_SESSION["message_mood"] = "negative";
|
||||
$_SESSION["message"] = $text['file-error'];
|
||||
|
|
@ -232,39 +221,21 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
$broadcast_phone_numbers = $file_res['sql'];
|
||||
|
||||
//build the database array
|
||||
//common array items
|
||||
$array['call_broadcasts'][0]['domain_uuid'] = $domain_uuid;
|
||||
$array['call_broadcasts'][0]['broadcast_name'] = $broadcast_name;
|
||||
if (permission_exists('call_broadcast_start_time')) {
|
||||
$array['call_broadcasts'][0]['broadcast_start_time'] = strtotime($broadcast_start_time) - strtotime('now') >= 0 ? strtotime($broadcast_start_time) - strtotime('now') : null;
|
||||
}
|
||||
if (permission_exists('call_broadcast_accountcode')) {
|
||||
$array['call_broadcasts'][0]['broadcast_accountcode'] = $broadcast_accountcode;
|
||||
}
|
||||
if (permission_exists('call_broadcast_timeout')) {
|
||||
$array['call_broadcasts'][0]['broadcast_timeout'] = strlen($broadcast_timeout) != 0 ? $broadcast_timeout : null;
|
||||
}
|
||||
if (permission_exists('call_broadcast_concurrent_limit')) {
|
||||
$array['call_broadcasts'][0]['broadcast_concurrent_limit'] = strlen($broadcast_concurrent_limit) != 0 ? $broadcast_concurrent_limit : null;
|
||||
}
|
||||
if (permission_exists("call_broadcast_caller_id")) {
|
||||
$array['call_broadcasts'][0]['broadcast_caller_id_name'] = $broadcast_caller_id_name;
|
||||
$array['call_broadcasts'][0]['broadcast_caller_id_number'] = $broadcast_caller_id_number;
|
||||
}
|
||||
if (permission_exists('call_broadcast_destination_number')) {
|
||||
$array['call_broadcasts'][0]['broadcast_destination_data'] = $broadcast_destination_data;
|
||||
}
|
||||
//$array['call_broadcasts'][0]['broadcast_destination_type'] = $broadcast_destination_type;
|
||||
if (permission_exists('call_broadcast_phone_numbers')) {
|
||||
$array['call_broadcasts'][0]['broadcast_phone_numbers'] = $broadcast_phone_numbers;
|
||||
}
|
||||
if (permission_exists('call_broadcast_voicemail_detection')) { //broadcast_avmd
|
||||
$array['call_broadcasts'][0]['broadcast_avmd'] = $broadcast_avmd;
|
||||
}
|
||||
if (permission_exists('call_broadcast_toll_allow')) {
|
||||
$array['call_broadcasts'][0]['broadcast_toll_allow'] = $broadcast_toll_allow;
|
||||
}
|
||||
$array['call_broadcasts'][0]['broadcast_start_time'] = $broadcast_start_time;
|
||||
$array['call_broadcasts'][0]['broadcast_timeout'] = strlen($broadcast_timeout) != 0 ? $broadcast_timeout : null;
|
||||
$array['call_broadcasts'][0]['broadcast_concurrent_limit'] = strlen($broadcast_concurrent_limit) != 0 ? $broadcast_concurrent_limit : null;
|
||||
$array['call_broadcasts'][0]['broadcast_caller_id_name'] = $broadcast_caller_id_name;
|
||||
$array['call_broadcasts'][0]['broadcast_caller_id_number'] = $broadcast_caller_id_number;
|
||||
$array['call_broadcasts'][0]['broadcast_destination_type'] = $broadcast_destination_type;
|
||||
$array['call_broadcasts'][0]['broadcast_phone_numbers'] = $broadcast_phone_numbers;
|
||||
$array['call_broadcasts'][0]['broadcast_avmd'] = $broadcast_avmd;
|
||||
$array['call_broadcasts'][0]['broadcast_destination_data'] = $broadcast_destination_data;
|
||||
$array['call_broadcasts'][0]['broadcast_accountcode'] = $broadcast_accountcode;
|
||||
$array['call_broadcasts'][0]['broadcast_description'] = $broadcast_description;
|
||||
$array['call_broadcasts'][0]['broadcast_toll_allow'] = $broadcast_toll_allow;
|
||||
|
||||
//execute
|
||||
$database = new database;
|
||||
|
|
@ -283,7 +254,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$call_broadcast_uuid = $_GET["id"];
|
||||
$sql = "select * from v_call_broadcasts ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
|
|
@ -292,29 +263,20 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$broadcast_name = $row["broadcast_name"];
|
||||
$broadcast_start_time = $row["broadcast_start_time"];
|
||||
$broadcast_timeout = $row["broadcast_timeout"];
|
||||
$broadcast_concurrent_limit = $row["broadcast_concurrent_limit"];
|
||||
$broadcast_caller_id_name = $row["broadcast_caller_id_name"];
|
||||
$broadcast_caller_id_number = $row["broadcast_caller_id_number"];
|
||||
//$broadcast_destination_type = $row["broadcast_destination_type"];
|
||||
$broadcast_destination_type = $row["broadcast_destination_type"];
|
||||
$broadcast_phone_numbers = $row["broadcast_phone_numbers"];
|
||||
$broadcast_avmd = $row["broadcast_avmd"];
|
||||
$broadcast_destination_data = $row["broadcast_destination_data"];
|
||||
$broadcast_accountcode = $row["broadcast_accountcode"];
|
||||
$broadcast_description = $row["broadcast_description"];
|
||||
$broadcast_toll_allow = $row["broadcast_toll_allow"];
|
||||
$insert_date = $row["insert_date"];
|
||||
$update_date = $row["update_date"];
|
||||
|
||||
//determine start date and time based on insert or update date and 'start time' delay (in seconds)
|
||||
$broadcast_start_reference = $update_date ?: $insert_date;
|
||||
if ($broadcast_start_time && $broadcast_start_reference) {
|
||||
$broadcast_start_time = date('Y-m-d H:i', strtotime($broadcast_start_reference) + $broadcast_start_time);
|
||||
}
|
||||
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
|
@ -350,7 +312,6 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -369,15 +330,15 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-start_time']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left' style='position: relative;'>\n";
|
||||
echo " <input class='formfld datetimepicker-future' type='text' id='broadcast_start_time' name='broadcast_start_time' value=\"".escape($broadcast_start_time)."\" data-toggle='datetimepicker' data-target='#broadcast_start_time' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='broadcast_start_time' value=\"".escape($broadcast_start_time)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-start_time']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('call_broadcast_accountcode')) {
|
||||
if (if_group("superadmin")){
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-accountcode']."\n";
|
||||
|
|
@ -403,7 +364,6 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('call_broadcast_concurrent_limit')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
|
|
@ -430,7 +390,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
//$parameters['domain_uuid'] = $domain_uuid;
|
||||
//$database = new database;
|
||||
//$rows = $database->select($sql, $parameters, 'all');
|
||||
//if (!empty($rows)) {
|
||||
//if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
// foreach ($rows as $row) {
|
||||
// if ($recording_uuid == $row['recording_uuid']) {
|
||||
// echo " <option value='".$row['recording_uuid']."' selected='yes'>".escape($row['recordingname'])."</option>\n";
|
||||
|
|
@ -471,8 +431,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Type\n";
|
||||
|
|
@ -498,7 +457,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "transfer (external number): 12081231234 XML default <br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
*/
|
||||
*/
|
||||
|
||||
if (permission_exists('call_broadcast_destination_number')) {
|
||||
echo "<tr>\n";
|
||||
|
|
@ -512,14 +471,14 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
if (permission_exists('call_broadcast_phone_numbers')) {
|
||||
if (permission_exists('call_broadcast_phone_number_list')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-phone']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
echo " <textarea class='formfld' style='width: 300px; height: 200px;' type='text' name='broadcast_phone_numbers' placeholder=\"".$text['label-list_example']."\">".str_replace('\n', "\n", $broadcast_phone_numbers ?? '')."</textarea>";
|
||||
echo " <textarea class='formfld' style='width: 300px; height: 200px;' type='text' name='broadcast_phone_numbers' placeholder=\"".$text['label-list_example']."\">".str_replace('\n', "\n", $broadcast_phone_numbers)."</textarea>";
|
||||
echo "<br><br>";
|
||||
echo " <input type='file' name='broadcast_phone_numbers_file' accept='.csv,.txt' style=\"display:inline-block;\"><a href='sample.csv' download><i class='fas fa-cloud-download-alt' style='margin-right: 5px;'></i>".$text['label-sample_file']."</a>";
|
||||
echo "<br /><br />";
|
||||
|
|
@ -535,15 +494,16 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='broadcast_avmd'>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".(!empty($broadcast_avmd) && $broadcast_avmd == "true" ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".(($broadcast_avmd == "false") ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".(($broadcast_avmd == "true") ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-avmd']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
if (permission_exists('call_broadcast_toll_allow')) {
|
||||
if (permission_exists('broadcast_toll_allow')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-broadcast_toll_allow']."\n";
|
||||
|
|
@ -555,7 +515,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-description']."\n";
|
||||
|
|
@ -568,7 +528,6 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>\n";
|
||||
echo "<br><br>";
|
||||
|
||||
if ($action == "update") {
|
||||
|
|
@ -578,6 +537,163 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||
|
||||
echo "</form>";
|
||||
|
||||
/*
|
||||
if ($action == "update") {
|
||||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td width='50%' nowrap><b>Call Broadcast</b></td>\n";
|
||||
echo "<td width='50%' align='right'> </td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "<form method='get' name='frm' action='call_broadcast_send.php'>\n";
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Category\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select name='user_category' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
$sql = "";
|
||||
$sql .= "select distinct user_category as user_category from v_users ";
|
||||
//$sql .= "where domain_uuid = :domain_uuid ";
|
||||
//$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, null, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
if ($user_category == $row['user_category']) {
|
||||
echo " <option value='".escape($row['user_category'])."' selected='yes'>".escape($row['user_category'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($row['user_category'])."'>".escape($row['user_category'])."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Group\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select name='group_name' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
$sql = "";
|
||||
$sql .= "select * from v_groups ";
|
||||
//$sql .= "where domain_uuid = :domain_uuid ";
|
||||
//$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, null, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
if ($recording_uuid == $row['group_name']) {
|
||||
echo " <option value='".escape($row['group_name'])."' selected='yes'>".escape($row['group_name'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($row['group_name'])."'>".escape($row['group_name'])."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Gateway\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select name='gateway' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
$sql = "";
|
||||
$sql .= "select * from v_gateways ";
|
||||
//$sql .= "where domain_uuid = :domain_uuid ";
|
||||
//$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, null, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
if ($gateway == $row['gateway']) {
|
||||
echo " <option value='".escape($row['gateway'])."' selected='yes'>".escape($row['gateway'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($row['gateway'])."'>".escape($row['gateway'])."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
echo " <option value='loopback'>loopback</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
//echo "zzz.<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Phone Type\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='phonetype1' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
echo " <option value='phone1'>phone1</option>\n";
|
||||
echo " <option value='phone2'>phone2</option>\n";
|
||||
echo " <option value='cell'>cell</option>\n";
|
||||
//echo " <option value='zzz'>cell</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Phone Type\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='phonetype2' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
echo " <option value='phone1'>phone1</option>\n";
|
||||
echo " <option value='phone2'>phone2</option>\n";
|
||||
echo " <option value='cell'>cell</option>\n";
|
||||
//echo " <option value='zzz'>cell</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
echo " <input type='hidden' name='call_broadcast_uuid' value='".escape($call_broadcast_uuid)."'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='Send Broadcast'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
}
|
||||
*/
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@
|
|||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//chec permissions
|
||||
|
|
@ -43,7 +44,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set the max execution time to 1 hour
|
||||
ini_set('max_execution_time',3600);
|
||||
ini_set(max_execution_time,3600);
|
||||
|
||||
//define the asynchronous command function
|
||||
function cmd_async($cmd) {
|
||||
|
|
@ -64,12 +65,12 @@
|
|||
}
|
||||
|
||||
//get the http get values and set as php variables
|
||||
$group_name = $_GET["group_name"] ?? '';
|
||||
$call_broadcast_uuid = $_GET["id"] ?? '';
|
||||
$user_category = $_GET["user_category"] ?? '';
|
||||
$gateway = $_GET["gateway"] ?? '';
|
||||
$phonetype1 = $_GET["phonetype1"] ?? '';
|
||||
$phonetype2 = $_GET["phonetype2"] ?? '';
|
||||
$group_name = $_GET["group_name"];
|
||||
$call_broadcast_uuid = $_GET["id"];
|
||||
$user_category = $_GET["user_category"];
|
||||
$gateway = $_GET["gateway"];
|
||||
$phonetype1 = $_GET["phonetype1"];
|
||||
$phonetype2 = $_GET["phonetype2"];
|
||||
|
||||
//get the call broadcast details from the database
|
||||
$sql = "select * from v_call_broadcasts ";
|
||||
|
|
@ -79,12 +80,12 @@
|
|||
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$broadcast_name = $row["broadcast_name"];
|
||||
$broadcast_start_time = $row["broadcast_start_time"];
|
||||
$broadcast_timeout = $row["broadcast_timeout"];
|
||||
$broadcast_concurrent_limit = $row["broadcast_concurrent_limit"];
|
||||
$recordingid = $row["recordingid"] ?? '';
|
||||
$recordingid = $row["recordingid"];
|
||||
$broadcast_caller_id_name = $row["broadcast_caller_id_name"];
|
||||
$broadcast_caller_id_number = $row["broadcast_caller_id_number"];
|
||||
$broadcast_destination_type = $row["broadcast_destination_type"];
|
||||
|
|
@ -93,7 +94,7 @@
|
|||
$broadcast_avmd = $row["broadcast_avmd"];
|
||||
$broadcast_accountcode = $row["broadcast_accountcode"];
|
||||
$broadcast_description = $row["broadcast_description"];
|
||||
//if (empty($row["broadcast_destination_data"])) {
|
||||
//if (strlen($row["broadcast_destination_data"]) == 0) {
|
||||
// $broadcast_destination_application = '';
|
||||
// $broadcast_destination_data = '';
|
||||
//}
|
||||
|
|
@ -106,13 +107,13 @@
|
|||
unset($sql, $parameters, $row);
|
||||
|
||||
//set the defaults
|
||||
if (empty($broadcast_caller_id_name)) {
|
||||
if (strlen($broadcast_caller_id_name) == 0) {
|
||||
$broadcast_caller_id_name = "anonymous";
|
||||
}
|
||||
if (empty($broadcast_caller_id_number)) {
|
||||
if (strlen($broadcast_caller_id_number) == 0) {
|
||||
$broadcast_caller_id_number = "0000000000";
|
||||
}
|
||||
if (empty($broadcast_accountcode)) {
|
||||
if (strlen($broadcast_accountcode) == 0) {
|
||||
$broadcast_accountcode = $_SESSION['domain_name'];;
|
||||
}
|
||||
if (isset($broadcast_start_time) && is_numeric($broadcast_start_time)) {
|
||||
|
|
@ -130,7 +131,7 @@
|
|||
$broadcast_name = str_replace("'", "", $broadcast_name);
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//get information over event socket
|
||||
if (!$fp) {
|
||||
|
|
@ -153,7 +154,7 @@
|
|||
require_once "resources/header.php";
|
||||
|
||||
//send the call broadcast
|
||||
if (!empty($broadcast_phone_numbers)) {
|
||||
if (strlen($broadcast_phone_numbers) > 0) {
|
||||
$broadcast_phone_number_array = explode ("\n", $broadcast_phone_numbers);
|
||||
$count = 1;
|
||||
foreach ($broadcast_phone_number_array as $tmp_value) {
|
||||
|
|
@ -196,17 +197,17 @@
|
|||
|
||||
//if the event socket connection is lost then re-connect
|
||||
if (!$fp) {
|
||||
$fp = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
}
|
||||
|
||||
//method 1
|
||||
$response = event_socket::command($cmd);
|
||||
$response = trim(event_socket_request($fp, 'api '.$cmd));
|
||||
|
||||
//method 2
|
||||
//cmd_async($_SESSION['switch']['bin']['dir']."/fs_cli -x \"".$cmd."\";");
|
||||
|
||||
//spread the calls out so that they are scheduled with different times
|
||||
if (strlen($broadcast_concurrent_limit) > 0 && !empty($broadcast_timeout)) {
|
||||
if (strlen($broadcast_concurrent_limit) > 0 && strlen($broadcast_timeout) > 0) {
|
||||
if ($broadcast_concurrent_limit == $count) {
|
||||
$sched_seconds = $sched_seconds + $broadcast_timeout;
|
||||
$count=0;
|
||||
|
|
@ -216,7 +217,8 @@
|
|||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='50%'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
|
|||
|
|
@ -23,9 +23,8 @@
|
|||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_broadcast_send')) {
|
||||
//access granted
|
||||
|
|
@ -45,10 +44,10 @@ else {
|
|||
if (is_uuid($uuid)) {
|
||||
//show the result
|
||||
if (count($_GET) > 0) {
|
||||
$fp = event_socket::create();
|
||||
if ($fp !== false) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$cmd = "sched_del ".$uuid;
|
||||
$result = event_socket::api($cmd);
|
||||
$result = event_socket_request($fp, 'api '.$cmd);
|
||||
message::add(htmlentities($result));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,11 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* call broadcast class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('call_broadcast')) {
|
||||
class call_broadcast {
|
||||
|
||||
/**
|
||||
|
|
@ -55,6 +33,16 @@
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
|
|
@ -78,7 +66,7 @@
|
|||
|
||||
//build the delete array
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -125,7 +113,7 @@
|
|||
|
||||
//get checked records
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -174,3 +162,6 @@
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "Affiche les appels actifs et les agents en queue sur le centre d'appel.";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "აჩვენებს აქტიურ ზარებს და აყენებს ქოლცენტრის რიგში";
|
||||
$apps[$x]['description']['nl-nl'] = "Laat actieve oproepen en agenten in het Call-Center wachtrij zien";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "Mostra as chamadas ativas, e os agentes na fila do Call Center.";
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,36 +3,29 @@
|
|||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Active Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Active Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "مركز الاتصال النشط";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Aktive Callcenter";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Active Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Aktive Callcenter";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Centro de Llamada Activo";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Active Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Centre d'Appels Active";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Centre d'Appel Actif";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "מרכז קריאה פעיל";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Call Center Attivi";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "აქტიური ქოლცენტრები";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Aktieve Callcenter";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Actieve Call-Center";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Aktywność w Call Center ";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Call Center ativos";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Centro de Chamadas Activo";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Centru de apeluri activ";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Активные Колл-центры";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Aktivt Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Центр активного виклику";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "主动呼叫中心";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "アクティブコールセンター";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "활성 콜 센터";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "7fb0dd87-e984-9980-c512-2c76b887aeb2";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_center_active/call_center_queue.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -43,7 +44,7 @@
|
|||
|
||||
//get the queue_name and set it as a variable
|
||||
$queue_name = $_GET['queue_name'];
|
||||
$name = $_GET['name'] ?? null;
|
||||
$name = $_GET['name'];
|
||||
|
||||
//get a new session array
|
||||
unset($_SESSION['queues']);
|
||||
|
|
@ -85,53 +86,36 @@
|
|||
|
||||
loadXmlHttp.prototype.stateChanged=function () {
|
||||
var url = new URL(this.xmlHttp.responseURL);
|
||||
|
||||
//logged out stop the refresh
|
||||
if (/login\.php$/.test(url.pathname)) {
|
||||
if (/login\.php$/.test(url.pathname)) {
|
||||
// You are logged out. Stop refresh!
|
||||
url.searchParams.set('path', '<?php echo $_SERVER['REQUEST_URI']; ?>');
|
||||
window.location.href = url.href;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href))) {
|
||||
if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
|
||||
//this.el.innerHTML = this.xmlHttp.responseText;
|
||||
document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
|
||||
}
|
||||
|
||||
//link table rows (except the last - the list_control_icons cell) on a table with a class of 'tr_hover', according to the href attribute of the <tr> tag
|
||||
$('.tr_hover tr,.list tr').each(function(i,e) {
|
||||
$(e).children('td:not(.list_control_icon,.list_control_icons,.tr_link_void,.list-row > .no-link,.list-row > .checkbox,.list-row > .button,.list-row > .action-button)').on('click', function() {
|
||||
var href = $(this).closest('tr').attr('href');
|
||||
var target = $(this).closest('tr').attr('target');
|
||||
if (href) {
|
||||
if (target) { window.open(href, target); }
|
||||
else { window.location = href; }
|
||||
}
|
||||
$('.tr_hover tr,.list tr').each(function(i,e) {
|
||||
$(e).children('td:not(.list_control_icon,.list_control_icons,.tr_link_void,.list-row > .no-link,.list-row > .checkbox,.list-row > .button,.list-row > .action-button)').on('click', function() {
|
||||
var href = $(this).closest('tr').attr('href');
|
||||
var target = $(this).closest('tr').attr('target');
|
||||
if (href) {
|
||||
if (target) { window.open(href, target); }
|
||||
else { window.location = href; }
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var requestTime = function() {
|
||||
var url = 'call_center_active_inc.php?queue_name=<?php echo escape($queue_name); ?>&name=<?php echo urlencode(escape($name)); ?>';
|
||||
new loadXmlHttp(url, 'ajax_response');
|
||||
<?php
|
||||
|
||||
//determine refresh rate
|
||||
$refresh_default = 1500; //milliseconds
|
||||
$refresh = is_numeric($_SESSION['call_center']['refresh']['numeric']) ? $_SESSION['call_center']['refresh']['numeric'] : $refresh_default;
|
||||
if ($refresh >= 0.5 && $refresh <= 120) { //convert seconds to milliseconds
|
||||
$refresh = $refresh * 1000;
|
||||
}
|
||||
else if ($refresh < 0.5 || ($refresh > 120 && $refresh < 500)) {
|
||||
$refresh = $refresh_default; //use default
|
||||
}
|
||||
else {
|
||||
//>= 500, must be milliseconds
|
||||
}
|
||||
|
||||
//set the value for the refresh
|
||||
echo "setInterval(function(){new loadXmlHttp(url, 'ajax_reponse');}, ".$refresh.");";
|
||||
|
||||
if (strlen($_SESSION["ajax_refresh_rate"]) == 0) { $_SESSION["ajax_refresh_rate"] = "1777"; }
|
||||
echo "setInterval(function(){new loadXmlHttp(url, 'ajax_reponse');}, ".$_SESSION["ajax_refresh_rate"].");";
|
||||
?>
|
||||
}
|
||||
|
||||
|
|
@ -165,4 +149,4 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2021
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
James Rose <james.o.rose@gmail.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -38,9 +39,6 @@
|
|||
exit;
|
||||
}
|
||||
|
||||
//initialize the database object
|
||||
$database = new database;
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
|
@ -49,11 +47,12 @@
|
|||
$queue_uuid = $_GET['queue_name'];
|
||||
|
||||
//get the queues from the database
|
||||
if (empty($_SESSION['queues']) || !is_array($_SESSION['queues'])) {
|
||||
if (!is_array($_SESSION['queues'])) {
|
||||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by queue_name asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$_SESSION['queues'] = $database->select($sql, $parameters, 'all');
|
||||
}
|
||||
|
||||
|
|
@ -92,10 +91,10 @@
|
|||
}
|
||||
|
||||
//create an event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//get the call center queue, agent and tiers list
|
||||
if (!$esl->is_connected()) {
|
||||
if (!$fp) {
|
||||
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='40%'>\n";
|
||||
|
|
@ -119,7 +118,7 @@
|
|||
//send the event socket command and get the response
|
||||
//callcenter_config queue list tiers [queue_name] |
|
||||
$switch_command = 'callcenter_config queue list tiers '.$queue_extension."@".$_SESSION["domain_name"];
|
||||
$event_socket_str = trim(event_socket::api($switch_command));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_command));
|
||||
$result = str_to_named_array($event_socket_str, '|');
|
||||
|
||||
//prepare the result for array_multisort
|
||||
|
|
@ -141,28 +140,27 @@
|
|||
//send the event socket command and get the response
|
||||
//callcenter_config queue list agents [queue_name] [status] |
|
||||
$switch_command = 'callcenter_config queue list agents '.$queue_extension."@".$_SESSION["domain_name"];
|
||||
$event_socket_str = trim(event_socket::api($switch_command));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_command));
|
||||
$agent_result = str_to_named_array($event_socket_str, '|');
|
||||
|
||||
//get the agents from the database
|
||||
if (empty($_SESSION['agents']) || !is_array($_SESSION['agents'])) {
|
||||
if (!is_array($_SESSION['agents'])) {
|
||||
$sql = "select * from v_call_center_agents ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by agent_name asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$_SESSION['agents'] = $database->select($sql, $parameters, 'all');
|
||||
}
|
||||
|
||||
//list the agents
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo "<th>".$text['label-name']."</th>\n";
|
||||
echo "<th>".$text['label-extension']."</th>\n";
|
||||
echo "<th title=\"".$text['description-status']."\">".$text['label-status']."</th>\n";
|
||||
echo "<th title=\"".$text['description-state']."\">".$text['label-state']."</th>\n";
|
||||
echo "<th>".$text['label-status']."</th>\n";
|
||||
echo "<th>".$text['label-state']."</th>\n";
|
||||
echo "<th>".$text['label-status_change']."</th>\n";
|
||||
echo "<th>".$text['label-last_bridge_end']."</th>\n";
|
||||
echo "<th class='center'>".$text['label-missed']."</th>\n";
|
||||
echo "<th class='center'>".$text['label-answered']."</th>\n";
|
||||
echo "<th>".$text['label-tier_state']."</th>\n";
|
||||
|
|
@ -221,18 +219,13 @@
|
|||
$talk_time = $agent_row['talk_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
|
||||
$last_status_change_length_formatted = format_seconds($last_status_change_length);
|
||||
$last_bridge_end_length_formatted = format_seconds($last_bridge_end_length);
|
||||
$last_status_change_seconds = time() - $last_status_change;
|
||||
$last_status_change_length_hour = floor($last_status_change_seconds/3600);
|
||||
$last_status_change_length_min = floor($last_status_change_seconds/60 - ($last_status_change_length_hour * 60));
|
||||
$last_status_change_length_sec = $last_status_change_seconds - (($last_status_change_length_hour * 3600) + ($last_status_change_length_min * 60));
|
||||
$last_status_change_length_min = sprintf("%02d", $last_status_change_length_min);
|
||||
$last_status_change_length_sec = sprintf("%02d", $last_status_change_length_sec);
|
||||
$last_status_change_length = $last_status_change_length_hour.':'.$last_status_change_length_min.':'.$last_status_change_length_sec;
|
||||
|
||||
if (permission_exists('call_center_agent_edit')) {
|
||||
$list_row_url = "../call_centers/call_center_agent_edit.php?id=".$agent_uuid;
|
||||
|
|
@ -250,8 +243,7 @@
|
|||
echo "<td>".escape($agent_extension)."</td>\n";
|
||||
echo "<td>".escape($status)."</td>\n";
|
||||
echo "<td>".escape($state)."</td>\n";
|
||||
echo "<td>".escape($last_status_change_length_formatted)."</td>\n";
|
||||
echo "<td>".escape($last_bridge_end_length_formatted)."</td>\n";
|
||||
echo "<td>".escape($last_status_change_length)."</td>\n";
|
||||
echo "<td class='center'>".escape($no_answer_count)."</td>\n";
|
||||
echo "<td class='center'>".escape($calls_answered)."</td>\n";
|
||||
echo "<td>".escape($tier_state)."</td>\n";
|
||||
|
|
@ -269,7 +261,7 @@
|
|||
}
|
||||
else {
|
||||
//$orig_call="{origination_caller_id_name=c2c-".urlencode(escape($name)).",origination_caller_id_number=".escape($agent_extension)."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26bridge(user/".escape($agent_extension)."@".$_SESSION['domain_name'].")";
|
||||
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-call'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=bridge&extension=".urlencode($agent_extension)."&caller_id_name=".urlencode($name ?? '')."'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-call'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=bridge&extension=".urlencode($agent_extension)."&caller_id_name=".urlencode($name)."'); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
echo "</td>";
|
||||
}
|
||||
|
|
@ -280,7 +272,6 @@
|
|||
} //foreach
|
||||
} //if
|
||||
echo "</table>\n\n";
|
||||
echo "</div>\n";
|
||||
|
||||
//add vertical spacing
|
||||
echo "<br /><br /><br />";
|
||||
|
|
@ -290,7 +281,7 @@
|
|||
//callcenter_config queue list members [queue_name]
|
||||
if (is_uuid($queue_uuid)) {
|
||||
$switch_command = 'callcenter_config queue list members '.$queue_extension."@".$_SESSION["domain_name"];
|
||||
$event_socket_str = trim(event_socket::api($switch_command));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_command));
|
||||
$result = str_to_named_array($event_socket_str, '|');
|
||||
if (!is_array($result)) { unset($result); }
|
||||
}
|
||||
|
|
@ -321,7 +312,6 @@
|
|||
echo $text['description-queue']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo "<th>".$text['label-time']."</th>\n";
|
||||
|
|
@ -329,7 +319,7 @@
|
|||
echo "<th>".$text['label-name']."</th>\n";
|
||||
echo "<th>".$text['label-number']."</th>\n";
|
||||
echo "<th>".$text['label-status']."</th>\n";
|
||||
if (permission_exists('call_center_active_options')) {
|
||||
if ((if_group("admin") || if_group("superadmin"))) {
|
||||
echo "<th>".$text['label-options']."</th>\n";
|
||||
}
|
||||
echo "<th>".$text['label-agent']."</th>\n";
|
||||
|
|
@ -338,7 +328,7 @@
|
|||
if (is_array($result)) {
|
||||
foreach ($result as $row) {
|
||||
$queue = $row['queue'];
|
||||
$system = $row['system'] ?? null;
|
||||
$system = $row['system'];
|
||||
$uuid = $row['uuid'];
|
||||
$session_uuid = $row['session_uuid'];
|
||||
$caller_number = $row['cid_number'];
|
||||
|
|
@ -377,12 +367,11 @@
|
|||
echo "<td>".escape($caller_name)." </td>\n";
|
||||
echo "<td>".escape($caller_number)." </td>\n";
|
||||
echo "<td>".escape($state)."</td>\n";
|
||||
if (permission_exists('call_center_active_options')) {
|
||||
if (if_group("admin") || if_group("superadmin")) {
|
||||
echo "<td>";
|
||||
if ($state != "Abandoned") {
|
||||
$orig_command = "{origination_caller_id_name=eavesdrop,origination_caller_id_number=".escape($q_caller_number ?? '')."}user/".escape($_SESSION['user']['extension'][0]['user'] ?? '')."@".escape($_SESSION['domain_name'])." %26eavesdrop(".escape($session_uuid).")";
|
||||
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".escape($q_caller_number)."}user/".escape($_SESSION['user']['extension'][0]['user'])."@".escape($_SESSION['domain_name'])." %26eavesdrop(".escape($session_uuid).")";
|
||||
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-eavesdrop'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=eavesdrop&caller_id_number=".urlencode($caller_number)."&uuid=".urlencode($session_uuid)."'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-transfer'],'style'=>'margin-left: 15px;','onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=uuid_pickup&uuid=".urlencode($session_uuid)."'); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
else {
|
||||
echo " ";
|
||||
|
|
@ -394,7 +383,6 @@
|
|||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,13 @@
|
|||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('call_center_active_options')) {
|
||||
if (permission_exists('call_center_active_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
|
|
@ -77,9 +78,6 @@
|
|||
case "uuid_transfer":
|
||||
$switch_command = "uuid_transfer ".$uuid." -bleg ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
|
||||
break;
|
||||
case "uuid_pickup":
|
||||
$switch_command = "uuid_transfer ".$uuid." ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
|
||||
break;
|
||||
case "bridge":
|
||||
$switch_command = "originate {origination_caller_id_name=".$caller_id_name.",origination_caller_id_number=".$caller_id_number."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." bridge(user/".$extension."@".$_SESSION['domain_name'].")";
|
||||
break;
|
||||
|
|
@ -90,7 +88,8 @@
|
|||
|
||||
//run the command
|
||||
if (isset($switch_command)) {
|
||||
$response = event_socket::api($switch_command);
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$response = event_socket_request($fp, 'api '.$switch_command);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -131,16 +130,16 @@
|
|||
}
|
||||
|
||||
//fs cmd
|
||||
if (!empty($switch_cmd)) {
|
||||
if (strlen($switch_cmd) > 0) {
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
//ensure the connection exists
|
||||
if ($esl) {
|
||||
if ($fp) {
|
||||
//send the command
|
||||
$switch_result = event_socket::api($switch_cmd);
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
//set the user state
|
||||
$cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting";
|
||||
$response = event_socket::command($cmd);
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,14 +17,15 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -42,12 +43,12 @@
|
|||
$text = $language->get();
|
||||
|
||||
//get the variables
|
||||
$order_by = $_GET["order_by"] ?? null;
|
||||
$order = $_GET["order"] ?? null;
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(queue_name) like :search ";
|
||||
$sql_search .= "or lower(queue_description) like :search ";
|
||||
|
|
@ -68,7 +69,7 @@
|
|||
//paging the records
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".$search;
|
||||
$page = !empty($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
|
@ -87,7 +88,7 @@
|
|||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-active_call_center']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-active_call_center']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
|
|
@ -104,7 +105,6 @@
|
|||
echo $text['description-active_call_center']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order);
|
||||
|
|
@ -128,9 +128,6 @@
|
|||
$x = 0;
|
||||
foreach($call_center_queues as $row) {
|
||||
$list_row_url = PROJECT_PATH."/app/call_center_active/call_center_active.php?queue_name=".escape($row['call_center_queue_uuid'])."&name=".urlencode(escape($row['queue_name']));
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
echo " <td><a href='".$list_row_url."'>".escape($row['queue_name'])."</a></td>\n";
|
||||
echo " <td>".escape($row['queue_extension'])."</td>\n";
|
||||
|
|
@ -154,12 +151,10 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -21,7 +21,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "Files d'attente d'appels entrants distribu%uFFFDs aux agents disponibles.";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "რიგები შემომავალი ზარების სამართავად და ამ ზარების ხელმისაწვდომ აგენტებთან გადასამისამართებლად.";
|
||||
$apps[$x]['description']['nl-nl'] = "Wachtrijen voor beheer van inkomede gesprekken en routering naar beschikbare agenten.";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "As filas servem para gerenciar as chamadas que entram e encaminhar as mesmas para os agentes disponíveis.";
|
||||
|
|
@ -36,15 +35,13 @@
|
|||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "call_centers";
|
||||
$apps[$x]['destinations'][$y]['name'] = "call_centers";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select call_center_queue_uuid, call_center_queue_uuid as uuid, queue_name as name, queue_extension as destination, ";
|
||||
$apps[$x]['destinations'][$y]['sql'] .= "queue_extension as extension, queue_context as context, queue_description as description from v_call_center_queues ";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select queue_name as name, queue_extension as destination, queue_extension as extension, queue_description as description from v_call_center_queues";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(queue_extension) asc";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "queue_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "queue_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "extension";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "description";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "context";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "queue_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "queue_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "queue_description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name} \${description}";
|
||||
|
|
@ -69,9 +66,6 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_center_queue_context";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_center_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
|
@ -150,9 +144,6 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_center_email_address";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
|
|
@ -187,46 +178,6 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "user";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: user (default)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b8f8a95c-0167-4768-8aab-c386f64bdd06";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "refresh";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1500";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the refresh rate in seconds (<=120) or milliseconds (>=500).";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ca34cbc0-e071-432e-afd6-b587aa52bd85";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "queue_login";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "static";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Agent queue login options: dynamic, static";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1bdf7b53-356f-4a81-85de-eeed4d26b7c5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "export_vars";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "hold_music";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Pass through hold_music variable.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f7ecaf4b-8228-4f15-9df1-c694a8259aab";
|
||||
$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_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_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}";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4c939d81-7192-4d9a-b7c4-76695a005d4f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "extension_range";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "400-499";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the suggested extension range(s) for call center queues";
|
||||
|
||||
//cache details
|
||||
$apps[$x]['cache']['key'] = "dialplan.\${domain_name}";
|
||||
|
|
@ -329,30 +280,6 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "agent_record";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y++;
|
||||
$apps[$x]['db'][$y]['table']['name'] = "v_call_center_queues";
|
||||
|
|
@ -497,48 +424,23 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_email_address";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_context";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y++;
|
||||
$apps[$x]['db'][$y]['table']['name'] = "v_call_center_tiers";
|
||||
$apps[$x]['db'][$y]['table']['parent'] = "";
|
||||
$z=0;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "call_center_tier_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_center_tier_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
|
|
@ -574,6 +476,11 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "call_center_agent_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "agent_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
|
@ -589,29 +496,5 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "tier_position";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2018 - 2022
|
||||
Portions created by the Initial Developer are Copyright (C) 2018 - 2021
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -26,16 +26,6 @@
|
|||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//add the domain_name as the context
|
||||
$sql = "UPDATE v_call_center_queues as c ";
|
||||
$sql .= "SET queue_context = ( ";
|
||||
$sql .= " SELECT domain_name FROM v_domains as d ";
|
||||
$sql .= " WHERE d.domain_uuid = c.domain_uuid ";
|
||||
$sql .= ") ";
|
||||
$sql .= "WHERE queue_context is null; ";
|
||||
$database->execute($sql);
|
||||
unset($sql);
|
||||
|
||||
//list the missing call center queue and agent uuids
|
||||
$sql = "select t.call_center_tier_uuid, t.call_center_queue_uuid, t.call_center_agent_uuid, t.queue_name, t.agent_name, d.domain_name, ";
|
||||
$sql .= "(select call_center_queue_uuid from v_call_center_queues where replace(queue_name, ' ', '-') = t.queue_name and domain_uuid = t.domain_uuid) as queue_uuid, ";
|
||||
|
|
@ -43,24 +33,26 @@ if ($domains_processed == 1) {
|
|||
$sql .= "from v_call_center_tiers as t, v_domains as d ";
|
||||
$sql .= "where t.domain_uuid = d.domain_uuid ";
|
||||
$sql .= "and (t.call_center_queue_uuid is null or t.call_center_agent_uuid is null) ";
|
||||
$database = new database;
|
||||
$tiers = $database->select($sql, null, 'all');
|
||||
if (!empty($tiers)) {
|
||||
foreach ($tiers as $index => $row) {
|
||||
if (is_array($tiers) && @sizeof($tiers) != 0) {
|
||||
foreach ($tiers as $index => &$row) {
|
||||
if ($row['call_center_queue_uuid'] == null && $row['queue_uuid'] != null) {
|
||||
$array['call_center_tiers'][$index]['call_center_queue_uuid'] = $row['queue_uuid'];
|
||||
}
|
||||
if ($row['call_center_agent_uuid'] == null && $row['agent_uuid'] != null) {
|
||||
$array['call_center_tiers'][$index]['call_center_agent_uuid'] = $row['agent_uuid'];
|
||||
}
|
||||
if (!empty($array['call_center_tiers'][$index])) {
|
||||
if (is_array($array['call_center_tiers'][$index]) && @sizeof($array['call_center_tiers'][$index]) != 0) {
|
||||
$array['call_center_tiers'][$index]['call_center_tier_uuid'] = $row['call_center_tier_uuid'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($array)) {
|
||||
$p = permissions::new();
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
$p = new permissions;
|
||||
$p->add('call_center_tier_edit', 'temp');
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'call_centers';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$database->save($array, false);
|
||||
|
|
@ -73,28 +65,27 @@ if ($domains_processed == 1) {
|
|||
unset($sql);
|
||||
|
||||
//update all callcenter dialplans to have the @domain in the queue name
|
||||
/*
|
||||
$sql = "select q.domain_uuid, d.domain_name, q.call_center_queue_uuid, q.dialplan_uuid, dp.dialplan_xml, ";
|
||||
$sql = "select q.domain_uuid, d.domain_name, q.call_center_queue_uuid, q.dialplan_uuid, ";
|
||||
$sql .= "q.queue_name, q.queue_extension, q.queue_timeout_action, q.queue_cid_prefix, q.queue_cc_exit_keys, ";
|
||||
$sql .= "q.queue_description, q.queue_time_base_score_sec, q.queue_greeting ";
|
||||
$sql .= "from v_call_center_queues as q, v_dialplans as dp, v_domains as d ";
|
||||
$sql .= "from v_call_center_queues as q, v_domains as d ";
|
||||
$sql .= "where q.domain_uuid = d.domain_uuid ";
|
||||
$sql .= "and (q.dialplan_uuid = dp.dialplan_uuid or q.dialplan_uuid is null) ";
|
||||
$database = new database;
|
||||
$call_center_queues = $database->select($sql, null, 'all');
|
||||
$id = 0;
|
||||
if (!empty($call_center_queues)) {
|
||||
if (is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $row) {
|
||||
|
||||
//get the application and data
|
||||
$action_array = explode(":",$row['queue_timeout_action'] ?? '');
|
||||
$action_array = explode(":",$row['queue_timeout_action']);
|
||||
$queue_timeout_app = $action_array[0];
|
||||
unset($action_array[0]);
|
||||
$queue_timeout_data = implode($action_array);
|
||||
|
||||
//add the recording path if needed
|
||||
if ($row['queue_greeting'] != '') {
|
||||
if (file_exists($settings->get('switch','recordings').'/'.$row['domain_name'].'/'.$row['queue_greeting'])) {
|
||||
$queue_greeting_path = $settings->get('switch','recordings').'/'.$row['domain_name'].'/'.$row['queue_greeting'];
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$row['domain_name'].'/'.$row['queue_greeting'])) {
|
||||
$queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row['queue_greeting'];
|
||||
}
|
||||
else {
|
||||
$queue_greeting_path = trim($row['queue_greeting']);
|
||||
|
|
@ -102,61 +93,59 @@ if ($domains_processed == 1) {
|
|||
}
|
||||
|
||||
//build the xml dialplan
|
||||
$dialplan_xml = "<extension name=\"".xml::sanitize($row["queue_name"])."\" continue=\"\" uuid=\"".xml::sanitize($row["dialplan_uuid"])."\">\n";
|
||||
$dialplan_xml = "<extension name=\"".$row["queue_name"]."\" continue=\"\" uuid=\"".$row["dialplan_uuid"]."\">\n";
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^([^#]+#)(.*)\$\" break=\"never\">\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"caller_id_name=\$2\"/>\n";
|
||||
$dialplan_xml .= " </condition>\n";
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^(callcenter\+)?".xml::sanitize($row["queue_extension"])."$\">\n";
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$row["queue_extension"]."$\">\n";
|
||||
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
||||
if (!empty($row['call_center_queue_uuid']) && is_uuid($row['call_center_queue_uuid'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".xml::sanitize($row['call_center_queue_uuid'])."\"/>\n";
|
||||
if (is_uuid($row['call_center_queue_uuid'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".$row['call_center_queue_uuid']."\"/>\n";
|
||||
}
|
||||
if (is_numeric($row['queue_extension'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".xml::sanitize($row['queue_extension'])."\"/>\n";
|
||||
if (is_numeric($queue_extension)) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$row['queue_extension']."\"/>\n";
|
||||
}
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=\${cc_export_vars},call_center_queue_uuid,sip_h_Alert-Info\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=call_center_queue_uuid\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
|
||||
if ($row['queue_time_base_score_sec'] != '') {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".xml::sanitize($row['queue_time_base_score_sec'])."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$row['queue_time_base_score_sec']."\"/>\n";
|
||||
}
|
||||
if (!empty($row['queue_greeting'])) {
|
||||
$greeting_array = explode(':', $row['queue_greeting']);
|
||||
if ($row['queue_greeting_path'] != '') {
|
||||
$greeting_array = explode(':', $row['queue_greeting_path']);
|
||||
if (count($greeting_array) == 1) {
|
||||
$dialplan_xml .= " <action application=\"playback\" data=\"".xml::sanitize($queue_greeting_path)."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"playback\" data=\"".$row['queue_greeting_path']."\"/>\n";
|
||||
}
|
||||
else {
|
||||
if ($greeting_array[0] == 'say' || $greeting_array[0] == 'tone_stream' || $greeting_array[0] == 'phrase') {
|
||||
$dialplan_xml .= " <action application=\"".xml::sanitize($greeting_array[0])."\" data=\"".xml::sanitize($greeting_array[1])."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"".$greeting_array[0]."\" data=\"".$greeting_array[1]."\"/>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($row['queue_cid_prefix'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".xml::sanitize($row['queue_cid_prefix'])."#\${caller_id_name}\"/>\n";
|
||||
if (strlen($row['queue_cid_prefix']) > 0) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".$row['queue_cid_prefix']."#\${caller_id_name}\"/>\n";
|
||||
}
|
||||
if (!empty($row['queue_cc_exit_keys'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($row['queue_cc_exit_keys'])."\"/>\n";
|
||||
if (strlen($row['queue_cc_exit_keys']) > 0) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".$row['queue_cc_exit_keys']."\"/>\n";
|
||||
}
|
||||
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($row['queue_extension'])."@".xml::sanitize($row['domain_name'])."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"callcenter\" data=\"".$row['queue_extension']."@".$row['domain_name']."\"/>\n";
|
||||
//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=\"".$queue_timeout_app."\" data=\"".$queue_timeout_data."\"/>\n";
|
||||
//}
|
||||
$dialplan_xml .= " </condition>\n";
|
||||
$dialplan_xml .= "</extension>";
|
||||
$dialplan_xml .= "</extension>\n";
|
||||
|
||||
//build the dialplan array
|
||||
if (md5($row["dialplan_xml"]) != md5($dialplan_xml)) {
|
||||
$array['dialplans'][$id]["domain_uuid"] = $row["domain_uuid"];
|
||||
$array['dialplans'][$id]["dialplan_uuid"] = $row["dialplan_uuid"];
|
||||
$array['dialplans'][$id]["dialplan_name"] = $row["queue_name"];
|
||||
$array['dialplans'][$id]["dialplan_number"] = $row["queue_extension"];
|
||||
$array['dialplans'][$id]["dialplan_context"] = $row['domain_name'];
|
||||
$array['dialplans'][$id]["dialplan_continue"] = "false";
|
||||
$array['dialplans'][$id]["dialplan_xml"] = $dialplan_xml;
|
||||
$array['dialplans'][$id]["dialplan_order"] = "230";
|
||||
$array['dialplans'][$id]["dialplan_enabled"] = "true";
|
||||
$array['dialplans'][$id]["dialplan_description"] = $row["queue_description"];
|
||||
$array['dialplans'][$id]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
|
||||
}
|
||||
$array['dialplans'][$id]["domain_uuid"] = $row["domain_uuid"];
|
||||
$array['dialplans'][$id]["dialplan_uuid"] = $row["dialplan_uuid"];
|
||||
$array['dialplans'][$id]["dialplan_name"] = $row["queue_name"];
|
||||
$array['dialplans'][$id]["dialplan_number"] = $row["queue_extension"];
|
||||
$array['dialplans'][$id]["dialplan_context"] = $row['domain_name'];
|
||||
$array['dialplans'][$id]["dialplan_continue"] = "false";
|
||||
$array['dialplans'][$id]["dialplan_xml"] = $dialplan_xml;
|
||||
$array['dialplans'][$id]["dialplan_order"] = "230";
|
||||
$array['dialplans'][$id]["dialplan_enabled"] = "true";
|
||||
$array['dialplans'][$id]["dialplan_description"] = $row["queue_description"];
|
||||
$array['dialplans'][$id]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
|
||||
|
||||
//increment the array id
|
||||
$id++;
|
||||
|
|
@ -165,14 +154,15 @@ if ($domains_processed == 1) {
|
|||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//save the array to the database
|
||||
if (!empty($array)) {
|
||||
//save the array to the database
|
||||
if (is_array($array)) {
|
||||
//add the dialplan permission
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add("dialplan_add", "temp");
|
||||
$p->add("dialplan_edit", "temp");
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'call_centers';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$database->save($array, false);
|
||||
|
|
@ -182,7 +172,6 @@ if ($domains_processed == 1) {
|
|||
$p->delete("dialplan_add", "temp");
|
||||
$p->delete("dialplan_edit", "temp");
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,69 +3,56 @@
|
|||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Centers";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Centers";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "مراكز الاتصال";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Call-Center";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Call-Center";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Call-Center";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Callcenter";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Callcenter";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Centro de Llamadas";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Centers";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Centre d' appels";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Centre d'appel";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "מוקדים טלפוניים";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Stato Agenti";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ქოლცენტრი";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Telefooncentrales";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Centra telefoniczne ";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Centros de chamada";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Call-Centers";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Call Center ";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Centro de Chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Centre de apeluri";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Колл-центр";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Call Center";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Кол-центр";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "呼叫中心";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールセンター";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "콜센터";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "6c072b29-5b6c-49fc-008e-95e24c77de99";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_centers/call_center_queues.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Agent Status";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Agent Status";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "الوكيل";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Agenten Status";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Status";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Agenten Status";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Estado de Agente";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Agente Status";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Agent Status";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "État de l'agent";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "מצב הסוכן";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Stato dell'agente";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "აგენტის სტატუსი";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Agent status";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Status agenta";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Estado do agente";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Estado do Agente";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Statutul agentului";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Статус агента";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Agent Status";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Статус оператора";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "代理状态";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "エージェントステータス";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "에이전트 상태";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "597c483a-51a9-f95a-8d54-ea7d87ada2b8";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_centers/call_center_agent_status.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -42,16 +43,33 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//connect to the database
|
||||
$database = new database;
|
||||
//check for duplicates
|
||||
if ($_GET["check"] == 'duplicate') {
|
||||
//agent id
|
||||
if ($_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 (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 (is_array($row) && sizeof($row) != 0 && $row['agent_name'] != '') {
|
||||
echo $text['message-duplicate_agent_id'].(if_group("superadmin") ? ": ".$row["agent_name"] : null);
|
||||
}
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
$agent_id = '';
|
||||
$agent_name = '';
|
||||
$agent_password = '';
|
||||
exit;
|
||||
}
|
||||
|
||||
//action add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$call_center_agent_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -59,17 +77,9 @@
|
|||
$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
|
||||
if (!empty($_POST)) {
|
||||
$call_center_agent_uuid = $_POST["call_center_agent_uuid"] ?? null;
|
||||
if (is_array($_POST)) {
|
||||
$call_center_agent_uuid = $_POST["call_center_agent_uuid"];
|
||||
$user_uuid = $_POST["user_uuid"];
|
||||
$agent_name = $_POST["agent_name"];
|
||||
$agent_type = $_POST["agent_type"];
|
||||
|
|
@ -88,7 +98,7 @@
|
|||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
|
|
@ -100,18 +110,23 @@
|
|||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (empty($call_center_agent_uuid)) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
|
||||
//if (empty($domain_uuid)) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (empty($user_uuid)) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
|
||||
if (empty($agent_name)) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
|
||||
if (empty($agent_type)) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
|
||||
if (empty($agent_call_timeout)) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
|
||||
//if (empty($agent_id)) { $msg .= $text['message-required']." ".$text['label-agent_id']."<br>\n"; }
|
||||
//if (empty($agent_password)) { $msg .= $text['message-required']." ".$text['label-agent_password']."<br>\n"; }
|
||||
//if (empty($agent_status)) { $msg .= $text['message-required']." ".$text['label-agent_status']."<br>\n"; }
|
||||
if (empty($agent_contact)) { $msg .= $text['message-required']." ".$text['label-agent_contact']."<br>\n"; }
|
||||
//if (empty($agent_logout)) { $msg .= $text['message-required']." ".$text['label-agent_logout']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
//if (strlen($call_center_agent_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (strlen($user_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
|
||||
if (strlen($agent_name) == 0) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
|
||||
if (strlen($agent_type) == 0) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
|
||||
if (strlen($agent_call_timeout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
|
||||
//if (strlen($agent_id) == 0) { $msg .= $text['message-required']." ".$text['label-agent_id']."<br>\n"; }
|
||||
//if (strlen($agent_password) == 0) { $msg .= $text['message-required']." ".$text['label-agent_password']."<br>\n"; }
|
||||
//if (strlen($agent_status) == 0) { $msg .= $text['message-required']." ".$text['label-agent_status']."<br>\n"; }
|
||||
if (strlen($agent_contact) == 0) { $msg .= $text['message-required']." ".$text['label-agent_contact']."<br>\n"; }
|
||||
if (strlen($agent_no_answer_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_no_answer_delay_time']."<br>\n"; }
|
||||
if (strlen($agent_max_no_answer) == 0) { $msg .= $text['message-required']." ".$text['label-agent_max_no_answer']."<br>\n"; }
|
||||
if (strlen($agent_wrap_up_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_wrap_up_time']."<br>\n"; }
|
||||
if (strlen($agent_reject_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_reject_delay_time']."<br>\n"; }
|
||||
if (strlen($agent_busy_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_busy_delay_time']."<br>\n"; }
|
||||
//if (strlen($agent_logout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_logout']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -124,28 +139,26 @@
|
|||
return;
|
||||
}
|
||||
|
||||
//set default values
|
||||
if (empty($agent_call_timeout)) { $agent_call_timeout = "20"; }
|
||||
if (empty($agent_max_no_answer)) { $agent_max_no_answer = "0"; }
|
||||
if (empty($agent_wrap_up_time)) { $agent_wrap_up_time = "10"; }
|
||||
if (empty($agent_no_answer_delay_time)) { $agent_no_answer_delay_time = "30"; }
|
||||
if (empty($agent_reject_delay_time)) { $agent_reject_delay_time = "90"; }
|
||||
if (empty($agent_busy_delay_time)) { $agent_busy_delay_time = "90"; }
|
||||
|
||||
//add the call_center_agent_uuid
|
||||
if (empty($call_center_agent_uuid)) {
|
||||
if (strlen($call_center_agent_uuid) == 0) {
|
||||
$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
|
||||
if ($_SESSION['call_center']['agent_contact_method']['text'] == 'loopback') {
|
||||
$agent_contact = str_replace("user/", "loopback/", $agent_contact);
|
||||
$agent_contact = str_replace("@", "/", $agent_contact);
|
||||
}
|
||||
|
||||
//freeswitch expands the contact string, so we need to sanitize it.
|
||||
$agent_contact = str_replace('$', '', $agent_contact);
|
||||
|
||||
//prepare the array
|
||||
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_center_agents'][0]['call_center_agent_uuid'] = $call_center_agent_uuid;
|
||||
|
|
@ -170,9 +183,11 @@
|
|||
}
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'call_center';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$database->save($array);
|
||||
//$message = $database->message;
|
||||
|
||||
//syncrhonize configuration
|
||||
save_call_center_xml();
|
||||
|
|
@ -213,37 +228,37 @@
|
|||
|
||||
//add the agent
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
//add the agent using event socket
|
||||
if ($esl->connected()) {
|
||||
if ($fp) {
|
||||
//add the agent
|
||||
$cmd = "callcenter_config agent add ".$call_center_agent_uuid." '".$agent_type."'";
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent add ".$call_center_agent_uuid." ".$agent_type;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
usleep(200);
|
||||
//agent set contact
|
||||
$cmd = "callcenter_config agent set contact ".$call_center_agent_uuid." '".$agent_contact."'";
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set contact ".$call_center_agent_uuid." ".$agent_contact;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
usleep(200);
|
||||
//agent set status
|
||||
$cmd = "callcenter_config agent set status ".$call_center_agent_uuid." '".$agent_status."'";
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set status ".$call_center_agent_uuid." '".$agent_status."'";
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
usleep(200);
|
||||
//agent set reject_delay_time
|
||||
$cmd = 'callcenter_config agent set reject_delay_time '.$call_center_agent_uuid.' '. $agent_reject_delay_time;
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set reject_delay_time ".$call_center_agent_uuid." ".$agent_reject_delay_time;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
usleep(200);
|
||||
//agent set busy_delay_time
|
||||
$cmd = 'callcenter_config agent set busy_delay_time '.$call_center_agent_uuid.' '.$agent_busy_delay_time;
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set busy_delay_time ".$call_center_agent_uuid." ".$agent_busy_delay_time;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
//agent set no_answer_delay_time
|
||||
$cmd = 'callcenter_config agent set no_answer_delay_time '.$call_center_agent_uuid.' '.$agent_no_answer_delay_time;
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set no_answer_delay_time ".$call_center_agent_uuid." ".$agent_no_answer_delay_time;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
//agent set max_no_answer
|
||||
$cmd = 'callcenter_config agent set max_no_answer '.$call_center_agent_uuid.' '.$agent_max_no_answer;
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set max_no_answer ".$call_center_agent_uuid." ".$agent_max_no_answer;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
//agent set wrap_up_time
|
||||
$cmd = 'callcenter_config agent set wrap_up_time '.$call_center_agent_uuid.' '.$agent_wrap_up_time;
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config agent set wrap_up_time ".$call_center_agent_uuid." ".$agent_wrap_up_time;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
|
|
@ -257,21 +272,22 @@
|
|||
header("Location: call_center_agents.php");
|
||||
return;
|
||||
}
|
||||
} //(is_array($_POST) && empty($_POST["persistformvar"]))
|
||||
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//initialize the destinations object
|
||||
$destination = new destinations;
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($_GET["id"]) && is_uuid($_GET["id"]) && empty($_POST["persistformvar"])) {
|
||||
if (is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") {
|
||||
$call_center_agent_uuid = $_GET["id"];
|
||||
$sql = "select * from v_call_center_agents ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and call_center_agent_uuid = :call_center_agent_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['call_center_agent_uuid'] = $call_center_agent_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$call_center_agent_uuid = $row["call_center_agent_uuid"];
|
||||
$user_uuid = $row["user_uuid"];
|
||||
$agent_name = $row["agent_name"];
|
||||
|
|
@ -293,13 +309,13 @@
|
|||
}
|
||||
|
||||
//set default values
|
||||
if (empty($agent_type)) { $agent_type = "callback"; }
|
||||
if (empty($agent_call_timeout)) { $agent_call_timeout = "20"; }
|
||||
if (empty($agent_max_no_answer)) { $agent_max_no_answer = "0"; }
|
||||
if (empty($agent_wrap_up_time)) { $agent_wrap_up_time = "10"; }
|
||||
if (empty($agent_no_answer_delay_time)) { $agent_no_answer_delay_time = "30"; }
|
||||
if (empty($agent_reject_delay_time)) { $agent_reject_delay_time = "90"; }
|
||||
if (empty($agent_busy_delay_time)) { $agent_busy_delay_time = "90"; }
|
||||
if (strlen($agent_type) == 0) { $agent_type = "callback"; }
|
||||
if (strlen($agent_call_timeout) == 0) { $agent_call_timeout = "20"; }
|
||||
if (strlen($agent_max_no_answer) == 0) { $agent_max_no_answer = "0"; }
|
||||
if (strlen($agent_wrap_up_time) == 0) { $agent_wrap_up_time = "10"; }
|
||||
if (strlen($agent_no_answer_delay_time) == 0) { $agent_no_answer_delay_time = "30"; }
|
||||
if (strlen($agent_reject_delay_time) == 0) { $agent_reject_delay_time = "90"; }
|
||||
if (strlen($agent_busy_delay_time) == 0) { $agent_busy_delay_time = "90"; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
@ -312,12 +328,47 @@
|
|||
if ($action == "update") {
|
||||
$document['title'] = $text['title-call_center_agent_edit'];
|
||||
}
|
||||
|
||||
//include the header
|
||||
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
|
||||
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='heading'>";
|
||||
|
|
@ -335,7 +386,6 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
|
@ -343,6 +393,21 @@
|
|||
echo "</td>\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 "<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 $text['description-agent_name']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -375,13 +440,18 @@
|
|||
echo " <td class='vtable' align='left'>";
|
||||
echo " <select name=\"user_uuid\" class='formfld' style='width: auto;'>\n";
|
||||
echo " <option value=\"\"></option>\n";
|
||||
foreach ($users as $field) {
|
||||
echo " <option value='".escape($field['user_uuid'])."' ".(!empty($user_uuid) && $user_uuid == $field['user_uuid'] ? "selected='selected'" : null).">".escape($field['username'])."</option>\n";
|
||||
foreach($users as $field) {
|
||||
if ($user_uuid == $field['user_uuid']) {
|
||||
echo " <option value='".escape($field['user_uuid'])."' selected='selected'>".escape($field['username'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($field['user_uuid'])."' $selected>".escape($field['username'])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </select>";
|
||||
unset($users);
|
||||
echo " <br>\n";
|
||||
echo " ".!empty($text['description-users'])."\n";
|
||||
echo " ".$text['description-users']."\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
|
|
@ -391,6 +461,7 @@
|
|||
echo "</td>\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 " <div style='display: none;' id='duplicate_agent_id_response'></div>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-agent_id']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -401,7 +472,7 @@
|
|||
echo " ".$text['label-agent_password']."\n";
|
||||
echo "</td>\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 $text['description-agent_password']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -412,7 +483,7 @@
|
|||
echo " ".$text['label-contact']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo $destination->select('user_contact', 'agent_contact', ($agent_contact ?? null));
|
||||
echo $destination->select('user_contact', 'agent_contact', $agent_contact);
|
||||
echo "<br />\n";
|
||||
echo $text['description-contact']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -424,11 +495,31 @@
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='agent_status'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo " <option value='Logged Out' ".(!empty($agent_status) && $agent_status == "Logged Out" ? "selected='selected'" : null).">".$text['option-logged_out']."</option>\n";
|
||||
echo " <option value='Available' ".(!empty($agent_status) && $agent_status == "Available" ? "selected='selected'" : null).">".$text['option-available']."</option>\n";
|
||||
echo " <option value='Available (On Demand)' ".(!empty($agent_status) && $agent_status == "Available (On Demand)" ? "selected='selected'" : null).">".$text['option-available_on_demand']."</option>\n";
|
||||
echo " <option value='On Break' ".(!empty($agent_status) && $agent_status == "On Break" ? "selected='selected'" : null).">".$text['option-on_break']."</option>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($agent_status == "Logged Out") {
|
||||
echo " <option value='Logged Out' SELECTED >".$text['option-logged_out']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Logged Out'>".$text['option-logged_out']."</option>\n";
|
||||
}
|
||||
if ($agent_status == "Available") {
|
||||
echo " <option value='Available' SELECTED >".$text['option-available']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Available'>".$text['option-available']."</option>\n";
|
||||
}
|
||||
if ($agent_status == "Available (On Demand)") {
|
||||
echo " <option value='Available (On Demand)' SELECTED >".$text['option-available_on_demand']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Available (On Demand)'>".$text['option-available_on_demand']."</option>\n";
|
||||
}
|
||||
if ($agent_status == "On Break") {
|
||||
echo " <option value='On Break' SELECTED >".$text['option-on_break']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='On Break'>".$text['option-on_break']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-status']."\n";
|
||||
|
|
@ -496,8 +587,8 @@
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='agent_record'>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".(!empty($agent_record) && $agent_record != "true" ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".($agent_record == "true" ? "selected='selected'" : '')." >".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($agent_record != "true" ? "selected='selected'" : '').">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-record_template']."\n";
|
||||
|
|
@ -518,7 +609,6 @@
|
|||
*/
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />";
|
||||
|
||||
if ($action == "update") {
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -48,7 +49,7 @@
|
|||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$tiers = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($_SESSION['call_center']['queue_login']['text']) && $_SESSION['call_center']['queue_login']['text'] == 'dynamic') {
|
||||
if (is_array($tiers) && count($tiers) == 0) {
|
||||
$per_queue_login = true;
|
||||
}
|
||||
else {
|
||||
|
|
@ -57,7 +58,7 @@
|
|||
unset($sql, $parameters);
|
||||
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//get the agents from the database
|
||||
$sql = "select * from v_call_center_agents ";
|
||||
|
|
@ -70,12 +71,12 @@
|
|||
|
||||
//get the agent list from event socket
|
||||
$switch_cmd = 'callcenter_config agent list';
|
||||
$event_socket_str = trim(event_socket::api($switch_cmd));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$agent_list = csv_to_named_array($event_socket_str, '|');
|
||||
|
||||
//get the agent list from event socket
|
||||
$switch_cmd = 'callcenter_config tier list';
|
||||
$event_socket_str = trim(event_socket::api($switch_cmd));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$call_center_tiers = csv_to_named_array($event_socket_str, '|');
|
||||
|
||||
//get the call center queues from the database
|
||||
|
|
@ -93,14 +94,14 @@
|
|||
|
||||
//add the status to the call_center_queues array
|
||||
$x = 0;
|
||||
if (!empty($call_center_queues)) {
|
||||
if (is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $queue) {
|
||||
//set the queue id
|
||||
$queue_id = $queue['queue_extension'].'@'.$queue['domain_name'];
|
||||
|
||||
//get the queue list from event socket
|
||||
$switch_cmd = "callcenter_config queue list agents ".$queue_id;
|
||||
$event_socket_str = trim(event_socket::api($switch_cmd));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$queue_list = csv_to_named_array($event_socket_str, '|');
|
||||
$call_center_queues[$x]['queue_list'] = $queue_list;
|
||||
$x++;
|
||||
|
|
@ -109,7 +110,7 @@
|
|||
|
||||
//get the agent status from mod_callcenter and update the agent status in the agents array
|
||||
$x = 0;
|
||||
if (!empty($agents)) {
|
||||
if (is_array($agents)) {
|
||||
foreach ($agents as $row) {
|
||||
//add the domain name
|
||||
$domain_name = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
|
|
@ -117,14 +118,14 @@
|
|||
|
||||
//update the queue status
|
||||
$i = 0;
|
||||
if (!empty($call_center_queues)) {
|
||||
if (is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $queue) {
|
||||
$agents[$x]['queues'][$i]['agent_name'] = $row['agent_name'];
|
||||
$agents[$x]['queues'][$i]['queue_name'] = $queue['queue_name'];
|
||||
$agents[$x]['queues'][$i]['call_center_agent_uuid'] = $row['call_center_agent_uuid'];
|
||||
$agents[$x]['queues'][$i]['call_center_queue_uuid'] = $queue['call_center_queue_uuid'];
|
||||
$agents[$x]['queues'][$i]['queue_status'] = 'Logged Out';
|
||||
if (!empty($queue['queue_list'])) {
|
||||
if (is_array($queue['queue_list'])) {
|
||||
foreach ($queue['queue_list'] as $queue_list) {
|
||||
if ($row['call_center_agent_uuid'] == $queue_list['name']) {
|
||||
$agents[$x]['queues'][$i]['queue_status'] = 'Available';
|
||||
|
|
@ -136,7 +137,7 @@
|
|||
}
|
||||
|
||||
//update the agent status
|
||||
if (!empty($agent_list)) {
|
||||
if (is_array($agent_list)) {
|
||||
foreach ($agent_list as $r) {
|
||||
if ($r['name'] == $row['call_center_agent_uuid']) {
|
||||
$agents[$x]['agent_status'] = $r['status'];
|
||||
|
|
@ -150,7 +151,7 @@
|
|||
}
|
||||
|
||||
//remove rows from the http post array where the status has not changed
|
||||
if (!empty($_POST['agents']) && !$per_queue_login) {
|
||||
if (is_array($_POST['agents']) && !$per_queue_login) {
|
||||
foreach($_POST['agents'] as $key => $row) {
|
||||
foreach($agents as $k => $field) {
|
||||
if ($field['agent_name'] === $row['agent_name'] && $field['agent_status'] === $row['agent_status']) {
|
||||
|
|
@ -161,18 +162,18 @@
|
|||
}
|
||||
|
||||
//use the http post array to change the status
|
||||
if (!empty($_POST['agents'])) {
|
||||
if (is_array($_POST['agents'])) {
|
||||
foreach($_POST['agents'] as $row) {
|
||||
if (!empty($row['agent_status'])) {
|
||||
if (isset($row['agent_status'])) {
|
||||
//agent set status
|
||||
if ($esl->is_connected()) {
|
||||
if ($fp) {
|
||||
//set the user_status
|
||||
if (!isset($row['queue_name'])) {
|
||||
$array['users'][0]['user_uuid'] = $row['user_uuid'] ?? null;
|
||||
$array['users'][0]['user_uuid'] = $row['user_uuid'];
|
||||
$array['users'][0]['user_status'] = $row['agent_status'];
|
||||
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('user_edit', 'temp');
|
||||
|
||||
$database = new database;
|
||||
|
|
@ -207,34 +208,24 @@
|
|||
if (!isset($row['queue_name'])) {
|
||||
if ($agent_status == "Do Not Disturb") {
|
||||
//set the default dnd action
|
||||
$dnd_action = "add";
|
||||
|
||||
$dnd_action = "add";
|
||||
//set the call center status to Logged Out
|
||||
if (is_uuid($row['agent_uuid'])) {
|
||||
$command = "callcenter_config agent set status ".$row['agent_uuid']." 'Logged Out' ";
|
||||
$response = event_socket::api($command);
|
||||
}
|
||||
if (is_uuid($row['agent_uuid'])) {
|
||||
$command = "api callcenter_config agent set status ".$row['agent_uuid']." 'Logged Out' ";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (is_uuid($row['agent_uuid'])) {
|
||||
//set the agent status
|
||||
$command = "callcenter_config agent set status ".$row['agent_uuid']." '".$agent_status."'";
|
||||
$response = event_socket::api($command);
|
||||
|
||||
//set the agent state
|
||||
if ($agent_status == 'Available' || $agent_status == 'Logged Out') {
|
||||
$command = "callcenter_config agent set state ".$row['agent_uuid']." 'Waiting'";
|
||||
$response = event_socket::api($command);
|
||||
}
|
||||
$command = "api callcenter_config agent set status ".$row['agent_uuid']." '".$agent_status."'";
|
||||
}
|
||||
}
|
||||
|
||||
$response = event_socket_request($fp, $command);
|
||||
}
|
||||
//echo $command."\n";
|
||||
|
||||
//get the queue_id
|
||||
if (isset($row['queue_uuid']) && is_uuid($row['queue_uuid'])) {
|
||||
if (!empty($call_center_queues)) {
|
||||
if (is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $queue) {
|
||||
if ($queue['call_center_queue_uuid'] == $row['queue_uuid']) {
|
||||
$queue_id = $queue['queue_extension'].'@'.$queue['domain_name'];
|
||||
|
|
@ -247,21 +238,22 @@
|
|||
if (isset($row['queue_uuid']) && $row['agent_status'] == 'Available') {
|
||||
//set the call center status
|
||||
//$command = "api callcenter_config agent set status ".$row['agent_name']."@".$_SESSION['domain_name']." '".$row['agent_status']."'";
|
||||
//$response = event_socket::command($command);
|
||||
//$response = event_socket_request($fp, $command);
|
||||
|
||||
//assign the agent to the queue
|
||||
if (is_uuid($row['queue_uuid']) && is_uuid($row['agent_uuid'])) {
|
||||
$command = "callcenter_config tier add ".$queue_id." ".$row['agent_uuid']." 1 1";
|
||||
$response = event_socket::api($command);
|
||||
$command = "api callcenter_config tier add ".$queue_id." ".$row['agent_uuid']." 1 1";
|
||||
//echo $command."<br />\n";
|
||||
$response = event_socket_request($fp, $command);
|
||||
}
|
||||
}
|
||||
|
||||
//un-assign the agent from the queue
|
||||
if (isset($row['queue_uuid']) && $row['agent_status'] == 'Logged Out') {
|
||||
if (is_uuid($row['queue_uuid']) && is_uuid($row['agent_uuid'])) {
|
||||
$command = "callcenter_config tier del ".$queue_id." ".$row['agent_uuid'];
|
||||
$command = "api callcenter_config tier del ".$queue_id." ".$row['agent_uuid'];
|
||||
//echo $command."<br />\n";
|
||||
$response = event_socket::api($command);
|
||||
$response = event_socket_request($fp, $command);
|
||||
}
|
||||
}
|
||||
usleep(200);
|
||||
|
|
@ -296,15 +288,11 @@
|
|||
} //foreach
|
||||
|
||||
//send a message
|
||||
message::add($text['message-status_set']);
|
||||
message::add($text['confirm-add']);
|
||||
header("Location: call_center_agent_status.php");
|
||||
return;
|
||||
} //post
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//includes the header
|
||||
$document['title'] = $text['title-call_center_agent_status'];
|
||||
require_once "resources/header.php";
|
||||
|
|
@ -341,14 +329,13 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (!empty($_POST['agents']) && !$per_queue_login) {
|
||||
if (is_array($_POST['agents']) && !$per_queue_login) {
|
||||
echo $text['description-call_center_agent_status']."\n";
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th class='pct-20'>".$text['label-agent']."</th>\n";
|
||||
|
|
@ -358,16 +345,15 @@
|
|||
echo " <th class='pct-20 hide-sm-dn'> </th>\n";
|
||||
if ($per_queue_login) {
|
||||
echo " <th class='pct-40'>".$text['label-options']."</th>\n";
|
||||
echo " <th class='pct-40' style='width=50%;'> </th>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($agents)) {
|
||||
if (is_array($agents) && @sizeof($agents) != 0) {
|
||||
$x = 0;
|
||||
foreach ($agents as $row) {
|
||||
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
||||
$html = "<tr class='list-row'>\n";
|
||||
$html .= " <td style='vertical-align: top;' ".$onclick.">".escape($row['agent_name'])." </td>\n";
|
||||
$html .= " <td ".$onclick.">".escape($row['agent_name'])." </td>\n";
|
||||
|
||||
if (!$per_queue_login) {
|
||||
$html .= " <td class='no-wrap'>";
|
||||
|
|
@ -382,15 +368,15 @@
|
|||
$html .= " <td ".$onclick." class='hide-sm-dn'> </td>\n";
|
||||
|
||||
if ($per_queue_login) {
|
||||
$html .= " <td class='description' style='width: 30%;'>";
|
||||
if (!empty($row['queues'])) {
|
||||
$html .= " <td class='description'>";
|
||||
if (is_array($row['queues'])) {
|
||||
$html .= " <table class='list' >\n";
|
||||
$html .= " <tr>\n";
|
||||
$html .= " <th>".$text['label-queue']."</th>\n";
|
||||
$html .= " <th>".$text['label-status']."</th>\n";
|
||||
$html .= " <th>".$text['label-options']."</th>\n";
|
||||
$html .= " </tr>\n";
|
||||
if (!empty($row['queues'])) {
|
||||
if (is_array($row['queues'])) {
|
||||
foreach ($row['queues'] as $queue) {
|
||||
$x++;
|
||||
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
||||
|
|
@ -411,8 +397,7 @@
|
|||
$html .= " <input type='hidden' name='agents[".$x."][queue_uuid]' value='".escape($queue['call_center_queue_uuid'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][agent_uuid]' value='".escape($row['call_center_agent_uuid'])."'>\n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Available' ".($queue['queue_status'] == 'Available' ? "checked='checked'" : null)."> ".$text['option-available']."</label> \n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Logged Out' ".($queue['queue_status'] == 'Logged Out' ? "checked='checked'" : null)."> ".$text['option-logged_out']."</label>\n";
|
||||
//$html .= " <label style='margin: 0; cursor: pointer;'><input type='radio' name='agents[".$x."][agent_status]' value='On Break' ".($queue['queue_status'] == 'On Break' ? "checked='checked'" : null)."> ".$text['option-on_break']."</label>\n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer;'><input type='radio' name='agents[".$x."][agent_status]' value='Logged Out' ".($queue['queue_status'] == 'Logged Out' ? "checked='checked'" : null)."> ".$text['option-logged_out']."</label>\n";
|
||||
$html .= " </td>\n";
|
||||
$html .= " </tr>\n";
|
||||
}
|
||||
|
|
@ -420,7 +405,6 @@
|
|||
$html .= " </table>\n";
|
||||
}
|
||||
$html .= " </td>\n";
|
||||
$html .= " <td> </td>\n";
|
||||
}
|
||||
$html .= "</tr>\n";
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
|
|
@ -437,7 +421,6 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2018
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -42,18 +43,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_center_agents'])) {
|
||||
if (is_array($_POST['call_center_agents'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$call_center_agents = $_POST['call_center_agents'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($call_center_agents)) {
|
||||
if ($action != '' && is_array($call_center_agents) && @sizeof($call_center_agents) != 0) {
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
if (permission_exists('call_center_agent_delete')) {
|
||||
|
|
@ -68,64 +66,50 @@
|
|||
}
|
||||
|
||||
//get http variables and set them to php variables
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search and show variables
|
||||
$search = $_GET["search"] ?? '';
|
||||
$show = $_GET["show"] ?? '';
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(agent_name) like :search ";
|
||||
$sql_search .= "or lower(agent_id) like :search ";
|
||||
$sql_search .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
//get total call center agent count from the database
|
||||
$sql = "select count(*) from v_call_center_agents ";
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] != "all" || !permission_exists('call_center_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and (";
|
||||
$sql .= " lower(agent_name) like :search ";
|
||||
$sql .= " or lower(agent_id) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.strtolower($search).'%';
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = !empty($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * ";
|
||||
$sql .= "from v_call_center_agents ";
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and (";
|
||||
$sql .= " lower(agent_name) like :search ";
|
||||
$sql .= " or lower(agent_id) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.strtolower($search).'%';
|
||||
}
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order, 'agent_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -138,7 +122,7 @@
|
|||
|
||||
//show content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_center_agents']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_center_agents']." (".$num_rows.")</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'=>'call_center_queues.php','style'=>'margin-right: 15px;']);
|
||||
if (permission_exists('call_center_imports')) {
|
||||
|
|
@ -155,7 +139,7 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>";
|
||||
if (permission_exists('call_center_all')) {
|
||||
if (!empty($_GET['show']) && $_GET['show'] == 'all') {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
|
|
@ -184,15 +168,14 @@
|
|||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('call_center_agent_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
//echo th_order_by('domain_uuid', 'domain_uuid', $order_by, $order);
|
||||
|
|
@ -206,20 +189,16 @@
|
|||
//echo th_order_by('agent_wrap_up_time', $text['label-wrap_up_time'], $order_by, $order);
|
||||
//echo th_order_by('agent_reject_delay_time', $text['label-reject_delay_time'], $order_by, $order);
|
||||
//echo th_order_by('agent_busy_delay_time', $text['label-busy_delay_time'], $order_by, $order);
|
||||
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_center_agent_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($result)) {
|
||||
if (is_array($result)) {
|
||||
$x = 0;
|
||||
foreach($result as $row) {
|
||||
$list_row_url = '';
|
||||
if (permission_exists('call_center_agent_edit')) {
|
||||
$list_row_url = "call_center_agent_edit.php?id=".urlencode($row['call_center_agent_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('call_center_agent_delete')) {
|
||||
|
|
@ -228,8 +207,8 @@
|
|||
echo " <input type='hidden' name='call_center_agents[$x][uuid]' value='".escape($row['call_center_agent_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
|
|
@ -257,7 +236,7 @@
|
|||
$sql .= "where gateway_uuid = :gateway_uuid ";
|
||||
$parameters['gateway_uuid'] = $bridge_statement[2];
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (count($result) > 0) {
|
||||
$gateway_name = $result[0]['gateway'];
|
||||
$agent_contact = str_replace($bridge_statement[2], $gateway_name, $agent_contact);
|
||||
|
|
@ -270,7 +249,7 @@
|
|||
//echo " <td>".$row[agent_wrap_up_time]."</td>\n";
|
||||
//echo " <td>".$row[agent_reject_delay_time]."</td>\n";
|
||||
//echo " <td>".$row[agent_busy_delay_time]."</td>\n";
|
||||
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_center_agent_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -282,7 +261,6 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
|
|
@ -294,4 +272,3 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -42,21 +43,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) {
|
||||
if (is_array($_POST['call_center_queues'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$call_center_queues = $_POST['call_center_queues'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
||||
if ($action != '' && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('call_center_queue_add')) {
|
||||
|
|
@ -77,13 +72,12 @@
|
|||
}
|
||||
|
||||
//get http variables and set as php variables
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$sort = $order_by == 'queue_extension' ? 'natural' : null;
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(queue_name) like :search ";
|
||||
$sql_search .= "or lower(queue_description) like :search ";
|
||||
|
|
@ -94,34 +88,34 @@
|
|||
//get total call center queues count from the database
|
||||
$sql = "select count(*) from v_call_center_queues ";
|
||||
$sql .= "where true ";
|
||||
if ($show != "all" || !permission_exists('call_center_all')) {
|
||||
if ($_GET['show'] != "all" || !permission_exists('call_center_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($sql_search)) {
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql ?? '');
|
||||
$sql .= order_by($order_by, $order, 'queue_name', 'asc', $sort);
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order, 'queue_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -134,7 +128,7 @@
|
|||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_center_queues']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_center_queues']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('call_center_imports')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'link'=>PROJECT_PATH.'/app/call_center_imports/call_center_imports.php?import_type=call_center_queues']);
|
||||
|
|
@ -146,21 +140,21 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-wallboard'],'icon'=>'th','link'=>PROJECT_PATH.'/app/call_center_wallboard/call_center_wallboard.php']);
|
||||
}
|
||||
$margin_left = permission_exists('call_center_agent_view') || permission_exists('call_center_wallboard') ? 'margin-left: 15px;' : null;
|
||||
if (permission_exists('call_center_queue_add') && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric'] ?? '') || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
if (permission_exists('call_center_queue_add') && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric']) || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','style'=>$margin_left,'link'=>'call_center_queue_edit.php']);
|
||||
unset($margin_left);
|
||||
}
|
||||
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric'] ?? '') || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none; '.!empty($margin_left),'onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric']) || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none; '.$margin_left,'onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
unset($margin_left);
|
||||
}
|
||||
if (permission_exists('call_center_queue_delete') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; '.!empty($margin_left),'onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
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_left,'onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
unset($margin_left);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_center_all')) {
|
||||
if ($show == 'all') {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
|
|
@ -178,7 +172,7 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric'] ?? '') || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric']) || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('call_center_queue_delete') && $result) {
|
||||
|
|
@ -192,15 +186,14 @@
|
|||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order);
|
||||
|
|
@ -219,20 +212,16 @@
|
|||
//echo th_order_by('queue_abandoned_resume_allowed', $text['label-abandoned_resume_allowed'], $order_by, $order);
|
||||
//echo th_order_by('queue_tier_rule_wait_multiply_level', $text['label-tier_rule_wait_multiply_level'], $order_by, $order);
|
||||
echo th_order_by('queue_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('call_center_queue_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_center_queue_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($result)) {
|
||||
if (is_array($result)) {
|
||||
$x = 0;
|
||||
foreach($result as $row) {
|
||||
$list_row_url = '';
|
||||
if (permission_exists('call_center_queue_edit')) {
|
||||
$list_row_url = "call_center_queue_edit.php?id=".urlencode($row['call_center_queue_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) {
|
||||
|
|
@ -241,8 +230,8 @@
|
|||
echo " <input type='hidden' name='call_center_queues[$x][uuid]' value='".escape($row['call_center_queue_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_center_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
|
|
@ -273,7 +262,7 @@
|
|||
//echo " <td>".escape($row[queue_abandoned_resume_allowed])." </td>\n";
|
||||
//echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])." </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['queue_description'])."</td>\n";
|
||||
if (permission_exists('call_center_queue_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_center_queue_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -285,7 +274,6 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
|
|
@ -297,4 +285,3 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -39,9 +40,19 @@
|
|||
|
||||
//get the variables
|
||||
$cmd = $_GET['cmd'];
|
||||
$call_center_queue_uuid = $_GET["id"];
|
||||
$agent_uuid = $_GET['agent_uuid'];
|
||||
$agent_status = $_GET['agent_status'];
|
||||
|
||||
//pre-populate the form
|
||||
if (is_array($_GET) && is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") {
|
||||
$call_center_queue_uuid = $_GET["id"];
|
||||
$sql = "select queue_extension from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
||||
$database = new database;
|
||||
$queue_extension = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//validate the variables
|
||||
switch ($cmd) {
|
||||
|
|
@ -58,24 +69,13 @@
|
|||
unset($cmd);
|
||||
}
|
||||
|
||||
//get the queue extension
|
||||
if (is_uuid($call_center_queue_uuid)) {
|
||||
$sql = "select queue_extension from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
||||
$database = new database;
|
||||
$queue_extension = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//run call center commands load, unload or reload
|
||||
//connect to event socket
|
||||
if (isset($queue_extension) && isset($cmd)) {
|
||||
$event_socket = event_socket::create();
|
||||
if ($event_socket->is_connected()) {
|
||||
$response = event_socket::api('reloadxml');
|
||||
$response = event_socket::api('callcenter_config queue '.$cmd.' '.$queue_extension.'@'.$_SESSION['domain_name']);
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$response = event_socket_request($fp, 'api reloadxml');
|
||||
$response = event_socket_request($fp, 'api callcenter_config queue '.$cmd. ' '.$queue_extension."@".$_SESSION["domain_name"]);
|
||||
fclose($fp);
|
||||
}
|
||||
else {
|
||||
$response = '';
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2015 - 2023
|
||||
Copyright (C) 2015 - 2021
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -26,8 +26,11 @@
|
|||
|
||||
/**
|
||||
* cache class provides an abstracted cache
|
||||
*
|
||||
* @method string dialplan - builds the dialplan for call center
|
||||
*/
|
||||
//define the call center class
|
||||
if (!class_exists('call_center')) {
|
||||
class call_center {
|
||||
/**
|
||||
* define the variables
|
||||
|
|
@ -59,6 +62,16 @@
|
|||
$this->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a dialplan for call center
|
||||
* @var string $domain_uuid the multi-tenant id
|
||||
|
|
@ -75,7 +88,7 @@
|
|||
$array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid;
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_delete', 'temp');
|
||||
$p->add('dialplan_detail_delete', 'temp');
|
||||
|
||||
|
|
@ -143,7 +156,7 @@
|
|||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||
$y++;
|
||||
|
||||
if (!empty($this->queue_cid_prefix)) {
|
||||
if (strlen($this->queue_cid_prefix) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
|
|
@ -153,7 +166,7 @@
|
|||
$y++;
|
||||
}
|
||||
|
||||
if (!empty($this->queue_greeting)) {
|
||||
if (strlen($this->queue_greeting) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "sleep";
|
||||
|
|
@ -163,7 +176,7 @@
|
|||
$y++;
|
||||
}
|
||||
|
||||
if (!empty($this->queue_greeting)) {
|
||||
if (strlen($this->queue_greeting) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "playback";
|
||||
|
|
@ -173,7 +186,7 @@
|
|||
$y++;
|
||||
}
|
||||
|
||||
if (!empty($this->queue_cc_exit_keys)) {
|
||||
if (strlen($this->queue_cc_exit_keys) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
|
|
@ -191,7 +204,7 @@
|
|||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||
$y++;
|
||||
|
||||
if (!empty($this->queue_timeout_action)) {
|
||||
if (strlen($this->queue_timeout_action) > 0) {
|
||||
$action_array = explode(":",$this->queue_timeout_action);
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
|
|
@ -213,7 +226,7 @@
|
|||
$array["dialplans"][0] = $dialplan;
|
||||
|
||||
//add temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add("dialplan_add", 'temp');
|
||||
$p->add("dialplan_detail_add", 'temp');
|
||||
$p->add("dialplan_edit", 'temp');
|
||||
|
|
@ -239,7 +252,7 @@
|
|||
$array['call_center_queues'][0]['dialplan_uuid'] = $this->dialplan_uuid;
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('call_center_queue_edit', 'temp');
|
||||
|
||||
//execute update
|
||||
|
|
@ -291,8 +304,8 @@
|
|||
|
||||
//filter out unchecked, build where clause for below
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = $record['uuid'];
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +313,7 @@
|
|||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, dialplan_uuid, queue_name, queue_extension from v_".$this->table." ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in ('".implode("','", $uuids)."') ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
|
|
@ -335,18 +348,18 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//delete the queue in the switch
|
||||
if ($esl->is_connected()) {
|
||||
if ($fp) {
|
||||
foreach ($uuids as $uuid) {
|
||||
$cmd = "callcenter_config queue unload ".$call_center_queues[$uuid]['queue_extension']."@".$_SESSION['domain_name'];
|
||||
$response = event_socket::api($cmd);
|
||||
$cmd = "api callcenter_config queue unload ".$call_center_queues[$uuid]['queue_extension']."@".$_SESSION["domin_name"];
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
}
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('call_center_tier_delete', 'temp');
|
||||
$p->add('dialplan_delete', 'temp');
|
||||
$p->add('dialplan_detail_delete', 'temp');
|
||||
|
|
@ -414,7 +427,7 @@
|
|||
|
||||
//filter out unchecked
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = $record['uuid'];
|
||||
}
|
||||
}
|
||||
|
|
@ -433,17 +446,18 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//delete the agent in the switch
|
||||
if ($esl->is_connected()) {
|
||||
if ($fp) {
|
||||
foreach ($uuids as $uuid) {
|
||||
event_socket::async("callcenter_config agent del $uuid");
|
||||
$cmd = "api callcenter_config agent del ".$uuid;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
}
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('call_center_tier_delete', 'temp');
|
||||
|
||||
//execute delete
|
||||
|
|
@ -499,8 +513,8 @@
|
|||
|
||||
//get checked records
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = $record['uuid'];
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -509,7 +523,7 @@
|
|||
|
||||
//primary table
|
||||
$sql = "select * from v_".$this->table." ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in ('".implode("','", $uuids)."') ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
|
|
@ -575,7 +589,7 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('call_center_tier_add', 'temp');
|
||||
$p->add('dialplan_add', 'temp');
|
||||
|
||||
|
|
@ -608,6 +622,7 @@
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
/*
|
||||
$o = new call_center;
|
||||
|
|
@ -621,3 +636,5 @@ $c->destination_number = "";
|
|||
$c->queue_cc_exit_keys = "";
|
||||
$c->dialplan();
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
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-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 4) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -42,86 +43,45 @@
|
|||
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_centers');
|
||||
|
||||
//get http variables and set as php variables
|
||||
$order_by = $_GET["order_by"] ?? null;
|
||||
$order = $_GET["order"] ?? null;
|
||||
|
||||
//connect to the database
|
||||
if (!isset($database)) {
|
||||
$database = new database;
|
||||
}
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
||||
//get the http post values and set them as php variables
|
||||
if (!empty($_POST['agents'])) {
|
||||
|
||||
//get the agent id
|
||||
if (is_uuid($_POST['agents'][0]['id'])) {
|
||||
$agent_uuid = $_POST['agents'][0]['id'];
|
||||
}
|
||||
|
||||
//get the agent details from event socket
|
||||
if (is_uuid($agent_uuid)) {
|
||||
$switch_cmd = 'callcenter_config agent list '.$agent['call_center_agent_uuid'];
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$call_center_agent = csv_to_named_array($event_socket_str, '|');
|
||||
$agent['agent_status'] = $call_center_agent[1]['status'];
|
||||
}
|
||||
|
||||
//find the agent_status - used for mod_call_center as there is only one agent status not one per queue
|
||||
$agent_status = 'Logged Out';
|
||||
if (count($_POST) > 0) {
|
||||
foreach ($_POST['agents'] as $row) {
|
||||
if ($row['agent_status'] == 'Available') {
|
||||
$agent_status = 'Available';
|
||||
break;
|
||||
}
|
||||
if ($row['agent_status'] == 'On Break') {
|
||||
$agent_status = 'On Break';
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (strlen($row['agent_status']) > 0) {
|
||||
//agent set status
|
||||
if ($fp) {
|
||||
// update the database
|
||||
$array['call_center_agents'][0]['call_center_agent_uuid'] = $row['id'];
|
||||
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['user']['domain_uuid'];
|
||||
$array['call_center_agents'][0]['agent_status'] = $row['agent_status'];
|
||||
$database = new database;
|
||||
$database->app_name = 'call_centers_dashboard';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$database->save($array);
|
||||
|
||||
//save the agent_stat change to the database
|
||||
$array['call_center_agents'][0]['call_center_agent_uuid'] = $agent_uuid;
|
||||
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['user']['domain_uuid'];
|
||||
$array['call_center_agents'][0]['agent_status'] = $agent_status;
|
||||
$database->app_name = 'call_centers_dashboard';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$result = $database->save($array);
|
||||
//set the call center status
|
||||
$cmd = "api callcenter_config agent set status ".$row['id']." '".$row['agent_status']."'";
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
//set the agent status to available and assign the agent to the queue with the tier
|
||||
if ($row['agent_status'] == 'Available') {
|
||||
//assign the agent to the queue
|
||||
$cmd = "api callcenter_config tier add ".$row['queue_extension']."@".$_SESSION['domain_name']." ".$row['id']." 1 1";
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
|
||||
//send the agent status status to mod_call_center
|
||||
$cmd = "callcenter_config agent set status ".$agent_uuid." '".$agent_status."'";
|
||||
$response = event_socket::api($cmd);
|
||||
|
||||
//add or delete agents from the queue assigned by the tier
|
||||
foreach ($_POST['agents'] as $row) {
|
||||
|
||||
//agent set status
|
||||
if ($fp && is_numeric($row['queue_extension']) && is_uuid($row['id'])) {
|
||||
|
||||
//set the agent status to available and assign the agent to the queue with the tier
|
||||
if ($row['agent_status'] == 'Available') {
|
||||
//assign the agent to the queue
|
||||
$cmd = "callcenter_config tier add ".$row['queue_extension']."@".$_SESSION['domain_name']." ".$row['id']." 1 1";
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
|
||||
//set the agent status to available and assign the agent to the queue with the tier
|
||||
if ($row['agent_status'] == 'On Break') {
|
||||
//assign the agent to the queue
|
||||
$cmd = "callcenter_config tier add ".$row['queue_extension']."@".$_SESSION['domain_name']." ".$row['id']." 1 1";
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
|
||||
//un-assign the agent from the queue
|
||||
if ($row['agent_status'] == 'Logged Out') {
|
||||
$cmd = "callcenter_config tier del ".$row['queue_extension']."@".$_SESSION['domain_name']." ".$row['id'];
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
|
||||
//small sleep
|
||||
usleep(200);
|
||||
//un-assign the agent from the queue
|
||||
if ($row['agent_status'] == 'Logged Out') {
|
||||
$cmd = "api callcenter_config tier del ".$row['queue_extension']."@".$_SESSION['domain_name']." ".$row['id'];
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
usleep(200);
|
||||
unset($parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -132,57 +92,42 @@
|
|||
|
||||
//get the agent list from event socket
|
||||
$switch_cmd = 'callcenter_config tier list';
|
||||
$event_socket_str = trim(event_socket::api($switch_cmd));
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$call_center_tiers = csv_to_named_array($event_socket_str, '|');
|
||||
|
||||
//get the call center queues from the database
|
||||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by queue_extension asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$call_center_queues = $database->select($sql, $parameters, 'all');
|
||||
$num_rows = !is_array($call_center_queues) ? 0 : @sizeof($call_center_queues);
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the agents from the database
|
||||
$sql = "select * from v_call_center_agents ";
|
||||
$sql .= "where user_uuid = :user_uuid ";
|
||||
$sql .= "and domain_uuid = :domain_uuid";
|
||||
$parameters['user_uuid'] = $_SESSION['user_uuid'];
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$agents = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($agents)) {
|
||||
if (count($agents) > 0) {
|
||||
$agent = $agents[0];
|
||||
}
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the call center queues from the database
|
||||
if (!empty($_SESSION['call_center']['queue_login']['text']) && $_SESSION['call_center']['queue_login']['text'] == 'dynamic') {
|
||||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and call_center_queue_uuid in ( ";
|
||||
$sql .= " select call_center_queue_uuid from v_call_center_tiers ";
|
||||
$sql .= " where call_center_agent_uuid = :call_center_agent_uuid ";
|
||||
$sql .= ") ";
|
||||
$parameters['call_center_agent_uuid'] = $agent['call_center_agent_uuid'];
|
||||
$sql .= "order by queue_extension asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$call_center_queues = $database->select($sql, $parameters, 'all');
|
||||
$num_rows = !is_array($call_center_queues) ? 0 : @sizeof($call_center_queues);
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the agent details from event socket
|
||||
$switch_cmd = 'callcenter_config agent list '.($agent['call_center_agent_uuid'] ?? null);
|
||||
$event_socket_str = trim(event_socket_request($fp ?? null, 'api '.$switch_cmd));
|
||||
$call_center_agent = csv_to_named_array($event_socket_str, '|');
|
||||
|
||||
//set the agent status
|
||||
$agent['agent_status'] = $call_center_agent[1]['status'];
|
||||
|
||||
//update the queue status
|
||||
$x = 0;
|
||||
if (!empty($call_center_queues) && is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $queue) {
|
||||
$call_center_queues[$x]['queue_status'] = 'Logged Out';
|
||||
foreach ($call_center_tiers as $tier) {
|
||||
if ($queue['queue_extension'] .'@'. $_SESSION['user']['domain_name'] == $tier['queue'] && $agent['call_center_agent_uuid'] == $tier['agent']) {
|
||||
$call_center_queues[$x]['queue_status'] = $agent['agent_status'];
|
||||
}
|
||||
foreach ($call_center_queues as $queue) {
|
||||
$call_center_queues[$x]['queue_status'] = 'Logged Out';
|
||||
foreach ($call_center_tiers as $tier) {
|
||||
if ($queue['queue_extension'] .'@'. $_SESSION['user']['domain_name'] == $tier['queue'] && $agent['call_center_agent_uuid'] == $tier['agent']) {
|
||||
$call_center_queues[$x]['queue_status'] = $agent['agent_status'];
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
//includes the header
|
||||
|
|
@ -190,15 +135,12 @@
|
|||
|
||||
//radio button cycle script
|
||||
echo "<script>\n";
|
||||
echo "\n";
|
||||
|
||||
echo " function get_selected(radio_group) {\n";
|
||||
echo " for (var i = 0; i < radio_group.length; i++) {\n";
|
||||
echo " if (radio_group[i].checked) { return i; }\n";
|
||||
echo " }\n";
|
||||
echo " return 0;\n";
|
||||
echo " }\n";
|
||||
echo "\n";
|
||||
|
||||
echo " function cycle(radio_group_name) {\n";
|
||||
echo " var radios = document.getElementsByName(radio_group_name);\n";
|
||||
|
|
@ -210,100 +152,58 @@
|
|||
echo " radios[i+1].checked = true;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "\n";
|
||||
|
||||
echo " function handle_status_change(agent_index) {\n";
|
||||
echo " var agent_status = document.querySelector('input[name=\"agents[' + agent_index + '][agent_status]\"]:checked').value;\n";
|
||||
echo " var radio_buttons = document.querySelectorAll('#form_list_call_center_agent_dashboard input[type=\"radio\"]');\n";
|
||||
//echo "console.log('status: '+agent_status);\n";
|
||||
//echo " radio_checked_value = '';\n";
|
||||
echo " radio_buttons.forEach(function(radio_button) {\n";
|
||||
//echo " if (radio_button.checked == true && radio_button.value === 'Available') {\n";
|
||||
//echo " radio_checked_value = 'Available';\n";
|
||||
//echo " }\n";
|
||||
//echo " if (radio_button.checked == true && radio_button.value === 'On Break') {\n";
|
||||
//echo " radio_checked_value = 'On Break';\n";
|
||||
//echo " }\n";
|
||||
//echo " if (radio_button.value === 'Logged Out') {\n";
|
||||
//echo " radio_checked_value = 'Logged Out';\n";
|
||||
//echo " }\n";
|
||||
echo " if (radio_button.checked) { console.log('checked: '+radio_button.value) }\n";
|
||||
echo " if (radio_button.value === 'Available' && agent_status === 'Available') {\n"; // radio_checked_value == 'On Break' &&
|
||||
//echo " radio_button.checked = true;\n";
|
||||
//echo " radio_button.value = 'Available';\n";
|
||||
//echo " radio_button[agent_status]\"]:checked').value == 'On Break';\n";
|
||||
//echo " console.log('--'+radio_button.value+'--');\n";
|
||||
//echo " console.log('need to change status On Break to Available');\n";
|
||||
//echo " console.log('---');\n";
|
||||
echo " }\n";
|
||||
echo " if (radio_button.value === 'On Break' && agent_status === 'On Break') {\n"; // radio_checked_value == 'Available' &&
|
||||
//echo " radio_button.checked = true;\n";
|
||||
//echo " radio_button.value = 'On Break';\n";
|
||||
//echo " radio_button[agent_status]\"]:checked').value == 'On Break';\n";
|
||||
//echo " console.log('--'+radio_button.value+'--');\n";
|
||||
//echo " console.log('need to change status Available to On Break');\n";
|
||||
//echo " console.log('---');\n";
|
||||
echo " }\n";
|
||||
|
||||
//echo " console.log('checked: '+radio_button.checked+' value:'+radio_button.value);\n";
|
||||
//echo " console.log('radio checked value: '+ radio_checked_value +' checked: '+radio_button.checked+' value:'+radio_button.value);\n";
|
||||
//else if (agent_status === 'Available') {\n";
|
||||
//echo " radio_button.checked = true;\n";
|
||||
//echo " }\n";
|
||||
echo " });\n";
|
||||
|
||||
echo " }\n";
|
||||
|
||||
echo "\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<div class='hud_box'>";
|
||||
|
||||
echo "<div class='hud_content' style='display: block;'>\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']) ? " </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 " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "<div class='action_bar sub'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_center_queues'].($agent['agent_name'] != '' ? " </b> Agent: <strong>".$agent['agent_name']."</strong>" : "</b>")."</div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'onclick'=>"list_form_submit('form_list_call_center_agent_dashboard');"]);
|
||||
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 " <tr class='list-header'>\n";
|
||||
echo " <th>".$text['label-queue_name']."</th>\n";
|
||||
echo " <th class='shrink'>".$text['label-status']."</th>\n";
|
||||
echo " </tr>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th>".$text['label-queue_name']."</th>\n";
|
||||
echo " <th class='shrink'>".$text['label-status']."</th>\n";
|
||||
// echo " <th>".$text['label-options']."</th>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($call_center_queues) && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
||||
if (is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
||||
$x = 0;
|
||||
foreach ($call_center_queues as $row) {
|
||||
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
||||
$onclick = '';
|
||||
echo "<tr class='list-row'>\n";
|
||||
echo " <td ".$onclick.">".escape($row['queue_name'])."</td>\n";
|
||||
// echo " <td>";
|
||||
// if ($row['queue_status'] == "Available") {
|
||||
// echo $text['option-available'];
|
||||
// }
|
||||
// if ($row['queue_status'] == "Logged Out") {
|
||||
// echo $text['option-logged_out'];
|
||||
// }
|
||||
// echo " </td>\n";
|
||||
echo " <td class='no-wrap right'>\n";
|
||||
echo " <input type='hidden' name='agents[".$x."][queue_extension]' value='".escape($row['queue_extension'])."'>\n";
|
||||
echo " <input type='hidden' name='agents[".$x."][agent_name]' value='".escape($agent['agent_name'])."'>\n";
|
||||
echo " <input type='hidden' name='agents[".$x."][id]' value='".escape($agent['call_center_agent_uuid'])."'>\n";
|
||||
echo " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Available' ".($row['queue_status'] == 'Available' ? "checked='checked'" : null)." onchange='handle_status_change(".$x.")'> ".$text['option-available']."</label>\n";
|
||||
echo " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Logged Out' ".($row['queue_status'] == 'Logged Out' ? "checked='checked'" : null)." onchange='handle_status_change(".$x.")'> ".$text['option-logged_out']."</label>\n";
|
||||
echo " <label style='margin: 0; cursor: pointer;'><input type='radio' name='agents[".$x."][agent_status]' value='On Break' ".($row['queue_status'] == 'On Break' ? "checked='checked'" : null)." onchange='handle_status_change(".$x.")'> ".$text['option-on_break']."</label>\n";
|
||||
echo " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Available' ".($row['queue_status'] == 'Available' ? "checked='checked'" : null)."> ".$text['option-available']."</label>\n";
|
||||
echo " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Logged Out' ".($row['queue_status'] == 'Logged Out' ? "checked='checked'" : null)."> ".$text['option-logged_out']."</label>\n";
|
||||
echo " <label style='margin: 0; cursor: pointer;'><input type='radio' name='agents[".$x."][agent_status]' value='On Break' ".($row['queue_status'] == 'On Break' ? "checked='checked'" : null)."> ".$text['option-on_break']."</label>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
|
||||
}
|
||||
unset($call_center_queues);
|
||||
}
|
||||
|
||||
echo " </table>\n";
|
||||
echo " <br />\n";
|
||||
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo " </form>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "</div>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,30 +2,7 @@
|
|||
|
||||
$array['dashboard'][$x]['dashboard_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261';
|
||||
$array['dashboard'][$x]['dashboard_name'] = '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_path'] = 'app/call_centers/resources/dashboard/call_center_agents.php';
|
||||
$array['dashboard'][$x]['dashboard_order'] = '180';
|
||||
$array['dashboard'][$x]['dashboard_enabled'] = 'false';
|
||||
$array['dashboard'][$x]['dashboard_description'] = 'Status for agent in a call center.';
|
||||
|
|
|
|||
|
|
@ -1,118 +0,0 @@
|
|||
<?php
|
||||
|
||||
//check the permission
|
||||
if (defined('STDIN')) {
|
||||
require_once dirname(__DIR__, 4) . "/resources/require.php";
|
||||
}
|
||||
else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//increase limits
|
||||
set_time_limit(300);
|
||||
ini_set('max_execution_time',300); //5 minutes
|
||||
ini_set('memory_limit', '256M');
|
||||
|
||||
//save the arguments to variables
|
||||
$script_name = $argv[0];
|
||||
if (!empty($argv[1])) {
|
||||
parse_str($argv[1], $_GET);
|
||||
}
|
||||
|
||||
//get the primary key
|
||||
if (Is_array($_GET)) {
|
||||
$hostname = urldecode($_GET['hostname']);
|
||||
$debug = $_GET['debug'];
|
||||
$sleep_seconds = $_GET['sleep'];
|
||||
}
|
||||
else {
|
||||
//invalid uuid
|
||||
exit;
|
||||
}
|
||||
|
||||
//connect to event socket
|
||||
$esl = event_socket::create();
|
||||
|
||||
//get the agent list from event socket
|
||||
$switch_cmd = 'callcenter_config agent list';
|
||||
$event_socket_str = trim(event_socket::api($switch_cmd));
|
||||
$agent_list = csv_to_named_array($event_socket_str, '|');
|
||||
|
||||
//get the agents from the database
|
||||
$sql = "select a.*, d.domain_name \n";
|
||||
$sql .= "from v_call_center_agents as a, v_domains as d \n";
|
||||
$sql .= "where a.domain_uuid = d.domain_uuid \n";
|
||||
$sql .= "order by agent_name asc \n";
|
||||
//echo $sql;
|
||||
$database = new database;
|
||||
$agents = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//view_array($results);
|
||||
foreach($agents as $row) {
|
||||
|
||||
//update the agent status
|
||||
if (is_array($agent_list)) {
|
||||
foreach ($agent_list as $r) {
|
||||
if ($r['name'] == $row['call_center_agent_uuid']) {
|
||||
$agent_status = $r['status'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//answer_state options: confirmed, early, and terminated
|
||||
if ($agent_status == 'Available') {
|
||||
$answer_state = 'confirmed';
|
||||
}
|
||||
else {
|
||||
$answer_state = 'terminated';
|
||||
}
|
||||
|
||||
//build the event
|
||||
if ($esl->is_connected()) {
|
||||
$event = "sendevent PRESENCE_IN\n";
|
||||
$event .= "proto: agent\n";
|
||||
$event .= "from: ".$row['agent_name']."@".$row['domain_name']."\n";
|
||||
$event .= "login: ".$row['agent_name']."@".$row['domain_name']."\n";
|
||||
$event .= "status: Active (1 waiting)\n";
|
||||
$event .= "rpid: unknown\n";
|
||||
$event .= "event_type: presence\n";
|
||||
$event .= "alt_event_type: dialog\n";
|
||||
$event .= "event_count: 1\n";
|
||||
$event .= "unique-id: ".uuid()."\n";
|
||||
$event .= "Presence-Call-Direction: outbound\n";
|
||||
$event .= "answer-state: ".$answer_state."\n";
|
||||
|
||||
$event = "sendevent PRESENCE_IN\n";
|
||||
$event .= "proto: agent\n";
|
||||
$event .= "from: ".$row['agent_id']."@".$row['domain_name']."\n";
|
||||
$event .= "login: ".$row['agent_id']."@".$row['domain_name']."\n";
|
||||
$event .= "status: Active (1 waiting)\n";
|
||||
$event .= "rpid: unknown\n";
|
||||
$event .= "event_type: presence\n";
|
||||
$event .= "alt_event_type: dialog\n";
|
||||
$event .= "event_count: 1\n";
|
||||
$event .= "unique-id: ".uuid()."\n";
|
||||
$event .= "Presence-Call-Direction: outbound\n";
|
||||
$event .= "answer-state: ".$answer_state."\n";
|
||||
}
|
||||
|
||||
//send message to the console
|
||||
if (isset($debug)) {
|
||||
echo "\n";
|
||||
echo "[presence][call_center] agent+".$row['agent_name']."@".$row['domain_name']." agent_status ".$agent_status." answer_state ".$answer_state."\n";
|
||||
}
|
||||
|
||||
//send the event
|
||||
$result = event_socket::command($event);
|
||||
if (isset($debug)) {
|
||||
print_r($result, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* * * * * cd /var/www/fusionpbx && php /var/www/fusionpbx/app/call_centers/resources/jobs/call_center_agents.php
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,131 +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) 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";
|
||||
|
||||
use maximal\audio\Waveform;
|
||||
|
||||
//check permisions
|
||||
if (permission_exists('recording_play')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//create the waveform file
|
||||
if ($_GET['id'] && !empty($_GET['data']) && !empty($_GET['type'])) {
|
||||
|
||||
//determine path of audio file by type
|
||||
if ($_GET['type'] == 'recordings') {
|
||||
|
||||
$slash = substr($_GET['data'],0,1) != '/' ? '/' : null;
|
||||
$full_file_path = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].$slash.str_replace($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'], '', $_GET['data']);
|
||||
|
||||
}
|
||||
else if ($_GET['type'] == 'sounds') {
|
||||
|
||||
//get first installed language (like en/us/callie)
|
||||
$language_paths = glob($_SESSION["switch"]['sounds']['dir']."/*/*/*");
|
||||
foreach ($language_paths as $key => $path) {
|
||||
$path = str_replace($_SESSION["switch"]['sounds']['dir'].'/', "", $path);
|
||||
$path_array = explode('/', $path);
|
||||
if (count($path_array) <> 3 || strlen($path_array[0]) <> 2 || strlen($path_array[1]) <> 2) {
|
||||
unset($language_paths[$key]);
|
||||
}
|
||||
$language_paths[$key] = str_replace($_SESSION["switch"]['sounds']['dir']."/","",$language_paths[$key] ?? '');
|
||||
if (empty($language_paths[$key])) {
|
||||
unset($language_paths[$key]);
|
||||
}
|
||||
}
|
||||
$language_path = $language_paths[0];
|
||||
|
||||
//determine the path for sound file
|
||||
$filename_parts = explode('/', str_replace('..', '', $_GET['data']));
|
||||
if (!is_array($filename_parts) || @sizeof($filename_parts) != 2) { exit; }
|
||||
$path = $_SESSION['switch']['sounds']['dir'].'/'.$language_path.'/'.$filename_parts[0].'/8000/';
|
||||
|
||||
//build full path to sound file
|
||||
$full_file_path = $path.$filename_parts[1];
|
||||
|
||||
}
|
||||
|
||||
//stream waveform file
|
||||
if (file_exists($full_file_path)) {
|
||||
|
||||
//temporary waveform image filename
|
||||
$temp_filename = 'waveform_'.$_GET['id'].'_'.rand(0000,9999).'.png';
|
||||
|
||||
//create temporary waveform image, if doesn't exist
|
||||
if (file_exists($temp_filename)) {
|
||||
$wf = true;
|
||||
}
|
||||
else {
|
||||
//create temporary waveform image
|
||||
$waveform = new Waveform($full_file_path);
|
||||
Waveform::$linesPerPixel = 1; // default: 8
|
||||
Waveform::$samplesPerLine = 512; // default: 512
|
||||
Waveform::$colorA = !empty($_SESSION['theme']['audio_player_waveform_color_a_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_a_leg']['text']) : [32,134,37,0.6]; // array rgba, left (a-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::$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::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
|
||||
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
|
||||
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
|
||||
}
|
||||
|
||||
//stream image to browser
|
||||
if ($wf === true && file_exists($temp_filename)) {
|
||||
|
||||
ob_clean();
|
||||
$fd = fopen($temp_filename, 'rb');
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Type: image/png");
|
||||
header('Content-Disposition: attachment; filename="'.$temp_filename.'"');
|
||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||
header("Content-Length: ".filesize($temp_filename));
|
||||
ob_clean();
|
||||
|
||||
fpassthru($fd);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//delete temp waveform image
|
||||
@unlink($temp_filename);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "გადართეთ ზარები ორ დანიშნულებას შორის სპეციალური კოდის აკრეფით.";
|
||||
$apps[$x]['description']['nl-nl'] = "Directe oproepen tussen twee bestemmingen via een feature code.";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
|
@ -35,9 +34,9 @@
|
|||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "call_flows";
|
||||
$apps[$x]['destinations'][$y]['name'] = "call_flows";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid, call_flow_uuid as uuid, call_flow_extension as destination, call_flow_extension as extension, call_flow_context as context from v_call_flows ";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid as uuid, call_flow_extension as destination, call_flow_context as context from v_call_flows ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(call_flow_extension) asc";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "call_flow_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['call_flow_uuid'] = "call_flow_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "call_flow_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "destination";
|
||||
|
|
@ -50,9 +49,9 @@
|
|||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "call_flows";
|
||||
$apps[$x]['destinations'][$y]['name'] = "call_flows";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid, call_flow_uuid as uuid, call_flow_feature_code as extension, call_flow_feature_code as destination, call_flow_context as context from v_call_flows ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_feature_code is not null and call_flow_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(call_flow_feature_code) asc";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid as uuid, call_flow_extension as extension, call_flow_feature_code as destination, call_flow_context as context from v_call_flows ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "call_flow_extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['uuid'] = "uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "destination";
|
||||
|
|
@ -92,16 +91,6 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
|
||||
//default settings
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "425b6aed-5039-490a-ba31-e49aa57b5902";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_flow";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "extension_range";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "30-39";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the suggested extension range(s) for call flows";
|
||||
|
||||
//cache details
|
||||
$apps[$x]['cache']['key'] = "dialplan.\${call_flow_context}";
|
||||
|
||||
|
|
@ -208,29 +197,5 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
if ($domains_processed == 1) {
|
||||
|
||||
//update the dialplan order
|
||||
$database = new database;
|
||||
$sql = "update v_call_flows set call_flow_enabled = 'true' where call_flow_enabled is null;\n";
|
||||
$database->execute($sql);
|
||||
unset($sql);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,36 +3,29 @@
|
|||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Flows";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Flows";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "اتصل بالتدفقات";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Anruf Steuerung";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Call Flows";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Anruf Steuerung";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Flujo de Llamada";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Flows";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Circulation d'Appel";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "cinématiques d'Appel";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "התקשר זרימות";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Deviatori di Chiamata";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ზარების მიმდინარეობა";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep besturing";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Przepływ rozmów";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Fluxo de chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Fluxos de chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Fluxuri de apeluri";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Переключатель вызовов";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Samtalsflöden";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Потоки дзвінків";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "通话流程";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールフロー";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 흐름";
|
||||
$apps[$x]['menu'][$y]['uuid'] = "b0939384-7055-44e8-8b4c-9f72293e1878";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_flows/call_flows.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
Lewis Hallam <lewishallam80@gmail.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
|
|
@ -42,20 +43,8 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$call_flow_sound = '';
|
||||
$call_flow_alternate_sound = '';
|
||||
$call_flow_name = '';
|
||||
$call_flow_extension = '';
|
||||
$call_flow_feature_code = '';
|
||||
$call_flow_pin_number = '';
|
||||
$call_flow_label = '';
|
||||
$call_flow_alternate_label = '';
|
||||
$call_flow_description = '';
|
||||
$call_flow_status = '';
|
||||
|
||||
//action add or update
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$call_flow_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -67,11 +56,11 @@
|
|||
$destination = new destinations;
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
if (is_array($_POST)) {
|
||||
|
||||
//set the variables from the http values
|
||||
$call_flow_uuid = $_POST["call_flow_uuid"] ?? null;
|
||||
$dialplan_uuid = $_POST["dialplan_uuid"] ?? null;
|
||||
$call_flow_uuid = $_POST["call_flow_uuid"];
|
||||
$dialplan_uuid = $_POST["dialplan_uuid"];
|
||||
$call_flow_name = $_POST["call_flow_name"];
|
||||
$call_flow_extension = $_POST["call_flow_extension"];
|
||||
$call_flow_feature_code = $_POST["call_flow_feature_code"];
|
||||
|
|
@ -84,7 +73,7 @@
|
|||
$call_flow_alternate_sound = $_POST["call_flow_alternate_sound"];
|
||||
$call_flow_alternate_destination = $_POST["call_flow_alternate_destination"];
|
||||
$call_flow_context = $_POST["call_flow_context"];
|
||||
$call_flow_enabled = $_POST["call_flow_enabled"] ?? 'false';
|
||||
$call_flow_enabled = $_POST["call_flow_enabled"];
|
||||
$call_flow_description = $_POST["call_flow_description"];
|
||||
|
||||
//seperate the action and the param
|
||||
|
|
@ -99,7 +88,7 @@
|
|||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//get the uuid from the POST
|
||||
if ($action == "update") {
|
||||
|
|
@ -116,25 +105,25 @@
|
|||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (empty($domain_uuid)) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (empty($call_flow_uuid)) { $msg .= $text['message-required']." ".$text['label-call_flow_uuid']."<br>\n"; }
|
||||
//if (empty($dialplan_uuid)) { $msg .= $text['message-required']." ".$text['label-dialplan_uuid']."<br>\n"; }
|
||||
//if (empty($call_flow_name)) { $msg .= $text['message-required']." ".$text['label-call_flow_name']."<br>\n"; }
|
||||
if (empty($call_flow_extension)) { $msg .= $text['message-required']." ".$text['label-call_flow_extension']."<br>\n"; }
|
||||
//if (empty($call_flow_feature_code)) { $msg .= $text['message-required']." ".$text['label-call_flow_feature_code']."<br>\n"; }
|
||||
//if (empty($call_flow_context)) { $msg .= $text['message-required']." ".$text['label-call_flow_context']."<br>\n"; }
|
||||
//if (empty($call_flow_status)) { $msg .= $text['message-required']." ".$text['label-call_flow_status']."<br>\n"; }
|
||||
//if (empty($call_flow_pin_number)) { $msg .= $text['message-required']." ".$text['label-call_flow_pin_number']."<br>\n"; }
|
||||
//if (empty($call_flow_label)) { $msg .= $text['message-required']." ".$text['label-call_flow_label']."<br>\n"; }
|
||||
//if (empty($call_flow_sound)) { $msg .= $text['message-required']." ".$text['label-call_flow_sound']."<br>\n"; }
|
||||
if (empty($call_flow_app)) { $msg .= $text['message-required']." ".($text['label-call_flow_app'] ?? '')."<br>\n"; }
|
||||
if (empty($call_flow_data)) { $msg .= $text['message-required']." ".($text['label-call_flow_data'] ?? '')."<br>\n"; }
|
||||
//if (empty($call_flow_alternate_label)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_label']."<br>\n"; }
|
||||
//if (empty($call_flow_alternate_sound)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_sound']."<br>\n"; }
|
||||
//if (empty($call_flow_alternate_app)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_app']."<br>\n"; }
|
||||
//if (empty($call_flow_alternate_data)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_data']."<br>\n"; }
|
||||
//if (empty($call_flow_description)) { $msg .= $text['message-required']." ".$text['label-call_flow_description']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (strlen($call_flow_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_uuid']."<br>\n"; }
|
||||
//if (strlen($dialplan_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-dialplan_uuid']."<br>\n"; }
|
||||
//if (strlen($call_flow_name) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_name']."<br>\n"; }
|
||||
if (strlen($call_flow_extension) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_extension']."<br>\n"; }
|
||||
if (strlen($call_flow_feature_code) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_feature_code']."<br>\n"; }
|
||||
//if (strlen($call_flow_context) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_context']."<br>\n"; }
|
||||
//if (strlen($call_flow_status) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_status']."<br>\n"; }
|
||||
//if (strlen($call_flow_pin_number) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_pin_number']."<br>\n"; }
|
||||
//if (strlen($call_flow_label) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_label']."<br>\n"; }
|
||||
//if (strlen($call_flow_sound) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_sound']."<br>\n"; }
|
||||
if (strlen($call_flow_app) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_app']."<br>\n"; }
|
||||
if (strlen($call_flow_data) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_data']."<br>\n"; }
|
||||
//if (strlen($call_flow_alternate_label) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_label']."<br>\n"; }
|
||||
//if (strlen($call_flow_alternate_sound) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_sound']."<br>\n"; }
|
||||
//if (strlen($call_flow_alternate_app) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_app']."<br>\n"; }
|
||||
//if (strlen($call_flow_alternate_data) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_data']."<br>\n"; }
|
||||
//if (strlen($call_flow_description) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -148,12 +137,12 @@
|
|||
}
|
||||
|
||||
//add the call_flow_uuid
|
||||
if (empty($call_flow_uuid)) {
|
||||
if (!is_uuid($call_flow_uuid)) {
|
||||
$call_flow_uuid = uuid();
|
||||
}
|
||||
|
||||
//add the dialplan_uuid
|
||||
if (empty($dialplan_uuid)) {
|
||||
if (!is_uuid($dialplan_uuid)) {
|
||||
$dialplan_uuid = uuid();
|
||||
}
|
||||
|
||||
|
|
@ -180,18 +169,16 @@
|
|||
$destination_feature = str_replace("+", "\+", $destination_feature);
|
||||
|
||||
//build the xml dialplan
|
||||
$dialplan_xml = "<extension name=\"".xml::sanitize($call_flow_name)."\" continue=\"\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
|
||||
if (!empty($call_flow_feature_code)) {
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($destination_feature)."$\" break=\"on-true\">\n";
|
||||
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"sleep\" data=\"200\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"feature_code=true\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".xml::sanitize($call_flow_uuid)."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"lua\" data=\"call_flow.lua\"/>\n";
|
||||
$dialplan_xml .= " </condition>\n";
|
||||
}
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($destination_extension)."$\">\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".xml::sanitize($call_flow_uuid)."\"/>\n";
|
||||
$dialplan_xml = "<extension name=\"".$call_flow_name."\" continue=\"\" uuid=\"".$dialplan_uuid."\">\n";
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$destination_feature."$\" break=\"on-true\">\n";
|
||||
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"sleep\" data=\"200\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"feature_code=true\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".$call_flow_uuid."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"lua\" data=\"call_flow.lua\"/>\n";
|
||||
$dialplan_xml .= " </condition>\n";
|
||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$destination_extension."$\">\n";
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".$call_flow_uuid."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"lua\" data=\"call_flow.lua\"/>\n";
|
||||
$dialplan_xml .= " </condition>\n";
|
||||
$dialplan_xml .= "</extension>\n";
|
||||
|
|
@ -237,7 +224,7 @@
|
|||
$array["call_flows"][$i]["call_flow_description"] = $call_flow_description;
|
||||
|
||||
//add the dialplan permission
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add("dialplan_add", "temp");
|
||||
$p->add("dialplan_edit", "temp");
|
||||
|
||||
|
|
@ -245,7 +232,7 @@
|
|||
$database = new database;
|
||||
$database->app_name = 'call_flows';
|
||||
$database->app_uuid = 'b1b70f85-6b42-429b-8c5a-60c8b02b7d14';
|
||||
if (!empty($call_flow_uuid)) {
|
||||
if (strlen($call_flow_uuid) > 0) {
|
||||
$database->uuid($call_flow_uuid);
|
||||
}
|
||||
$database->save($array);
|
||||
|
|
@ -255,29 +242,6 @@
|
|||
$p->delete("dialplan_add", "temp");
|
||||
$p->delete("dialplan_edit", "temp");
|
||||
|
||||
// Update subscribed endpoints
|
||||
if (!empty($call_flow_feature_code)) {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
//send the event
|
||||
$event = "sendevent PRESENCE_IN\n";
|
||||
$event .= "proto: flow\n";
|
||||
$event .= "event_type: presence\n";
|
||||
$event .= "alt_event_type: dialog\n";
|
||||
$event .= "Presence-Call-Direction: outbound\n";
|
||||
$event .= "state: Active (1 waiting)\n";
|
||||
$event .= "from: flow+".$call_flow_feature_code."@".$_SESSION['domain_name']."\n";
|
||||
$event .= "login: flow+".$call_flow_feature_code."@".$_SESSION['domain_name']."\n";
|
||||
$event .= "unique-id: ".$call_flow_uuid."\n";
|
||||
if ($call_flow_status == "true") {
|
||||
$event .= "answer-state: confirmed\n";
|
||||
} else {
|
||||
$event .= "answer-state: terminated\n";
|
||||
}
|
||||
event_socket::command($event);
|
||||
}
|
||||
}
|
||||
|
||||
//debug info
|
||||
//echo "<pre>";
|
||||
//print_r($message);
|
||||
|
|
@ -307,10 +271,10 @@
|
|||
header("Location: call_flows.php");
|
||||
return;
|
||||
}
|
||||
} //(is_array($_POST) && empty($_POST["persistformvar"]))
|
||||
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
$call_flow_uuid = $_GET["id"];
|
||||
$sql = "select * from v_call_flows ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
|
|
@ -360,16 +324,155 @@
|
|||
}
|
||||
|
||||
//set the context for users that are not in the superadmin group
|
||||
if (empty($call_flow_context)) {
|
||||
if (strlen($call_flow_context) == 0) {
|
||||
$call_flow_context = $_SESSION['domain_name'];
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if (empty($call_flow_enabled)) { $call_flow_enabled = 'true'; }
|
||||
//get the recordings
|
||||
$sql = "select recording_name, recording_filename from v_recordings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by recording_name asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$recordings = $database->select($sql, $parameters, 'all');
|
||||
unset($parameters, $sql);
|
||||
|
||||
//get the sounds
|
||||
$sounds = new sounds;
|
||||
$audio_files = $sounds->get();
|
||||
if (if_group("superadmin")) {
|
||||
echo "<script>\n";
|
||||
echo "var Objs;\n";
|
||||
echo "\n";
|
||||
echo "function changeToInput(obj){\n";
|
||||
echo " tb=document.createElement('INPUT');\n";
|
||||
echo " tb.type='text';\n";
|
||||
echo " tb.name=obj.name;\n";
|
||||
echo " tb.setAttribute('class', 'formfld');\n";
|
||||
//echo " tb.setAttribute('style', 'width: 380px;');\n";
|
||||
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
|
||||
echo " tbb=document.createElement('INPUT');\n";
|
||||
echo " tbb.setAttribute('class', 'btn');\n";
|
||||
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
||||
echo " tbb.type='button';\n";
|
||||
echo " tbb.value=$('<div />').html('◁').text();\n";
|
||||
echo " tbb.objs=[obj,tb,tbb];\n";
|
||||
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
|
||||
echo " obj.parentNode.insertBefore(tb,obj);\n";
|
||||
echo " obj.parentNode.insertBefore(tbb,obj);\n";
|
||||
echo " obj.parentNode.removeChild(obj);\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
echo "function Replace(obj){\n";
|
||||
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[1]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[2]);\n";
|
||||
echo "}\n";
|
||||
echo "</script>\n";
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
function sound_select_list($var, $name, $description_name, $load_sound=false) {
|
||||
global $text, $recordings, $db;
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-' . $description_name]."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
echo "<select name='".escape($name)."' class='formfld' ".((if_group("superadmin")) ? "onchange='changeToInput(this);'" : null).">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
//misc optgroup
|
||||
if (if_group("superadmin")) {
|
||||
echo "<optgroup label=".$text['miscellaneous'].">\n";
|
||||
echo " <option value='say:'>say:</option>\n";
|
||||
echo " <option value='tone_stream:'>tone_stream:</option>\n";
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//recordings
|
||||
$tmp_selected = false;
|
||||
if (count($recordings) > 0) {
|
||||
echo "<optgroup label=".$text['recordings'].">\n";
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($var == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($var) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
|
||||
}
|
||||
else if ($var == $recording_filename && strlen($var) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($recording_filename)."'>".escape($recording_name)."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//phrases
|
||||
$sql = "select * from v_phrases where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($parameters, $sql);
|
||||
if (is_array($result)) {
|
||||
echo "<optgroup label='Phrases'>\n";
|
||||
foreach ($result as &$row) {
|
||||
if ($var == "phrase:".$row["phrase_uuid"]) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='phrase:".escape($row["phrase_uuid"])."' selected='selected'>".escape($row["phrase_name"])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='phrase:".escape($row["phrase_uuid"])."'>".escape($row["phrase_name"])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//sounds
|
||||
if ($load_sound) {
|
||||
$file = new file;
|
||||
$sound_files = $file->sounds();
|
||||
if (is_array($sound_files)) {
|
||||
echo "<optgroup label=".$text["sounds"].">\n";
|
||||
foreach ($sound_files as $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($var, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$var = substr($var, 71);
|
||||
}
|
||||
if ($var == $value) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".escape($value)."' selected='selected'>".escape($value)."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($value)."'>".escape($value)."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
//select
|
||||
if (if_group("superadmin")) {
|
||||
if (!$tmp_selected && strlen($var) > 0) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$var)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($var)."' selected='selected'>".escape($var)."</option>\n";
|
||||
}
|
||||
else if (substr($var, -3) == "wav" || substr($var, -3) == "mp3") {
|
||||
echo " <option value='".escape($var)."' selected='selected'>".escape($var)."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($var)."' selected='selected'>".escape($var)."</option>\n";
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
unset($tmp_selected);
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo $text['description-' . $description_name]."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
@ -380,73 +483,6 @@
|
|||
require_once "resources/header.php";
|
||||
|
||||
//show the content
|
||||
if (permission_exists('recording_play') || permission_exists('recording_download')) {
|
||||
echo "<script type='text/javascript' language='JavaScript'>\n";
|
||||
echo " function set_playable(id, audio_selected, audio_type) {\n";
|
||||
echo " file_ext = audio_selected.split('.').pop();\n";
|
||||
echo " var mime_type = '';\n";
|
||||
echo " switch (file_ext) {\n";
|
||||
echo " case 'wav': mime_type = 'audio/wav'; break;\n";
|
||||
echo " case 'mp3': mime_type = 'audio/mpeg'; break;\n";
|
||||
echo " case 'ogg': mime_type = 'audio/ogg'; break;\n";
|
||||
echo " }\n";
|
||||
echo " if (mime_type != '' && (audio_type == 'recordings' || audio_type == 'sounds')) {\n";
|
||||
echo " if (audio_type == 'recordings') {\n";
|
||||
echo " $('#recording_audio_' + id).attr('src', '../recordings/recordings.php?action=download&type=rec&filename=' + audio_selected);\n";
|
||||
echo " }\n";
|
||||
echo " else if (audio_type == 'sounds') {\n";
|
||||
echo " $('#recording_audio_' + id).attr('src', '../switch/sounds.php?action=download&filename=' + audio_selected);\n";
|
||||
echo " }\n";
|
||||
echo " $('#recording_audio_' + id).attr('type', mime_type);\n";
|
||||
echo " $('#recording_button_' + id).show();\n";
|
||||
echo " }\n";
|
||||
echo " else {\n";
|
||||
echo " $('#recording_button_' + id).hide();\n";
|
||||
echo " $('#recording_audio_' + id).attr('src','').attr('type','');\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
if (if_group("superadmin")) {
|
||||
echo "<script type='text/javascript' language='JavaScript'>\n";
|
||||
echo " var objs;\n";
|
||||
echo " function toggle_select_input(obj, instance_id){\n";
|
||||
echo " tb=document.createElement('INPUT');\n";
|
||||
echo " tb.type='text';\n";
|
||||
echo " tb.name=obj.name;\n";
|
||||
echo " tb.className='formfld';\n";
|
||||
echo " tb.setAttribute('id', instance_id);\n";
|
||||
echo " tb.setAttribute('style', 'width: ' + obj.offsetWidth + 'px;');\n";
|
||||
if (!empty($on_change)) {
|
||||
echo " tb.setAttribute('onchange', \"".$on_change."\");\n";
|
||||
echo " tb.setAttribute('onkeyup', \"".$on_change."\");\n";
|
||||
}
|
||||
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
|
||||
echo " document.getElementById('btn_select_to_input_' + instance_id).style.display = 'none';\n";
|
||||
echo " tbb=document.createElement('INPUT');\n";
|
||||
echo " tbb.setAttribute('class', 'btn');\n";
|
||||
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
||||
echo " tbb.type='button';\n";
|
||||
echo " tbb.value=$('<div />').html('◁').text();\n";
|
||||
echo " tbb.objs=[obj,tb,tbb];\n";
|
||||
echo " tbb.onclick=function(){ replace_element(this.objs, instance_id); }\n";
|
||||
echo " obj.parentNode.insertBefore(tb,obj);\n";
|
||||
echo " obj.parentNode.insertBefore(tbb,obj);\n";
|
||||
echo " obj.parentNode.removeChild(obj);\n";
|
||||
echo " replace_element(this.objs, instance_id);\n";
|
||||
echo " }\n";
|
||||
echo " function replace_element(obj, instance_id){\n";
|
||||
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[1]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[2]);\n";
|
||||
echo " document.getElementById('btn_select_to_input_' + instance_id).style.display = 'inline';\n";
|
||||
if (!empty($on_change)) {
|
||||
echo " ".$on_change.";\n";
|
||||
}
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
echo "<form name='frm' id='frm' method='post'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
|
|
@ -458,7 +494,6 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -477,14 +512,14 @@
|
|||
echo " ".$text['label-call_flow_extension']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_extension' maxlength='255' value=\"".escape($call_flow_extension)."\" required='required' placeholder=\"".($_SESSION['call_flow']['extension_range']['text'] ?? '')."\">\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_extension' maxlength='255' value=\"".escape($call_flow_extension)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_flow_extension']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_flow_feature_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
|
@ -502,7 +537,7 @@
|
|||
echo " <select class='formfld' name='call_flow_status'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($call_flow_status == "true") {
|
||||
if (!empty($call_flow_label)) {
|
||||
if (strlen($call_flow_label) > 0) {
|
||||
echo " <option value='true' selected='selected'>".escape($call_flow_label)."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
|
@ -510,7 +545,7 @@
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (!empty($call_flow_label)) {
|
||||
if (strlen($call_flow_label) > 0) {
|
||||
echo " <option value='true'>".escape($call_flow_label)."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
|
@ -518,7 +553,7 @@
|
|||
}
|
||||
}
|
||||
if ($call_flow_status == "false") {
|
||||
if (!empty($call_flow_alternate_label)) {
|
||||
if (strlen($call_flow_alternate_label) > 0) {
|
||||
echo " <option value='false' selected='selected'>".escape($call_flow_alternate_label)."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
|
@ -526,7 +561,7 @@
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (!empty($call_flow_alternate_label)) {
|
||||
if (strlen($call_flow_alternate_label) > 0) {
|
||||
echo " <option value='false'>".escape($call_flow_alternate_label)."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
|
@ -557,91 +592,33 @@
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_label' maxlength='255' value=\"".escape($call_flow_label)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo !empty($text['description-call_flow_label'])."\n";
|
||||
echo $text['description-call_flow_label']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$instance_id = 'call_flow_sound';
|
||||
$instance_label = 'call_flow_sound';
|
||||
$instance_value = $call_flow_sound;
|
||||
sound_select_list($call_flow_sound, 'call_flow_sound', 'call_flow_sound', true);
|
||||
|
||||
/*
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' rowspan='2' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-'.$instance_label]."\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_flow_sound']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable playback_progress_bar_background' id='recording_progress_bar_".$instance_id."' onclick=\"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'));\" style='display: none; border-bottom: none; padding-top: 0 !important; padding-bottom: 0 !important;' align='left'><span class='playback_progress_bar' id='recording_progress_".$instance_id."'></span></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo "<select name='".$instance_id."' id='".$instance_id."' class='formfld' ".(permission_exists('recording_play') || permission_exists('recording_download') ? "onchange=\"recording_reset('".$instance_id."'); set_playable('".$instance_id."', this.value, this.options[this.selectedIndex].parentNode.getAttribute('data-type'));\"" : null).">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
$found = $playable = false;
|
||||
if (!empty($audio_files) && is_array($audio_files) && @sizeof($audio_files) != 0) {
|
||||
foreach ($audio_files as $key => $value) {
|
||||
echo "<optgroup label=".$text['label-'.$key]." data-type='".$key."'>\n";
|
||||
foreach ($value as $row) {
|
||||
if ($key == 'recordings') {
|
||||
if (
|
||||
!empty($instance_value) &&
|
||||
($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
|
||||
file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
|
||||
) {
|
||||
$selected = "selected='selected'";
|
||||
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
|
||||
$found = true;
|
||||
}
|
||||
else {
|
||||
unset($selected);
|
||||
}
|
||||
}
|
||||
else if ($key == 'sounds') {
|
||||
if (!empty($instance_value) && $instance_value == $row["value"]) {
|
||||
$selected = "selected='selected'";
|
||||
$playable = '../switch/sounds.php?action=download&filename='.$row["value"];
|
||||
$found = true;
|
||||
}
|
||||
else {
|
||||
unset($selected);
|
||||
}
|
||||
}
|
||||
else {
|
||||
unset($selected);
|
||||
}
|
||||
echo " <option value='".escape($row["value"])."' ".($selected ?? '').">".escape($row["name"])."</option>\n";
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
if (if_group("superadmin") && !empty($instance_value) && !$found) {
|
||||
echo " <option value='".escape($instance_value)."' selected='selected'>".escape($instance_value)."</option>\n";
|
||||
}
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
if (if_group("superadmin")) {
|
||||
echo "<input type='button' id='btn_select_to_input_".$instance_id."' class='btn' name='' alt='back' onclick='toggle_select_input(document.getElementById(\"".$instance_id."\"), \"".$instance_id."\"); this.style.visibility=\"hidden\";' value='◁'>";
|
||||
}
|
||||
if ((permission_exists('recording_play') || permission_exists('recording_download')) && !empty($playable)) {
|
||||
switch (pathinfo($playable, PATHINFO_EXTENSION)) {
|
||||
case 'wav' : $mime_type = 'audio/wav'; break;
|
||||
case 'mp3' : $mime_type = 'audio/mpeg'; 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 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);
|
||||
}
|
||||
echo " <input class='formfld' type='text' name='call_flow_sound' maxlength='255' value=\"".escape($call_flow_sound)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-'.$instance_label]."\n";
|
||||
echo $text['description-call_flow_sound']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
*/
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_flow_destination']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
//set the selected value
|
||||
$select_value = '';
|
||||
if (!empty($call_flow_app) && !empty($call_flow_data)) {
|
||||
//set the selected value
|
||||
if (strlen($call_flow_app.$call_flow_data) > 0) {
|
||||
$select_value = $call_flow_app.':'.$call_flow_data;
|
||||
}
|
||||
//show the destination list
|
||||
|
|
@ -663,86 +640,28 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$instance_id = 'call_flow_alternate_sound';
|
||||
$instance_label = 'call_flow_alternate_sound';
|
||||
$instance_value = $call_flow_alternate_sound;
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' rowspan='2' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-'.$instance_label]."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable playback_progress_bar_background' id='recording_progress_bar_".$instance_id."' onclick=\"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'));\" style='display: none; border-bottom: none; padding-top: 0 !important; padding-bottom: 0 !important;' align='left'><span class='playback_progress_bar' id='recording_progress_".$instance_id."'></span></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo "<select name='".$instance_id."' id='".$instance_id."' class='formfld' ".(permission_exists('recording_play') || permission_exists('recording_download') ? "onchange=\"recording_reset('".$instance_id."'); set_playable('".$instance_id."', this.value, this.options[this.selectedIndex].parentNode.getAttribute('data-type'));\"" : null).">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
$found = $playable = false;
|
||||
if (!empty($audio_files) && is_array($audio_files) && @sizeof($audio_files) != 0) {
|
||||
foreach ($audio_files as $key => $value) {
|
||||
echo "<optgroup label=".$text['label-'.$key]." data-type='".$key."'>\n";
|
||||
foreach ($value as $row) {
|
||||
if ($key == 'recordings') {
|
||||
if (
|
||||
!empty($instance_value) &&
|
||||
($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
|
||||
file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
|
||||
) {
|
||||
$selected = "selected='selected'";
|
||||
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
|
||||
$found = true;
|
||||
}
|
||||
else {
|
||||
unset($selected);
|
||||
}
|
||||
}
|
||||
else if ($key == 'sounds') {
|
||||
if (!empty($instance_value) && $instance_value == $row["value"]) {
|
||||
$selected = "selected='selected'";
|
||||
$playable = '../switch/sounds.php?action=download&filename='.$row["value"];
|
||||
$found = true;
|
||||
}
|
||||
else {
|
||||
unset($selected);
|
||||
}
|
||||
}
|
||||
else {
|
||||
unset($selected);
|
||||
}
|
||||
echo " <option value='".escape($row["value"])."' ".($selected ?? '').">".escape($row["name"])."</option>\n";
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
if (if_group("superadmin") && !empty($instance_value) && !$found) {
|
||||
echo " <option value='".escape($instance_value)."' selected='selected'>".escape($instance_value)."</option>\n";
|
||||
}
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
if (if_group("superadmin")) {
|
||||
echo "<input type='button' id='btn_select_to_input_".$instance_id."' class='btn' name='' alt='back' onclick='toggle_select_input(document.getElementById(\"".$instance_id."\"), \"".$instance_id."\"); this.style.visibility=\"hidden\";' value='◁'>";
|
||||
}
|
||||
if ((permission_exists('recording_play') || permission_exists('recording_download')) && (!empty($playable) || empty($instance_value))) {
|
||||
switch (pathinfo($playable, PATHINFO_EXTENSION)) {
|
||||
case 'wav' : $mime_type = 'audio/wav'; break;
|
||||
case 'mp3' : $mime_type = 'audio/mpeg'; 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 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);
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-'.$instance_label]."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
sound_select_list($call_flow_alternate_sound, 'call_flow_alternate_sound', 'call_flow_alternate_sound', true);
|
||||
|
||||
/*
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_flow_alternate_sound']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_alternate_sound' maxlength='255' value=\"".escape($call_flow_alternate_sound)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_flow_alternate_sound']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
*/
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_flow_alternate_destination']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$select_value = '';
|
||||
if (!empty($call_flow_alternate_app) && !empty($call_flow_alternate_data)) {
|
||||
if (strlen($call_flow_alternate_app.$call_flow_alternate_data) > 0) {
|
||||
$select_value = $call_flow_alternate_app.':'.$call_flow_alternate_data;
|
||||
}
|
||||
echo $destination->select('dialplan', 'call_flow_alternate_destination', $select_value);
|
||||
|
|
@ -770,18 +689,21 @@
|
|||
echo " ".$text['label-enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='call_flow_enabled' name='call_flow_enabled' value='true' ".($call_flow_enabled == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
echo " </label>\n";
|
||||
echo " <select class='formfld' name='call_flow_enabled'>\n";
|
||||
if ($call_flow_enabled == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' id='call_flow_enabled' name='call_flow_enabled'>\n";
|
||||
echo " <option value='true' ".($call_flow_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($call_flow_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if ($call_flow_enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_flow_description']."\n";
|
||||
|
|
@ -789,12 +711,11 @@
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"".escape($call_flow_description)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo !empty($text['description-call_flow_description'])."\n";
|
||||
echo $text['description-call_flow_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />";
|
||||
|
||||
if ($action == "update") {
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/paging.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
|
|
@ -42,24 +43,16 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get search
|
||||
$search = $_REQUEST['search'] ?? null;
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_flows'])) {
|
||||
if (is_array($_POST['call_flows'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$call_flows = $_POST['call_flows'];
|
||||
$toggle_field = $_POST['toggle_field'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($call_flows)) {
|
||||
if ($action != '' && is_array($call_flows) && @sizeof($call_flows) != 0) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('call_flow_add')) {
|
||||
|
|
@ -87,13 +80,12 @@
|
|||
}
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$sort = $order_by == 'call_flow_extension' ? 'natural' : null;
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($search ?? '');
|
||||
if (!empty($search)) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "lower(call_flow_name) like :search ";
|
||||
$sql_search .= "or lower(call_flow_extension) like :search ";
|
||||
|
|
@ -110,32 +102,32 @@
|
|||
//prepare to page the results
|
||||
$sql = "select count(*) from v_call_flows ";
|
||||
$sql .= "where true ";
|
||||
if ($show != "all" || !permission_exists('call_flow_all')) {
|
||||
if ($_GET['show'] != "all" || !permission_exists('call_flow_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
$sql .= $sql_search ?? '';
|
||||
$sql .= $sql_search;
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($show == "all" && permission_exists('call_flow_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql ?? '');
|
||||
$sql .= order_by($order_by, $order, 'call_flow_name', 'asc', $sort);
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order, 'call_flow_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$call_flows = $database->select($sql, $parameters ?? null, 'all');
|
||||
$call_flows = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -158,7 +150,7 @@
|
|||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_flows']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_flows']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('call_flow_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'call_flow_edit.php']);
|
||||
|
|
@ -179,7 +171,7 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_flow_all')) {
|
||||
if ($show == 'all') {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
|
|
@ -215,15 +207,14 @@
|
|||
echo "<input type='hidden' id='toggle_field' name='toggle_field' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($call_flows) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($call_flows ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_flow_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('call_flow_name', $text['label-call_flow_name'], $order_by, $order);
|
||||
|
|
@ -235,20 +226,16 @@
|
|||
}
|
||||
echo th_order_by('call_flow_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('call_flow_description', $text['label-call_flow_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_flow_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($call_flows)) {
|
||||
if (is_array($call_flows)) {
|
||||
$x = 0;
|
||||
foreach ($call_flows as $row) {
|
||||
$list_row_url = '';
|
||||
if (permission_exists('call_flow_edit')) {
|
||||
$list_row_url = "call_flow_edit.php?id=".urlencode($row['call_flow_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
|
||||
|
|
@ -257,8 +244,8 @@
|
|||
echo " <input type='hidden' name='call_flows[$x][uuid]' value='".escape($row['call_flow_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_flow_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
|
|
@ -291,7 +278,7 @@
|
|||
echo escape($row['call_flow_enabled']);
|
||||
}
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])." </td>\n";
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button) {
|
||||
if (permission_exists('call_flow_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -303,7 +290,6 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
|
||||
|
|
@ -315,4 +301,3 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
//define the call_flows class
|
||||
if (!class_exists('call_flows')) {
|
||||
class call_flows {
|
||||
|
||||
/**
|
||||
|
|
@ -59,6 +60,16 @@
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
|
|
@ -120,7 +131,7 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_delete', 'temp');
|
||||
$p->add('dialplan_detail_delete', 'temp');
|
||||
|
||||
|
|
@ -186,20 +197,17 @@
|
|||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($uuids)) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, ";
|
||||
$sql .= "dialplan_uuid, call_flow_feature_code, call_flow_context from v_".$this->table." ";
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_uuid, call_flow_context from v_".$this->table." ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($rows)) {
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$call_flows[$row['uuid']]['state'] = $row['toggle'];
|
||||
$call_flows[$row['uuid']]['dialplan_uuid'] = $row['dialplan_uuid'];
|
||||
$call_flows[$row['uuid']]['call_flow_feature_code'] = $row['call_flow_feature_code'];
|
||||
$call_flow_contexts[] = $row['call_flow_context'];
|
||||
}
|
||||
}
|
||||
|
|
@ -222,7 +230,7 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_edit', 'temp');
|
||||
|
||||
//save the array
|
||||
|
|
@ -255,36 +263,7 @@
|
|||
//set message
|
||||
message::add($text['message-toggle']);
|
||||
}
|
||||
unset($records);
|
||||
|
||||
//toggle the presence
|
||||
if ($this->toggle_field != 'call_flow_enabled') {
|
||||
foreach($call_flows as $uuid => $row) {
|
||||
//prepare the event
|
||||
$cmd = "sendevent PRESENCE_IN\n";
|
||||
$cmd .= "proto: flow\n";
|
||||
$cmd .= "login: ".$row['call_flow_feature_code']."@".$_SESSION['domain_name']."\n";
|
||||
$cmd .= "from: ".$row['call_flow_feature_code']."@".$_SESSION['domain_name']."\n";
|
||||
$cmd .= "status: Active (1 waiting)\n";
|
||||
$cmd .= "rpid: unknown\n";
|
||||
$cmd .= "event_type: presence\n";
|
||||
$cmd .= "alt_event_type: dialog\n";
|
||||
$cmd .= "event_count: 1\n";
|
||||
$cmd .= "unique-id: ".uuid()."\n";
|
||||
$cmd .= "Presence-Call-Direction: outbound\n";
|
||||
if ($call_flow['state'] == 'true') {
|
||||
$cmd .= "answer-state: confirmed\n";
|
||||
}
|
||||
else {
|
||||
$cmd .= "answer-state: terminated\n";
|
||||
}
|
||||
|
||||
//send the event
|
||||
$switch_result = event_socket::command($cmd);
|
||||
}
|
||||
}
|
||||
unset($call_flows);
|
||||
|
||||
unset($records, $call_flows);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -373,7 +352,7 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_add', 'temp');
|
||||
|
||||
//save the array
|
||||
|
|
@ -409,3 +388,6 @@
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,131 +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) 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";
|
||||
|
||||
use maximal\audio\Waveform;
|
||||
|
||||
//check permisions
|
||||
if (permission_exists('recording_play')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//create the waveform file
|
||||
if ($_GET['id'] && !empty($_GET['data']) && !empty($_GET['type'])) {
|
||||
|
||||
//determine path of audio file by type
|
||||
if ($_GET['type'] == 'recordings') {
|
||||
|
||||
$slash = substr($_GET['data'],0,1) != '/' ? '/' : null;
|
||||
$full_file_path = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].$slash.str_replace($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'], '', $_GET['data']);
|
||||
|
||||
}
|
||||
else if ($_GET['type'] == 'sounds') {
|
||||
|
||||
//get first installed language (like en/us/callie)
|
||||
$language_paths = glob($_SESSION["switch"]['sounds']['dir']."/*/*/*");
|
||||
foreach ($language_paths as $key => $path) {
|
||||
$path = str_replace($_SESSION["switch"]['sounds']['dir'].'/', "", $path);
|
||||
$path_array = explode('/', $path);
|
||||
if (count($path_array) <> 3 || strlen($path_array[0]) <> 2 || strlen($path_array[1]) <> 2) {
|
||||
unset($language_paths[$key]);
|
||||
}
|
||||
$language_paths[$key] = str_replace($_SESSION["switch"]['sounds']['dir']."/","",$language_paths[$key] ?? '');
|
||||
if (empty($language_paths[$key])) {
|
||||
unset($language_paths[$key]);
|
||||
}
|
||||
}
|
||||
$language_path = $language_paths[0];
|
||||
|
||||
//determine the path for sound file
|
||||
$filename_parts = explode('/', str_replace('..', '', $_GET['data']));
|
||||
if (!is_array($filename_parts) || @sizeof($filename_parts) != 2) { exit; }
|
||||
$path = $_SESSION['switch']['sounds']['dir'].'/'.$language_path.'/'.$filename_parts[0].'/8000/';
|
||||
|
||||
//build full path to sound file
|
||||
$full_file_path = $path.$filename_parts[1];
|
||||
|
||||
}
|
||||
|
||||
//stream waveform file
|
||||
if (file_exists($full_file_path)) {
|
||||
|
||||
//temporary waveform image filename
|
||||
$temp_filename = 'waveform_'.$_GET['id'].'_'.rand(0000,9999).'.png';
|
||||
|
||||
//create temporary waveform image, if doesn't exist
|
||||
if (file_exists($temp_filename)) {
|
||||
$wf = true;
|
||||
}
|
||||
else {
|
||||
//create temporary waveform image
|
||||
$waveform = new Waveform($full_file_path);
|
||||
Waveform::$linesPerPixel = 1; // default: 8
|
||||
Waveform::$samplesPerLine = 512; // default: 512
|
||||
Waveform::$colorA = !empty($_SESSION['theme']['audio_player_waveform_color_a_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_a_leg']['text']) : [32,134,37,0.6]; // array rgba, left (a-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::$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::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
|
||||
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
|
||||
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
|
||||
}
|
||||
|
||||
//stream image to browser
|
||||
if ($wf === true && file_exists($temp_filename)) {
|
||||
|
||||
ob_clean();
|
||||
$fd = fopen($temp_filename, 'rb');
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Type: image/png");
|
||||
header('Content-Disposition: attachment; filename="'.$temp_filename.'"');
|
||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||
header("Content-Length: ".filesize($temp_filename));
|
||||
ob_clean();
|
||||
|
||||
fpassthru($fd);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//delete temp waveform image
|
||||
@unlink($temp_filename);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
$apps[$x]['description']['fr-fr'] = "Renvoi d'appel, Follow Me et ne pas deranger.";
|
||||
$apps[$x]['description']['he-il'] = "";
|
||||
$apps[$x]['description']['it-it'] = "";
|
||||
$apps[$x]['description']['ka-ge'] = "ზარის გადამისამართება, მომყევი და არ შემაწუხო.";
|
||||
$apps[$x]['description']['nl-nl'] = "Oproep doorsturen, Volg mij en Niet storen";
|
||||
$apps[$x]['description']['pl-pl'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "Desvio de chamadas, Siga-me e Não perturbe (DND).";
|
||||
|
|
@ -81,37 +80,5 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_order'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default Follow Me Timeout value.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "408becd6-35ec-46f8-bca9-452d0fc474b6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dashboard_call_forward_chart_color_call_forward";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#2a9df4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d385b1f4-76b0-4454-a9b8-11899f6407dd";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dashboard_call_forward_chart_color_follow_me";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#03c04a";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "32ef2f93-6fde-409f-82cd-aabe506892df";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dashboard_call_forward_chart_color_do_not_disturb";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#ea4c46";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d0c9bb4c-5d7b-46c2-8651-b0324db6f26f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dashboard_call_forward_chart_color_active";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#d4d4d4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
<?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-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//process this only one time
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,7 @@
|
|||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Forward";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Forward";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "نداء إلى الأمام";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Rufumleitung";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Rufumleitung";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Rufumleitung";
|
||||
|
|
@ -11,29 +11,23 @@
|
|||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Reenvio de Llamadas";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Renvoi d'appel";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Renvoi d'appel";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "העבר שיחה";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Inoltro";
|
||||
$apps[$x]['menu'][$y]['title']['ka-ge'] = "ზარის გადამისამართება";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep doorsturen";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Przekierowanie";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Redirectionare apel";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Переадресация";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Vidarekoppling";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Переадресація";
|
||||
$apps[$x]['menu'][$y]['title']['zh-cn'] = "呼叫转移";
|
||||
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールフォワード";
|
||||
$apps[$x]['menu'][$y]['title']['ko-kr'] = "착신 전환";
|
||||
|
||||
$apps[$x]['menu'][$y]['uuid'] = "4e4df00b-aafb-45a8-82c1-cdabc921889c";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
$apps[$x]['menu'][$y]['category'] = "internal";
|
||||
$apps[$x]['menu'][$y]['icon'] = "";
|
||||
$apps[$x]['menu'][$y]['path'] = "/app/call_forward/call_forward.php";
|
||||
$apps[$x]['menu'][$y]['order'] = "";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "user";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,35 +1,32 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
/*
|
||||
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/
|
||||
|
||||
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.
|
||||
|
||||
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 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-2021
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
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>
|
||||
*/
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//set default
|
||||
$is_included = false;
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
|
|
@ -46,13 +43,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_forward');
|
||||
|
||||
//get posted data and set defaults
|
||||
$action = $_POST['action'] ?? '';
|
||||
$search = $_POST['search'] ?? '';
|
||||
$extensions = $_POST['extensions'] ?? [];
|
||||
//get posted data
|
||||
if (is_array($_POST['extensions'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$extensions = $_POST['extensions'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && count($extensions) > 0) {
|
||||
if ($action != '' && is_array($extensions) && @sizeof($extensions) != 0) {
|
||||
switch ($action) {
|
||||
case 'toggle_call_forward':
|
||||
if (permission_exists('call_forward')) {
|
||||
|
|
@ -74,111 +73,41 @@
|
|||
break;
|
||||
}
|
||||
|
||||
header('Location: call_forward.php' . ($search != '' ? '?search=' . urlencode($search) : null));
|
||||
header('Location: call_forward.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
//get order and order by
|
||||
$order_by = $_GET["order_by"] ?? 'extension';
|
||||
$order = $_GET["order"] ?? 'asc';
|
||||
$sort = $order_by == 'extension' ? 'natural' : null;
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//get the search
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
|
||||
//set the show variable
|
||||
$show = $_GET['show'] ?? '';
|
||||
$search = strtolower($_GET["search"]);
|
||||
|
||||
//define select count query
|
||||
$sql = "select count(*) from v_extensions ";
|
||||
if ($show === "all" && permission_exists('call_forward_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
if (strlen($search) > 0) {
|
||||
$sql .= "and ( ";
|
||||
$sql .= "extension like :search ";
|
||||
$sql .= "or lower(description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%' . $search . '%';
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!permission_exists('extension_edit')) {
|
||||
if (!empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and (";
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $row) {
|
||||
if ($x > 0) {
|
||||
$sql .= "or ";
|
||||
}
|
||||
$sql .= "extension = '" . $row['user'] . "' ";
|
||||
$x++;
|
||||
}
|
||||
$sql .= ")";
|
||||
} else {
|
||||
//used to hide any results when a user has not been assigned an extension
|
||||
$sql .= "and extension = 'disabled' ";
|
||||
}
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
unset($parameters);
|
||||
|
||||
//prepare the paging
|
||||
$rows_per_page = !empty($_SESSION['domain']['paging']['numeric']) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
|
||||
if ($search) {
|
||||
$params[] = "search=" . $search;
|
||||
}
|
||||
if ($order_by) {
|
||||
$params[] = "order_by=" . $order_by;
|
||||
}
|
||||
if ($order) {
|
||||
$params[] = "order=" . $order;
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_forward_all')) {
|
||||
$params[] = "show=all";
|
||||
}
|
||||
$param = !empty($params) ? implode('&', $params) : '';
|
||||
unset($params);
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) {
|
||||
$page = 0;
|
||||
$_GET['page'] = 0;
|
||||
}
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_extensions ";
|
||||
if ($show == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and ( ";
|
||||
$sql .= "extension like :search ";
|
||||
$sql .= "or lower(description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%' . $search . '%';
|
||||
}
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!permission_exists('extension_edit')) {
|
||||
if (!empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and (";
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $row) {
|
||||
if ($x > 0) {
|
||||
$sql .= "or ";
|
||||
}
|
||||
$sql .= "extension = '" . $row['user'] . "' ";
|
||||
foreach($_SESSION['user']['extension'] as $row) {
|
||||
if ($x > 0) { $sql .= "or "; }
|
||||
$sql .= "extension = '".$row['user']."' ";
|
||||
$x++;
|
||||
}
|
||||
$sql .= ")";
|
||||
|
|
@ -188,16 +117,72 @@
|
|||
$sql .= "and extension = 'disabled' ";
|
||||
}
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'extension', 'asc', $sort);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$sql .= $sql_search;
|
||||
$database = new database;
|
||||
$extensions = $database->select($sql, $parameters ?? null, 'all');
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($parameters);
|
||||
|
||||
//if there are no extensions then set to empty array
|
||||
if ($extensions === false) {
|
||||
$extensions = [];
|
||||
//prepare the paging
|
||||
if ($is_included) {
|
||||
$rows_per_page = 10;
|
||||
}
|
||||
else {
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
}
|
||||
$params[] = "app_uuid=".$app_uuid;
|
||||
if ($search) { $params[] = "search=".$search; }
|
||||
if ($order_by) { $params[] = "order_by=".$order_by; }
|
||||
if ($order) { $params[] = "order=".$order; }
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$params[] .= "show=all";
|
||||
}
|
||||
$param = $params ? implode('&', $params) : null;
|
||||
unset($params);
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_extensions ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (strlen($search) > 0) {
|
||||
$sql .= "and ( ";
|
||||
$sql .= "extension like :search ";
|
||||
$sql .= "or lower(description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!permission_exists('extension_edit')) {
|
||||
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and (";
|
||||
$x = 0;
|
||||
foreach($_SESSION['user']['extension'] as $row) {
|
||||
if ($x > 0) { $sql .= "or "; }
|
||||
$sql .= "extension = '".$row['user']."' ";
|
||||
$x++;
|
||||
}
|
||||
$sql .= ")";
|
||||
}
|
||||
else {
|
||||
//used to hide any results when a user has not been assigned an extension
|
||||
$sql .= "and extension = 'disabled' ";
|
||||
}
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$sql .= order_by($order_by, $order, 'extension', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$extensions = $database->select($sql, $parameters, 'all');
|
||||
unset($parameters);
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
@ -209,16 +194,13 @@
|
|||
}
|
||||
require_once "resources/header.php";
|
||||
|
||||
//set the back button
|
||||
$_SESSION['call_forward_back'] = $_SERVER['PHP_SELF'];
|
||||
|
||||
//show the content
|
||||
if ($is_included) {
|
||||
echo "<div class='action_bar sub'>\n";
|
||||
echo " <div class='heading'><b>" . $text['header-call_forward'] . "</b></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_forward']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if ($num_rows > 10) {
|
||||
echo button::create(['type' => 'button', 'label' => $text['button-view_all'], 'icon' => 'diagram-project', 'collapse' => false, 'link' => PROJECT_PATH . '/app/call_forward/call_forward.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/call_forward/call_forward.php']);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
|
|
@ -226,10 +208,10 @@
|
|||
}
|
||||
else {
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>" . $text['header-call_forward'] . "</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_forward']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
|
||||
if (count($extensions) > 0) {
|
||||
if ($extensions) {
|
||||
if (permission_exists('call_forward')) {
|
||||
echo button::create(['type' => 'button', 'label' => $text['label-call_forward'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_cfwd', 'onclick' => "list_action_set('toggle_call_forward'); modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
|
|
@ -240,92 +222,87 @@
|
|||
echo button::create(['type' => 'button', 'label' => $text['label-dnd'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_dnd', 'onclick' => "list_action_set('toggle_do_not_disturb'); modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
}
|
||||
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)]);
|
||||
if ($_GET['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'.($params ? '&'.implode('&', $params) : null)]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if ($show == 'all' && permission_exists('call_forward_all')) {
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"" . escape($search) . "\" placeholder=\"" . $text['label-search'] . "\" onkeydown=''>";
|
||||
echo button::create(['label' => $text['button-search'], 'icon' => $_SESSION['theme']['button_icon_search'], 'type' => 'submit', 'id' => 'btn_search']);
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
|
||||
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_forward.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>" . $paging_controls_mini . "</span>";
|
||||
if ($paging_controls_mini != '') {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
}
|
||||
echo " </form>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (count($extensions) > 0) {
|
||||
echo modal::create(['id' => 'modal-toggle', 'type' => 'toggle', 'actions' => button::create(['type' => 'button', 'label' => $text['button-continue'], 'icon' => 'check', 'id' => 'btn_toggle', 'style' => 'float: right; margin-left: 15px;', 'collapse' => 'never', 'onclick' => "modal_close(); list_form_submit('form_list');"])]);
|
||||
if ($extensions) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-call_routing'] . "\n";
|
||||
echo $text['description-call_routing']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
if ($show == 'all' && permission_exists('call_forward_all')) {
|
||||
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"" . escape($search) . "\">\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (!$is_included) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' " . (empty($extensions) ?: "style='visibility: hidden;'") . ">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($extensions ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
if ($show == "all" && permission_exists('call_forward_all')) {
|
||||
echo "<th>" . $text['label-domain'] . "</th>\n";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
echo "<th>".$text['label-domain']."</th>\n";
|
||||
}
|
||||
}
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
|
||||
// echo " <th>" . $text['label-extension'] . "</th>\n";
|
||||
echo " <th>".$text['label-extension']."</th>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " <th>" . $text['label-call_forward'] . "</th>\n";
|
||||
echo " <th>".$text['label-call_forward']."</th>\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " <th>" . $text['label-follow_me'] . "</th>\n";
|
||||
echo " <th>".$text['label-follow_me']."</th>\n";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
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";
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
if ($list_row_edit_button) {
|
||||
echo " <th class='".($is_included ? 'hide-md-dn' : 'hide-sm-dn')."'>".$text['label-description']."</th>\n";
|
||||
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($extensions)) {
|
||||
if (is_array($extensions)) {
|
||||
$x = 0;
|
||||
foreach ($extensions as $row) {
|
||||
$list_row_url = PROJECT_PATH . "/app/call_forward/call_forward_edit.php?id=" . $row['extension_uuid'] . "&return_url=" . urlencode($_SERVER['REQUEST_URI']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
echo "<tr class='list-row' href='" . $list_row_url . "'>\n";
|
||||
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']);
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (!$is_included && $extensions) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='extensions[$x][checked]' id='checkbox_" . $x . "' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='extensions[$x][uuid]' value='" . escape($row['extension_uuid']) . "' />\n";
|
||||
echo " <input type='checkbox' name='extensions[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='extensions[$x][uuid]' value='".escape($row['extension_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
|
||||
if ($show == "all" && permission_exists('call_forward_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$domain = $text['label-global'];
|
||||
}
|
||||
echo " <td>" . escape($domain) . "</td>\n";
|
||||
echo " <td>".escape($domain)."</td>\n";
|
||||
}
|
||||
}
|
||||
echo " <td><a href='" . $list_row_url . "' title=\"" . $text['button-edit'] . "\">" . escape($row['extension']) . "</a></td>\n";
|
||||
echo " <td><a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['extension'])."</a></td>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
//-- inline toggle -----------------
|
||||
//$button_label = $row['forward_all_enabled'] == 'true' ? ($row['forward_all_destination'] != '' ? escape(format_phone($row['forward_all_destination'])) : '('.$text['label-invalid'].')') : null;
|
||||
|
|
@ -368,6 +345,7 @@
|
|||
//}
|
||||
//unset($button_label);
|
||||
//----------------------------------
|
||||
|
||||
//get destination count
|
||||
$follow_me_destination_count = 0;
|
||||
if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) {
|
||||
|
|
@ -377,11 +355,11 @@
|
|||
$parameters['follow_me_uuid'] = $row['follow_me_uuid'];
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$follow_me_destination_count = $database->select($sql, $parameters ?? null, 'column');
|
||||
$follow_me_destination_count = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
echo " <td>\n";
|
||||
echo $follow_me_destination_count ? $text['label-enabled'] . ' (' . $follow_me_destination_count . ')' : ' ';
|
||||
echo $follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : ' ';
|
||||
echo " </td>\n";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
|
|
@ -401,10 +379,10 @@
|
|||
echo $row['do_not_disturb'] == 'true' ? $text['label-enabled'] : ' ';
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='description overflow " . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . escape($row['description']) . " </td>\n";
|
||||
if ($list_row_edit_button) {
|
||||
echo " <td class='description overflow ".($is_included ? 'hide-md-dn' : 'hide-sm-dn')."'>".escape($row['description'])." </td>\n";
|
||||
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type' => 'button', 'title' => $text['button-edit'], 'icon' => $_SESSION['theme']['button_icon_edit'], 'link' => $list_row_url]);
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -414,16 +392,16 @@
|
|||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (!$is_included) {
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>" . $paging_controls . "</div>\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\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";
|
||||
|
||||
require_once "resources/footer.php";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2021
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
|
@ -44,7 +45,7 @@
|
|||
|
||||
//define the destination_select function
|
||||
function destination_select($select_name, $select_value, $select_default) {
|
||||
if (empty($select_value)) { $select_value = $select_default; }
|
||||
if (strlen($select_value) == 0) { $select_value = $select_default; }
|
||||
echo " <select class='formfld' style='width: 55px;' name='$select_name'>\n";
|
||||
$i = 0;
|
||||
while($i <= 100) {
|
||||
|
|
@ -82,7 +83,7 @@
|
|||
$parameters['extension_uuid'] = $extension_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$extension = $row["extension"];
|
||||
$number_alias = $row["number_alias"];
|
||||
$accountcode = $row["accountcode"];
|
||||
|
|
@ -90,7 +91,7 @@
|
|||
$effective_caller_id_number = $row["effective_caller_id_number"];
|
||||
$outbound_caller_id_name = $row["outbound_caller_id_name"];
|
||||
$outbound_caller_id_number = $row["outbound_caller_id_number"];
|
||||
$do_not_disturb = !empty($row["do_not_disturb"]) ? $row["do_not_disturb"] : 'false';
|
||||
$do_not_disturb = $row["do_not_disturb"] != '' ? $row["do_not_disturb"] : 'false';
|
||||
$forward_all_destination = $row["forward_all_destination"];
|
||||
$forward_all_enabled = $row["forward_all_enabled"];
|
||||
$forward_busy_destination = $row["forward_busy_destination"];
|
||||
|
|
@ -108,10 +109,10 @@
|
|||
unset($sql, $parameters, $row);
|
||||
|
||||
//process post vars
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
if (count($_POST) > 0) {
|
||||
$forward_all_enabled = $_POST["forward_all_enabled"];
|
||||
$forward_all_destination = $_POST["forward_all_destination"];
|
||||
$forward_busy_enabled = $_POST["forward_busy_enabled"];
|
||||
|
|
@ -121,8 +122,8 @@
|
|||
$forward_user_not_registered_enabled = $_POST["forward_user_not_registered_enabled"];
|
||||
$forward_user_not_registered_destination = $_POST["forward_user_not_registered_destination"];
|
||||
|
||||
$cid_name_prefix = $_POST["cid_name_prefix"] ?? '';
|
||||
$cid_number_prefix = $_POST["cid_number_prefix"] ?? '';
|
||||
$cid_name_prefix = $_POST["cid_name_prefix"];
|
||||
$cid_number_prefix = $_POST["cid_number_prefix"];
|
||||
$follow_me_enabled = $_POST["follow_me_enabled"];
|
||||
$follow_me_ignore_busy = $_POST["follow_me_ignore_busy"];
|
||||
|
||||
|
|
@ -134,7 +135,7 @@
|
|||
$destinations[$n]['delay'] = $field['delay'];
|
||||
$destinations[$n]['prompt'] = $field['prompt'];
|
||||
$destinations[$n]['timeout'] = $field['timeout'];
|
||||
if (!empty($field['destination'])) {
|
||||
if ($field['destination'] != '') {
|
||||
$destination_found = true;
|
||||
}
|
||||
$n++;
|
||||
|
|
@ -151,8 +152,8 @@
|
|||
}
|
||||
|
||||
//check for all required data
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
$document['title'] = $text['title-call_forward'];
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$document['title'] = $text['title-call_routing'];
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
|
|
@ -165,6 +166,11 @@
|
|||
return;
|
||||
}
|
||||
|
||||
//include the classes
|
||||
include "resources/classes/call_forward.php";
|
||||
include "resources/classes/follow_me.php";
|
||||
include "resources/classes/do_not_disturb.php";
|
||||
|
||||
//call forward config
|
||||
if (permission_exists('call_forward')) {
|
||||
//sanitize the destinations
|
||||
|
|
@ -225,7 +231,7 @@
|
|||
$d = 0;
|
||||
$destination_found = false;
|
||||
foreach ($destinations as $field) {
|
||||
if (!empty($field['destination'])) {
|
||||
if ($field['destination'] != '') {
|
||||
//sanitize the destination
|
||||
$field['destination'] = preg_replace('#[^\*0-9]#', '', $field['destination']);
|
||||
|
||||
|
|
@ -248,26 +254,27 @@
|
|||
}
|
||||
|
||||
//add the dialplan permission
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add("extension_edit", "temp");
|
||||
|
||||
//save the data
|
||||
$database = new database;
|
||||
$database->app_name = 'call_forward';
|
||||
$database->app_name = 'call_routing';
|
||||
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
//$message = $database->message;
|
||||
|
||||
//remove the temporary permission
|
||||
$p->delete("extension_edit", "temp");
|
||||
|
||||
//delete empty destination records
|
||||
if (!empty($follow_me_delete_uuids)) {
|
||||
if (is_array($follow_me_delete_uuids) && sizeof($follow_me_delete_uuids) > 0) {
|
||||
foreach ($follow_me_delete_uuids as $follow_me_delete_uuid) {
|
||||
$array['follow_me_destinations'][]['follow_me_destination_uuid'] = $follow_me_delete_uuid;
|
||||
}
|
||||
$database = new database;
|
||||
$database->app_name = 'call_forward';
|
||||
$database->app_name = 'call_routing';
|
||||
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
|
@ -341,7 +348,7 @@
|
|||
*/
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
$ring_count = ceil($call_timeout / 6);
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
|
|
@ -358,7 +365,7 @@
|
|||
else {
|
||||
$feature_event_notify->forward_all_destination = $forward_all_destination;
|
||||
}
|
||||
|
||||
|
||||
if ($forward_busy_destination == "") {
|
||||
$feature_event_notify->forward_busy_destination = "0";
|
||||
}
|
||||
|
|
@ -376,51 +383,9 @@
|
|||
unset($feature_event_notify);
|
||||
}
|
||||
|
||||
//send presence event
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
if ($dnd_enabled == 'true') {
|
||||
//build the event
|
||||
$cmd = "sendevent PRESENCE_IN\n";
|
||||
$cmd .= "proto: sip\n";
|
||||
$cmd .= "login: ".$extension."@".$_SESSION['domain_name']."\n";
|
||||
$cmd .= "from: ".$extension."@".$_SESSION['domain_name']."\n";
|
||||
$cmd .= "status: Active (1 waiting)\n";
|
||||
$cmd .= "rpid: unknown\n";
|
||||
$cmd .= "event_type: presence\n";
|
||||
$cmd .= "alt_event_type: dialog\n";
|
||||
$cmd .= "event_count: 1\n";
|
||||
$cmd .= "unique-id: ".uuid()."\n";
|
||||
$cmd .= "Presence-Call-Direction: outbound\n";
|
||||
$cmd .= "answer-state: confirmed\n";
|
||||
|
||||
//send the event
|
||||
$switch_result = event_socket::command($cmd);
|
||||
}
|
||||
else {
|
||||
$presence = new presence;
|
||||
if (!$presence->active($extension."@".$_SESSION['domain_name'])) {
|
||||
//build the event
|
||||
$cmd = "sendevent PRESENCE_IN\n";
|
||||
$cmd .= "proto: sip\n";
|
||||
$cmd .= "login: ".$extension."@".$_SESSION['domain_name']."\n";
|
||||
$cmd .= "from: ".$extension."@".$_SESSION['domain_name']."\n";
|
||||
$cmd .= "status: Active (1 waiting)\n";
|
||||
$cmd .= "rpid: unknown\n";
|
||||
$cmd .= "event_type: presence\n";
|
||||
$cmd .= "alt_event_type: dialog\n";
|
||||
$cmd .= "event_count: 1\n";
|
||||
$cmd .= "unique-id: ".uuid()."\n";
|
||||
$cmd .= "Presence-Call-Direction: outbound\n";
|
||||
$cmd .= "answer-state: terminated\n";
|
||||
|
||||
//send the event
|
||||
$switch_result = event_socket::command($cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
@ -429,7 +394,7 @@
|
|||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$extension."@".$_SESSION['domain_name']);
|
||||
if (!empty($number_alias)) {
|
||||
if (strlen($number_alias) > 0) {
|
||||
$cache->delete("directory:".$number_alias."@".$_SESSION['domain_name']);
|
||||
}
|
||||
|
||||
|
|
@ -438,11 +403,11 @@
|
|||
}
|
||||
|
||||
//show the header
|
||||
$document['title'] = $text['title-call_forward'];
|
||||
$document['title'] = $text['title-call_routing'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($follow_me_uuid) && is_uuid($follow_me_uuid)) {
|
||||
if (is_uuid($follow_me_uuid)) {
|
||||
$sql = "select * from v_follow_me ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and follow_me_uuid = :follow_me_uuid ";
|
||||
|
|
@ -452,7 +417,7 @@
|
|||
$row = $database->select($sql, $parameters, 'row');
|
||||
unset($sql, $parameters);
|
||||
|
||||
if (!empty($row)) {
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$cid_name_prefix = $row["cid_name_prefix"];
|
||||
$cid_number_prefix = $row["cid_number_prefix"];
|
||||
$follow_me_enabled = $row["follow_me_enabled"];
|
||||
|
|
@ -467,7 +432,7 @@
|
|||
$result = $database->select($sql, $parameters, 'all');
|
||||
|
||||
unset($destinations);
|
||||
foreach ($result as $x => $row) {
|
||||
foreach ($result as $x => &$row) {
|
||||
$destinations[$x]['uuid'] = $row["follow_me_destination_uuid"];
|
||||
$destinations[$x]['destination'] = $row["follow_me_destination"];
|
||||
$destinations[$x]['delay'] = $row["follow_me_delay"];
|
||||
|
|
@ -477,15 +442,6 @@
|
|||
unset($sql, $parameters, $result, $row);
|
||||
}
|
||||
}
|
||||
|
||||
//add the pre-defined follow me destinations
|
||||
for ($n = 0; $n <= (((!empty($_SESSION['follow_me']['max_destinations']['numeric'])) ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
|
||||
if (empty($destinations[$n]['uuid'])) { $destinations[$n]['uuid'] = null; }
|
||||
if (empty($destinations[$n]['destination'])) { $destinations[$n]['destination'] = null; }
|
||||
if (empty($destinations[$n]['delay'])) { $destinations[$n]['delay'] = null; }
|
||||
if (empty($destinations[$n]['prompt'])) { $destinations[$n]['prompt'] = null; }
|
||||
if (empty($destinations[$n]['timeout'])) { $destinations[$n]['timeout'] = 30; }
|
||||
}
|
||||
|
||||
//get the extensions array - used with autocomplete
|
||||
$sql = "select * from v_extensions ";
|
||||
|
|
@ -497,51 +453,49 @@
|
|||
unset($sql, $parameters, $row);
|
||||
|
||||
//set the default
|
||||
if (empty($dnd_enabled)) {
|
||||
if (!isset($dnd_enabled)) {
|
||||
//set the value from the database
|
||||
$dnd_enabled = $do_not_disturb;
|
||||
}
|
||||
|
||||
//prepare the autocomplete
|
||||
if(filter_var($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) {
|
||||
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
|
||||
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo "\$(function() {\n";
|
||||
echo " var extensions = [\n";
|
||||
foreach ($extensions as $row) {
|
||||
if (empty($number_alias)) {
|
||||
echo " \"".escape($row["extension"])."\",\n";
|
||||
}
|
||||
else {
|
||||
echo " \"".escape($row["number_alias"])."\",\n";
|
||||
}
|
||||
if($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
|
||||
|
||||
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
|
||||
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo "\$(function() {\n";
|
||||
echo " var extensions = [\n";
|
||||
foreach ($extensions as &$row) {
|
||||
if (strlen($number_alias) == 0) {
|
||||
echo " \"".escape($row["extension"])."\",\n";
|
||||
}
|
||||
echo " ];\n";
|
||||
for ($n = 0; $n <= (((!empty($_SESSION['follow_me']['max_destinations']['numeric'])) ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
|
||||
echo " \$(\"#destination_".$n."\").autocomplete({\n";
|
||||
echo " source: extensions\n";
|
||||
echo " });\n";
|
||||
else {
|
||||
echo " \"".escape($row["number_alias"])."\",\n";
|
||||
}
|
||||
|
||||
echo "});\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
echo " ];\n";
|
||||
for ($n = 0; $n <= ((($_SESSION['follow_me']['max_destinations']['numeric'] != '') ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
|
||||
echo " \$(\"#destination_".$n."\").autocomplete({\n";
|
||||
echo " source: extensions\n";
|
||||
echo " });\n";
|
||||
}
|
||||
|
||||
echo "});\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//save the back button location using referer
|
||||
$back_destination = "window.location.href='" . ($_SESSION['call_forward_back'] ?? "/app/call_forward/call_forward.php") . "'";
|
||||
|
||||
//show the content
|
||||
echo "<form method='post' name='frm' id='frm'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_forward']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','onclick'=>$back_destination]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'call_forward.php']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
|
|
@ -550,7 +504,6 @@
|
|||
echo $text['description']." <strong>".escape($extension)."</strong>\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -558,10 +511,10 @@
|
|||
echo " <strong>".$text['label-call_forward']."</strong>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
$on_click = "$('#tr_follow_me_settings').slideUp('fast'); ";
|
||||
$on_click .= "$('#tr_follow_me_settings').slideUp('fast'); ";
|
||||
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
|
||||
$on_click .= "document.getElementById('forward_all_destination').focus(); ";
|
||||
$on_click2 = "(document.getElementById('follow_me_enabled').checked) ? $('#tr_follow_me_settings').slideDown('fast') : '' ";
|
||||
$on_click2 .= "(document.getElementById('follow_me_enabled').checked) ? $('#tr_follow_me_settings').slideDown('fast') : '' ";
|
||||
echo " <label for='forward_all_disabled'><input type='radio' name='forward_all_enabled' id='forward_all_disabled' onclick=\"$on_click2\" value='false' ".(($forward_all_enabled == "false" || $forward_all_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
|
||||
echo " <label for='forward_all_enabled'><input type='radio' name='forward_all_enabled' id='forward_all_enabled' onclick=\"$on_click\" value='true' ".(($forward_all_enabled == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
|
||||
unset($on_click);
|
||||
|
|
@ -627,14 +580,14 @@
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
$on_click = "document.getElementById('forward_all_disabled').checked=true; ";
|
||||
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
|
||||
echo " <label for='follow_me_disabled'><input type='radio' name='follow_me_enabled' id='follow_me_disabled' onclick=\"$('#tr_follow_me_settings').slideUp('fast');\" value='false' ".((!empty($follow_me_enabled) && $follow_me_enabled == "false" || empty($follow_me_enabled)) ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
|
||||
echo " <label for='follow_me_enabled'><input type='radio' name='follow_me_enabled' id='follow_me_enabled' onclick=\"$('#tr_follow_me_settings').slideDown('fast'); $on_click\" value='true' ".((!empty($follow_me_enabled) && $follow_me_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
|
||||
echo " <label for='follow_me_disabled'><input type='radio' name='follow_me_enabled' id='follow_me_disabled' onclick=\"$('#tr_follow_me_settings').slideUp('fast');\" value='false' ".(($follow_me_enabled == "false" || $follow_me_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
|
||||
echo " <label for='follow_me_enabled'><input type='radio' name='follow_me_enabled' id='follow_me_enabled' onclick=\"$('#tr_follow_me_settings').slideDown('fast'); $on_click\" value='true' ".(($follow_me_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
|
||||
unset($on_click);
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
if (!empty($follow_me_enabled) && $follow_me_enabled == "true" && $dnd_enabled != "true" && $forward_all_enabled != "true") { $style = ''; } else { $style = 'display: none;'; }
|
||||
if ($follow_me_enabled == "true" && $dnd_enabled != "true" && $forward_all_enabled != "true") { $style = ''; } else { $style = 'display: none;'; }
|
||||
echo "<div id='tr_follow_me_settings' style='$style'>\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
|
@ -655,22 +608,21 @@
|
|||
echo " </tr>\n";
|
||||
|
||||
//output destinations
|
||||
$on_click = "";
|
||||
foreach ($destinations as $n => $destination) {
|
||||
echo " <input type='hidden' name='destinations[".$n."][uuid]' value='".((!empty($destination['uuid'])) ? $destination['uuid'] : uuid())."'>\n";
|
||||
for ($n = 0; $n <= ((($_SESSION['follow_me']['max_destinations']['numeric'] != '') ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
|
||||
echo " <input type='hidden' name='destinations[".$n."][uuid]' value='".(($destinations[$n]['uuid'] != '') ? $destinations[$n]['uuid'] : uuid())."'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td><input class='formfld' style='min-width: 135px;' type='text' name='destinations[".$n."][destination]' id='destination_".$n."' maxlength='255' value=\"".escape($destination['destination'])."\"></td>\n";
|
||||
echo " <td><input class='formfld' style='min-width: 135px;' type='text' name='destinations[".$n."][destination]' id='destination_".$n."' maxlength='255' value=\"".escape($destinations[$n]['destination'])."\"></td>\n";
|
||||
echo " <td>\n";
|
||||
destination_select('destinations['.$n.'][delay]', $destination['delay'], '0');
|
||||
destination_select('destinations['.$n.'][delay]', $destinations[$n]['delay'], '0');
|
||||
echo " </td>\n";
|
||||
echo " <td>\n";
|
||||
destination_select('destinations['.$n.'][timeout]', $destination['timeout'], ((!empty($_SESSION['follow_me']['timeout']['numeric'])) ? $_SESSION['follow_me']['timeout']['numeric'] : 30));
|
||||
destination_select('destinations['.$n.'][timeout]', $destinations[$n]['timeout'], (($_SESSION['follow_me']['timeout']['numeric'] != '') ? $_SESSION['follow_me']['timeout']['numeric'] : 30));
|
||||
echo " </td>\n";
|
||||
if (permission_exists('follow_me_prompt')) {
|
||||
echo " <td>\n";
|
||||
echo " <select class='formfld' style='width: 90px;' name='destinations[".$n."][prompt]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo " <option value='1' ".(($destination['prompt']) ? "selected='selected'" : null).">".$text['label-destination_prompt_confirm']."</option>\n";
|
||||
echo " <option value='1' ".(($destinations[$n]['prompt'])?"selected='selected'":null).">".$text['label-destination_prompt_confirm']."</option>\n";
|
||||
//echo " <option value='2'>".$text['label-destination_prompt_announce]."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
|
|
@ -688,8 +640,8 @@
|
|||
echo $text['label-ignore_busy'];
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' align='left'>\n";
|
||||
echo " <label for='follow_me_ignore_busy_false'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_false' value='false' onclick=\"\" ".(empty($follow_me_ignore_busy) || $follow_me_ignore_busy == "false" ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
|
||||
echo " <label for='follow_me_ignore_busy_true'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_true' value='true' onclick=\"".$on_click."\" ".(!empty($follow_me_ignore_busy) && $follow_me_ignore_busy == "true" ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
|
||||
echo " <label for='follow_me_ignore_busy_false'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_false' value='false' onclick=\"\" ".(($follow_me_ignore_busy == "false" || $follow_me_ignore_busy == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
|
||||
echo " <label for='follow_me_ignore_busy_true'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_true' value='true' onclick=\"$on_click\" ".(($follow_me_ignore_busy == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
|
||||
echo " <br />\n";
|
||||
echo $text['description-ignore_busy']."\n";
|
||||
echo " </td>\n";
|
||||
|
|
@ -742,10 +694,9 @@
|
|||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>\n";
|
||||
echo "<br /><br />";
|
||||
|
||||
if (!empty($action) && $action == "update") {
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='id' value='".escape($extension_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
|
|
|||
|
|
@ -1,276 +1,279 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
/*
|
||||
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/
|
||||
|
||||
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.
|
||||
|
||||
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 Original Code is FusionPBX
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2016
|
||||
All Rights Reserved.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2023
|
||||
All Rights Reserved.
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
Errol Samuels <voiptology@gmail.com>
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
Errol Samuels <voiptology@gmail.com>
|
||||
|
||||
*/
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the call_forward class
|
||||
class call_forward {
|
||||
|
||||
// set class constants
|
||||
const APP_NAME = 'calls';
|
||||
const APP_UUID = '19806921-e8ed-dcff-b325-dd3e5da4959d';
|
||||
const PERMISSION = 'call_forward';
|
||||
const LIST_PAGE = 'calls.php';
|
||||
const TABLE = 'extensions';
|
||||
const UUID_PREFIX = 'extension_';
|
||||
const TOGGLE_FIELD = 'forward_all_enabled';
|
||||
const TOGGLE_VALUES = ['true', 'false'];
|
||||
|
||||
public $debug;
|
||||
public $domain_uuid;
|
||||
public $domain_name;
|
||||
public $extension_uuid;
|
||||
private $extension;
|
||||
private $number_alias;
|
||||
public $forward_all_destination;
|
||||
public $forward_all_enabled;
|
||||
private $toll_allow;
|
||||
public $accountcode;
|
||||
public $outbound_caller_id_name;
|
||||
public $outbound_caller_id_number;
|
||||
|
||||
public function set() {
|
||||
//determine whether to update the dial string
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and extension_uuid = :extension_uuid ";
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
$parameters['extension_uuid'] = $this->extension_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$this->extension = $row["extension"];
|
||||
$this->number_alias = $row["number_alias"];
|
||||
$this->accountcode = $row["accountcode"];
|
||||
$this->toll_allow = $row["toll_allow"];
|
||||
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
|
||||
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
|
||||
//build extension update array
|
||||
$array['extensions'][0]['extension_uuid'] = $this->extension_uuid;
|
||||
$array['extensions'][0]['forward_all_destination'] = strlen($this->forward_all_destination) != 0 ? $this->forward_all_destination : null;
|
||||
if (strlen($this->forward_all_destination) == 0 || $this->forward_all_enabled == "false") {
|
||||
$array['extensions'][0]['forward_all_enabled'] = 'false';
|
||||
}
|
||||
else {
|
||||
$array['extensions'][0]['forward_all_enabled'] = 'true';
|
||||
}
|
||||
|
||||
//grant temporary permissions
|
||||
$p = new permissions;
|
||||
$p->add('extension_add', 'temp');
|
||||
|
||||
//execute update
|
||||
$database = new database;
|
||||
$database->app_name = 'calls';
|
||||
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('extension_add', 'temp');
|
||||
|
||||
//delete extension from the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$this->extension."@".$this->domain_name);
|
||||
if(strlen($this->number_alias) > 0){
|
||||
$cache->delete("directory:".$this->number_alias."@".$this->domain_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* declare private variables
|
||||
*/
|
||||
private $extension;
|
||||
private $number_alias;
|
||||
private $toll_allow;
|
||||
|
||||
public function set() {
|
||||
//create the database connection
|
||||
$database = new database;
|
||||
|
||||
//determine whether to update the dial string
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and extension_uuid = :extension_uuid ";
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
$parameters['extension_uuid'] = $this->extension_uuid;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$this->extension = $row["extension"];
|
||||
$this->number_alias = $row["number_alias"];
|
||||
$this->accountcode = $row["accountcode"];
|
||||
$this->toll_allow = $row["toll_allow"];
|
||||
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
|
||||
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
|
||||
//build extension update array
|
||||
$array['extensions'][0]['extension_uuid'] = $this->extension_uuid;
|
||||
$array['extensions'][0]['forward_all_destination'] = strlen($this->forward_all_destination) != 0 ? $this->forward_all_destination : null;
|
||||
if (empty($this->forward_all_destination) || $this->forward_all_enabled == "false") {
|
||||
$array['extensions'][0]['forward_all_enabled'] = 'false';
|
||||
} else {
|
||||
$array['extensions'][0]['forward_all_enabled'] = 'true';
|
||||
}
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p->add('extension_add', 'temp');
|
||||
|
||||
//execute update
|
||||
$database->app_name = 'calls';
|
||||
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('extension_add', 'temp');
|
||||
|
||||
//delete extension from the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:" . $this->extension . "@" . $this->domain_name);
|
||||
if (!empty($this->number_alias)) {
|
||||
$cache->delete("directory:" . $this->number_alias . "@" . $this->domain_name);
|
||||
}
|
||||
}
|
||||
private $app_name;
|
||||
private $app_uuid;
|
||||
private $permission;
|
||||
private $list_page;
|
||||
private $table;
|
||||
private $uuid_prefix;
|
||||
private $toggle_field;
|
||||
private $toggle_values;
|
||||
|
||||
/**
|
||||
* Toggle an array of call_forward records
|
||||
* @param array $records array of records to toggle
|
||||
* toggle records
|
||||
*/
|
||||
public function toggle(array $records) {
|
||||
public function toggle($records) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'], 'negative');
|
||||
header('Location: ' . self::LIST_PAGE);
|
||||
exit;
|
||||
}
|
||||
//assign private variables
|
||||
$this->app_name = 'calls';
|
||||
$this->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
|
||||
$this->permission = 'call_forward';
|
||||
$this->list_page = 'calls.php';
|
||||
$this->table = 'extensions';
|
||||
$this->uuid_prefix = 'extension_';
|
||||
$this->toggle_field = 'forward_all_enabled';
|
||||
$this->toggle_values = ['true','false'];
|
||||
|
||||
//validate there are records to process
|
||||
if (count($records) < 1) return;
|
||||
|
||||
//check we have permission for this action
|
||||
if (permission_exists(self::PERMISSION)) {
|
||||
|
||||
//create the database connection
|
||||
$database = new database;
|
||||
if (permission_exists($this->permission)) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
|
||||
// initialize an empty array
|
||||
$uuids = [];
|
||||
$extensions = [];
|
||||
|
||||
//get current toggle state
|
||||
foreach ($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'" . $record['uuid'] . "'";
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//toggle the checked records
|
||||
if (count($uuids) > 0) {
|
||||
$sql = "select " . self::UUID_PREFIX . "uuid as uuid, extension, number_alias, ";
|
||||
$sql .= "call_timeout, do_not_disturb, ";
|
||||
$sql .= "forward_all_enabled, forward_all_destination, ";
|
||||
$sql .= "forward_busy_enabled, forward_busy_destination, ";
|
||||
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
|
||||
$sql .= self::TOGGLE_FIELD . " as toggle, follow_me_uuid ";
|
||||
$sql .= "from v_" . self::TABLE . " ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and " . self::UUID_PREFIX . "uuid in (" . implode(', ', $uuids) . ") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$extensions[$row['uuid']]['extension'] = $row['extension'];
|
||||
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
|
||||
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
|
||||
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
|
||||
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
|
||||
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
|
||||
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
|
||||
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
|
||||
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
|
||||
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
|
||||
$extensions[$row['uuid']]['state'] = $row['toggle'];
|
||||
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
}
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//build update array
|
||||
$x = 0;
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
//get current toggle state
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, extension, number_alias, ";
|
||||
$sql .= "call_timeout, do_not_disturb, ";
|
||||
$sql .= "forward_all_enabled, forward_all_destination, ";
|
||||
$sql .= "forward_busy_enabled, forward_busy_destination, ";
|
||||
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
|
||||
$sql .= $this->toggle_field." as toggle, follow_me_uuid ";
|
||||
$sql .= "from v_".$this->table." ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$extensions[$row['uuid']]['extension'] = $row['extension'];
|
||||
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
|
||||
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
|
||||
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
|
||||
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
|
||||
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
|
||||
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
|
||||
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
|
||||
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
|
||||
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
|
||||
$extensions[$row['uuid']]['state'] = $row['toggle'];
|
||||
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
}
|
||||
|
||||
//check destination
|
||||
$destination_exists = $extension['forward_all_destination'] != '' ? true : false;
|
||||
//build update array
|
||||
$x = 0;
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
|
||||
//determine new state
|
||||
$new_state = $extension['state'] == self::TOGGLE_VALUES[1] && $destination_exists ? self::TOGGLE_VALUES[0] : self::TOGGLE_VALUES[1];
|
||||
//check destination
|
||||
$destination_exists = $extension['forward_all_destination'] != '' ? true : false;
|
||||
|
||||
//toggle feature
|
||||
if ($new_state != $extension['state']) {
|
||||
$array[self::TABLE][$x][self::UUID_PREFIX . 'uuid'] = $uuid;
|
||||
$array[self::TABLE][$x][self::TOGGLE_FIELD] = $new_state;
|
||||
//determine new state
|
||||
$new_state = $extension['state'] == $this->toggle_values[1] && $destination_exists ? $this->toggle_values[0] : $this->toggle_values[1];
|
||||
|
||||
//toggle feature
|
||||
if ($new_state != $extension['state']) {
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
|
||||
$array[$this->table][$x][$this->toggle_field] = $new_state;
|
||||
}
|
||||
|
||||
//disable other features
|
||||
if ($new_state == $this->toggle_values[0]) { //true
|
||||
$array[$this->table][$x]['do_not_disturb'] = $this->toggle_values[1]; //false
|
||||
$array[$this->table][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
|
||||
if (is_uuid($extension['follow_me_uuid'])) {
|
||||
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
|
||||
$array['follow_me'][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
|
||||
}
|
||||
}
|
||||
|
||||
//increment counter
|
||||
$x++;
|
||||
|
||||
}
|
||||
|
||||
//save the changes
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = new permissions;
|
||||
$p->add('extension_edit', 'temp');
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('extension_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
$feature_event_notify->extension = $extension['extension'];
|
||||
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
|
||||
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
|
||||
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
|
||||
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
|
||||
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
|
||||
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
|
||||
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
|
||||
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
|
||||
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
|
||||
$feature_event_notify->send_notify();
|
||||
unset($feature_event_notify);
|
||||
}
|
||||
}
|
||||
|
||||
//synchronize configuration
|
||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$cache->delete("directory:".$extension['extension']."@".$_SESSION['domain_name']);
|
||||
if ($extension['number_alias'] != '') {
|
||||
$cache->delete("directory:".$extension['number_alias']."@".$_SESSION['domain_name']);
|
||||
}
|
||||
}
|
||||
|
||||
//set message
|
||||
message::add($text['message-toggle']);
|
||||
|
||||
}
|
||||
unset($records, $extensions, $extension);
|
||||
}
|
||||
|
||||
//disable other features
|
||||
if ($new_state == self::TOGGLE_VALUES[0]) { //true
|
||||
$array[self::TABLE][$x]['do_not_disturb'] = self::TOGGLE_VALUES[1]; //false
|
||||
$array[self::TABLE][$x]['follow_me_enabled'] = self::TOGGLE_VALUES[1]; //false
|
||||
if (is_uuid($extension['follow_me_uuid'])) {
|
||||
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
|
||||
$array['follow_me'][$x]['follow_me_enabled'] = self::TOGGLE_VALUES[1]; //false
|
||||
}
|
||||
}
|
||||
|
||||
//increment counter
|
||||
$x++;
|
||||
}
|
||||
|
||||
//save the changes
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p->add('extension_edit', 'temp');
|
||||
|
||||
//save the array
|
||||
$database->app_name = self::APP_NAME;
|
||||
$database->app_uuid = self::APP_UUID;
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('extension_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
$feature_event_notify->extension = $extension['extension'];
|
||||
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
|
||||
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
|
||||
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
|
||||
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
|
||||
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
|
||||
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
|
||||
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
|
||||
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
|
||||
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
|
||||
$feature_event_notify->send_notify();
|
||||
unset($feature_event_notify);
|
||||
}
|
||||
}
|
||||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$cache->delete("directory:" . $extension['extension'] . "@" . $_SESSION['domain_name']);
|
||||
if ($extension['number_alias'] != '') {
|
||||
$cache->delete("directory:" . $extension['number_alias'] . "@" . $_SESSION['domain_name']);
|
||||
}
|
||||
}
|
||||
|
||||
//set message
|
||||
message::add($text['message-toggle']);
|
||||
}
|
||||
unset($records, $extensions, $extension);
|
||||
}
|
||||
}
|
||||
|
||||
//function
|
||||
}
|
||||
} //function
|
||||
|
||||
}// class
|
||||
|
||||
// class
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,12 +17,13 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2023
|
||||
Copyright (C) 2010 - 2016
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the dnd class
|
||||
class do_not_disturb {
|
||||
|
|
@ -39,10 +40,10 @@
|
|||
if ($this->enabled == "true") {
|
||||
//update the call center status
|
||||
$user_status = "Logged Out";
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['username']."@".$this->domain_name." '".$user_status."'";
|
||||
$switch_result = event_socket::api($switch_cmd);
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
|
||||
//update the database user_status
|
||||
|
|
@ -79,8 +80,8 @@
|
|||
if (is_uuid($this->extension_uuid)) {
|
||||
$this->extension_uuid = $row["extension_uuid"];
|
||||
}
|
||||
if (empty($this->extension)) {
|
||||
if (empty($row["number_alias"])) {
|
||||
if (strlen($this->extension) == 0) {
|
||||
if (strlen($row["number_alias"]) == 0) {
|
||||
$this->extension = $row["extension"];
|
||||
}
|
||||
else {
|
||||
|
|
@ -95,7 +96,7 @@
|
|||
$array['extensions'][0]['do_not_disturb'] = $this->enabled;
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('extension_edit', 'temp');
|
||||
|
||||
//execute update
|
||||
|
|
@ -111,7 +112,7 @@
|
|||
//delete extension from the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$this->extension."@".$this->domain_name);
|
||||
if(!empty($this->number_alias)){
|
||||
if(strlen($this->number_alias) > 0){
|
||||
$cache->delete("directory:".$this->number_alias."@".$this->domain_name);
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +164,7 @@
|
|||
|
||||
//get current toggle state
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -226,7 +227,7 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('extension_edit', 'temp');
|
||||
|
||||
//save the array
|
||||
|
|
@ -240,12 +241,12 @@
|
|||
$p->delete('extension_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
$feature_event_notify->extension = $extension['extension'];
|
||||
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'] == "true" ? "false" : "true";
|
||||
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
|
||||
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
|
||||
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
|
||||
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
|
||||
|
|
@ -260,7 +261,8 @@
|
|||
}
|
||||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
@ -288,4 +290,4 @@
|
|||
|
||||
} //class
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
KonradSC <konrd@yahoo.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the feature_event_notify class
|
||||
class feature_event_notify {
|
||||
|
|
@ -42,11 +43,11 @@
|
|||
|
||||
//feature_event method
|
||||
public function send_notify() {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
// Get the SIP profiles for the extension
|
||||
$command = "sofia_contact */{$this->extension}@{$this->domain_name}";
|
||||
$contact_string = event_socket::api($command);
|
||||
$contact_string = event_socket_request($fp, "api ".$command);
|
||||
// The first value in the array will be full matching text, the second one will be the array of profile matches
|
||||
preg_match_all('/sofia\/([^,]+)\/(?:[^,]+)/', $contact_string, $matches);
|
||||
if (sizeof($matches) != 2 || sizeof($matches[1]) < 1) {
|
||||
|
|
@ -72,11 +73,12 @@
|
|||
$event .= "forward_no_answer: " . $this->forward_no_answer_destination . "\n";
|
||||
$event .= "doNotDisturbOn: " . $this->do_not_disturb . "\n";
|
||||
$event .= "ringCount: " . $this->ring_count . "\n";
|
||||
event_socket::command($event);
|
||||
event_socket_request($fp, $event);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
} //function
|
||||
|
||||
|
||||
} //class
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2023
|
||||
Copyright (C) 2010 - 2019
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
Riccardo Granchi <riccardo.granchi@nems.it>
|
||||
Errol Samuels <voiptology@gmail.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the follow me class
|
||||
class follow_me {
|
||||
|
|
@ -84,14 +85,14 @@
|
|||
$array['follow_me'][0]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
$array['follow_me'][0]['domain_uuid'] = $this->domain_uuid;
|
||||
$array['follow_me'][0]['cid_name_prefix'] = $this->cid_name_prefix;
|
||||
if (!empty($this->cid_number_prefix)) {
|
||||
if (strlen($this->cid_number_prefix) > 0) {
|
||||
$array['follow_me'][0]['cid_number_prefix'] = $this->cid_number_prefix;
|
||||
}
|
||||
|
||||
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
|
||||
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('follow_me_add', 'temp');
|
||||
//execute insert
|
||||
$database = new database;
|
||||
|
|
@ -115,7 +116,7 @@
|
|||
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
|
||||
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('follow_me_add', 'temp');
|
||||
//execute update
|
||||
$database = new database;
|
||||
|
|
@ -135,7 +136,7 @@
|
|||
//delete related follow me destinations
|
||||
$array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('follow_me_destination_delete', 'temp');
|
||||
//execute delete
|
||||
$database = new database;
|
||||
|
|
@ -148,7 +149,7 @@
|
|||
|
||||
//build follow me destinations insert array
|
||||
$x = 0;
|
||||
if (!empty($this->destination_data_1)) {
|
||||
if (strlen($this->destination_data_1) > 0) {
|
||||
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
|
||||
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
|
||||
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
|
|
@ -160,7 +161,7 @@
|
|||
$this->destination_order++;
|
||||
$x++;
|
||||
}
|
||||
if (!empty($this->destination_data_2)) {
|
||||
if (strlen($this->destination_data_2) > 0) {
|
||||
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
|
||||
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
|
||||
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
|
|
@ -172,7 +173,7 @@
|
|||
$this->destination_order++;
|
||||
$x++;
|
||||
}
|
||||
if (!empty($this->destination_data_3)) {
|
||||
if (strlen($this->destination_data_3) > 0) {
|
||||
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
|
||||
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
|
||||
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
|
|
@ -184,7 +185,7 @@
|
|||
$this->destination_order++;
|
||||
$x++;
|
||||
}
|
||||
if (!empty($this->destination_data_4)) {
|
||||
if (strlen($this->destination_data_4) > 0) {
|
||||
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
|
||||
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
|
||||
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
|
|
@ -196,7 +197,7 @@
|
|||
$this->destination_order++;
|
||||
$x++;
|
||||
}
|
||||
if (!empty($this->destination_data_5)) {
|
||||
if (strlen($this->destination_data_5) > 0) {
|
||||
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
|
||||
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
|
||||
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
|
||||
|
|
@ -210,7 +211,7 @@
|
|||
}
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('follow_me_destination_add', 'temp');
|
||||
//execute insert
|
||||
$database = new database;
|
||||
|
|
@ -234,7 +235,7 @@
|
|||
$extension_uuid = $result[0]['extension_uuid'];
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add("follow_me_edit", 'temp');
|
||||
$p->add("extension_edit", 'temp');
|
||||
|
||||
|
|
@ -307,7 +308,7 @@
|
|||
|
||||
//get current toggle state
|
||||
foreach($records as $x => $record) {
|
||||
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
|
@ -353,7 +354,7 @@
|
|||
$extension['state'] == $this->toggle_values[1] //false becoming true
|
||||
&& is_uuid($extension['follow_me_uuid'])
|
||||
) {
|
||||
$sql = "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid";
|
||||
$sql .= "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid";
|
||||
$parameters['follow_me_uuid'] = $extension['follow_me_uuid'];
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
|
@ -389,7 +390,7 @@
|
|||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//grant temporary permissions
|
||||
$p = permissions::new();
|
||||
$p = new permissions;
|
||||
$p->add('extension_edit', 'temp');
|
||||
$p->add('follow_me_edit', 'temp');
|
||||
|
||||
|
|
@ -405,7 +406,7 @@
|
|||
$p->delete('follow_me_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
|
|
@ -425,7 +426,8 @@
|
|||
}
|
||||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,35 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 4) . "/resources/require.php";
|
||||
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) 2021
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
//require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
|
||||
//access granted
|
||||
}
|
||||
|
|
@ -13,243 +38,14 @@
|
|||
exit;
|
||||
}
|
||||
|
||||
//connect to the database
|
||||
if (!isset($database)) {
|
||||
$database = new database;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_forward');
|
||||
|
||||
//extensions link
|
||||
$extension_link = '#';
|
||||
if (permission_exists('extension_view')) {
|
||||
$extension_link = PROJECT_PATH."/app/extensions/extensions.php";
|
||||
}
|
||||
$call_forward_link = PROJECT_PATH."/app/call_forward/call_forward.php";
|
||||
//set a variable for the included code to know its included
|
||||
$is_included = true;
|
||||
|
||||
//set the row style
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//get data
|
||||
$sql = "select ";
|
||||
$sql .= "extension_uuid,";
|
||||
$sql .= "extension, ";
|
||||
$sql .= "forward_all_enabled, ";
|
||||
$sql .= "forward_all_destination, ";
|
||||
$sql .= "follow_me_enabled, ";
|
||||
$sql .= "follow_me_uuid, ";
|
||||
$sql .= "do_not_disturb ";
|
||||
$sql .= "from ";
|
||||
$sql .= "v_extensions ";
|
||||
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!permission_exists('extension_edit')) {
|
||||
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and (";
|
||||
$x = 0;
|
||||
foreach($_SESSION['user']['extension'] as $row) {
|
||||
if ($x > 0) { $sql .= "or "; }
|
||||
$sql .= "extension = '".$row['user']."' ";
|
||||
$x++;
|
||||
}
|
||||
$sql .= ")";
|
||||
}
|
||||
else {
|
||||
//used to hide any results when a user has not been assigned an extension
|
||||
$sql .= "and extension = 'disabled' ";
|
||||
}
|
||||
}
|
||||
$sql .= order_by($order_by ?? null, $order ?? null, 'extension', 'asc');
|
||||
$database = new database;
|
||||
$extensions = $database->select($sql, $parameters, 'all');
|
||||
unset($parameters);
|
||||
|
||||
//determine keys and stats
|
||||
unset($stats);
|
||||
|
||||
//set defaults
|
||||
$stats['dnd'] = $stats['follow_me'] = $stats['call_forward'] = $stats['active'] = 0;
|
||||
|
||||
$show_stat = false;
|
||||
if (is_array($extensions) && @sizeof($extensions) != 0) {
|
||||
foreach ($extensions as $row) {
|
||||
if (permission_exists('call_forward')) {
|
||||
$stats['call_forward'] += $row['forward_all_enabled'] == 'true' && $row['forward_all_destination'] ? 1 : 0;
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
$stats['follow_me'] += $row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid']) ? 1 : 0;
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
$stats['dnd'] += $row['do_not_disturb'] == 'true' ? 1 : 0;
|
||||
}
|
||||
}
|
||||
$stats['active'] = @sizeof($extensions) - $stats['call_forward'] - $stats['follow_me'] - $stats['dnd'];
|
||||
}
|
||||
if (is_array($stats) && @sizeof($stats) != 0) {
|
||||
$show_stat = true;
|
||||
}
|
||||
|
||||
//begin widget
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_call_forward_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['header-call_forward']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
|
||||
echo "<div class='hud_chart' style='width: 275px;'><canvas id='call_forward_chart'></canvas></div>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
echo " const call_forward_chart = new Chart(\n";
|
||||
echo " document.getElementById('call_forward_chart').getContext('2d'),\n";
|
||||
echo " {\n";
|
||||
echo " type: 'doughnut',\n";
|
||||
echo " data: {\n";
|
||||
echo " labels: [\n";
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " '".$text['label-dnd'].": ".$stats['dnd']."',\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " '".$text['label-follow_me'].": ".$stats['follow_me']."',\n";
|
||||
}
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " '".$text['label-call_forward'].": ".$stats['call_forward']."',\n";
|
||||
}
|
||||
echo " '".$text['label-active'].": ".$stats['active']."',\n";
|
||||
echo " ],\n";
|
||||
echo " datasets: [{\n";
|
||||
echo " data: [\n";
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " '".$stats['dnd']."',\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " '".$stats['follow_me']."',\n";
|
||||
}
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " '".$stats['call_forward']."',\n";
|
||||
}
|
||||
echo " '".$stats['active']."',\n";
|
||||
echo " 0.00001,\n";
|
||||
echo " ],\n";
|
||||
echo " backgroundColor: [\n";
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_do_not_disturb') ?? '#ea4c46')."',\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_follow_me') ?? '#03c04a')."',\n";
|
||||
}
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_call_forward') ?? '#2a9df4')."',\n";
|
||||
}
|
||||
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_active') ?? '#d4d4d4')."',\n";
|
||||
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_active') ?? '#d4d4d4')."'\n";
|
||||
echo " ],\n";
|
||||
echo " borderColor: '".$settings->get('theme', 'dashboard_chart_border_color')."',\n";
|
||||
echo " borderWidth: '".$settings->get('theme', 'dashboard_chart_border_width')."'\n";
|
||||
echo " }]\n";
|
||||
echo " },\n";
|
||||
echo " options: {\n";
|
||||
echo " plugins: {\n";
|
||||
echo " chart_number: {\n";
|
||||
echo " text: '".$stats['call_forward']."'\n";
|
||||
echo " },\n";
|
||||
echo " legend: {\n";
|
||||
echo " display: true,\n";
|
||||
echo " position: 'right',\n";
|
||||
echo " reverse: true,\n";
|
||||
echo " labels: {\n";
|
||||
echo " usePointStyle: true,\n";
|
||||
echo " pointStyle: 'rect',\n";
|
||||
echo " color: '".$dashboard_label_text_color."'\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " },\n";
|
||||
echo " plugins: [{\n";
|
||||
echo " id: 'chart_number',\n";
|
||||
echo " beforeDraw(chart, args, options){\n";
|
||||
echo " const {ctx, chartArea: {top, right, bottom, left, width, height} } = chart;\n";
|
||||
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
|
||||
echo " ctx.textBaseline = 'middle';\n";
|
||||
echo " ctx.textAlign = 'center';\n";
|
||||
echo " ctx.fillStyle = '".$dashboard_number_text_color."';\n";
|
||||
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
|
||||
echo " ctx.save();\n";
|
||||
echo " }\n";
|
||||
echo " }]\n";
|
||||
echo " }\n";
|
||||
echo " );\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
if ($dashboard_chart_type == "number") {
|
||||
echo " <span class='hud_stat'>".$stats['call_forward']."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//details
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_call_forward_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n";
|
||||
echo "<th class='hud_heading'><a href='".$extension_link."'>".$text['label-extension']."</a></th>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " <th class='hud_heading' style='text-align: center;'><a href='".$call_forward_link."'>".$text['label-call_forward']."</a></th>\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " <th class='hud_heading' style='text-align: center;'><a href='".$call_forward_link."'>".$text['label-follow_me']."</a></th>\n";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " <th class='hud_heading' style='text-align: center;'><a href='".$call_forward_link."'>".$text['label-dnd']."</a></th>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
if (is_array($extensions) && @sizeof($extensions) != 0) {
|
||||
foreach ($extensions as $row) {
|
||||
$tr_link = PROJECT_PATH."/app/call_forward/call_forward_edit.php?id=".$row['extension_uuid'];
|
||||
echo "<tr href='".$tr_link."'>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text'><a href='".$tr_link."' title=\"".$text['button-edit']."\">".escape($row['extension'])."</a></td>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".($row['forward_all_enabled'] == 'true' ? escape(format_phone($row['forward_all_destination'])) : ' ')."</td>\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
//get destination count
|
||||
$follow_me_destination_count = 0;
|
||||
if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) {
|
||||
$sql = "select count(*) from v_follow_me_destinations ";
|
||||
$sql .= "where follow_me_uuid = :follow_me_uuid ";
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['follow_me_uuid'] = $row['follow_me_uuid'];
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$follow_me_destination_count = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".($follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : ' ')."</td>\n";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".($row['do_not_disturb'] == 'true' ? $text['label-enabled'] : ' ')."</td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$c = ($c) ? 0 : 1;
|
||||
}
|
||||
unset($extensions);
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_call_forward_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>\n";
|
||||
}
|
||||
echo "</div>\n";
|
||||
//include the call forward
|
||||
require_once "app/call_forward/call_forward.php";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,33 +1,8 @@
|
|||
<?php
|
||||
|
||||
//call forward
|
||||
$array['dashboard'][$x]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
|
||||
$array['dashboard'][$x]['dashboard_name'] = 'Call Forward';
|
||||
$array['dashboard'][$x]['dashboard_path'] = 'call_forward/call_forward';
|
||||
$array['dashboard'][$x]['dashboard_icon'] = 'fa-forward';
|
||||
$array['dashboard'][$x]['dashboard_icon_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php';
|
||||
$array['dashboard'][$x]['dashboard_target'] = 'self';
|
||||
$array['dashboard'][$x]['dashboard_width'] = '';
|
||||
$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'] = '';
|
||||
$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_text_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
|
||||
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_background_color'] ='';
|
||||
$array['dashboard'][$x]['dashboard_background_color_hover'] = '';
|
||||
$array['dashboard'][$x]['dashboard_detail_background_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_column_span'] = '1';
|
||||
$array['dashboard'][$x]['dashboard_row_span'] = '2';
|
||||
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden';
|
||||
$array['dashboard'][$x]['dashboard_path'] = 'app/call_forward/resources/dashboard/call_forward.php';
|
||||
$array['dashboard'][$x]['dashboard_order'] = '130';
|
||||
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
|
||||
$array['dashboard'][$x]['dashboard_description'] = 'Call routing for extension using Call forward, Follow Me and Do Not Disturb.';
|
||||
|
|
@ -43,42 +18,5 @@ $y++;
|
|||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '6d04646f-54cf-49f4-a3ce-a16e7adda2b9';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
|
||||
$x++;
|
||||
|
||||
//follow me icon
|
||||
$array['dashboard'][$x]['dashboard_uuid'] = '714e513d-be78-4c63-8f8d-951d48a7fc0e';
|
||||
$array['dashboard'][$x]['dashboard_name'] = 'Follow Me';
|
||||
$array['dashboard'][$x]['dashboard_path'] = 'core/dashboard/resources/dashboard/icon.php';
|
||||
$array['dashboard'][$x]['dashboard_icon'] = 'fa-forward';
|
||||
$array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php';
|
||||
$array['dashboard'][$x]['dashboard_target'] = 'self';
|
||||
$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'] = '';
|
||||
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
|
||||
$array['dashboard'][$x]['dashboard_label_background_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
|
||||
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
|
||||
$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff';
|
||||
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
|
||||
$array['dashboard'][$x]['dashboard_background_color'] ='';
|
||||
$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'] = '1';
|
||||
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled';
|
||||
$array['dashboard'][$x]['dashboard_order'] = '50';
|
||||
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
|
||||
$array['dashboard'][$x]['dashboard_description'] = '';
|
||||
$y = 0;
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '57a49ce1-6985-4c9e-b59c-38ecd1d6bf7f';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '714e513d-be78-4c63-8f8d-951d48a7fc0e';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,93 +0,0 @@
|
|||
<?php
|
||||
|
||||
//check the permission
|
||||
if (defined('STDIN')) {
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 4) . "/resources/require.php";
|
||||
}
|
||||
else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//increase limits
|
||||
set_time_limit(0);
|
||||
//ini_set('max_execution_time',1800); //30 minutes
|
||||
//ini_set('memory_limit', '512M');
|
||||
|
||||
//save the arguments to variables
|
||||
$script_name = $argv[0];
|
||||
if (!empty($argv[1])) {
|
||||
parse_str($argv[1], $_GET);
|
||||
}
|
||||
|
||||
//get the primary key
|
||||
if (Is_array($_GET)) {
|
||||
$hostname = urldecode($_GET['hostname']);
|
||||
$debug = $_GET['debug'];
|
||||
$sleep_seconds = $_GET['sleep'];
|
||||
}
|
||||
else {
|
||||
//invalid uuid
|
||||
exit;
|
||||
}
|
||||
|
||||
//use global conf created from require.php
|
||||
global $conf;
|
||||
|
||||
//set the event socket connection settings
|
||||
$host = $conf['switch.event_socket.host'] ?? $conf['event_socket.ip_address'] ?? '127.0.0.1';
|
||||
$port = $conf['switch.event_socket.port'] ?? $conf['event_socket.port'] ?? '8021';
|
||||
$pass = $conf['switch.event_socket.password'] ?? $conf['event_socket.password'] ?? 'ClueCon';
|
||||
|
||||
//connect to event socket using a lower timeout because we are on cli
|
||||
$esl = event_socket::create($host, $port, $pass, 10000);
|
||||
|
||||
//ensure we are connected
|
||||
if ($esl->is_connected()) {
|
||||
|
||||
//get the list
|
||||
$sql = "select domain_name, extension, user_context, do_not_disturb, description ";
|
||||
$sql .= "from v_extensions as e, v_domains as d ";
|
||||
$sql .= "where do_not_disturb = 'true' ";
|
||||
$sql .= "and e.domain_uuid = d.domain_uuid ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
$database = new database;
|
||||
$results = $database->select($sql, $parameters, 'all');
|
||||
unset($parameters);
|
||||
foreach ($results as $row) {
|
||||
|
||||
//build the event
|
||||
$cmd = "sendevent PRESENCE_IN\n";
|
||||
$cmd .= "proto: sip\n";
|
||||
$cmd .= "login: " . $row['extension'] . "@" . $row['domain_name'] . "\n";
|
||||
$cmd .= "from: " . $row['extension'] . "@" . $row['domain_name'] . "\n";
|
||||
$cmd .= "status: Active (1 waiting)\n";
|
||||
$cmd .= "rpid: unknown\n";
|
||||
$cmd .= "event_type: presence\n";
|
||||
$cmd .= "alt_event_type: dialog\n";
|
||||
$cmd .= "event_count: 1\n";
|
||||
$cmd .= "unique-id: " . uuid() . "\n";
|
||||
$cmd .= "Presence-Call-Direction: outbound\n";
|
||||
$cmd .= "answer-state: confirmed\n";
|
||||
//$cmd .= "answer-state: early\n";
|
||||
//$cmd .= "answer-state: terminated\n";
|
||||
//send message to the console
|
||||
if (isset($debug)) {
|
||||
echo "\n";
|
||||
echo "[presence] dnd " . $row['extension'] . "@" . $row['domain_name'] . "\n";
|
||||
}
|
||||
|
||||
//send the event
|
||||
$result = event_socket::command($cmd);
|
||||
if (isset($debug)) {
|
||||
print_r($result, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
trigger_error("Unable to connect to FreeSWITCH using $host, $port, $password", E_USER_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
* * * * * cd /var/www/fusionpbx && php /var/www/fusionpbx/app/call_forward/resources/jobs/dnd.php
|
||||
*/
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
$apps[$x]['uuid'] = '56165644-598d-4ed8-be01-d960bcb8ffed';
|
||||
$apps[$x]['category'] = '';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '1.1';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en-us'] = 'Call Recordings';
|
||||
|
|
@ -34,24 +34,57 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_download';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_transcribe';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y = 0;
|
||||
$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_subcategory'] = "filesystem_retention_days";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$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_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";
|
||||
|
||||
//Call Recordings
|
||||
$y = 2;
|
||||
$apps[$x]['db'][$y]['table']['name'] = 'v_call_recordings';
|
||||
$apps[$x]['db'][$y]['table']['parent'] = '';
|
||||
$z = 0;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_name';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_path';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_length';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_direction';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_description';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_base64';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,47 +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) 2022-2024
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//create the user view combines username, organization, contact first and last name
|
||||
$database->execute("DROP VIEW view_call_recordings;", null);
|
||||
$sql = "CREATE VIEW view_call_recordings AS ( \n";
|
||||
$sql .= " select domain_uuid, xml_cdr_uuid as call_recording_uuid, \n";
|
||||
$sql .= " caller_id_name, caller_id_number, caller_destination, destination_number, \n";
|
||||
$sql .= " record_name as call_recording_name, record_path as call_recording_path, \n";
|
||||
$sql .= " record_transcription as call_recording_transcription, \n";
|
||||
$sql .= " duration as call_recording_length, start_stamp as call_recording_date, direction as call_direction \n";
|
||||
$sql .= " from v_xml_cdr \n";
|
||||
$sql .= " where record_name is not null \n";
|
||||
$sql .= " and record_path is not null \n";
|
||||
$sql .= " order by start_stamp desc \n";
|
||||
$sql .= "); \n";
|
||||
$database->execute($sql, null);
|
||||
unset($sql);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -2,626 +2,422 @@
|
|||
|
||||
$text['title-call_recordings']['en-us'] = "Call Recordings";
|
||||
$text['title-call_recordings']['en-gb'] = "Call Recordings";
|
||||
$text['title-call_recordings']['ar-eg'] = "تسجيلات المكالمات";
|
||||
$text['title-call_recordings']['de-at'] = "Anrufaufzeichnungen";
|
||||
$text['title-call_recordings']['de-ch'] = "Anrufaufzeichnungen";
|
||||
$text['title-call_recordings']['de-de'] = "Anrufaufzeichnungen";
|
||||
$text['title-call_recordings']['el-gr'] = "Ηχογραφήσεις κλήσεων";
|
||||
$text['title-call_recordings']['es-cl'] = "Grabaciones de llamadas";
|
||||
$text['title-call_recordings']['es-mx'] = "Grabaciones de llamadas";
|
||||
$text['title-call_recordings']['ar-eg'] = "";
|
||||
$text['title-call_recordings']['de-at'] = "";
|
||||
$text['title-call_recordings']['de-ch'] = "";
|
||||
$text['title-call_recordings']['de-de'] = "";
|
||||
$text['title-call_recordings']['es-cl'] = "";
|
||||
$text['title-call_recordings']['es-mx'] = "";
|
||||
$text['title-call_recordings']['fr-ca'] = "Enregistrements d'appels";
|
||||
$text['title-call_recordings']['fr-fr'] = "Enregistrements d'appels";
|
||||
$text['title-call_recordings']['he-il'] = "הקלטות שיחות";
|
||||
$text['title-call_recordings']['it-it'] = "Grabaciones de llamadas";
|
||||
$text['title-call_recordings']['ka-ge'] = "ზარის ჩანაწერები";
|
||||
$text['title-call_recordings']['he-il'] = "";
|
||||
$text['title-call_recordings']['it-it'] = "";
|
||||
$text['title-call_recordings']['nl-nl'] = "Gespreksopnamen";
|
||||
$text['title-call_recordings']['pl-pl'] = "Nagrania Rozmów";
|
||||
$text['title-call_recordings']['pt-br'] = "Gravações de chamadas";
|
||||
$text['title-call_recordings']['pt-pt'] = "Gravações de chamadas";
|
||||
$text['title-call_recordings']['ro-ro'] = "Înregistrări de apeluri";
|
||||
$text['title-call_recordings']['pt-br'] = "";
|
||||
$text['title-call_recordings']['pt-pt'] = "";
|
||||
$text['title-call_recordings']['ro-ro'] = "";
|
||||
$text['title-call_recordings']['ru-ru'] = "Записи разговоров";
|
||||
$text['title-call_recordings']['sv-se'] = "Samtalsinspelningar";
|
||||
$text['title-call_recordings']['uk-ua'] = "Записи дзвінків";
|
||||
$text['title-call_recordings']['zh-cn'] = "通话录音";
|
||||
$text['title-call_recordings']['ja-jp'] = "通話録音";
|
||||
$text['title-call_recordings']['ko-kr'] = "통화 녹음";
|
||||
$text['title-call_recordings']['sv-se'] = "";
|
||||
$text['title-call_recordings']['uk-ua'] = "";
|
||||
|
||||
$text['title-call_recording']['en-us'] = "Call Recording";
|
||||
$text['title-call_recording']['en-gb'] = "Call Recording";
|
||||
$text['title-call_recording']['ar-eg'] = "تسجيل المكالمات";
|
||||
$text['title-call_recording']['de-at'] = "Anrufaufzeichnung";
|
||||
$text['title-call_recording']['de-ch'] = "Anrufaufzeichnung";
|
||||
$text['title-call_recording']['de-de'] = "Anrufaufzeichnung";
|
||||
$text['title-call_recording']['el-gr'] = "Καταγραφή κλήσεων";
|
||||
$text['title-call_recording']['es-cl'] = "Grabacion de llamada";
|
||||
$text['title-call_recording']['es-mx'] = "Grabacion de llamada";
|
||||
$text['title-call_recording']['ar-eg'] = "";
|
||||
$text['title-call_recording']['de-at'] = "";
|
||||
$text['title-call_recording']['de-ch'] = "";
|
||||
$text['title-call_recording']['de-de'] = "";
|
||||
$text['title-call_recording']['es-cl'] = "";
|
||||
$text['title-call_recording']['es-mx'] = "";
|
||||
$text['title-call_recording']['fr-ca'] = "Enregistrement d'appel";
|
||||
$text['title-call_recording']['fr-fr'] = "Enregistrement d'appel";
|
||||
$text['title-call_recording']['he-il'] = "הקלטת שיחה";
|
||||
$text['title-call_recording']['it-it'] = "Registrazione delle chiamate";
|
||||
$text['title-call_recording']['ka-ge'] = "საუბრის ჩაწერა";
|
||||
$text['title-call_recording']['he-il'] = "";
|
||||
$text['title-call_recording']['it-it'] = "";
|
||||
$text['title-call_recording']['nl-nl'] = "Gespreksopname";
|
||||
$text['title-call_recording']['pl-pl'] = "Nagranie rozmowy";
|
||||
$text['title-call_recording']['pt-br'] = "Gravação de chamadas";
|
||||
$text['title-call_recording']['pt-pt'] = "Gravação de chamadas";
|
||||
$text['title-call_recording']['ro-ro'] = "Înregistrare apel";
|
||||
$text['title-call_recording']['pl-pl'] = "";
|
||||
$text['title-call_recording']['pt-br'] = "";
|
||||
$text['title-call_recording']['pt-pt'] = "";
|
||||
$text['title-call_recording']['ro-ro'] = "";
|
||||
$text['title-call_recording']['ru-ru'] = "Запись разговора";
|
||||
$text['title-call_recording']['sv-se'] = "Samtalsinspelning";
|
||||
$text['title-call_recording']['uk-ua'] = "Запис дзвінків";
|
||||
$text['title-call_recording']['zh-cn'] = "通话录音";
|
||||
$text['title-call_recording']['ja-jp'] = "通話録音";
|
||||
$text['title-call_recording']['ko-kr'] = "통화 녹음";
|
||||
$text['title-call_recording']['sv-se'] = "";
|
||||
$text['title-call_recording']['uk-ua'] = "";
|
||||
|
||||
$text['title_description-call_recordings']['en-us'] = "Shows the call recordings with name, length, date and time, and call direction.";
|
||||
$text['title_description-call_recordings']['en-gb'] = "Shows the call recordings with name, length, date and time, and call direction.";
|
||||
$text['title_description-call_recordings']['ar-eg'] = "يظهر تسجيلات المكالمة بالاسم والطول والتاريخ والوقت واتجاه المكالمة.";
|
||||
$text['title_description-call_recordings']['de-at'] = "Zeigt die Anrufaufzeichnungen mit Name, Dauer, Datum und Uhrzeit sowie Anrufrichtung an.";
|
||||
$text['title_description-call_recordings']['de-ch'] = "Zeigt die Anrufaufzeichnungen mit Name, Dauer, Datum und Uhrzeit sowie Anrufrichtung an.";
|
||||
$text['title_description-call_recordings']['de-de'] = "Zeigt die Anrufaufzeichnungen mit Name, Dauer, Datum und Uhrzeit sowie Anrufrichtung an.";
|
||||
$text['title_description-call_recordings']['el-gr'] = "Εμφανίζει τις εγγραφές κλήσεων με όνομα, διάρκεια, ημερομηνία και ώρα και κατεύθυνση κλήσης.";
|
||||
$text['title_description-call_recordings']['es-cl'] = "Muestra las grabaciones de llamadas con nombre, duración, fecha y hora, y dirección de la llamada.";
|
||||
$text['title_description-call_recordings']['es-mx'] = "Muestra las grabaciones de llamadas con nombre, duración, fecha y hora, y dirección de la llamada.";
|
||||
$text['title_description-call_recordings']['ar-eg'] = "";
|
||||
$text['title_description-call_recordings']['de-at'] = "";
|
||||
$text['title_description-call_recordings']['de-ch'] = "";
|
||||
$text['title_description-call_recordings']['de-de'] = "";
|
||||
$text['title_description-call_recordings']['es-cl'] = "";
|
||||
$text['title_description-call_recordings']['es-mx'] = "";
|
||||
$text['title_description-call_recordings']['fr-ca'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
|
||||
$text['title_description-call_recordings']['fr-fr'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
|
||||
$text['title_description-call_recordings']['he-il'] = "מציג את הקלטות השיחה עם שם, אורך, תאריך ושעה וכיוון השיחה.";
|
||||
$text['title_description-call_recordings']['it-it'] = "Mostra le registrazioni delle chiamate con nome, durata, data e ora e direzione della chiamata.";
|
||||
$text['title_description-call_recordings']['ka-ge'] = "აჩვენებს ხელმისაწვდომ ზარის ჩანაწერებს სახელით, ხანგრძლივობით, თარიღითა და დროით და ზარის მიმართულებით.";
|
||||
$text['title_description-call_recordings']['he-il'] = "";
|
||||
$text['title_description-call_recordings']['it-it'] = "";
|
||||
$text['title_description-call_recordings']['nl-nl'] = "Toont de gespreksopnamen met naam, lengte, datum/tijd en oproep richting.";
|
||||
$text['title_description-call_recordings']['pl-pl'] = "Wyświetla nagrania połączeń wraz z nazwą, długością, datą i godziną oraz kierunkiem połączenia.";
|
||||
$text['title_description-call_recordings']['pt-br'] = "Mostra as gravações de chamadas com nome, duração, data e hora e direção da chamada.";
|
||||
$text['title_description-call_recordings']['pt-pt'] = "Mostra as gravações de chamadas com nome, duração, data e hora e direção da chamada.";
|
||||
$text['title_description-call_recordings']['ro-ro'] = "Afișează înregistrările apelurilor cu nume, lungime, dată și oră și direcția apelului.";
|
||||
$text['title_description-call_recordings']['pt-br'] = "";
|
||||
$text['title_description-call_recordings']['pt-pt'] = "";
|
||||
$text['title_description-call_recordings']['ro-ro'] = "";
|
||||
$text['title_description-call_recordings']['ru-ru'] = "Показывает доступные записи разговоров с именем, датой, временем и направлением вызова.";
|
||||
$text['title_description-call_recordings']['sv-se'] = "Visar samtalsinspelningarna med namn, längd, datum och tid samt samtalsriktning.";
|
||||
$text['title_description-call_recordings']['uk-ua'] = "Показує записи дзвінків із назвою, тривалістю, датою та часом, а також напрямком дзвінка.";
|
||||
$text['title_description-call_recordings']['zh-cn'] = "显示带有名称、长度、日期和时间以及呼叫方向的通话录音。";
|
||||
$text['title_description-call_recordings']['ja-jp'] = "通話録音を名前、長さ、日付と時刻、通話方向とともに表示します。";
|
||||
$text['title_description-call_recordings']['ko-kr'] = "이름, 길이, 날짜 및 시간, 통화 방향과 함께 통화 녹음을 표시합니다.";
|
||||
$text['title_description-call_recordings']['sv-se'] = "";
|
||||
$text['title_description-call_recordings']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_recording_name']['en-us'] = "Name";
|
||||
$text['label-call_recording_name']['en-gb'] = "Name";
|
||||
$text['label-call_recording_name']['ar-eg'] = "اسم";
|
||||
$text['label-call_recording_name']['de-at'] = "Name";
|
||||
$text['label-call_recording_name']['de-ch'] = "Name";
|
||||
$text['label-call_recording_name']['de-de'] = "Name";
|
||||
$text['label-call_recording_name']['el-gr'] = "Ονομα";
|
||||
$text['label-call_recording_name']['es-cl'] = "Nombre";
|
||||
$text['label-call_recording_name']['es-mx'] = "Nombre";
|
||||
$text['label-call_recording_name']['ar-eg'] = "";
|
||||
$text['label-call_recording_name']['de-at'] = "";
|
||||
$text['label-call_recording_name']['de-ch'] = "";
|
||||
$text['label-call_recording_name']['de-de'] = "";
|
||||
$text['label-call_recording_name']['es-cl'] = "";
|
||||
$text['label-call_recording_name']['es-mx'] = "";
|
||||
$text['label-call_recording_name']['fr-ca'] = "Nom";
|
||||
$text['label-call_recording_name']['fr-fr'] = "Nom";
|
||||
$text['label-call_recording_name']['he-il'] = "שֵׁם";
|
||||
$text['label-call_recording_name']['it-it'] = "Nome";
|
||||
$text['label-call_recording_name']['ka-ge'] = "სახელი";
|
||||
$text['label-call_recording_name']['he-il'] = "";
|
||||
$text['label-call_recording_name']['it-it'] = "";
|
||||
$text['label-call_recording_name']['nl-nl'] = "Naam";
|
||||
$text['label-call_recording_name']['pl-pl'] = "Nazwa";
|
||||
$text['label-call_recording_name']['pt-br'] = "Nome";
|
||||
$text['label-call_recording_name']['pt-pt'] = "Nome";
|
||||
$text['label-call_recording_name']['ro-ro'] = "Nume";
|
||||
$text['label-call_recording_name']['pt-br'] = "";
|
||||
$text['label-call_recording_name']['pt-pt'] = "";
|
||||
$text['label-call_recording_name']['ro-ro'] = "";
|
||||
$text['label-call_recording_name']['ru-ru'] = "Имя";
|
||||
$text['label-call_recording_name']['sv-se'] = "namn";
|
||||
$text['label-call_recording_name']['uk-ua'] = "Ім'я";
|
||||
$text['label-call_recording_name']['zh-cn'] = "姓名";
|
||||
$text['label-call_recording_name']['ja-jp'] = "名前";
|
||||
$text['label-call_recording_name']['ko-kr'] = "이름";
|
||||
$text['label-call_recording_name']['sv-se'] = "";
|
||||
$text['label-call_recording_name']['uk-ua'] = "";
|
||||
|
||||
$text['label-caller_id_name']['en-us'] = "Caller Name";
|
||||
$text['label-caller_id_name']['en-gb'] = "Caller Name";
|
||||
$text['label-caller_id_name']['ar-eg'] = "اسم المتصل";
|
||||
$text['label-caller_id_name']['de-at'] = "Anrufer Name";
|
||||
$text['label-caller_id_name']['de-ch'] = "Anrufer Name";
|
||||
$text['label-caller_id_name']['de-de'] = "Anrufer Name";
|
||||
$text['label-caller_id_name']['el-gr'] = "Όνομα καλούντος";
|
||||
$text['label-caller_id_name']['es-cl'] = "Nombre CID";
|
||||
$text['label-caller_id_name']['es-mx'] = "Nombre CID";
|
||||
$text['label-caller_id_name']['fr-ca'] = "Nom de l'Appelant";
|
||||
$text['label-caller_id_name']['fr-fr'] = "Nom de l'Appelant";
|
||||
$text['label-caller_id_name']['he-il'] = "שם המתקשר";
|
||||
$text['label-caller_id_name']['it-it'] = "Nome CID";
|
||||
$text['label-caller_id_name']['ka-ge'] = "დამრეკავის სახელი";
|
||||
$text['label-caller_id_name']['nl-nl'] = "Naam beller";
|
||||
$text['label-caller_id_name']['pl-pl'] = "Prezentacja nazwy dzwoniącego";
|
||||
$text['label-caller_id_name']['pt-br'] = "Nome CID";
|
||||
$text['label-caller_id_name']['pt-pt'] = "Nome CID";
|
||||
$text['label-caller_id_name']['ro-ro'] = "Numele apelantului";
|
||||
$text['label-caller_id_name']['ru-ru'] = "CID Имя";
|
||||
$text['label-caller_id_name']['sv-se'] = "CID Namn";
|
||||
$text['label-caller_id_name']['uk-ua'] = "CID Ім’я";
|
||||
$text['label-caller_id_name']['zh-cn'] = "来电者姓名";
|
||||
$text['label-caller_id_name']['ja-jp'] = "発信者名";
|
||||
$text['label-caller_id_name']['ko-kr'] = "발신자 이름";
|
||||
|
||||
$text['label-caller_id_number']['en-us'] = "Caller Number";
|
||||
$text['label-caller_id_number']['en-gb'] = "Caller Number";
|
||||
$text['label-caller_id_number']['ar-eg'] = "رقم المتصل";
|
||||
$text['label-caller_id_number']['de-at'] = "Anrufer Nummer";
|
||||
$text['label-caller_id_number']['de-ch'] = "Anrufer Nummer";
|
||||
$text['label-caller_id_number']['de-de'] = "Anrufer Nummer";
|
||||
$text['label-caller_id_number']['el-gr'] = "Αριθμός καλούντος";
|
||||
$text['label-caller_id_number']['es-cl'] = "Número CID";
|
||||
$text['label-caller_id_number']['es-mx'] = "Número CID";
|
||||
$text['label-caller_id_number']['fr-ca'] = "Numéro de l'Appelant";
|
||||
$text['label-caller_id_number']['fr-fr'] = "Numéro de l'Appelant";
|
||||
$text['label-caller_id_number']['he-il'] = "מספר מתקשר";
|
||||
$text['label-caller_id_number']['it-it'] = "Numero CID";
|
||||
$text['label-caller_id_number']['ka-ge'] = "დამრეკავის ნომერი";
|
||||
$text['label-caller_id_number']['nl-nl'] = "Beller nummer";
|
||||
$text['label-caller_id_number']['pl-pl'] = "Prezentacja numeru dzwoniącego";
|
||||
$text['label-caller_id_number']['pt-br'] = "Número CID";
|
||||
$text['label-caller_id_number']['pt-pt'] = "Número CID";
|
||||
$text['label-caller_id_number']['ro-ro'] = "Numărul apelantului";
|
||||
$text['label-caller_id_number']['ru-ru'] = "CID номера";
|
||||
$text['label-caller_id_number']['sv-se'] = "CID, Nummer";
|
||||
$text['label-caller_id_number']['uk-ua'] = "CID Номер";
|
||||
$text['label-caller_id_number']['zh-cn'] = "来电号码";
|
||||
$text['label-caller_id_number']['ja-jp'] = "発信者番号";
|
||||
$text['label-caller_id_number']['ko-kr'] = "발신자 번호";
|
||||
|
||||
$text['label-caller_destination']['en-us'] = "Caller Destination";
|
||||
$text['label-caller_destination']['en-gb'] = "Caller Destination";
|
||||
$text['label-caller_destination']['ar-eg'] = "وجهة المتصل";
|
||||
$text['label-caller_destination']['de-at'] = "Rufziel";
|
||||
$text['label-caller_destination']['de-ch'] = "Rufziel";
|
||||
$text['label-caller_destination']['de-de'] = "Rufziel";
|
||||
$text['label-caller_destination']['el-gr'] = "Προορισμός καλούντος";
|
||||
$text['label-caller_destination']['es-cl'] = "Destino de la persona que llama";
|
||||
$text['label-caller_destination']['es-mx'] = "Destino de la persona que llama";
|
||||
$text['label-caller_destination']['fr-ca'] = "Destination de l'appelant";
|
||||
$text['label-caller_destination']['fr-fr'] = "Destination de l'appelant";
|
||||
$text['label-caller_destination']['he-il'] = "Destino de la persona que llama";
|
||||
$text['label-caller_destination']['it-it'] = "Destinazione del chiamante";
|
||||
$text['label-caller_destination']['ka-ge'] = "დამრეკავის დანიშნულება";
|
||||
$text['label-caller_destination']['nl-nl'] = "Bestemming van de beller";
|
||||
$text['label-caller_destination']['pl-pl'] = "Miejsce docelowe dzwoniącego";
|
||||
$text['label-caller_destination']['pt-br'] = "Destino do chamador";
|
||||
$text['label-caller_destination']['pt-pt'] = "Destino do chamador";
|
||||
$text['label-caller_destination']['ro-ro'] = "Destinația apelantului";
|
||||
$text['label-caller_destination']['ru-ru'] = "Вызывающий абонент";
|
||||
$text['label-caller_destination']['sv-se'] = "Uppringarens destination";
|
||||
$text['label-caller_destination']['uk-ua'] = "Пункт призначення абонента";
|
||||
$text['label-caller_destination']['zh-cn'] = "来电目的地";
|
||||
$text['label-caller_destination']['ja-jp'] = "発信者の宛先";
|
||||
$text['label-caller_destination']['ko-kr'] = "발신자 목적지";
|
||||
|
||||
$text['label-destination_number']['en-us'] = "Destination";
|
||||
$text['label-destination_number']['en-gb'] = "Destination";
|
||||
$text['label-destination_number']['ar-eg'] = "وجهة";
|
||||
$text['label-destination_number']['de-at'] = "Ziel";
|
||||
$text['label-destination_number']['de-ch'] = "Ziel";
|
||||
$text['label-destination_number']['de-de'] = "Ziel";
|
||||
$text['label-destination_number']['el-gr'] = "Προορισμός";
|
||||
$text['label-destination_number']['es-cl'] = "Destino";
|
||||
$text['label-destination_number']['es-mx'] = "Destino";
|
||||
$text['label-destination_number']['fr-ca'] = "Destination";
|
||||
$text['label-destination_number']['fr-fr'] = "Destination";
|
||||
$text['label-destination_number']['he-il'] = "יַעַד";
|
||||
$text['label-destination_number']['it-it'] = "Destinazione";
|
||||
$text['label-destination_number']['ka-ge'] = "დანიშნულება";
|
||||
$text['label-destination_number']['nl-nl'] = "Bestemming";
|
||||
$text['label-destination_number']['pl-pl'] = "Miejsce docelowe";
|
||||
$text['label-destination_number']['pt-br'] = "Destino";
|
||||
$text['label-destination_number']['pt-pt'] = "Destino";
|
||||
$text['label-destination_number']['ro-ro'] = "Destinaţie";
|
||||
$text['label-destination_number']['ru-ru'] = "Место назначения";
|
||||
$text['label-destination_number']['sv-se'] = "Destination";
|
||||
$text['label-destination_number']['uk-ua'] = "Пункт призначення";
|
||||
$text['label-destination_number']['zh-cn'] = "目的地";
|
||||
$text['label-destination_number']['ja-jp'] = "行き先";
|
||||
$text['label-destination_number']['ko-kr'] = "목적지";
|
||||
|
||||
$text['description-call_recording_name']['en-us'] = "Call Recording Name";
|
||||
$text['description-call_recording_name']['en-gb'] = "Call Recording Name";
|
||||
$text['description-call_recording_name']['ar-eg'] = "اسم تسجيل المكالمات";
|
||||
$text['description-call_recording_name']['de-at'] = "Name der Anrufaufzeichnung";
|
||||
$text['description-call_recording_name']['de-ch'] = "Name der Anrufaufzeichnung";
|
||||
$text['description-call_recording_name']['de-de'] = "Name der Anrufaufzeichnung";
|
||||
$text['description-call_recording_name']['el-gr'] = "Όνομα εγγραφής κλήσης";
|
||||
$text['description-call_recording_name']['es-cl'] = "Nombre de grabación de llamada";
|
||||
$text['description-call_recording_name']['es-mx'] = "Nombre de grabación de llamada";
|
||||
$text['description-call_recording_name']['fr-ca'] = "Nom de l'enregistrement d'appel";
|
||||
$text['description-call_recording_name']['fr-fr'] = "Nom de l'enregistrement d'appel";
|
||||
$text['description-call_recording_name']['he-il'] = "שם הקלטת שיחה";
|
||||
$text['description-call_recording_name']['it-it'] = "Nome della registrazione della chiamata";
|
||||
$text['description-call_recording_name']['ka-ge'] = "ზარის ჩანაწერის სახელი";
|
||||
$text['description-call_recording_name']['en-us'] = "";
|
||||
$text['description-call_recording_name']['en-gb'] = "";
|
||||
$text['description-call_recording_name']['ar-eg'] = "";
|
||||
$text['description-call_recording_name']['de-at'] = "";
|
||||
$text['description-call_recording_name']['de-ch'] = "";
|
||||
$text['description-call_recording_name']['de-de'] = "";
|
||||
$text['description-call_recording_name']['es-cl'] = "";
|
||||
$text['description-call_recording_name']['es-mx'] = "";
|
||||
$text['description-call_recording_name']['fr-ca'] = "";
|
||||
$text['description-call_recording_name']['fr-fr'] = "";
|
||||
$text['description-call_recording_name']['he-il'] = "";
|
||||
$text['description-call_recording_name']['it-it'] = "";
|
||||
$text['description-call_recording_name']['nl-nl'] = "Gespreksopname naam";
|
||||
$text['description-call_recording_name']['pl-pl'] = "Nazwa nagrania rozmowy";
|
||||
$text['description-call_recording_name']['pt-br'] = "Nome da gravação de chamada";
|
||||
$text['description-call_recording_name']['pt-pt'] = "Nome da gravação de chamada";
|
||||
$text['description-call_recording_name']['ro-ro'] = "Numele înregistrării apelului";
|
||||
$text['description-call_recording_name']['ru-ru'] = "Имя записи звонка";
|
||||
$text['description-call_recording_name']['sv-se'] = "Namn på samtalsinspelning";
|
||||
$text['description-call_recording_name']['uk-ua'] = "Назва запису виклику";
|
||||
$text['description-call_recording_name']['zh-cn'] = "通话录音名称";
|
||||
$text['description-call_recording_name']['ja-jp'] = "通話録音名";
|
||||
$text['description-call_recording_name']['ko-kr'] = "통화 녹음 이름";
|
||||
$text['description-call_recording_name']['pl-pl'] = "";
|
||||
$text['description-call_recording_name']['pt-br'] = "";
|
||||
$text['description-call_recording_name']['pt-pt'] = "";
|
||||
$text['description-call_recording_name']['ro-ro'] = "";
|
||||
$text['description-call_recording_name']['ru-ru'] = "";
|
||||
$text['description-call_recording_name']['sv-se'] = "";
|
||||
$text['description-call_recording_name']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_recording_path']['en-us'] = "Path";
|
||||
$text['label-call_recording_path']['en-gb'] = "Path";
|
||||
$text['label-call_recording_path']['ar-eg'] = "طريق";
|
||||
$text['label-call_recording_path']['de-at'] = "Weg";
|
||||
$text['label-call_recording_path']['de-ch'] = "Weg";
|
||||
$text['label-call_recording_path']['de-de'] = "Weg";
|
||||
$text['label-call_recording_path']['el-gr'] = "Μονοπάτι";
|
||||
$text['label-call_recording_path']['es-cl'] = "Camino";
|
||||
$text['label-call_recording_path']['es-mx'] = "Camino";
|
||||
$text['label-call_recording_path']['ar-eg'] = "";
|
||||
$text['label-call_recording_path']['de-at'] = "";
|
||||
$text['label-call_recording_path']['de-ch'] = "";
|
||||
$text['label-call_recording_path']['de-de'] = "";
|
||||
$text['label-call_recording_path']['es-cl'] = "";
|
||||
$text['label-call_recording_path']['es-mx'] = "";
|
||||
$text['label-call_recording_path']['fr-ca'] = "Chemin";
|
||||
$text['label-call_recording_path']['fr-fr'] = "Chemin";
|
||||
$text['label-call_recording_path']['he-il'] = "נָתִיב";
|
||||
$text['label-call_recording_path']['it-it'] = "Sentiero";
|
||||
$text['label-call_recording_path']['ka-ge'] = "ბილიკი";
|
||||
$text['label-call_recording_path']['he-il'] = "";
|
||||
$text['label-call_recording_path']['it-it'] = "";
|
||||
$text['label-call_recording_path']['nl-nl'] = "Pad";
|
||||
$text['label-call_recording_path']['pl-pl'] = "Scieżka";
|
||||
$text['label-call_recording_path']['pt-br'] = "Caminho";
|
||||
$text['label-call_recording_path']['pt-pt'] = "Caminho";
|
||||
$text['label-call_recording_path']['ro-ro'] = "cale";
|
||||
$text['label-call_recording_path']['pt-br'] = "";
|
||||
$text['label-call_recording_path']['pt-pt'] = "";
|
||||
$text['label-call_recording_path']['ro-ro'] = "";
|
||||
$text['label-call_recording_path']['ru-ru'] = "Путь";
|
||||
$text['label-call_recording_path']['sv-se'] = "Väg";
|
||||
$text['label-call_recording_path']['uk-ua'] = "шлях";
|
||||
$text['label-call_recording_path']['zh-cn'] = "小路";
|
||||
$text['label-call_recording_path']['ja-jp'] = "道";
|
||||
$text['label-call_recording_path']['ko-kr'] = "길";
|
||||
$text['label-call_recording_path']['sv-se'] = "";
|
||||
$text['label-call_recording_path']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_recording_path']['en-us'] = "Conversation recording path";
|
||||
$text['description-call_recording_path']['en-gb'] = "Conversation recording path";
|
||||
$text['description-call_recording_path']['ar-eg'] = "مسار تسجيل المحادثة";
|
||||
$text['description-call_recording_path']['de-at'] = "Konversationsaufzeichnungspfad";
|
||||
$text['description-call_recording_path']['de-ch'] = "Konversationsaufzeichnungspfad";
|
||||
$text['description-call_recording_path']['de-de'] = "Konversationsaufzeichnungspfad";
|
||||
$text['description-call_recording_path']['el-gr'] = "Διαδρομή εγγραφής συνομιλίας";
|
||||
$text['description-call_recording_path']['es-cl'] = "Ruta de grabación de conversaciones";
|
||||
$text['description-call_recording_path']['es-mx'] = "Ruta de grabación de conversaciones";
|
||||
$text['description-call_recording_path']['fr-ca'] = "Chemin d'enregistrement des conversations";
|
||||
$text['description-call_recording_path']['fr-fr'] = "Chemin d'enregistrement des conversations";
|
||||
$text['description-call_recording_path']['he-il'] = "נתיב הקלטת שיחות";
|
||||
$text['description-call_recording_path']['it-it'] = "Percorso di registrazione della conversazione";
|
||||
$text['description-call_recording_path']['ka-ge'] = "საუბრის ჩანაწერის ბილიკი";
|
||||
$text['description-call_recording_path']['en-us'] = "";
|
||||
$text['description-call_recording_path']['en-gb'] = "";
|
||||
$text['description-call_recording_path']['ar-eg'] = "";
|
||||
$text['description-call_recording_path']['de-at'] = "";
|
||||
$text['description-call_recording_path']['de-ch'] = "";
|
||||
$text['description-call_recording_path']['de-de'] = "";
|
||||
$text['description-call_recording_path']['es-cl'] = "";
|
||||
$text['description-call_recording_path']['es-mx'] = "";
|
||||
$text['description-call_recording_path']['fr-ca'] = "";
|
||||
$text['description-call_recording_path']['fr-fr'] = "";
|
||||
$text['description-call_recording_path']['he-il'] = "";
|
||||
$text['description-call_recording_path']['it-it'] = "";
|
||||
$text['description-call_recording_path']['nl-nl'] = "Gespreksopname pad";
|
||||
$text['description-call_recording_path']['pl-pl'] = "Ścieżka nagrywania rozmowy";
|
||||
$text['description-call_recording_path']['pt-br'] = "Caminho de gravação de conversa";
|
||||
$text['description-call_recording_path']['pt-pt'] = "Caminho de gravação de conversa";
|
||||
$text['description-call_recording_path']['ro-ro'] = "Calea de înregistrare a conversației";
|
||||
$text['description-call_recording_path']['ru-ru'] = "Путь записи разговора";
|
||||
$text['description-call_recording_path']['sv-se'] = "Konversationsinspelningsväg";
|
||||
$text['description-call_recording_path']['uk-ua'] = "Шлях запису розмови";
|
||||
$text['description-call_recording_path']['zh-cn'] = "对话录音路径";
|
||||
$text['description-call_recording_path']['ja-jp'] = "会話録音パス";
|
||||
$text['description-call_recording_path']['ko-kr'] = "대화 녹음 경로";
|
||||
$text['description-call_recording_path']['pl-pl'] = "";
|
||||
$text['description-call_recording_path']['pt-br'] = "";
|
||||
$text['description-call_recording_path']['pt-pt'] = "";
|
||||
$text['description-call_recording_path']['ro-ro'] = "";
|
||||
$text['description-call_recording_path']['ru-ru'] = "";
|
||||
$text['description-call_recording_path']['sv-se'] = "";
|
||||
$text['description-call_recording_path']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_recording_length']['en-us'] = "Length";
|
||||
$text['label-call_recording_length']['en-gb'] = "Length";
|
||||
$text['label-call_recording_length']['ar-eg'] = "طول";
|
||||
$text['label-call_recording_length']['de-at'] = "Länge";
|
||||
$text['label-call_recording_length']['de-ch'] = "Länge";
|
||||
$text['label-call_recording_length']['de-de'] = "Länge";
|
||||
$text['label-call_recording_length']['el-gr'] = "Μήκος";
|
||||
$text['label-call_recording_length']['es-cl'] = "Longitud";
|
||||
$text['label-call_recording_length']['es-mx'] = "Longitud";
|
||||
$text['label-call_recording_length']['ar-eg'] = "";
|
||||
$text['label-call_recording_length']['de-at'] = "";
|
||||
$text['label-call_recording_length']['de-ch'] = "";
|
||||
$text['label-call_recording_length']['de-de'] = "";
|
||||
$text['label-call_recording_length']['es-cl'] = "";
|
||||
$text['label-call_recording_length']['es-mx'] = "";
|
||||
$text['label-call_recording_length']['fr-ca'] = "Longueur";
|
||||
$text['label-call_recording_length']['fr-fr'] = "Longueur";
|
||||
$text['label-call_recording_length']['he-il'] = "אורך";
|
||||
$text['label-call_recording_length']['it-it'] = "Lunghezza";
|
||||
$text['label-call_recording_length']['ka-ge'] = "ხანგრძლივობა";
|
||||
$text['label-call_recording_length']['he-il'] = "";
|
||||
$text['label-call_recording_length']['it-it'] = "";
|
||||
$text['label-call_recording_length']['nl-nl'] = "Lengte";
|
||||
$text['label-call_recording_length']['pl-pl'] = "Długość";
|
||||
$text['label-call_recording_length']['pt-br'] = "Comprimento";
|
||||
$text['label-call_recording_length']['pt-pt'] = "Comprimento";
|
||||
$text['label-call_recording_length']['ro-ro'] = "Lungime";
|
||||
$text['label-call_recording_length']['pt-br'] = "";
|
||||
$text['label-call_recording_length']['pt-pt'] = "";
|
||||
$text['label-call_recording_length']['ro-ro'] = "";
|
||||
$text['label-call_recording_length']['ru-ru'] = "Длительность";
|
||||
$text['label-call_recording_length']['sv-se'] = "Längd";
|
||||
$text['label-call_recording_length']['uk-ua'] = "Довжина";
|
||||
$text['label-call_recording_length']['zh-cn'] = "长度";
|
||||
$text['label-call_recording_length']['ja-jp'] = "長さ";
|
||||
$text['label-call_recording_length']['ko-kr'] = "길이";
|
||||
$text['label-call_recording_length']['sv-se'] = "";
|
||||
$text['label-call_recording_length']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_recording_length']['en-us'] = "Call Recording Duration";
|
||||
$text['description-call_recording_length']['en-gb'] = "Call Recording Duration";
|
||||
$text['description-call_recording_length']['ar-eg'] = "مدة تسجيل المكالمات";
|
||||
$text['description-call_recording_length']['de-at'] = "Anrufaufzeichnungsdauer";
|
||||
$text['description-call_recording_length']['de-ch'] = "Anrufaufzeichnungsdauer";
|
||||
$text['description-call_recording_length']['de-de'] = "Anrufaufzeichnungsdauer";
|
||||
$text['description-call_recording_length']['el-gr'] = "Διάρκεια εγγραφής κλήσης";
|
||||
$text['description-call_recording_length']['es-cl'] = "Duración de la grabación de llamadas";
|
||||
$text['description-call_recording_length']['es-mx'] = "Duración de la grabación de llamadas";
|
||||
$text['description-call_recording_length']['fr-ca'] = "Durée d'enregistrement des appels";
|
||||
$text['description-call_recording_length']['fr-fr'] = "Durée d'enregistrement des appels";
|
||||
$text['description-call_recording_length']['he-il'] = "משך הקלטת השיחה";
|
||||
$text['description-call_recording_length']['it-it'] = "Durata della registrazione delle chiamate";
|
||||
$text['description-call_recording_length']['ka-ge'] = "ზარის ჩანაწერის ხანგრძლივობა";
|
||||
$text['description-call_recording_length']['en-us'] = "";
|
||||
$text['description-call_recording_length']['en-gb'] = "";
|
||||
$text['description-call_recording_length']['ar-eg'] = "";
|
||||
$text['description-call_recording_length']['de-at'] = "";
|
||||
$text['description-call_recording_length']['de-ch'] = "";
|
||||
$text['description-call_recording_length']['de-de'] = "";
|
||||
$text['description-call_recording_length']['es-cl'] = "";
|
||||
$text['description-call_recording_length']['es-mx'] = "";
|
||||
$text['description-call_recording_length']['fr-ca'] = "";
|
||||
$text['description-call_recording_length']['fr-fr'] = "";
|
||||
$text['description-call_recording_length']['he-il'] = "";
|
||||
$text['description-call_recording_length']['it-it'] = "";
|
||||
$text['description-call_recording_length']['nl-nl'] = "Gespreksopname duur";
|
||||
$text['description-call_recording_length']['pl-pl'] = "Czas nagrywania rozmowy";
|
||||
$text['description-call_recording_length']['pt-br'] = "Durata înregistrării apelului";
|
||||
$text['description-call_recording_length']['pt-pt'] = "Durata înregistrării apelului";
|
||||
$text['description-call_recording_length']['ro-ro'] = "Durata înregistrării apelului";
|
||||
$text['description-call_recording_length']['ru-ru'] = "Продолжительность записи разговора";
|
||||
$text['description-call_recording_length']['sv-se'] = "Samtalsinspelningslängd";
|
||||
$text['description-call_recording_length']['uk-ua'] = "Тривалість запису розмови";
|
||||
$text['description-call_recording_length']['zh-cn'] = "通话录音时长";
|
||||
$text['description-call_recording_length']['ja-jp'] = "通話録音時間";
|
||||
$text['description-call_recording_length']['ko-kr'] = "통화 녹음 시간";
|
||||
$text['description-call_recording_length']['pl-pl'] = "";
|
||||
$text['description-call_recording_length']['pt-br'] = "";
|
||||
$text['description-call_recording_length']['pt-pt'] = "";
|
||||
$text['description-call_recording_length']['ro-ro'] = "";
|
||||
$text['description-call_recording_length']['ru-ru'] = "";
|
||||
$text['description-call_recording_length']['sv-se'] = "";
|
||||
$text['description-call_recording_length']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_recording_date']['en-us'] = "Date";
|
||||
$text['label-call_recording_date']['en-gb'] = "Date";
|
||||
$text['label-call_recording_date']['ar-eg'] = "تاريخ";
|
||||
$text['label-call_recording_date']['de-at'] = "Datum";
|
||||
$text['label-call_recording_date']['de-ch'] = "Datum";
|
||||
$text['label-call_recording_date']['de-de'] = "Datum";
|
||||
$text['label-call_recording_date']['el-gr'] = "Ημερομηνία";
|
||||
$text['label-call_recording_date']['es-cl'] = "Fecha";
|
||||
$text['label-call_recording_date']['es-mx'] = "Fecha";
|
||||
$text['label-call_recording_date']['ar-eg'] = "";
|
||||
$text['label-call_recording_date']['de-at'] = "";
|
||||
$text['label-call_recording_date']['de-ch'] = "";
|
||||
$text['label-call_recording_date']['de-de'] = "";
|
||||
$text['label-call_recording_date']['es-cl'] = "";
|
||||
$text['label-call_recording_date']['es-mx'] = "";
|
||||
$text['label-call_recording_date']['fr-ca'] = "Date";
|
||||
$text['label-call_recording_date']['fr-fr'] = "Date";
|
||||
$text['label-call_recording_date']['he-il'] = "תַאֲרִיך";
|
||||
$text['label-call_recording_date']['it-it'] = "תַאֲרִיך";
|
||||
$text['label-call_recording_date']['ka-ge'] = "თარიღი";
|
||||
$text['label-call_recording_date']['he-il'] = "";
|
||||
$text['label-call_recording_date']['it-it'] = "";
|
||||
$text['label-call_recording_date']['nl-nl'] = "Datum";
|
||||
$text['label-call_recording_date']['pl-pl'] = "Data";
|
||||
$text['label-call_recording_date']['pt-br'] = "Data";
|
||||
$text['label-call_recording_date']['pt-pt'] = "Data";
|
||||
$text['label-call_recording_date']['ro-ro'] = "Data";
|
||||
$text['label-call_recording_date']['pt-br'] = "";
|
||||
$text['label-call_recording_date']['pt-pt'] = "";
|
||||
$text['label-call_recording_date']['ro-ro'] = "";
|
||||
$text['label-call_recording_date']['ru-ru'] = "Дата";
|
||||
$text['label-call_recording_date']['sv-se'] = "Datum";
|
||||
$text['label-call_recording_date']['uk-ua'] = "Дата";
|
||||
$text['label-call_recording_date']['zh-cn'] = "日期";
|
||||
$text['label-call_recording_date']['ja-jp'] = "日にち";
|
||||
$text['label-call_recording_date']['ko-kr'] = "날짜";
|
||||
$text['label-call_recording_date']['sv-se'] = "";
|
||||
$text['label-call_recording_date']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_recording_date']['en-us'] = "Call Recording Date";
|
||||
$text['description-call_recording_date']['en-gb'] = "Call Recording Date";
|
||||
$text['description-call_recording_date']['ar-eg'] = "تاريخ تسجيل المكالمة";
|
||||
$text['description-call_recording_date']['de-at'] = "Anrufaufzeichnungsdatum";
|
||||
$text['description-call_recording_date']['de-ch'] = "Anrufaufzeichnungsdatum";
|
||||
$text['description-call_recording_date']['de-de'] = "Anrufaufzeichnungsdatum";
|
||||
$text['description-call_recording_date']['el-gr'] = "Ημερομηνία εγγραφής κλήσης";
|
||||
$text['description-call_recording_date']['es-cl'] = "Fecha de grabación de llamadas";
|
||||
$text['description-call_recording_date']['es-mx'] = "Fecha de grabación de llamadas";
|
||||
$text['description-call_recording_date']['fr-ca'] = "Date d'enregistrement de l'appel";
|
||||
$text['description-call_recording_date']['fr-fr'] = "Date d'enregistrement de l'appel";
|
||||
$text['description-call_recording_date']['he-il'] = "תאריך הקלטת שיחה";
|
||||
$text['description-call_recording_date']['it-it'] = "Data di registrazione della chiamata";
|
||||
$text['description-call_recording_date']['ka-ge'] = "ზარის ჩაწერის თარიღი";
|
||||
$text['description-call_recording_date']['en-us'] = "";
|
||||
$text['description-call_recording_date']['en-gb'] = "";
|
||||
$text['description-call_recording_date']['ar-eg'] = "";
|
||||
$text['description-call_recording_date']['de-at'] = "";
|
||||
$text['description-call_recording_date']['de-ch'] = "";
|
||||
$text['description-call_recording_date']['de-de'] = "";
|
||||
$text['description-call_recording_date']['es-cl'] = "";
|
||||
$text['description-call_recording_date']['es-mx'] = "";
|
||||
$text['description-call_recording_date']['fr-ca'] = "";
|
||||
$text['description-call_recording_date']['fr-fr'] = "";
|
||||
$text['description-call_recording_date']['he-il'] = "";
|
||||
$text['description-call_recording_date']['it-it'] = "";
|
||||
$text['description-call_recording_date']['nl-nl'] = "Gespreksopname datum";
|
||||
$text['description-call_recording_date']['pl-pl'] = "Data nagrania rozmowy";
|
||||
$text['description-call_recording_date']['pt-br'] = "Data de gravação da chamada";
|
||||
$text['description-call_recording_date']['pt-pt'] = "Data de gravação da chamada";
|
||||
$text['description-call_recording_date']['ro-ro'] = "Data înregistrării apelului";
|
||||
$text['description-call_recording_date']['ru-ru'] = "Дата записи звонка";
|
||||
$text['description-call_recording_date']['sv-se'] = "Samtalsinspelningsdatum";
|
||||
$text['description-call_recording_date']['uk-ua'] = "Дата запису дзвінка";
|
||||
$text['description-call_recording_date']['zh-cn'] = "通话录音日期";
|
||||
$text['description-call_recording_date']['ja-jp'] = "通話録音日";
|
||||
$text['description-call_recording_date']['ko-kr'] = "통화 녹음 날짜";
|
||||
$text['description-call_recording_date']['pl-pl'] = "";
|
||||
$text['description-call_recording_date']['pt-br'] = "";
|
||||
$text['description-call_recording_date']['pt-pt'] = "";
|
||||
$text['description-call_recording_date']['ro-ro'] = "";
|
||||
$text['description-call_recording_date']['ru-ru'] = "";
|
||||
$text['description-call_recording_date']['sv-se'] = "";
|
||||
$text['description-call_recording_date']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_direction']['en-us'] = "Direction";
|
||||
$text['label-call_direction']['en-gb'] = "Direction";
|
||||
$text['label-call_direction']['ar-eg'] = "اتجاه";
|
||||
$text['label-call_direction']['de-at'] = "Richtung";
|
||||
$text['label-call_direction']['de-ch'] = "Richtung";
|
||||
$text['label-call_direction']['de-de'] = "Richtung";
|
||||
$text['label-call_direction']['el-gr'] = "Κατεύθυνση";
|
||||
$text['label-call_direction']['es-cl'] = "Dirección";
|
||||
$text['label-call_direction']['es-mx'] = "Dirección";
|
||||
$text['label-call_direction']['ar-eg'] = "";
|
||||
$text['label-call_direction']['de-at'] = "";
|
||||
$text['label-call_direction']['de-ch'] = "";
|
||||
$text['label-call_direction']['de-de'] = "";
|
||||
$text['label-call_direction']['es-cl'] = "";
|
||||
$text['label-call_direction']['es-mx'] = "";
|
||||
$text['label-call_direction']['fr-ca'] = "Direction";
|
||||
$text['label-call_direction']['fr-fr'] = "Direction";
|
||||
$text['label-call_direction']['he-il'] = "כיוון";
|
||||
$text['label-call_direction']['it-it'] = "Direzione";
|
||||
$text['label-call_direction']['ka-ge'] = "მიმართულება";
|
||||
$text['label-call_direction']['he-il'] = "";
|
||||
$text['label-call_direction']['it-it'] = "";
|
||||
$text['label-call_direction']['nl-nl'] = "Richting";
|
||||
$text['label-call_direction']['pl-pl'] = "Kierunek";
|
||||
$text['label-call_direction']['pt-br'] = "Direção";
|
||||
$text['label-call_direction']['pt-pt'] = "Direção";
|
||||
$text['label-call_direction']['ro-ro'] = "Direcţie";
|
||||
$text['label-call_direction']['pt-br'] = "";
|
||||
$text['label-call_direction']['pt-pt'] = "";
|
||||
$text['label-call_direction']['ro-ro'] = "";
|
||||
$text['label-call_direction']['ru-ru'] = "Направление";
|
||||
$text['label-call_direction']['sv-se'] = "Riktning";
|
||||
$text['label-call_direction']['uk-ua'] = "Напрямок";
|
||||
$text['label-call_direction']['zh-cn'] = "方向";
|
||||
$text['label-call_direction']['ja-jp'] = "方向";
|
||||
$text['label-call_direction']['ko-kr'] = "방향";
|
||||
$text['label-call_direction']['sv-se'] = "";
|
||||
$text['label-call_direction']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_direction']['en-us'] = "Call recording call direction";
|
||||
$text['description-call_direction']['en-gb'] = "Call recording call direction";
|
||||
$text['description-call_direction']['ar-eg'] = "تسجيل المكالمات اتجاه المكالمة";
|
||||
$text['description-call_direction']['de-at'] = "Anrufaufzeichnung, Anrufrichtung";
|
||||
$text['description-call_direction']['de-ch'] = "Anrufaufzeichnung, Anrufrichtung";
|
||||
$text['description-call_direction']['de-de'] = "Anrufaufzeichnung, Anrufrichtung";
|
||||
$text['description-call_direction']['el-gr'] = "Κατεύθυνση κλήσης καταγραφής κλήσης";
|
||||
$text['description-call_direction']['es-cl'] = "Dirección de llamada de grabación de llamadas.";
|
||||
$text['description-call_direction']['es-mx'] = "Dirección de llamada de grabación de llamadas.";
|
||||
$text['description-call_direction']['fr-ca'] = "Direction d'appel d'enregistrement d'appel";
|
||||
$text['description-call_direction']['fr-fr'] = "Direction d'appel d'enregistrement d'appel";
|
||||
$text['description-call_direction']['he-il'] = "הקלטת שיחה כיוון שיחה";
|
||||
$text['description-call_direction']['it-it'] = "Direzione della chiamata per la registrazione delle chiamate";
|
||||
$text['description-call_direction']['ka-ge'] = "ზარების ჩაწერა. ზარის მიმართულება";
|
||||
$text['description-call_direction']['en-us'] = "";
|
||||
$text['description-call_direction']['en-gb'] = "";
|
||||
$text['description-call_direction']['ar-eg'] = "";
|
||||
$text['description-call_direction']['de-at'] = "";
|
||||
$text['description-call_direction']['de-ch'] = "";
|
||||
$text['description-call_direction']['de-de'] = "";
|
||||
$text['description-call_direction']['es-cl'] = "";
|
||||
$text['description-call_direction']['es-mx'] = "";
|
||||
$text['description-call_direction']['fr-ca'] = "";
|
||||
$text['description-call_direction']['fr-fr'] = "";
|
||||
$text['description-call_direction']['he-il'] = "";
|
||||
$text['description-call_direction']['it-it'] = "";
|
||||
$text['description-call_direction']['nl-nl'] = "Gespreksopname oproeprichting";
|
||||
$text['description-call_direction']['pl-pl'] = "Nagrywanie połączeń Kierunek połączenia";
|
||||
$text['description-call_direction']['pt-br'] = "Direção de chamada de gravação de chamada";
|
||||
$text['description-call_direction']['pt-pt'] = "Direção de chamada de gravação de chamada";
|
||||
$text['description-call_direction']['ro-ro'] = "Înregistrarea apelului direcția apelului";
|
||||
$text['description-call_direction']['ru-ru'] = "Запись звонков, направление звонка";
|
||||
$text['description-call_direction']['sv-se'] = "Samtalsinspelning samtalsriktning";
|
||||
$text['description-call_direction']['uk-ua'] = "Напрямок виклику запису дзвінка";
|
||||
$text['description-call_direction']['zh-cn'] = "通话录音 通话方向";
|
||||
$text['description-call_direction']['ja-jp'] = "通話録音の通話方向";
|
||||
$text['description-call_direction']['ko-kr'] = "통화 녹음 통화 방향";
|
||||
$text['description-call_direction']['pl-pl'] = "";
|
||||
$text['description-call_direction']['pt-br'] = "";
|
||||
$text['description-call_direction']['pt-pt'] = "";
|
||||
$text['description-call_direction']['ro-ro'] = "";
|
||||
$text['description-call_direction']['ru-ru'] = "";
|
||||
$text['description-call_direction']['sv-se'] = "";
|
||||
$text['description-call_direction']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_recording_description']['en-us'] = "Description";
|
||||
$text['label-call_recording_description']['en-gb'] = "Description";
|
||||
$text['label-call_recording_description']['ar-eg'] = "وصف";
|
||||
$text['label-call_recording_description']['de-at'] = "Beschreibung";
|
||||
$text['label-call_recording_description']['de-ch'] = "Beschreibung";
|
||||
$text['label-call_recording_description']['de-de'] = "Beschreibung";
|
||||
$text['label-call_recording_description']['el-gr'] = "Περιγραφή";
|
||||
$text['label-call_recording_description']['es-cl'] = "Descripción";
|
||||
$text['label-call_recording_description']['es-mx'] = "Descripción";
|
||||
$text['label-call_recording_description']['ar-eg'] = "";
|
||||
$text['label-call_recording_description']['de-at'] = "";
|
||||
$text['label-call_recording_description']['de-ch'] = "";
|
||||
$text['label-call_recording_description']['de-de'] = "";
|
||||
$text['label-call_recording_description']['es-cl'] = "";
|
||||
$text['label-call_recording_description']['es-mx'] = "";
|
||||
$text['label-call_recording_description']['fr-ca'] = "Description";
|
||||
$text['label-call_recording_description']['fr-fr'] = "Description";
|
||||
$text['label-call_recording_description']['he-il'] = "תיאור";
|
||||
$text['label-call_recording_description']['it-it'] = "Descrizione";
|
||||
$text['label-call_recording_description']['ka-ge'] = "აღწერა";
|
||||
$text['label-call_recording_description']['he-il'] = "";
|
||||
$text['label-call_recording_description']['it-it'] = "";
|
||||
$text['label-call_recording_description']['nl-nl'] = "Omschrijving";
|
||||
$text['label-call_recording_description']['pl-pl'] = "Opis";
|
||||
$text['label-call_recording_description']['pt-br'] = "Descrição";
|
||||
$text['label-call_recording_description']['pt-pt'] = "Descrição";
|
||||
$text['label-call_recording_description']['ro-ro'] = "Descriere";
|
||||
$text['label-call_recording_description']['pt-br'] = "";
|
||||
$text['label-call_recording_description']['pt-pt'] = "";
|
||||
$text['label-call_recording_description']['ro-ro'] = "";
|
||||
$text['label-call_recording_description']['ru-ru'] = "Описание";
|
||||
$text['label-call_recording_description']['sv-se'] = "Beskrivning";
|
||||
$text['label-call_recording_description']['uk-ua'] = "опис";
|
||||
$text['label-call_recording_description']['zh-cn'] = "描述";
|
||||
$text['label-call_recording_description']['ja-jp'] = "説明";
|
||||
$text['label-call_recording_description']['ko-kr'] = "설명";
|
||||
$text['label-call_recording_description']['sv-se'] = "";
|
||||
$text['label-call_recording_description']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_recording_description']['en-us'] = "Call recording direction";
|
||||
$text['description-call_recording_description']['en-gb'] = "Call recording direction";
|
||||
$text['description-call_recording_description']['ar-eg'] = "اتجاه تسجيل المكالمات";
|
||||
$text['description-call_recording_description']['de-at'] = "Richtung der Anrufaufzeichnung";
|
||||
$text['description-call_recording_description']['de-ch'] = "Richtung der Anrufaufzeichnung";
|
||||
$text['description-call_recording_description']['de-de'] = "Richtung der Anrufaufzeichnung";
|
||||
$text['description-call_recording_description']['el-gr'] = "Κατεύθυνση εγγραφής κλήσης";
|
||||
$text['description-call_recording_description']['es-cl'] = "Dirección de grabación de llamadas";
|
||||
$text['description-call_recording_description']['es-mx'] = "Dirección de grabación de llamadas";
|
||||
$text['description-call_recording_description']['fr-ca'] = "Direction d'enregistrement des appels";
|
||||
$text['description-call_recording_description']['fr-fr'] = "Direction d'enregistrement des appels";
|
||||
$text['description-call_recording_description']['he-il'] = "כיוון הקלטת שיחות";
|
||||
$text['description-call_recording_description']['it-it'] = "Direzione di registrazione della chiamata";
|
||||
$text['description-call_recording_description']['ka-ge'] = "ზარის ჩანაწერების მიმართულება";
|
||||
$text['description-call_recording_description']['en-us'] = "";
|
||||
$text['description-call_recording_description']['en-gb'] = "";
|
||||
$text['description-call_recording_description']['ar-eg'] = "";
|
||||
$text['description-call_recording_description']['de-at'] = "";
|
||||
$text['description-call_recording_description']['de-ch'] = "";
|
||||
$text['description-call_recording_description']['de-de'] = "";
|
||||
$text['description-call_recording_description']['es-cl'] = "";
|
||||
$text['description-call_recording_description']['es-mx'] = "";
|
||||
$text['description-call_recording_description']['fr-ca'] = "";
|
||||
$text['description-call_recording_description']['fr-fr'] = "";
|
||||
$text['description-call_recording_description']['he-il'] = "";
|
||||
$text['description-call_recording_description']['it-it'] = "";
|
||||
$text['description-call_recording_description']['nl-nl'] = "Gespreksopname richting";
|
||||
$text['description-call_recording_description']['pl-pl'] = "Kierunek nagrywania połączeń";
|
||||
$text['description-call_recording_description']['pt-br'] = "Direção de gravação de chamadas";
|
||||
$text['description-call_recording_description']['pt-pt'] = "Direção de gravação de chamadas";
|
||||
$text['description-call_recording_description']['ro-ro'] = "Direcția de înregistrare a apelurilor";
|
||||
$text['description-call_recording_description']['ru-ru'] = "Направление записи звонков";
|
||||
$text['description-call_recording_description']['sv-se'] = "Riktning för samtalsinspelning";
|
||||
$text['description-call_recording_description']['uk-ua'] = "Напрямок запису дзвінка";
|
||||
$text['description-call_recording_description']['zh-cn'] = "通话录音方向";
|
||||
$text['description-call_recording_description']['ja-jp'] = "通話録音の方向";
|
||||
$text['description-call_recording_description']['ko-kr'] = "통화 녹음 방향";
|
||||
$text['description-call_recording_description']['pl-pl'] = "";
|
||||
$text['description-call_recording_description']['pt-br'] = "";
|
||||
$text['description-call_recording_description']['pt-pt'] = "";
|
||||
$text['description-call_recording_description']['ro-ro'] = "";
|
||||
$text['description-call_recording_description']['ru-ru'] = "";
|
||||
$text['description-call_recording_description']['sv-se'] = "";
|
||||
$text['description-call_recording_description']['uk-ua'] = "";
|
||||
|
||||
$text['label-call_recording_base64']['en-us'] = "Base64";
|
||||
$text['label-call_recording_base64']['en-gb'] = "Base64";
|
||||
$text['label-call_recording_base64']['ar-eg'] = "قاعدة64";
|
||||
$text['label-call_recording_base64']['de-at'] = "Base64";
|
||||
$text['label-call_recording_base64']['de-ch'] = "Base64";
|
||||
$text['label-call_recording_base64']['de-de'] = "Base64";
|
||||
$text['label-call_recording_base64']['el-gr'] = "Βάση64";
|
||||
$text['label-call_recording_base64']['es-cl'] = "Base64";
|
||||
$text['label-call_recording_base64']['es-mx'] = "Base64";
|
||||
$text['label-call_recording_base64']['ar-eg'] = "";
|
||||
$text['label-call_recording_base64']['de-at'] = "";
|
||||
$text['label-call_recording_base64']['de-ch'] = "";
|
||||
$text['label-call_recording_base64']['de-de'] = "";
|
||||
$text['label-call_recording_base64']['es-cl'] = "";
|
||||
$text['label-call_recording_base64']['es-mx'] = "";
|
||||
$text['label-call_recording_base64']['fr-ca'] = "Base64";
|
||||
$text['label-call_recording_base64']['fr-fr'] = "Base64";
|
||||
$text['label-call_recording_base64']['he-il'] = "64בסיס";
|
||||
$text['label-call_recording_base64']['it-it'] = "Base64";
|
||||
$text['label-call_recording_base64']['ka-ge'] = "Base64";
|
||||
$text['label-call_recording_base64']['he-il'] = "";
|
||||
$text['label-call_recording_base64']['it-it'] = "";
|
||||
$text['label-call_recording_base64']['nl-nl'] = "Base64";
|
||||
$text['label-call_recording_base64']['pl-pl'] = "Base64";
|
||||
$text['label-call_recording_base64']['pt-br'] = "Base64";
|
||||
$text['label-call_recording_base64']['pt-pt'] = "Base64";
|
||||
$text['label-call_recording_base64']['ro-ro'] = "Base64";
|
||||
$text['label-call_recording_base64']['ru-ru'] = "Base64";
|
||||
$text['label-call_recording_base64']['sv-se'] = "Base64";
|
||||
$text['label-call_recording_base64']['uk-ua'] = "Base64";
|
||||
$text['label-call_recording_base64']['zh-cn'] = "基地64";
|
||||
$text['label-call_recording_base64']['ja-jp'] = "ベース64";
|
||||
$text['label-call_recording_base64']['ko-kr'] = "베이스64";
|
||||
$text['label-call_recording_base64']['pt-br'] = "";
|
||||
$text['label-call_recording_base64']['pt-pt'] = "";
|
||||
$text['label-call_recording_base64']['ro-ro'] = "";
|
||||
$text['label-call_recording_base64']['ru-ru'] = "";
|
||||
$text['label-call_recording_base64']['sv-se'] = "";
|
||||
$text['label-call_recording_base64']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_recording_base64']['en-us'] = "Base64";
|
||||
$text['description-call_recording_base64']['en-gb'] = "Base64";
|
||||
$text['description-call_recording_base64']['ar-eg'] = "قاعدة64";
|
||||
$text['description-call_recording_base64']['de-at'] = "Base64";
|
||||
$text['description-call_recording_base64']['de-ch'] = "Base64";
|
||||
$text['description-call_recording_base64']['de-de'] = "Base64";
|
||||
$text['description-call_recording_base64']['el-gr'] = "Βάση64";
|
||||
$text['description-call_recording_base64']['es-cl'] = "Base64";
|
||||
$text['description-call_recording_base64']['es-mx'] = "Base64";
|
||||
$text['description-call_recording_base64']['fr-ca'] = "Base64";
|
||||
$text['description-call_recording_base64']['fr-fr'] = "Base64";
|
||||
$text['description-call_recording_base64']['he-il'] = "בסיס 64";
|
||||
$text['description-call_recording_base64']['it-it'] = "Base64";
|
||||
$text['description-call_recording_base64']['ka-ge'] = "Base64";
|
||||
$text['description-call_recording_base64']['nl-nl'] = "Baseren64";
|
||||
$text['description-call_recording_base64']['pl-pl'] = "Baza64";
|
||||
$text['description-call_recording_base64']['pt-br'] = "Base64";
|
||||
$text['description-call_recording_base64']['pt-pt'] = "Base64";
|
||||
$text['description-call_recording_base64']['ro-ro'] = "Baza64";
|
||||
$text['description-call_recording_base64']['ru-ru'] = "База64";
|
||||
$text['description-call_recording_base64']['sv-se'] = "Bas64";
|
||||
$text['description-call_recording_base64']['uk-ua'] = "База64";
|
||||
$text['description-call_recording_base64']['zh-cn'] = "基地64";
|
||||
$text['description-call_recording_base64']['ja-jp'] = "ベース64";
|
||||
$text['description-call_recording_base64']['ko-kr'] = "베이스64";
|
||||
$text['description-call_recording_base64']['en-us'] = "";
|
||||
$text['description-call_recording_base64']['en-gb'] = "";
|
||||
$text['description-call_recording_base64']['ar-eg'] = "";
|
||||
$text['description-call_recording_base64']['de-at'] = "";
|
||||
$text['description-call_recording_base64']['de-ch'] = "";
|
||||
$text['description-call_recording_base64']['de-de'] = "";
|
||||
$text['description-call_recording_base64']['es-cl'] = "";
|
||||
$text['description-call_recording_base64']['es-mx'] = "";
|
||||
$text['description-call_recording_base64']['fr-ca'] = "";
|
||||
$text['description-call_recording_base64']['fr-fr'] = "";
|
||||
$text['description-call_recording_base64']['he-il'] = "";
|
||||
$text['description-call_recording_base64']['it-it'] = "";
|
||||
$text['description-call_recording_base64']['nl-nl'] = "Base64";
|
||||
$text['description-call_recording_base64']['pl-pl'] = "";
|
||||
$text['description-call_recording_base64']['pt-br'] = "";
|
||||
$text['description-call_recording_base64']['pt-pt'] = "";
|
||||
$text['description-call_recording_base64']['ro-ro'] = "";
|
||||
$text['description-call_recording_base64']['ru-ru'] = "";
|
||||
$text['description-call_recording_base64']['sv-se'] = "";
|
||||
$text['description-call_recording_base64']['uk-ua'] = "";
|
||||
|
||||
$text['label-inbound']['en-us'] = "Inbound";
|
||||
$text['label-inbound']['en-gb'] = "Inbound";
|
||||
$text['label-inbound']['ar-eg'] = "واردة";
|
||||
$text['label-inbound']['de-at'] = "Eingehende";
|
||||
$text['label-inbound']['de-ch'] = "Eingehende";
|
||||
$text['label-inbound']['de-de'] = "Eingehende";
|
||||
$text['label-inbound']['el-gr'] = "Εισερχόμενος";
|
||||
$text['label-inbound']['es-cl'] = "Entrante";
|
||||
$text['label-inbound']['es-mx'] = "Entrante";
|
||||
$text['label-inbound']['fr-ca'] = "Entrant";
|
||||
$text['label-inbound']['fr-fr'] = "Entrant";
|
||||
$text['label-inbound']['he-il'] = "נכנסת";
|
||||
$text['label-inbound']['it-it'] = "In entrata";
|
||||
$text['label-inbound']['ka-ge'] = "შემომავალი";
|
||||
$text['label-inbound']['ar-eg'] = "Inbound";
|
||||
$text['label-inbound']['de-at'] = "Inbound";
|
||||
$text['label-inbound']['de-ch'] = "Inbound";
|
||||
$text['label-inbound']['de-de'] = "Inbound";
|
||||
$text['label-inbound']['es-cl'] = "Inbound";
|
||||
$text['label-inbound']['es-mx'] = "Inbound";
|
||||
$text['label-inbound']['fr-ca'] = "Inbound";
|
||||
$text['label-inbound']['fr-fr'] = "Inbound";
|
||||
$text['label-inbound']['he-il'] = "Inbound";
|
||||
$text['label-inbound']['it-it'] = "Inbound";
|
||||
$text['label-inbound']['nl-nl'] = "Inkomend";
|
||||
$text['label-inbound']['pl-pl'] = "Przychodzący";
|
||||
$text['label-inbound']['pt-br'] = "Entrada";
|
||||
$text['label-inbound']['pt-pt'] = "Entrada";
|
||||
$text['label-inbound']['ro-ro'] = "Intrare";
|
||||
$text['label-inbound']['ru-ru'] = "Входящий";
|
||||
$text['label-inbound']['sv-se'] = "Inkommande";
|
||||
$text['label-inbound']['uk-ua'] = "Вхідний";
|
||||
$text['label-inbound']['zh-cn'] = "入境";
|
||||
$text['label-inbound']['ja-jp'] = "インバウンド";
|
||||
$text['label-inbound']['ko-kr'] = "인바운드";
|
||||
$text['label-inbound']['pt-br'] = "Inbound";
|
||||
$text['label-inbound']['pt-pt'] = "Inbound";
|
||||
$text['label-inbound']['ro-ro'] = "Inbound";
|
||||
$text['label-inbound']['ru-ru'] = "Inbound";
|
||||
$text['label-inbound']['sv-se'] = "Inbound";
|
||||
$text['label-inbound']['uk-ua'] = "Inbound";
|
||||
|
||||
$text['label-outbound']['en-us'] = "Outbound";
|
||||
$text['label-outbound']['en-gb'] = "Outbound";
|
||||
$text['label-outbound']['ar-eg'] = "الصادرة";
|
||||
$text['label-outbound']['de-at'] = "Ausgehend";
|
||||
$text['label-outbound']['de-ch'] = "Ausgehend";
|
||||
$text['label-outbound']['de-de'] = "Ausgehend";
|
||||
$text['label-outbound']['el-gr'] = "Εξερχόμενος";
|
||||
$text['label-outbound']['es-cl'] = "Saliente";
|
||||
$text['label-outbound']['es-mx'] = "Saliente";
|
||||
$text['label-outbound']['fr-ca'] = "Sortant";
|
||||
$text['label-outbound']['fr-fr'] = "Sortant";
|
||||
$text['label-outbound']['he-il'] = "יוצא";
|
||||
$text['label-outbound']['it-it'] = "In uscita";
|
||||
$text['label-outbound']['ka-ge'] = "გამავალი";
|
||||
$text['label-outbound']['ar-eg'] = "Outbound";
|
||||
$text['label-outbound']['de-at'] = "Outbound";
|
||||
$text['label-outbound']['de-ch'] = "Outbound";
|
||||
$text['label-outbound']['de-de'] = "Outbound";
|
||||
$text['label-outbound']['es-cl'] = "Outbound";
|
||||
$text['label-outbound']['es-mx'] = "Outbound";
|
||||
$text['label-outbound']['fr-ca'] = "Outbound";
|
||||
$text['label-outbound']['fr-fr'] = "Outbound";
|
||||
$text['label-outbound']['he-il'] = "Outbound";
|
||||
$text['label-outbound']['it-it'] = "Outbound";
|
||||
$text['label-outbound']['nl-nl'] = "Uitgaand";
|
||||
$text['label-outbound']['pl-pl'] = "Wychodzący";
|
||||
$text['label-outbound']['pt-br'] = "Saída";
|
||||
$text['label-outbound']['pt-pt'] = "Saída";
|
||||
$text['label-outbound']['pt-br'] = "Outbound";
|
||||
$text['label-outbound']['pt-pt'] = "Outbound";
|
||||
$text['label-outbound']['ro-ro'] = "Outbound";
|
||||
$text['label-outbound']['ru-ru'] = "Исходящий";
|
||||
$text['label-outbound']['sv-se'] = "Utgående";
|
||||
$text['label-outbound']['uk-ua'] = "Вихідний";
|
||||
$text['label-outbound']['zh-cn'] = "出站";
|
||||
$text['label-outbound']['ja-jp'] = "アウトバウンド";
|
||||
$text['label-outbound']['ko-kr'] = "배 밖으로";
|
||||
$text['label-outbound']['ru-ru'] = "Outbound";
|
||||
$text['label-outbound']['sv-se'] = "Outbound";
|
||||
$text['label-outbound']['uk-ua'] = "Outbound";
|
||||
|
||||
$text['label-local']['en-us'] = "Local";
|
||||
$text['label-local']['en-gb'] = "Local";
|
||||
$text['label-local']['ar-eg'] = "محلي";
|
||||
$text['label-local']['de-at'] = "Lokal";
|
||||
$text['label-local']['de-ch'] = "Lokal";
|
||||
$text['label-local']['de-de'] = "Lokal";
|
||||
$text['label-local']['el-gr'] = "Τοπικός";
|
||||
$text['label-local']['ar-eg'] = "Local";
|
||||
$text['label-local']['de-at'] = "Local";
|
||||
$text['label-local']['de-ch'] = "Local";
|
||||
$text['label-local']['de-de'] = "Local";
|
||||
$text['label-local']['es-cl'] = "Local";
|
||||
$text['label-local']['es-mx'] = "Local";
|
||||
$text['label-local']['fr-ca'] = "Local";
|
||||
$text['label-local']['fr-fr'] = "Local";
|
||||
$text['label-local']['he-il'] = "מְקוֹמִי";
|
||||
$text['label-local']['it-it'] = "Locale";
|
||||
$text['label-local']['ka-ge'] = "ლოკალური";
|
||||
$text['label-local']['he-il'] = "Local";
|
||||
$text['label-local']['it-it'] = "Local";
|
||||
$text['label-local']['nl-nl'] = "Lokaal";
|
||||
$text['label-local']['pl-pl'] = "Lokalny";
|
||||
$text['label-local']['pt-br'] = "Local";
|
||||
$text['label-local']['pt-pt'] = "Local";
|
||||
$text['label-local']['ro-ro'] = "Local";
|
||||
$text['label-local']['ru-ru'] = "Местный";
|
||||
$text['label-local']['sv-se'] = "Lokal";
|
||||
$text['label-local']['uk-ua'] = "Місцевий";
|
||||
$text['label-local']['zh-cn'] = "当地的";
|
||||
$text['label-local']['ja-jp'] = "地元";
|
||||
$text['label-local']['ko-kr'] = "현지의";
|
||||
$text['label-local']['ru-ru'] = "Local";
|
||||
$text['label-local']['sv-se'] = "Local";
|
||||
$text['label-local']['uk-ua'] = "Local";
|
||||
|
||||
?>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue