more php 8.1 changes (#6734)
* Update ivr_menu_edit.php * Update ringbacks.php * Update call_block_edit.php * Update call_broadcast.php * Update call_broadcast_edit.php * Update call_center_queue_edit.php * Update call_center_queue_edit.php * Update call_center_agent_status.php * Update call_center_queue_edit.php * Update call_center_agent_edit.php * Update call_center_queues.php * Update call_flow_edit.php * Update call_broadcast.php * Update call_forward.php * Update call_broadcast_send.php * Update conference_rooms.php * Update conference_centers.php * Update conference_control_edit.php * Update conference_control_details.php * Update conference_profile_edit.php * Update conference_profile_param_edit.php * Update conference_profile_edit.php * Update database_transaction_edit.php * Update database_transactions.php
This commit is contained in:
parent
9c650a29b1
commit
d6b73cf296
|
|
@ -44,8 +44,14 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
//set the defaults
|
||||||
|
$call_block_name = '';
|
||||||
|
$call_block_country_code = '';
|
||||||
|
$call_block_number = '';
|
||||||
|
$call_block_description = '';
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (is_uuid($_REQUEST["id"])) {
|
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
$call_block_uuid = $_REQUEST["id"];
|
$call_block_uuid = $_REQUEST["id"];
|
||||||
}
|
}
|
||||||
|
|
@ -53,8 +59,12 @@
|
||||||
$action = "add";
|
$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
|
//get http post variables and set them to php variables
|
||||||
if (count($_POST) > 0) {
|
if (!empty($_POST)) {
|
||||||
//get the variables from the http post
|
//get the variables from the http post
|
||||||
$call_block_direction = $_POST["call_block_direction"];
|
$call_block_direction = $_POST["call_block_direction"];
|
||||||
$extension_uuid = $_POST["extension_uuid"];
|
$extension_uuid = $_POST["extension_uuid"];
|
||||||
|
|
@ -76,7 +86,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle the http post
|
//handle the http post
|
||||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||||
|
|
||||||
//handle action
|
//handle action
|
||||||
if (!empty($_POST['action'])) {
|
if (!empty($_POST['action'])) {
|
||||||
|
|
@ -93,7 +103,7 @@
|
||||||
break;
|
break;
|
||||||
case 'add':
|
case 'add':
|
||||||
$xml_cdrs = $_POST['xml_cdrs'];
|
$xml_cdrs = $_POST['xml_cdrs'];
|
||||||
if (permission_exists('call_block_add') && is_array($xml_cdrs) && @sizeof($xml_cdrs) != 0) {
|
if (!empty($xml_cdrs) && permission_exists('call_block_add')) {
|
||||||
$obj = new call_block;
|
$obj = new call_block;
|
||||||
$obj->call_block_direction = $call_block_direction;
|
$obj->call_block_direction = $call_block_direction;
|
||||||
$obj->extension_uuid = $extension_uuid;
|
$obj->extension_uuid = $extension_uuid;
|
||||||
|
|
@ -174,7 +184,7 @@
|
||||||
$array['call_block'][0]['call_block_uuid'] = uuid();
|
$array['call_block'][0]['call_block_uuid'] = uuid();
|
||||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
||||||
if (is_uuid($extension_uuid)) {
|
if (!empty($extension_uuid) && is_uuid($extension_uuid)) {
|
||||||
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
||||||
}
|
}
|
||||||
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
||||||
|
|
@ -221,7 +231,7 @@
|
||||||
$array['call_block'][0]['call_block_uuid'] = $call_block_uuid;
|
$array['call_block'][0]['call_block_uuid'] = $call_block_uuid;
|
||||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
||||||
if (is_uuid($extension_uuid)) {
|
if (!empty($extension_uuid) && is_uuid($extension_uuid)) {
|
||||||
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
||||||
}
|
}
|
||||||
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
||||||
|
|
@ -248,7 +258,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
if (count($_GET) > 0 && !empty($_POST["persistformvar"])) {
|
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||||
$call_block_uuid = $_GET["id"];
|
$call_block_uuid = $_GET["id"];
|
||||||
$sql = "select * from v_call_block ";
|
$sql = "select * from v_call_block ";
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
|
|
@ -404,7 +414,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||||
echo " ".$text['label-name']."\n";
|
echo " ".$text['label-name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_block_name' maxlength='255' value=\"".escape($call_block_name ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_block_name' maxlength='255' value=\"".escape($call_block_name)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_block_name']."\n";
|
echo $text['description-call_block_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -415,8 +425,8 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||||
echo " ".$text['label-number']."\n";
|
echo " ".$text['label-number']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_block_country_code' maxlength='6' style='width: 60px;' value=\"".escape($call_block_country_code ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_block_country_code' maxlength='6' style='width: 60px;' value=\"".escape($call_block_country_code)."\">\n";
|
||||||
echo " <input class='formfld' type='text' name='call_block_number' maxlength='255' value=\"".escape($call_block_number ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_block_number' maxlength='255' value=\"".escape($call_block_number)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_block_number']."\n";
|
echo $text['description-call_block_number']."\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
@ -529,7 +539,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||||
echo " ".$text['label-description']."\n";
|
echo " ".$text['label-description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_block_description' maxlength='255' value=\"".escape($call_block_description ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_block_description' maxlength='255' value=\"".escape($call_block_description)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-description']."\n";
|
echo $text['description-description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -546,7 +556,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
//get recent calls from the db (if not editing an existing call block record)
|
//get recent calls from the db (if not editing an existing call block record)
|
||||||
if (!is_uuid($_REQUEST["id"])) {
|
if (empty($_REQUEST["id"])) {
|
||||||
|
|
||||||
//without block all permission, limit to assigned extension(s)
|
//without block all permission, limit to assigned extension(s)
|
||||||
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension'])) {
|
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension'])) {
|
||||||
|
|
@ -571,7 +581,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||||
$sql = "select caller_id_name, caller_id_number, caller_destination, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
|
$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 .= "from v_xml_cdr where domain_uuid = :domain_uuid ";
|
||||||
$sql .= "and direction <> 'local' ";
|
$sql .= "and direction <> 'local' ";
|
||||||
$sql .= $sql_where;
|
$sql .= $sql_where ?? null;
|
||||||
$sql .= "order by start_stamp desc ";
|
$sql .= "order by start_stamp desc ";
|
||||||
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
|
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,10 @@
|
||||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||||
|
|
||||||
//prepare the paging
|
//prepare the paging
|
||||||
|
$param = '';
|
||||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
if (!empty($search)) {
|
if (!empty($search)) {
|
||||||
$param = "&search=".urlencode($search);
|
$param .= "&search=".urlencode($search);
|
||||||
}
|
}
|
||||||
if ($show == "all" && permission_exists('call_broadcast_all')) {
|
if ($show == "all" && permission_exists('call_broadcast_all')) {
|
||||||
$param .= "&show=all";
|
$param .= "&show=all";
|
||||||
|
|
|
||||||
|
|
@ -295,8 +295,8 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||||
$parameters['domain_uuid'] = $domain_uuid;
|
$parameters['domain_uuid'] = $domain_uuid;
|
||||||
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
|
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
if (is_array($row) && @sizeof($row) != 0) {
|
if (!empty($row)) {
|
||||||
$broadcast_name = $row["broadcast_name"];
|
$broadcast_name = $row["broadcast_name"];
|
||||||
$broadcast_start_time = $row["broadcast_start_time"];
|
$broadcast_start_time = $row["broadcast_start_time"];
|
||||||
$broadcast_timeout = $row["broadcast_timeout"];
|
$broadcast_timeout = $row["broadcast_timeout"];
|
||||||
|
|
@ -433,7 +433,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||||
//$parameters['domain_uuid'] = $domain_uuid;
|
//$parameters['domain_uuid'] = $domain_uuid;
|
||||||
//$database = new database;
|
//$database = new database;
|
||||||
//$rows = $database->select($sql, $parameters, 'all');
|
//$rows = $database->select($sql, $parameters, 'all');
|
||||||
//if (is_array($rows) && @sizeof($rows) != 0) {
|
//if (!empty($rows)) {
|
||||||
// foreach ($rows as $row) {
|
// foreach ($rows as $row) {
|
||||||
// if ($recording_uuid == $row['recording_uuid']) {
|
// if ($recording_uuid == $row['recording_uuid']) {
|
||||||
// echo " <option value='".$row['recording_uuid']."' selected='yes'>".escape($row['recordingname'])."</option>\n";
|
// echo " <option value='".$row['recording_uuid']."' selected='yes'>".escape($row['recordingname'])."</option>\n";
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
|
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
if (is_array($row) && sizeof($row) != 0) {
|
if (!empty($row)) {
|
||||||
$broadcast_name = $row["broadcast_name"];
|
$broadcast_name = $row["broadcast_name"];
|
||||||
$broadcast_start_time = $row["broadcast_start_time"];
|
$broadcast_start_time = $row["broadcast_start_time"];
|
||||||
$broadcast_timeout = $row["broadcast_timeout"];
|
$broadcast_timeout = $row["broadcast_timeout"];
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,11 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
//set the defaults
|
||||||
|
$agent_id = '';
|
||||||
|
$agent_name = '';
|
||||||
|
$agent_password = '';
|
||||||
|
|
||||||
//check for duplicates
|
//check for duplicates
|
||||||
if (!empty($_GET["check"]) == 'duplicate') {
|
if (!empty($_GET["check"]) == 'duplicate') {
|
||||||
//agent id
|
//agent id
|
||||||
|
|
@ -401,7 +406,7 @@
|
||||||
echo " ".$text['label-agent_name']."\n";
|
echo " ".$text['label-agent_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='agent_name' maxlength='255' value=\"".escape($agent_name ?? '')."\" />\n";
|
echo " <input class='formfld' type='text' name='agent_name' maxlength='255' value=\"".escape($agent_name)."\" />\n";
|
||||||
/*
|
/*
|
||||||
echo "<select id=\"agent_name\" name=\"agent_name\" class='formfld'>\n";
|
echo "<select id=\"agent_name\" name=\"agent_name\" class='formfld'>\n";
|
||||||
echo "<option value=\"\"></option>\n";
|
echo "<option value=\"\"></option>\n";
|
||||||
|
|
@ -469,7 +474,7 @@
|
||||||
echo " ".$text['label-agent_id']."\n";
|
echo " ".$text['label-agent_id']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='number' name='agent_id' id='agent_id' maxlength='255' min='1' step='1' value='".escape($agent_id ?? '')."'>\n";
|
echo " <input class='formfld' type='number' name='agent_id' id='agent_id' maxlength='255' min='1' step='1' value='".escape($agent_id)."'>\n";
|
||||||
echo " <div style='display: none;' id='duplicate_agent_id_response'></div>\n";
|
echo " <div style='display: none;' id='duplicate_agent_id_response'></div>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-agent_id']."\n";
|
echo $text['description-agent_id']."\n";
|
||||||
|
|
@ -481,7 +486,7 @@
|
||||||
echo " ".$text['label-agent_password']."\n";
|
echo " ".$text['label-agent_password']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='".escape($agent_password ?? '')."'>\n";
|
echo " <input class='formfld' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='".escape($agent_password)."'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-agent_password']."\n";
|
echo $text['description-agent_password']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$tiers = $database->select($sql, $parameters ?? null, 'all');
|
$tiers = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($tiers) && count($tiers) == 0) {
|
if (!empty($tiers)) {
|
||||||
$per_queue_login = true;
|
$per_queue_login = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
$sql .= "order by agent_name asc ";
|
$sql .= "order by agent_name asc ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$agents = $database->select($sql, $parameters ?? null, 'all');
|
$agents = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//get the agent list from event socket
|
//get the agent list from event socket
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
$sql .= "order by queue_name asc ";
|
$sql .= "order by queue_name asc ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$call_center_queues = $database->select($sql, $parameters ?? null, 'all');
|
$call_center_queues = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
//view_array($call_center_queues, false);
|
//view_array($call_center_queues, false);
|
||||||
|
|
||||||
|
|
@ -228,7 +228,7 @@
|
||||||
|
|
||||||
//get the queue_id
|
//get the queue_id
|
||||||
if (isset($row['queue_uuid']) && is_uuid($row['queue_uuid'])) {
|
if (isset($row['queue_uuid']) && is_uuid($row['queue_uuid'])) {
|
||||||
if (is_array($call_center_queues)) {
|
if (!empty($call_center_queues)) {
|
||||||
foreach ($call_center_queues as $queue) {
|
foreach ($call_center_queues as $queue) {
|
||||||
if ($queue['call_center_queue_uuid'] == $row['queue_uuid']) {
|
if ($queue['call_center_queue_uuid'] == $row['queue_uuid']) {
|
||||||
$queue_id = $queue['queue_extension'].'@'.$queue['domain_name'];
|
$queue_id = $queue['queue_extension'].'@'.$queue['domain_name'];
|
||||||
|
|
@ -336,7 +336,7 @@
|
||||||
echo " <div style='clear: both;'></div>\n";
|
echo " <div style='clear: both;'></div>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
if (!empty($_POST['agents']) && is_array($_POST['agents']) && !$per_queue_login) {
|
if (!empty($_POST['agents']) && !$per_queue_login) {
|
||||||
echo $text['description-call_center_agent_status']."\n";
|
echo $text['description-call_center_agent_status']."\n";
|
||||||
echo "<br /><br />\n";
|
echo "<br /><br />\n";
|
||||||
}
|
}
|
||||||
|
|
@ -376,14 +376,14 @@
|
||||||
|
|
||||||
if ($per_queue_login) {
|
if ($per_queue_login) {
|
||||||
$html .= " <td class='description'>";
|
$html .= " <td class='description'>";
|
||||||
if (is_array($row['queues'])) {
|
if (!empty($row['queues'])) {
|
||||||
$html .= " <table class='list' >\n";
|
$html .= " <table class='list' >\n";
|
||||||
$html .= " <tr>\n";
|
$html .= " <tr>\n";
|
||||||
$html .= " <th>".$text['label-queue']."</th>\n";
|
$html .= " <th>".$text['label-queue']."</th>\n";
|
||||||
$html .= " <th>".$text['label-status']."</th>\n";
|
$html .= " <th>".$text['label-status']."</th>\n";
|
||||||
$html .= " <th>".$text['label-options']."</th>\n";
|
$html .= " <th>".$text['label-options']."</th>\n";
|
||||||
$html .= " </tr>\n";
|
$html .= " </tr>\n";
|
||||||
if (is_array($row['queues'])) {
|
if (!empty($row['queues'])) {
|
||||||
foreach ($row['queues'] as $queue) {
|
foreach ($row['queues'] as $queue) {
|
||||||
$x++;
|
$x++;
|
||||||
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,15 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
//set the defaults
|
||||||
|
$queue_name = '';
|
||||||
|
$queue_extension = '';
|
||||||
|
$queue_time_base_score_sec = '';
|
||||||
|
$queue_cid_prefix = '';
|
||||||
|
$queue_announce_frequency = '';
|
||||||
|
$queue_cc_exit_keys = '';
|
||||||
|
$queue_description = '';
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
|
|
@ -65,7 +74,7 @@
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$total_call_center_queues = $database->select($sql, $parameters ?? null, 'column');
|
$total_call_center_queues = $database->select($sql, $parameters, 'column');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
if ($total_call_center_queues >= $_SESSION['limit']['call_center_queues']['numeric']) {
|
if ($total_call_center_queues >= $_SESSION['limit']['call_center_queues']['numeric']) {
|
||||||
|
|
@ -133,7 +142,7 @@
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$parameters['call_center_tier_uuid'] = $call_center_tier_uuid;
|
$parameters['call_center_tier_uuid'] = $call_center_tier_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$tiers = $database->select($sql, $parameters ?? null, 'all');
|
$tiers = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
if (!empty($tiers)) {
|
if (!empty($tiers)) {
|
||||||
|
|
@ -418,12 +427,12 @@
|
||||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||||
|
|
||||||
//clear the destinations session array
|
//clear the destinations session array
|
||||||
if (!empty($_SESSION['destinations']['array'])) {
|
if (isset($_SESSION['destinations']['array'])) {
|
||||||
unset($_SESSION['destinations']['array']);
|
unset($_SESSION['destinations']['array']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
if (!empty($action)) {
|
if (isset($action)) {
|
||||||
if ($action == "add") {
|
if ($action == "add") {
|
||||||
message::add($text['message-add']);
|
message::add($text['message-add']);
|
||||||
}
|
}
|
||||||
|
|
@ -497,7 +506,7 @@
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$call_center_queues = $database->select($sql, $parameters ?? null, 'all');
|
$call_center_queues = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
if (!empty($call_center_queues)) {
|
if (!empty($call_center_queues)) {
|
||||||
|
|
@ -545,7 +554,7 @@
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
|
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$tiers = $database->select($sql, $parameters ?? null, 'all');
|
$tiers = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//add an empty row to the tiers array
|
//add an empty row to the tiers array
|
||||||
|
|
@ -573,7 +582,7 @@
|
||||||
$sql .= "order by agent_name asc";
|
$sql .= "order by agent_name asc";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$agents = $database->select($sql, $parameters ?? null, 'all');
|
$agents = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//get the sounds
|
//get the sounds
|
||||||
|
|
@ -605,7 +614,7 @@
|
||||||
$sql .= "order by recording_name asc ";
|
$sql .= "order by recording_name asc ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$recordings = $database->select($sql, $parameters ?? null, 'all');
|
$recordings = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//get the phrases
|
//get the phrases
|
||||||
|
|
@ -613,7 +622,7 @@
|
||||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
$parameters['domain_uuid'] = $domain_uuid;
|
$parameters['domain_uuid'] = $domain_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$phrases = $database->select($sql, $parameters ?? null, 'all');
|
$phrases = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//show the header
|
//show the header
|
||||||
|
|
@ -626,7 +635,7 @@
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
//only allow a uuid
|
//only allow a uuid
|
||||||
if (!empty($call_center_queue_uuid) && !is_uuid($call_center_queue_uuid)) {
|
if (empty($call_center_queue_uuid)) {
|
||||||
$call_center_queue_uuid = null;
|
$call_center_queue_uuid = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -698,7 +707,7 @@
|
||||||
echo " ".$text['label-queue_name']."\n";
|
echo " ".$text['label-queue_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='queue_name' maxlength='255' value=\"".escape($queue_name ?? '')."\" required='required'>\n";
|
echo " <input class='formfld' type='text' name='queue_name' maxlength='255' value=\"".escape($queue_name)."\" required='required'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-queue_name']."\n";
|
echo $text['description-queue_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -709,7 +718,7 @@
|
||||||
echo " ".$text['label-extension']."\n";
|
echo " ".$text['label-extension']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension ?? '')."\" required='required'>\n";
|
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-extension']."\n";
|
echo $text['description-extension']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -948,7 +957,7 @@
|
||||||
echo " ".$text['label-time_base_score_sec']."\n";
|
echo " ".$text['label-time_base_score_sec']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='number' name='queue_time_base_score_sec' maxlength='255' min='0' step='1' value='".escape($queue_time_base_score_sec ?? '')."'>\n";
|
echo " <input class='formfld' type='number' name='queue_time_base_score_sec' maxlength='255' min='0' step='1' value='".escape($queue_time_base_score_sec)."'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-time_base_score_sec']."\n";
|
echo $text['description-time_base_score_sec']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -1121,7 +1130,7 @@
|
||||||
echo " ".$text['label-caller_id_name_prefix']."\n";
|
echo " ".$text['label-caller_id_name_prefix']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='queue_cid_prefix' maxlength='255' value='".escape($queue_cid_prefix ?? '')."'>\n";
|
echo " <input class='formfld' type='text' name='queue_cid_prefix' maxlength='255' value='".escape($queue_cid_prefix)."'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-caller_id_name_prefix']."\n";
|
echo $text['description-caller_id_name_prefix']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -1287,7 +1296,7 @@
|
||||||
echo " ".$text['label-caller_announce_frequency']."\n";
|
echo " ".$text['label-caller_announce_frequency']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='number' name='queue_announce_frequency' maxlength='255' min='0' step='1' value='".escape($queue_announce_frequency ?? '')."'>\n";
|
echo " <input class='formfld' type='number' name='queue_announce_frequency' maxlength='255' min='0' step='1' value='".escape($queue_announce_frequency)."'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-caller_announce_frequency']."\n";
|
echo $text['description-caller_announce_frequency']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -1299,7 +1308,7 @@
|
||||||
echo " ".$text['label-exit_keys']."\n";
|
echo " ".$text['label-exit_keys']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='queue_cc_exit_keys' value='".escape($queue_cc_exit_keys ?? '')."'>\n";
|
echo " <input class='formfld' type='text' name='queue_cc_exit_keys' value='".escape($queue_cc_exit_keys)."'>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-exit_keys']."\n";
|
echo $text['description-exit_keys']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -1323,7 +1332,7 @@
|
||||||
echo " ".$text['label-description']."\n";
|
echo " ".$text['label-description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='queue_description' maxlength='255' value=\"".escape($queue_description ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='queue_description' maxlength='255' value=\"".escape($queue_description)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-description']."\n";
|
echo $text['description-description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
//set additional variables
|
||||||
|
$show = $_GET["show"] ?? '';
|
||||||
|
|
||||||
//set from session variables
|
//set from session variables
|
||||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||||
|
|
||||||
|
|
@ -107,7 +110,7 @@
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$rows_per_page = ($_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);
|
$param = "&search=".urlencode($search);
|
||||||
if (!empty($_GET['show']) == "all" && permission_exists('call_center_all')) {
|
if ($show == "all" && permission_exists('call_center_all')) {
|
||||||
$param .= "&show=all";
|
$param .= "&show=all";
|
||||||
}
|
}
|
||||||
$page = $_GET['page'] ?? '';
|
$page = $_GET['page'] ?? '';
|
||||||
|
|
@ -160,7 +163,7 @@
|
||||||
}
|
}
|
||||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||||
if (permission_exists('call_center_all')) {
|
if (permission_exists('call_center_all')) {
|
||||||
if (!empty($_GET['show']) == 'all') {
|
if ($show == 'all') {
|
||||||
echo " <input type='hidden' name='show' value='all'>";
|
echo " <input type='hidden' name='show' value='all'>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -199,7 +202,7 @@
|
||||||
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);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||||
echo " </th>\n";
|
echo " </th>\n";
|
||||||
}
|
}
|
||||||
if (!empty($_GET['show']) == "all" && permission_exists('call_center_all')) {
|
if ($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_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||||
}
|
}
|
||||||
echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order);
|
echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order);
|
||||||
|
|
@ -236,7 +239,7 @@
|
||||||
echo " <input type='hidden' name='call_center_queues[$x][uuid]' value='".escape($row['call_center_queue_uuid'])."' />\n";
|
echo " <input type='hidden' name='call_center_queues[$x][uuid]' value='".escape($row['call_center_queue_uuid'])."' />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
if (!empty($_GET['show']) == "all" && permission_exists('call_center_all')) {
|
if ($show == "all" && permission_exists('call_center_all')) {
|
||||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,17 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$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 = '';
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
|
|
@ -140,12 +151,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the call_flow_uuid
|
//add the call_flow_uuid
|
||||||
if (!is_uuid($call_flow_uuid)) {
|
if (empty($call_flow_uuid)) {
|
||||||
$call_flow_uuid = uuid();
|
$call_flow_uuid = uuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the dialplan_uuid
|
//add the dialplan_uuid
|
||||||
if (!is_uuid($dialplan_uuid)) {
|
if (empty($dialplan_uuid)) {
|
||||||
$dialplan_uuid = uuid();
|
$dialplan_uuid = uuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -310,7 +321,7 @@
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$parameters['call_flow_uuid'] = $call_flow_uuid;
|
$parameters['call_flow_uuid'] = $call_flow_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
//set the php variables
|
//set the php variables
|
||||||
$call_flow_uuid = $row["call_flow_uuid"];
|
$call_flow_uuid = $row["call_flow_uuid"];
|
||||||
|
|
@ -365,7 +376,7 @@
|
||||||
$sql .= "order by recording_name asc ";
|
$sql .= "order by recording_name asc ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$recordings = $database->select($sql, $parameters ?? null, 'all');
|
$recordings = $database->select($sql, $parameters, 'all');
|
||||||
unset($parameters, $sql);
|
unset($parameters, $sql);
|
||||||
|
|
||||||
if (if_group("superadmin")) {
|
if (if_group("superadmin")) {
|
||||||
|
|
@ -443,7 +454,7 @@
|
||||||
$sql = "select * from v_phrases where domain_uuid = :domain_uuid ";
|
$sql = "select * from v_phrases where domain_uuid = :domain_uuid ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
unset($parameters, $sql);
|
unset($parameters, $sql);
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
echo "<optgroup label='Phrases'>\n";
|
echo "<optgroup label='Phrases'>\n";
|
||||||
|
|
@ -532,7 +543,7 @@
|
||||||
echo " ".$text['label-call_flow_name']."\n";
|
echo " ".$text['label-call_flow_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_name' maxlength='255' value=\"".escape($call_flow_name ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_name' maxlength='255' value=\"".escape($call_flow_name)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_flow_name']."\n";
|
echo $text['description-call_flow_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -543,7 +554,7 @@
|
||||||
echo " ".$text['label-call_flow_extension']."\n";
|
echo " ".$text['label-call_flow_extension']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_extension' maxlength='255' value=\"".escape($call_flow_extension ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_extension' maxlength='255' value=\"".escape($call_flow_extension)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_flow_extension']."\n";
|
echo $text['description-call_flow_extension']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -554,7 +565,7 @@
|
||||||
echo " ".$text['label-call_flow_feature_code']."\n";
|
echo " ".$text['label-call_flow_feature_code']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_feature_code' maxlength='255' value=\"".escape($call_flow_feature_code ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_feature_code' maxlength='255' value=\"".escape($call_flow_feature_code)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_flow_feature_code']."\n";
|
echo $text['description-call_flow_feature_code']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -610,7 +621,7 @@
|
||||||
echo " ".$text['label-call_flow_pin_number']."\n";
|
echo " ".$text['label-call_flow_pin_number']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_pin_number' maxlength='255' value=\"".escape($call_flow_pin_number ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_pin_number' maxlength='255' value=\"".escape($call_flow_pin_number)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_flow_pin_number']."\n";
|
echo $text['description-call_flow_pin_number']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -621,7 +632,7 @@
|
||||||
echo " ".$text['label-call_flow_label']."\n";
|
echo " ".$text['label-call_flow_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_label' maxlength='255' value=\"".escape($call_flow_label ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_label' maxlength='255' value=\"".escape($call_flow_label)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo !empty($text['description-call_flow_label'])."\n";
|
echo !empty($text['description-call_flow_label'])."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -665,7 +676,7 @@
|
||||||
echo " ".$text['label-call_flow_alternate_label']."\n";
|
echo " ".$text['label-call_flow_alternate_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_alternate_label' maxlength='255' value=\"".escape($call_flow_alternate_label ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_alternate_label' maxlength='255' value=\"".escape($call_flow_alternate_label)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-call_flow_alternate_label']."\n";
|
echo $text['description-call_flow_alternate_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -737,7 +748,7 @@
|
||||||
echo " ".$text['label-call_flow_description']."\n";
|
echo " ".$text['label-call_flow_description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"".escape($call_flow_description ?? '')."\">\n";
|
echo " <input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"".escape($call_flow_description)."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo !empty($text['description-call_flow_description'])."\n";
|
echo !empty($text['description-call_flow_description'])."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
$search = strtolower($_GET["search"] ?? '');
|
$search = strtolower($_GET["search"] ?? '');
|
||||||
|
|
||||||
//set the show variable
|
//set the show variable
|
||||||
$show = $_GET['show'] ?? 'domain';
|
$show = $_GET['show'] ?? '';
|
||||||
|
|
||||||
//define select count query
|
//define select count query
|
||||||
$sql = "select count(*) from v_extensions ";
|
$sql = "select count(*) from v_extensions ";
|
||||||
|
|
@ -131,8 +131,6 @@
|
||||||
//prepare the paging
|
//prepare the paging
|
||||||
$rows_per_page = !empty($_SESSION['domain']['paging']['numeric']) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = !empty($_SESSION['domain']['paging']['numeric']) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
|
|
||||||
$params[] = "app_uuid=" . call_forward::APP_UUID;
|
|
||||||
|
|
||||||
if ($search) {
|
if ($search) {
|
||||||
$params[] = "search=" . $search;
|
$params[] = "search=" . $search;
|
||||||
}
|
}
|
||||||
|
|
@ -143,7 +141,7 @@
|
||||||
$params[] = "order=" . $order;
|
$params[] = "order=" . $order;
|
||||||
}
|
}
|
||||||
if ($show == "all" && permission_exists('call_forward_all')) {
|
if ($show == "all" && permission_exists('call_forward_all')) {
|
||||||
$params[] .= "show=all";
|
$params[] = "show=all";
|
||||||
}
|
}
|
||||||
$param = !empty($params) ? implode('&', $params) : '';
|
$param = !empty($params) ? implode('&', $params) : '';
|
||||||
unset($params);
|
unset($params);
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
|
|
||||||
//get the conference rooms
|
//get the conference rooms
|
||||||
$conference_center->rows_per_page = $rows_per_page;
|
$conference_center->rows_per_page = $rows_per_page;
|
||||||
$conference_center->offset = $offset;
|
$conference_center->offset = $offset ?? '';
|
||||||
$conference_center->order_by = $order_by;
|
$conference_center->order_by = $order_by;
|
||||||
$conference_center->order = $order;
|
$conference_center->order = $order;
|
||||||
if (!empty($search)) {
|
if (!empty($search)) {
|
||||||
|
|
@ -446,7 +446,7 @@
|
||||||
// }
|
// }
|
||||||
// echo " </td>\n";
|
// echo " </td>\n";
|
||||||
|
|
||||||
if (strlen($conference[$meeting_uuid]["session_uuid"])) {
|
if (!empty($conference) && !empty($meeting_uuid) && strlen($conference[$meeting_uuid]["session_uuid"])) {
|
||||||
echo " <td class='center'>".escape($conference[$meeting_uuid]["member_count"])." </td>\n";
|
echo " <td class='center'>".escape($conference[$meeting_uuid]["member_count"])." </td>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ if (!class_exists('conference_centers')) {
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$conference_rooms = $database->select($sql, $parameters, 'all');
|
$conference_rooms = $database->select($sql, $parameters, 'all');
|
||||||
|
|
||||||
if (is_array($conference_rooms)) {
|
if (!empty($conference_rooms)) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach($conference_rooms as $row) {
|
foreach($conference_rooms as $row) {
|
||||||
//increment the array index
|
//increment the array index
|
||||||
|
|
@ -200,7 +200,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql, $parameters, $conference_rooms);
|
unset($sql, $parameters, $conference_rooms);
|
||||||
return $result;
|
return $result ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -312,7 +312,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete multiple records
|
//delete multiple records
|
||||||
if (is_array($records) && @sizeof($records) != 0) {
|
if (!empty($records)) {
|
||||||
|
|
||||||
//build the delete array
|
//build the delete array
|
||||||
foreach ($records as $x => $record) {
|
foreach ($records as $x => $record) {
|
||||||
|
|
@ -339,7 +339,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the checked rows
|
//delete the checked rows
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (!empty($array)) {
|
||||||
|
|
||||||
//grant temporary permissions
|
//grant temporary permissions
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
|
|
@ -400,7 +400,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete multiple records
|
//delete multiple records
|
||||||
if (is_array($records) && @sizeof($records) != 0) {
|
if (!empty($records)) {
|
||||||
|
|
||||||
//build the delete array
|
//build the delete array
|
||||||
foreach ($records as $x => $record) {
|
foreach ($records as $x => $record) {
|
||||||
|
|
@ -415,7 +415,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the checked rows
|
//delete the checked rows
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (!empty($array)) {
|
||||||
|
|
||||||
//grant temporary permissions
|
//grant temporary permissions
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
|
|
@ -464,7 +464,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete multiple records
|
//delete multiple records
|
||||||
if (is_array($records) && @sizeof($records) != 0) {
|
if (!empty($records)) {
|
||||||
|
|
||||||
//build the delete array
|
//build the delete array
|
||||||
foreach ($records as $x => $record) {
|
foreach ($records as $x => $record) {
|
||||||
|
|
@ -479,7 +479,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the checked rows
|
//delete the checked rows
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (!empty($array)) {
|
||||||
|
|
||||||
//grant temporary permissions
|
//grant temporary permissions
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
|
|
@ -533,7 +533,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//toggle the checked records
|
//toggle the checked records
|
||||||
if (is_array($records) && @sizeof($records) != 0) {
|
if (!empty($records)) {
|
||||||
|
|
||||||
//get current toggle state
|
//get current toggle state
|
||||||
foreach($records as $x => $record) {
|
foreach($records as $x => $record) {
|
||||||
|
|
@ -541,14 +541,14 @@ if (!class_exists('conference_centers')) {
|
||||||
$uuids[] = "'".$record['uuid']."'";
|
$uuids[] = "'".$record['uuid']."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
if (!empty($uuids)) {
|
||||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_uuid from v_".$this->table." ";
|
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_uuid from v_".$this->table." ";
|
||||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$rows = $database->select($sql, $parameters, 'all');
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (!empty($rows)) {
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$conference_centers[$row['uuid']]['state'] = $row['toggle'];
|
$conference_centers[$row['uuid']]['state'] = $row['toggle'];
|
||||||
$conference_centers[$row['uuid']]['dialplan_uuid'] = $row['dialplan_uuid'];
|
$conference_centers[$row['uuid']]['dialplan_uuid'] = $row['dialplan_uuid'];
|
||||||
|
|
@ -568,7 +568,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//save the changes
|
//save the changes
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (!empty($array)) {
|
||||||
|
|
||||||
//grant temporary permissions
|
//grant temporary permissions
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
|
|
@ -630,7 +630,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//toggle the checked records
|
//toggle the checked records
|
||||||
if (is_array($records) && @sizeof($records) != 0) {
|
if (!empty($records)) {
|
||||||
|
|
||||||
//validate submitted toggle field
|
//validate submitted toggle field
|
||||||
if (!in_array($this->toggle_field, ['record','wait_mod','announce_name','announce_count','announce_recording','mute','sounds','enabled'])) {
|
if (!in_array($this->toggle_field, ['record','wait_mod','announce_name','announce_count','announce_recording','mute','sounds','enabled'])) {
|
||||||
|
|
@ -647,14 +647,14 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
if (!empty($uuids)) {
|
||||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
|
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
|
||||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$rows = $database->select($sql, $parameters, 'all');
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (!empty($rows)) {
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$states[$row['uuid']] = $row['toggle'];
|
$states[$row['uuid']] = $row['toggle'];
|
||||||
}
|
}
|
||||||
|
|
@ -692,7 +692,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//save the changes
|
//save the changes
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (!empty($array)) {
|
||||||
|
|
||||||
//save the array
|
//save the array
|
||||||
$database = new database;
|
$database = new database;
|
||||||
|
|
@ -738,7 +738,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy the checked records
|
//copy the checked records
|
||||||
if (is_array($records) && @sizeof($records) != 0) {
|
if (!empty($records)) {
|
||||||
|
|
||||||
//get checked records
|
//get checked records
|
||||||
foreach($records as $x => $record) {
|
foreach($records as $x => $record) {
|
||||||
|
|
@ -748,14 +748,14 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//create insert array from existing data
|
//create insert array from existing data
|
||||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
if (!empty($uuids)) {
|
||||||
$sql = "select * from v_".$this->table." ";
|
$sql = "select * from v_".$this->table." ";
|
||||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$rows = $database->select($sql, $parameters, 'all');
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (!empty($rows)) {
|
||||||
foreach ($rows as $x => $row) {
|
foreach ($rows as $x => $row) {
|
||||||
|
|
||||||
//copy data
|
//copy data
|
||||||
|
|
@ -771,7 +771,7 @@ if (!class_exists('conference_centers')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//save the changes and set the message
|
//save the changes and set the message
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (!empty($array)) {
|
||||||
|
|
||||||
//save the array
|
//save the array
|
||||||
$database = new database;
|
$database = new database;
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@
|
||||||
echo "<tr class='list-header'>\n";
|
echo "<tr class='list-header'>\n";
|
||||||
if (permission_exists('conference_control_detail_edit') || permission_exists('conference_control_detail_delete')) {
|
if (permission_exists('conference_control_detail_edit') || permission_exists('conference_control_detail_delete')) {
|
||||||
echo " <th class='checkbox'>\n";
|
echo " <th class='checkbox'>\n";
|
||||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
|
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
|
||||||
echo " </th>\n";
|
echo " </th>\n";
|
||||||
}
|
}
|
||||||
echo th_order_by('control_digits', $text['label-control_digits'], $order_by, $order, null, "class='pct-5 center'", $param);
|
echo th_order_by('control_digits', $text['label-control_digits'], $order_by, $order, null, "class='pct-5 center'", $param);
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
$sql .= "where conference_control_uuid = :conference_control_uuid ";
|
$sql .= "where conference_control_uuid = :conference_control_uuid ";
|
||||||
$parameters['conference_control_uuid'] = $conference_control_uuid;
|
$parameters['conference_control_uuid'] = $conference_control_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
if (!empty($row)) {
|
if (!empty($row)) {
|
||||||
$control_name = $row["control_name"];
|
$control_name = $row["control_name"];
|
||||||
$control_enabled = $row["control_enabled"];
|
$control_enabled = $row["control_enabled"];
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,8 @@
|
||||||
$parameters['conference_profile_uuid'] = $conference_profile_uuid;
|
$parameters['conference_profile_uuid'] = $conference_profile_uuid;
|
||||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
if (is_array($row) && sizeof($row) != 0) {
|
if (!empty($row)) {
|
||||||
$profile_name = $row["profile_name"];
|
$profile_name = $row["profile_name"];
|
||||||
$profile_enabled = $row["profile_enabled"];
|
$profile_enabled = $row["profile_enabled"];
|
||||||
$profile_description = $row["profile_description"];
|
$profile_description = $row["profile_description"];
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
$sql .= "where conference_profile_param_uuid = :conference_profile_param_uuid ";
|
$sql .= "where conference_profile_param_uuid = :conference_profile_param_uuid ";
|
||||||
$parameters['conference_profile_param_uuid'] = $conference_profile_param_uuid;
|
$parameters['conference_profile_param_uuid'] = $conference_profile_param_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
if (!empty($row)) {
|
if (!empty($row)) {
|
||||||
$profile_param_name = $row["profile_param_name"];
|
$profile_param_name = $row["profile_param_name"];
|
||||||
$profile_param_value = $row["profile_param_value"];
|
$profile_param_value = $row["profile_param_value"];
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,13 @@
|
||||||
$search = '';
|
$search = '';
|
||||||
$action = '';
|
$action = '';
|
||||||
$page = 0;
|
$page = 0;
|
||||||
|
$user_uuid = '';
|
||||||
|
$app_name = '';
|
||||||
|
$app_uuid = '';
|
||||||
|
$domain_name = '';
|
||||||
|
$username = '';
|
||||||
|
$transaction_code = '';
|
||||||
|
$transaction_address = '';
|
||||||
|
|
||||||
//set the variables
|
//set the variables
|
||||||
if (!empty($_GET["id"]) && is_uuid($_GET["id"])) {
|
if (!empty($_GET["id"]) && is_uuid($_GET["id"])) {
|
||||||
|
|
@ -74,7 +81,7 @@
|
||||||
$parameters['database_transaction_uuid'] = $database_transaction_uuid;
|
$parameters['database_transaction_uuid'] = $database_transaction_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$row = $database->select($sql, $parameters, 'row');
|
$row = $database->select($sql, $parameters, 'row');
|
||||||
if (is_array($row) && @sizeof($row) != 0) {
|
if (!empty($row)) {
|
||||||
$user_uuid = $row["user_uuid"];
|
$user_uuid = $row["user_uuid"];
|
||||||
$app_name = $row["app_name"];
|
$app_name = $row["app_name"];
|
||||||
$app_uuid = $row["app_uuid"];
|
$app_uuid = $row["app_uuid"];
|
||||||
|
|
@ -110,7 +117,7 @@
|
||||||
|
|
||||||
//get the type if not provided
|
//get the type if not provided
|
||||||
if (empty($transaction_type)) {
|
if (empty($transaction_type)) {
|
||||||
if ($transaction_old == null || $transaction_old == "null") {
|
if (empty($transaction_old) || $transaction_old == null || $transaction_old == "null") {
|
||||||
$transaction_type = 'add';
|
$transaction_type = 'add';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -237,9 +244,9 @@
|
||||||
//this adds old and new values to the array
|
//this adds old and new values to the array
|
||||||
function array_difference($array1, $array2) {
|
function array_difference($array1, $array2) {
|
||||||
$array = array();
|
$array = array();
|
||||||
if (is_array($array1)) {
|
if (!empty($array1)) {
|
||||||
foreach ($array1 as $key => $value) {
|
foreach ($array1 as $key => $value) {
|
||||||
if (is_array($array2[$key])) {
|
if (!empty($array2[$key])) {
|
||||||
$array[$key] = array_difference($array1[$key], $array2[$key]);
|
$array[$key] = array_difference($array1[$key], $array2[$key]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -247,9 +254,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_array($array2)) {
|
if (!empty($array2)) {
|
||||||
foreach ($array2 as $key => $value) {
|
foreach ($array2 as $key => $value) {
|
||||||
if (is_array($value)) {
|
if (!empty($value)) {
|
||||||
$array[$key] = array_difference($array1[$key], $array2[$key]);
|
$array[$key] = array_difference($array1[$key], $array2[$key]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -265,7 +272,7 @@
|
||||||
|
|
||||||
//loop through the array
|
//loop through the array
|
||||||
foreach ($array as $key => $value) {
|
foreach ($array as $key => $value) {
|
||||||
if (is_array($value) && !isset($value['old']) && !isset($value['new'])) {
|
if (!empty($value) && !isset($value['old']) && !isset($value['new'])) {
|
||||||
if (!is_numeric($key)) {
|
if (!is_numeric($key)) {
|
||||||
//get the table name
|
//get the table name
|
||||||
$_SESSION['name'] = $key;
|
$_SESSION['name'] = $key;
|
||||||
|
|
@ -320,14 +327,14 @@
|
||||||
if ($transaction_type == "add") {
|
if ($transaction_type == "add") {
|
||||||
|
|
||||||
//multiple dimensional array into a 2 dimensional array
|
//multiple dimensional array into a 2 dimensional array
|
||||||
if (is_array($after)) {
|
if (!empty($after)) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($after as $key => $value) {
|
foreach ($after as $key => $value) {
|
||||||
$id = 0;
|
$id = 0;
|
||||||
foreach ($value as $row) {
|
foreach ($value as $row) {
|
||||||
$sub_id = 0;
|
$sub_id = 0;
|
||||||
foreach ($row as $sub_key => $val) {
|
foreach ($row as $sub_key => $val) {
|
||||||
if (is_array($val)) {
|
if (!empty($val)) {
|
||||||
foreach ($val as $sub_row) {
|
foreach ($val as $sub_row) {
|
||||||
foreach ($sub_row as $k => $v) {
|
foreach ($sub_row as $k => $v) {
|
||||||
$array[$x]['schema'] = $sub_key;
|
$array[$x]['schema'] = $sub_key;
|
||||||
|
|
@ -353,7 +360,7 @@
|
||||||
}
|
}
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "<table width='100%'>\n";
|
echo "<table width='100%'>\n";
|
||||||
if (is_array($array)) {
|
if (!empty($array)) {
|
||||||
foreach ($array as $row) {
|
foreach ($array as $row) {
|
||||||
if ($row['schema'] !== $previous_schema || $row['row'] !== $previous_row) {
|
if ($row['schema'] !== $previous_schema || $row['row'] !== $previous_row) {
|
||||||
echo "<tr><td colspan='4'> </td></tr>\n";
|
echo "<tr><td colspan='4'> </td></tr>\n";
|
||||||
|
|
@ -373,7 +380,7 @@
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (is_array($after)) {
|
if (!empty($after)) {
|
||||||
//create the table header
|
//create the table header
|
||||||
$array = array_difference(null, $after, 1);
|
$array = array_difference(null, $after, 1);
|
||||||
$table_header = "<tr><td colspan='5'> </td></tr>\n";
|
$table_header = "<tr><td colspan='5'> </td></tr>\n";
|
||||||
|
|
@ -418,7 +425,7 @@
|
||||||
if ($transaction_type == "delete") {
|
if ($transaction_type == "delete") {
|
||||||
echo "<br /><br />\n";
|
echo "<br /><br />\n";
|
||||||
echo "<table width='100%'>\n";
|
echo "<table width='100%'>\n";
|
||||||
if (is_array($before)) {
|
if (!empty($before)) {
|
||||||
foreach ($before as $table_name => $rows) {
|
foreach ($before as $table_name => $rows) {
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <th>".escape($table_name)."</th><th> </th>\n";
|
echo " <th>".escape($table_name)."</th><th> </th>\n";
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
$sql .= order_by($order_by, $order, 't.transaction_date', 'desc');
|
$sql .= order_by($order_by, $order, 't.transaction_date', 'desc');
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//get users
|
//get users
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$rows = $database->select($sql, $parameters, 'all');
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (!empty($rows)) {
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$users[$row['user_uuid']] = $row['username'];
|
$users[$row['user_uuid']] = $row['username'];
|
||||||
}
|
}
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if (is_array($result)) {
|
if (!empty($result)) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
if (permission_exists('database_transaction_edit')) {
|
if (permission_exists('database_transaction_edit')) {
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,12 @@
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
//set the defaults
|
||||||
|
$ivr_menu_name = '';
|
||||||
|
$ivr_menu_extension = '';
|
||||||
|
$ivr_menu_cid_prefix = '';
|
||||||
|
$ivr_menu_description = '';
|
||||||
|
|
||||||
//initialize the destinations object
|
//initialize the destinations object
|
||||||
$destination = new destinations;
|
$destination = new destinations;
|
||||||
|
|
||||||
|
|
@ -296,7 +302,7 @@
|
||||||
$array['ivr_menus'][0]["ivr_menu_description"] = $ivr_menu_description;
|
$array['ivr_menus'][0]["ivr_menu_description"] = $ivr_menu_description;
|
||||||
$y = 0;
|
$y = 0;
|
||||||
foreach ($ivr_menu_options as $row) {
|
foreach ($ivr_menu_options as $row) {
|
||||||
if (isset($row['ivr_menu_option_digits']) && $row['ivr_menu_option_digits'] != '') {
|
if (!empty($row['ivr_menu_option_digits'])) {
|
||||||
if (!empty($row['ivr_menu_option_uuid']) && is_uuid($row['ivr_menu_option_uuid'])) {
|
if (!empty($row['ivr_menu_option_uuid']) && is_uuid($row['ivr_menu_option_uuid'])) {
|
||||||
$ivr_menu_option_uuid = $row['ivr_menu_option_uuid'];
|
$ivr_menu_option_uuid = $row['ivr_menu_option_uuid'];
|
||||||
}
|
}
|
||||||
|
|
@ -458,13 +464,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
if (empty($ivr_menu_uuid)) { $ivr_menu_uuid = $_REQUEST["id"]; }
|
if (empty($ivr_menu_uuid)) { $ivr_menu_uuid = $_REQUEST["id"] ?? null; }
|
||||||
if (!empty($ivr_menu_uuid) && is_uuid($ivr_menu_uuid) && empty($_POST["persistformvar"])) {
|
if (!empty($ivr_menu_uuid) && is_uuid($ivr_menu_uuid) && empty($_POST["persistformvar"])) {
|
||||||
$ivr = new ivr_menu;
|
$ivr = new ivr_menu;
|
||||||
$ivr->domain_uuid = $_SESSION["domain_uuid"];
|
$ivr->domain_uuid = $_SESSION["domain_uuid"];
|
||||||
$ivr->ivr_menu_uuid = $ivr_menu_uuid;
|
$ivr->ivr_menu_uuid = $ivr_menu_uuid;
|
||||||
$ivr_menus = $ivr->find();
|
$ivr_menus = $ivr->find();
|
||||||
if (is_array($ivr_menus)) {
|
if (!empty($ivr_menus)) {
|
||||||
foreach ($ivr_menus as &$row) {
|
foreach ($ivr_menus as &$row) {
|
||||||
$dialplan_uuid = $row["dialplan_uuid"];
|
$dialplan_uuid = $row["dialplan_uuid"];
|
||||||
$ivr_menu_name = $row["ivr_menu_name"];
|
$ivr_menu_name = $row["ivr_menu_name"];
|
||||||
|
|
@ -992,7 +998,7 @@
|
||||||
}
|
}
|
||||||
//sounds
|
//sounds
|
||||||
/*
|
/*
|
||||||
if (is_array($sound_files)) {
|
if (!empty($sound_files)) {
|
||||||
echo "<optgroup label='Sounds'>\n";
|
echo "<optgroup label='Sounds'>\n";
|
||||||
foreach ($sound_files as $value) {
|
foreach ($sound_files as $value) {
|
||||||
if (!empty($value)) {
|
if (!empty($value)) {
|
||||||
|
|
@ -1055,7 +1061,7 @@
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
if (is_array($ivr_menu_options)) {
|
if (!empty($ivr_menu_options)) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach($ivr_menu_options as $field) {
|
foreach($ivr_menu_options as $field) {
|
||||||
|
|
||||||
|
|
@ -1291,7 +1297,7 @@
|
||||||
}
|
}
|
||||||
//recordings
|
//recordings
|
||||||
$tmp_selected = false;
|
$tmp_selected = false;
|
||||||
if (is_array($recordings) && !empty($_SESSION['switch']['recordings']['dir'])) {
|
if (!empty($recordings) && !empty($_SESSION['switch']['recordings']['dir'])) {
|
||||||
echo "<optgroup label='Recordings'>\n";
|
echo "<optgroup label='Recordings'>\n";
|
||||||
foreach ($recordings as &$row) {
|
foreach ($recordings as &$row) {
|
||||||
$recording_name = $row["recording_name"];
|
$recording_name = $row["recording_name"];
|
||||||
|
|
@ -1311,7 +1317,7 @@
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
//phrases
|
//phrases
|
||||||
if (is_array($phrases)) {
|
if (!empty($phrases)) {
|
||||||
echo "<optgroup label='Phrases'>\n";
|
echo "<optgroup label='Phrases'>\n";
|
||||||
foreach ($phrases as &$row) {
|
foreach ($phrases as &$row) {
|
||||||
if ($ivr_menu_invalid_sound == "phrase:".$row["phrase_uuid"]) {
|
if ($ivr_menu_invalid_sound == "phrase:".$row["phrase_uuid"]) {
|
||||||
|
|
@ -1325,7 +1331,7 @@
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
//sounds
|
//sounds
|
||||||
if (is_array($sound_files)) {
|
if (!empty($sound_files)) {
|
||||||
echo "<optgroup label='Sounds'>\n";
|
echo "<optgroup label='Sounds'>\n";
|
||||||
foreach ($sound_files as $value) {
|
foreach ($sound_files as $value) {
|
||||||
if (!empty($value)) {
|
if (!empty($value)) {
|
||||||
|
|
@ -1380,7 +1386,7 @@
|
||||||
}
|
}
|
||||||
//recordings
|
//recordings
|
||||||
$tmp_selected = false;
|
$tmp_selected = false;
|
||||||
if (is_array($recordings) && !empty($_SESSION['switch']['recordings']['dir'])) {
|
if (!empty($recordings) && !empty($_SESSION['switch']['recordings']['dir'])) {
|
||||||
echo "<optgroup label='Recordings'>\n";
|
echo "<optgroup label='Recordings'>\n";
|
||||||
foreach ($recordings as &$row) {
|
foreach ($recordings as &$row) {
|
||||||
$recording_name = $row["recording_name"];
|
$recording_name = $row["recording_name"];
|
||||||
|
|
@ -1400,7 +1406,7 @@
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
//phrases
|
//phrases
|
||||||
if (is_array($phrases)) {
|
if (!empty($phrases)) {
|
||||||
echo "<optgroup label='Phrases'>\n";
|
echo "<optgroup label='Phrases'>\n";
|
||||||
foreach ($phrases as &$row) {
|
foreach ($phrases as &$row) {
|
||||||
if ($ivr_menu_exit_sound == "phrase:".$row["phrase_uuid"]) {
|
if ($ivr_menu_exit_sound == "phrase:".$row["phrase_uuid"]) {
|
||||||
|
|
@ -1414,7 +1420,7 @@
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
//sounds
|
//sounds
|
||||||
if (is_array($sound_files)) {
|
if (!empty($sound_files)) {
|
||||||
echo "<optgroup label='Sounds'>\n";
|
echo "<optgroup label='Sounds'>\n";
|
||||||
foreach ($sound_files as $value) {
|
foreach ($sound_files as $value) {
|
||||||
if (!empty($value)) {
|
if (!empty($value)) {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ if (!class_exists('ringbacks')) {
|
||||||
$ringtones_list[$ringtone] = $label;
|
$ringtones_list[$ringtone] = $label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->ringtones_list = $ringtones_list;
|
$this->ringtones_list = $ringtones_list ?? '';
|
||||||
unset($sql, $ringtones, $ringtone, $ringtones_list);
|
unset($sql, $ringtones, $ringtone, $ringtones_list);
|
||||||
|
|
||||||
//get the default_ringback label
|
//get the default_ringback label
|
||||||
|
|
@ -146,7 +146,7 @@ if (!class_exists('ringbacks')) {
|
||||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$streams = $database->select($sql, $parameters, 'all');
|
$streams = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($streams) && @sizeof($streams) != 0) {
|
if (!empty($streams)) {
|
||||||
$select .= " <optgroup label='".$text['label-streams']."'>";
|
$select .= " <optgroup label='".$text['label-streams']."'>";
|
||||||
foreach ($streams as $row) {
|
foreach ($streams as $row) {
|
||||||
$select .= " <option value='".$row['stream_location']."' ".(($selected == $row['stream_location']) ? 'selected="selected"' : null).">".$row['stream_name']."</option>\n";
|
$select .= " <option value='".$row['stream_location']."' ".(($selected == $row['stream_location']) ? 'selected="selected"' : null).">".$row['stream_name']."</option>\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue