more php 8.1 changes (#6727)
* Update call_broadcast.php * Update call_broadcast_edit.php * Update conference_center_edit.php * Update call_flows.php * Update conference_room_edit.php * Update conference_sessions.php * Update conference_session_details.php * Update conference_rooms.php * Update conference_controls.php * Update conference_control_edit.php * Update conference_control_details.php * Update conference_control_detail_edit.php * Update conference_profiles.php * Update conference_profile_edit.php * Update conference_profile_params.php * Update conference_profile_param_edit.php * Update conferences.php * Update conference_edit.php * Update conferences.php * Update conference_interactive_inc.php * Update contacts.php
This commit is contained in:
parent
1d23d548d0
commit
410f5e6f68
|
|
@ -120,8 +120,8 @@
|
|||
}
|
||||
$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);
|
||||
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);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the call broadcasts
|
||||
|
|
@ -175,11 +175,11 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_broadcast_all')) {
|
||||
if ($_GET['show'] == 'all') {
|
||||
if ($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'.(!empty($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=''>";
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
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);' ".($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";
|
||||
}
|
||||
if ($show == "all" && permission_exists('call_broadcast_all')) {
|
||||
|
|
@ -250,7 +250,7 @@
|
|||
}
|
||||
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']);
|
||||
|
|
@ -258,11 +258,11 @@
|
|||
echo " </td>\n";
|
||||
echo " <td>".escape($row['broadcast_concurrent_limit'])."</td>\n";
|
||||
//determine start date and time
|
||||
$broadcast_start_reference = $row['update_date'] ?: $row['insert_date'];
|
||||
$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>".escape($broadcast_start_time ?? '')."</td>\n";
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</td>\n";
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
|
|
|
|||
|
|
@ -54,6 +54,18 @@
|
|||
else {
|
||||
$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) {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
|
|
@ -90,7 +93,7 @@
|
|||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
$search = strtolower($search ?? '');
|
||||
if (!empty($search)) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "lower(call_flow_name) like :search ";
|
||||
|
|
@ -108,7 +111,7 @@
|
|||
//prepare to page the results
|
||||
$sql = "select count(*) from v_call_flows ";
|
||||
$sql .= "where true ";
|
||||
if (!empty($_GET['show']) != "all" || !permission_exists('call_flow_all')) {
|
||||
if ($show != "all" || !permission_exists('call_flow_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -119,7 +122,7 @@
|
|||
//prepare to page the results
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('call_flow_all')) {
|
||||
if ($show == "all" && permission_exists('call_flow_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'] ?? '';
|
||||
|
|
@ -177,7 +180,7 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_flow_all')) {
|
||||
if (!empty($_GET['show']) == 'all') {
|
||||
if ($show == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
|
|
@ -220,7 +223,7 @@
|
|||
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 " </th>\n";
|
||||
}
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('call_flow_all')) {
|
||||
if ($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);
|
||||
|
|
@ -250,7 +253,7 @@
|
|||
echo " <input type='hidden' name='call_flows[$x][uuid]' value='".escape($row['call_flow_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if (!empty($_GET['show']) == "all" && permission_exists('call_flow_all')) {
|
||||
if ($show == "all" && permission_exists('call_flow_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_center_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -54,8 +54,13 @@
|
|||
$action = "add";
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
$conference_center_name = '';
|
||||
$conference_center_extension = '';
|
||||
$conference_center_description = '';
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//delete the conference center
|
||||
if ($_POST['action'] == 'delete' && permission_exists('conference_center_delete') && is_uuid($conference_center_uuid)) {
|
||||
|
|
@ -207,7 +212,7 @@
|
|||
} //(is_array($_POST) && empty($_POST["persistformvar"]))
|
||||
|
||||
//pre-populate the form
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
$conference_center_uuid = $_GET["id"];
|
||||
$sql = "select * from v_conference_centers ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
|
|
@ -215,8 +220,8 @@
|
|||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_center_uuid'] = $conference_center_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$conference_center_uuid = $row["conference_center_uuid"];
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$conference_center_name = $row["conference_center_name"];
|
||||
|
|
@ -239,7 +244,7 @@
|
|||
$sql .= "order by recording_name asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$recordings = $database->select($sql, $parameters, 'all');
|
||||
$recordings = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the phrases
|
||||
|
|
@ -247,7 +252,7 @@
|
|||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$phrases = $database->select($sql, $parameters, 'all');
|
||||
$phrases = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the streams
|
||||
|
|
@ -257,7 +262,7 @@
|
|||
$sql .= "order by stream_name asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$streams = $database->select($sql, $parameters, 'all');
|
||||
$streams = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -459,7 +464,7 @@
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_center_description' maxlength='255' value=\"".escape($conference_center_description)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-conference_center_description']."\n";
|
||||
//echo $text['description-conference_center_description']."\n";
|
||||
echo "</td>\n";
|
||||
|
||||
echo "</table>";
|
||||
|
|
|
|||
|
|
@ -46,8 +46,15 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$conference_room_name = '';
|
||||
$start_datetime = '';
|
||||
$stop_datetime = '';
|
||||
$account_code = '';
|
||||
$description = '';
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_room_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -56,7 +63,7 @@
|
|||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
if (!empty($_POST)) {
|
||||
$conference_center_uuid = $_POST["conference_center_uuid"];
|
||||
$conference_room_name = $_POST['conference_room_name'];
|
||||
$moderator_pin = $_POST["moderator_pin"];
|
||||
|
|
@ -106,7 +113,7 @@
|
|||
unset ($sql);
|
||||
|
||||
//set the default
|
||||
if ($profile === "") { $profile = "default"; }
|
||||
if (empty($profile)) { $profile = "default"; }
|
||||
|
||||
//define fucntion get_conference_pin - used to find a unique pin number
|
||||
function get_conference_pin($length, $conference_room_uuid) {
|
||||
|
|
@ -131,7 +138,7 @@
|
|||
}
|
||||
|
||||
//record announcment
|
||||
if ($record == "true") {
|
||||
if (!empty($record) && $record == "true") {
|
||||
//prepare the values
|
||||
$default_language = 'en';
|
||||
$default_dialect = 'us';
|
||||
|
|
@ -145,7 +152,7 @@
|
|||
}
|
||||
|
||||
//generate the pins
|
||||
if (is_uuid($conference_center_uuid)) {
|
||||
if (!empty($conference_center_uuid) && is_uuid($conference_center_uuid)) {
|
||||
$sql = "select conference_center_pin_length ";
|
||||
$sql .= "from v_conference_centers ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
|
|
@ -154,7 +161,7 @@
|
|||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
if (!empty($row)) {
|
||||
$pin_length = $row['conference_center_pin_length'];
|
||||
}
|
||||
unset($sql, $parameters);
|
||||
|
|
@ -167,7 +174,7 @@
|
|||
}
|
||||
|
||||
//delete the user
|
||||
if ($_GET["a"] == "delete" && permission_exists('conference_room_delete')) {
|
||||
if (!empty($_GET["a"]) && $_GET["a"] == "delete" && permission_exists('conference_room_delete')) {
|
||||
if (is_uuid($_REQUEST["conference_room_user_uuid"])) {
|
||||
//set the variables
|
||||
$conference_room_user_uuid = $_REQUEST["conference_room_user_uuid"];
|
||||
|
|
@ -196,7 +203,7 @@
|
|||
}
|
||||
|
||||
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
|
|
@ -287,7 +294,7 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if (empty($_POST["persistformvar"])) {
|
||||
|
||||
if ($action == "add" && permission_exists('conference_room_add')) {
|
||||
//set default values
|
||||
|
|
@ -454,7 +461,7 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
//get the conference room details
|
||||
$conference_room_uuid = $_REQUEST["id"];
|
||||
$sql = "select * from v_conference_rooms ";
|
||||
|
|
@ -463,8 +470,8 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_room_uuid'] = $conference_room_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$conference_center_uuid = $row["conference_center_uuid"];
|
||||
$conference_room_name = $row["conference_room_name"];
|
||||
$profile = $row["profile"];
|
||||
|
|
@ -499,10 +506,10 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
$sql .= "and r.conference_room_uuid = :conference_room_uuid ";
|
||||
$sql .= "order by u.username asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_room_uuid'] = $conference_room_uuid;
|
||||
$parameters['conference_room_uuid'] = $conference_room_uuid ?? '';
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
$rows = $database->select($sql, $parameters ?? null, 'all');
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
$conference_room_users[$row['user_uuid']]['username'] = $row['username'];
|
||||
$conference_room_users[$row['user_uuid']]['conference_room_user_uuid'] = $row['conference_room_user_uuid'];
|
||||
|
|
@ -513,13 +520,13 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
//get the users array
|
||||
$sql = "select user_uuid, username from v_users ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
if (is_array($conference_room_users) && @sizeof($conference_room_users) != 0) {
|
||||
if (!empty($conference_room_users)) {
|
||||
$sql .= "and user_uuid not in ('".implode("','", array_keys($conference_room_users))."') ";
|
||||
}
|
||||
$sql .= "order by username asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$users = $database->select($sql, $parameters, 'all');
|
||||
$users = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//set default profile
|
||||
|
|
@ -527,10 +534,10 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
|
||||
//get default pins
|
||||
if (empty($moderator_pin)) {
|
||||
$moderator_pin = get_conference_pin($pin_length, $conference_room_uuid);
|
||||
$moderator_pin = get_conference_pin($pin_length ?? '', $conference_room_uuid ?? '');
|
||||
}
|
||||
if (empty($participant_pin)) {
|
||||
$participant_pin = get_conference_pin($pin_length, $conference_room_uuid);
|
||||
$participant_pin = get_conference_pin($pin_length ?? '', $conference_room_uuid ?? '');
|
||||
}
|
||||
|
||||
//format the pins
|
||||
|
|
@ -568,7 +575,7 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
|||
echo " <div class='heading'><b>".$text['title-conference_room']."</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'=>'conference_rooms.php']);
|
||||
if (is_uuid($conference_room_uuid)) {
|
||||
if (!empty($conference_room_uuid) && is_uuid($conference_room_uuid)) {
|
||||
if (permission_exists('conference_interactive_view')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-left: 15px;','link'=>'../conferences_active/conference_interactive.php?c='.urlencode($conference_room_uuid)]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,14 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$search = $_GET["search"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['conference_rooms'])) {
|
||||
if (!empty($_POST['conference_rooms'])) {
|
||||
$action = $_POST['action'];
|
||||
$toggle_field = $_POST['toggle_field'];
|
||||
$search = $_POST['search'];
|
||||
|
|
@ -55,7 +61,7 @@
|
|||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conference_rooms) && @sizeof($conference_rooms) != 0) {
|
||||
if (!empty($action) && !empty($conference_rooms)) {
|
||||
switch ($action) {
|
||||
case 'toggle':
|
||||
if (permission_exists('conference_room_edit')) {
|
||||
|
|
@ -72,13 +78,13 @@
|
|||
break;
|
||||
}
|
||||
|
||||
header('Location: conference_rooms.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
header('Location: conference_rooms.php'.(!empty($search) ? '?search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
//if the $_GET array exists then process it
|
||||
if (count($_GET) > 0 && empty($_GET["search"])) {
|
||||
if (!empty($_GET) && empty($_GET["search"])) {
|
||||
//get http GET variables and set them as php variables
|
||||
$conference_room_uuid = $_GET["conference_room_uuid"];
|
||||
$record = $_GET["record"];
|
||||
|
|
@ -167,8 +173,8 @@
|
|||
}
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//get the conference room count
|
||||
$conference_center = new conference_centers;
|
||||
|
|
@ -180,7 +186,7 @@
|
|||
$num_rows = $conference_center->room_count();
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = $search ? "&search=".$search : null;
|
||||
if (isset($_GET['page'])) {
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
|
|
@ -244,9 +250,9 @@
|
|||
}
|
||||
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();'>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'bridges.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>(!empty($search) ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'bridges.php','style'=>(empty($search) ? 'display: none;' : null)]);
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
|
||||
}
|
||||
echo " </form>\n";
|
||||
|
|
@ -273,7 +279,7 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('conference_room_add') || permission_exists('conference_room_edit') || permission_exists('conference_room_delete')) {
|
||||
echo " <th class='checkbox'>\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 " <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_order_by('conference_center_uuid', 'Conference UUID', $order_by, $order);
|
||||
|
|
@ -296,7 +302,7 @@
|
|||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
}
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('conference_room_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -482,7 +488,7 @@
|
|||
}
|
||||
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
|
||||
if (permission_exists('conference_room_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_room_edit') && $list_row_edit_button == '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";
|
||||
|
|
@ -495,7 +501,7 @@
|
|||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
echo "<div align='center'>".!empty($paging_controls)."</div>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -45,13 +45,16 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//set variables from the http values
|
||||
$order_by = $_GET["order_by"] != '' ? $_GET["order_by"] : 'start_epoch';
|
||||
$order = $_GET['order'] != '' ? $_GET['order'] : 'asc';
|
||||
$conference_session_uuid = $_GET["uuid"];
|
||||
$order_by = $_GET["order_by"] ?? '' ? $_GET["order_by"] : 'start_epoch';
|
||||
$order = $_GET['order'] ?? '' ? $_GET['order'] : 'asc';
|
||||
$conference_session_uuid = $_GET["uuid"] ?? '';
|
||||
|
||||
//add meeting_uuid to a session variable
|
||||
if (is_uuid($conference_session_uuid)) {
|
||||
if (!empty($conference_session_uuid) && is_uuid($conference_session_uuid)) {
|
||||
$_SESSION['meeting']['session_uuid'] = $conference_session_uuid;
|
||||
}
|
||||
|
||||
|
|
@ -60,10 +63,10 @@
|
|||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and conference_session_uuid = :conference_session_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_session_uuid'] = $_SESSION['meeting']['session_uuid'];
|
||||
$parameters['conference_session_uuid'] = $_SESSION['meeting']['session_uuid'] ?? '';
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$meeting_uuid = $row["meeting_uuid"];
|
||||
$recording = $row["recording"];
|
||||
$start_epoch = $row["start_epoch"];
|
||||
|
|
@ -73,23 +76,23 @@
|
|||
unset($sql, $parameters, $row);
|
||||
|
||||
//set the year, month and day based on the session start epoch
|
||||
$tmp_year = date("Y", $start_epoch);
|
||||
$tmp_month = date("M", $start_epoch);
|
||||
$tmp_day = date("d", $start_epoch);
|
||||
$tmp_year = date("Y", !empty($start_epoch));
|
||||
$tmp_month = date("M", !empty($start_epoch));
|
||||
$tmp_day = date("d", !empty($start_epoch));
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_conference_session_details ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and conference_session_uuid = :conference_session_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_session_uuid'] = $_SESSION['meeting']['session_uuid'];
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$parameters['conference_session_uuid'] = $_SESSION['meeting']['session_uuid'] ?? '';
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = '';
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
|
@ -101,8 +104,8 @@
|
|||
$sql .= order_by($order_by, $order);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_session_uuid'] = $_SESSION['meeting']['session_uuid'];
|
||||
$conference_session_details = $database->select($sql, $parameters, 'all');
|
||||
$parameters['conference_session_uuid'] = $_SESSION['meeting']['session_uuid'] ?? '';
|
||||
$conference_session_details = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//include the header
|
||||
|
|
@ -115,10 +118,10 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'conference_sessions.php']);
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) {
|
||||
if (!empty($row['conference_session_uuid']) && file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) {
|
||||
$tmp_name = $row['conference_session_uuid'].".mp3";
|
||||
}
|
||||
elseif (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) {
|
||||
elseif (!empty($row['conference_session_uuid']) && file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) {
|
||||
$tmp_name = $row['conference_session_uuid'].".wav";
|
||||
}
|
||||
if (!empty($tmp_name) && file_exists($tmp_dir.'/'.$tmp_name)) {
|
||||
|
|
@ -127,7 +130,7 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-play'],'icon'=>$_SESSION['theme']['button_icon_play'],'onclick'=>"window.open('".PROJECT_PATH."/app/recordings/recording_play.php?a=download&type=moh&filename=".urlencode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no');"]);
|
||||
}
|
||||
}
|
||||
if ($paging_controls_mini != '') {
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
|
@ -150,12 +153,12 @@
|
|||
echo "<th>".$text['label-time']."</th>\n";
|
||||
echo th_order_by('start_epoch', $text['label-start'], $order_by, $order);
|
||||
echo th_order_by('end_epoch', $text['label-end'], $order_by, $order);
|
||||
if (permission_exists('conference_session_details') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_session_details') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($conference_session_details) && sizeof($conference_session_details) != 0) {
|
||||
if (!empty($conference_session_details)) {
|
||||
foreach($conference_session_details as $row) {
|
||||
if (defined('TIME_24HR') && TIME_24HR == 1) {
|
||||
$start_date = date("j M Y H:i:s", $row['start_epoch']);
|
||||
|
|
@ -189,7 +192,7 @@
|
|||
echo " <td>".$time_difference." </td>\n";
|
||||
echo " <td>".$start_date." </td>\n";
|
||||
echo " <td>".$end_date." </td>\n";
|
||||
if (permission_exists('conference_session_details') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_session_details') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -46,15 +46,18 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['conference_sessions'])) {
|
||||
if (!empty($_POST['conference_sessions'])) {
|
||||
$action = $_POST['action'];
|
||||
$meeting_uuid = $_POST['meeting_uuid'];
|
||||
$conference_sessions = $_POST['conference_sessions'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conference_sessions) && @sizeof($conference_sessions) != 0) {
|
||||
if (!empty($action) && !empty($conference_sessions)) {
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
if (permission_exists('conference_session_delete')) {
|
||||
|
|
@ -70,12 +73,12 @@
|
|||
}
|
||||
|
||||
//set variables from the http values
|
||||
$meeting_uuid = $_GET["id"];
|
||||
$order_by = $_GET["order_by"] != '' ? $_GET["order_by"] : 'start_epoch';
|
||||
$order = $_GET["order"] != '' ? $_GET["order"] : 'desc';
|
||||
$meeting_uuid = $_GET["id"] ?? '';
|
||||
$order_by = $_GET["order_by"] ?? '' ? $_GET["order_by"] : 'start_epoch';
|
||||
$order = $_GET["order"] ?? '' ? $_GET["order"] : 'desc';
|
||||
|
||||
//add meeting_uuid to a session variable
|
||||
if (is_uuid($meeting_uuid)) {
|
||||
if (!empty($meeting_uuid) && is_uuid($meeting_uuid)) {
|
||||
$_SESSION['meeting']['uuid'] = $meeting_uuid;
|
||||
}
|
||||
|
||||
|
|
@ -84,15 +87,15 @@
|
|||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and meeting_uuid = :meeting_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['meeting_uuid'] = $_SESSION['meeting']['uuid'];
|
||||
$parameters['meeting_uuid'] = $_SESSION['meeting']['uuid'] ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = '';
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
|
@ -105,9 +108,9 @@
|
|||
$sql .= order_by($order_by, $order);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['meeting_uuid'] = $_SESSION['meeting']['uuid'];
|
||||
$parameters['meeting_uuid'] = $_SESSION['meeting']['uuid'] ?? '';
|
||||
$database = new database;
|
||||
$conference_sessions = $database->select($sql, $parameters, 'all');
|
||||
$conference_sessions = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -172,12 +175,12 @@
|
|||
echo th_order_by('profile', $text['label-profile'], $order_by, $order);
|
||||
//echo th_order_by('recording', $text['label-recording'], $order_by, $order);
|
||||
echo "<th>".$text['label-tools']."</th>\n";
|
||||
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if ($list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($conference_sessions) && sizeof($conference_sessions) != 0) {
|
||||
if (!empty($conference_sessions)) {
|
||||
$x = 0;
|
||||
foreach($conference_sessions as $row) {
|
||||
$tmp_year = date("Y", $row['start_epoch']);
|
||||
|
|
@ -232,7 +235,7 @@
|
|||
echo "</table>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if ($list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -21,8 +21,13 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$control_digits = '';
|
||||
$control_action = '';
|
||||
$control_data = '';
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_control_detail_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -31,12 +36,12 @@
|
|||
}
|
||||
|
||||
//set the parent uuid
|
||||
if (is_uuid($_GET["conference_control_uuid"])) {
|
||||
if (!empty($_GET["conference_control_uuid"]) && is_uuid($_GET["conference_control_uuid"])) {
|
||||
$conference_control_uuid = $_GET["conference_control_uuid"];
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
if (!empty($_POST)) {
|
||||
$control_digits = $_POST["control_digits"];
|
||||
$control_action = $_POST["control_action"];
|
||||
$control_data = $_POST["control_data"];
|
||||
|
|
@ -44,7 +49,7 @@
|
|||
}
|
||||
|
||||
//process the http post
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid
|
||||
if ($action == "update") {
|
||||
|
|
@ -79,7 +84,7 @@
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if (empty($_POST["persistformvar"])) {
|
||||
|
||||
$array['conference_control_details'][0]['conference_control_uuid'] = $conference_control_uuid;
|
||||
$array['conference_control_details'][0]['control_digits'] = $control_digits;
|
||||
|
|
@ -112,16 +117,16 @@
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$conference_control_detail_uuid = $_GET["id"];
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
$conference_control_detail_uuid = $_GET["id"] ?? '';
|
||||
$sql = "select * from v_conference_control_details ";
|
||||
$sql .= "where conference_control_detail_uuid = :conference_control_detail_uuid ";
|
||||
//$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['conference_control_detail_uuid'] = $conference_control_detail_uuid;
|
||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$control_digits = $row["control_digits"];
|
||||
$control_action = $row["control_action"];
|
||||
$control_data = $row["control_data"];
|
||||
|
|
@ -147,7 +152,7 @@
|
|||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-conference_control_detail']."</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','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'conference_control_edit.php?id='.urlencode($conference_control_uuid)]);
|
||||
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'=>'conference_control_edit.php?id='.urlencode($conference_control_uuid ?? '')]);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
|
|
@ -213,9 +218,9 @@
|
|||
echo "</table>";
|
||||
echo "<br /><br />";
|
||||
|
||||
echo "<input type='hidden' name='conference_control_uuid' value='".escape($conference_control_uuid)."'>\n";
|
||||
echo "<input type='hidden' name='conference_control_uuid' value='".escape($conference_control_uuid ?? '')."'>\n";
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='conference_control_detail_uuid' value='".escape($conference_control_detail_uuid)."'>\n";
|
||||
echo "<input type='hidden' name='conference_control_detail_uuid' value='".escape($conference_control_detail_uuid ?? '')."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -46,15 +46,18 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['conference_control_details'])) {
|
||||
if (!empty($_POST['conference_control_details'])) {
|
||||
$action = $_POST['action'];
|
||||
$conference_control_uuid = $_POST['conference_control_uuid'];
|
||||
$conference_control_details = $_POST['conference_control_details'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conference_control_details) && @sizeof($conference_control_details) != 0) {
|
||||
if (!empty($action) && !empty($conference_control_details)) {
|
||||
switch ($action) {
|
||||
case 'toggle':
|
||||
if (permission_exists('conference_control_detail_edit')) {
|
||||
|
|
@ -77,11 +80,11 @@
|
|||
}
|
||||
|
||||
//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
|
||||
$search = $_GET["search"];
|
||||
$search = $_GET["search"] ?? '';
|
||||
if (!empty($search)) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "control_digits like :search";
|
||||
|
|
@ -96,27 +99,27 @@
|
|||
$sql = "select count(conference_control_detail_uuid) ";
|
||||
$sql .= "from v_conference_control_details ";
|
||||
$sql .= "where conference_control_uuid = :conference_control_uuid ";
|
||||
$sql .= $sql_search;
|
||||
$parameters['conference_control_uuid'] = $conference_control_uuid;
|
||||
$sql .= $sql_search ?? '';
|
||||
$parameters['conference_control_uuid'] = $conference_control_uuid ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&id=".$conference_control_uuid;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&id=".!empty($conference_control_uuid);
|
||||
if (isset($_GET['page'])) {
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
}
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(conference_control_detail_uuid)', '*', $sql);
|
||||
$sql .= $sql_search;
|
||||
$sql .= $sql_search ?? '';
|
||||
$sql .= order_by($order_by, $order, 'control_digits', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$sql .= limit_offset($rows_per_page, !empty($offset));
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -129,7 +132,7 @@
|
|||
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'=>'margin-right: 15px; display: none;','link'=>'conference_controls.php']);
|
||||
if (permission_exists('conference_control_detail_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'name'=>'btn_add','collapse'=>'hide-xs','link'=>'conference_control_detail_edit.php?conference_control_uuid='.urlencode($_GET['id'])]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'name'=>'btn_add','collapse'=>'hide-xs','link'=>'conference_control_detail_edit.php?conference_control_uuid='.urlencode($_GET['id'] ?? '')]);
|
||||
}
|
||||
if (permission_exists('conference_control_detail_edit') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','collapse'=>'hide-xs','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
|
|
@ -150,7 +153,7 @@
|
|||
|
||||
echo "<form id='form_list' method='post' action='conference_control_details.php'>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='conference_control_uuid' value=\"".escape($conference_control_uuid)."\">\n";
|
||||
echo "<input type='hidden' name='conference_control_uuid' value=\"".escape($conference_control_uuid ?? '')."\">\n";
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
|
|
@ -163,12 +166,12 @@
|
|||
echo th_order_by('control_action', $text['label-control_action'], $order_by, $order, null, null, $param);
|
||||
echo th_order_by('control_data', $text['label-control_data'], $order_by, $order, null, "class='pct-50 hide-xs'", $param);
|
||||
echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order, null, "class='center'", $param);
|
||||
if (permission_exists('conference_control_detail_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
if (!empty($result)) {
|
||||
$x = 0;
|
||||
foreach ($result as $row) {
|
||||
if (permission_exists('conference_control_detail_edit')) {
|
||||
|
|
@ -200,7 +203,7 @@
|
|||
echo $text['label-'.$row['control_enabled']];
|
||||
}
|
||||
echo " </td>\n";
|
||||
if (permission_exists('conference_control_detail_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == '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";
|
||||
|
|
@ -213,7 +216,7 @@
|
|||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
echo "<div align='center'>".!empty($paging_controls)."</div>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
|
|
@ -237,4 +240,4 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$control_name = '';
|
||||
$control_description = '';
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_control_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -31,14 +35,14 @@
|
|||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
if (!empty($_POST)) {
|
||||
$control_name = $_POST["control_name"];
|
||||
$control_enabled = $_POST["control_enabled"] ?: 'false';
|
||||
$control_description = $_POST["control_description"];
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid from the POST
|
||||
if ($action == "update") {
|
||||
|
|
@ -107,15 +111,15 @@
|
|||
} //(is_array($_POST) && empty($_POST["persistformvar"]))
|
||||
|
||||
//pre-populate the form
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
if (!empty($_GET) && !empty($_POST["persistformvar"])) {
|
||||
$conference_control_uuid = $_GET["id"];
|
||||
$sql = "select * from v_conference_controls ";
|
||||
//$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "where conference_control_uuid = :conference_control_uuid ";
|
||||
$parameters['conference_control_uuid'] = $conference_control_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$control_name = $row["control_name"];
|
||||
$control_enabled = $row["control_enabled"];
|
||||
$control_description = $row["control_description"];
|
||||
|
|
|
|||
|
|
@ -46,15 +46,18 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['conference_controls'])) {
|
||||
if (!empty($_POST['conference_controls'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$conference_controls = $_POST['conference_controls'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conference_controls) && @sizeof($conference_controls) != 0) {
|
||||
if (!empty($action) && !empty($conference_controls)) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('conference_control_add')) {
|
||||
|
|
@ -76,16 +79,16 @@
|
|||
break;
|
||||
}
|
||||
|
||||
header('Location: conference_controls.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
header('Location: conference_controls.php'.(!empty($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
|
||||
$search = strtolower($_GET["search"]);
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
$sql_search = "where (";
|
||||
$sql_search .= " lower(control_name) like :search ";
|
||||
|
|
@ -96,14 +99,14 @@
|
|||
|
||||
//get the count
|
||||
$sql = "select count(conference_control_uuid) from v_conference_controls ";
|
||||
$sql .= $sql_search;
|
||||
$sql .= $sql_search ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = $search ? "&search=".$search : null;
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
|
@ -113,7 +116,7 @@
|
|||
$sql .= order_by($order_by, $order, 'control_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$conference_controls = $database->select($sql, $parameters, 'all');
|
||||
$conference_controls = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -173,18 +176,18 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('conference_control_add') || permission_exists('conference_control_edit') || permission_exists('conference_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);' ".($conference_controls ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($conference_controls) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo th_order_by('control_name', $text['label-control_name'], $order_by, $order);
|
||||
echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order, null, "class='center shrink'");
|
||||
echo " <th class='hide-sm-dn'>".$text['label-control_description']."</th>\n";
|
||||
if (permission_exists('conference_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_control_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($conference_controls) && @sizeof($conference_controls) != 0) {
|
||||
if (!empty($conference_controls)) {
|
||||
$x = 0;
|
||||
foreach ($conference_controls as $row) {
|
||||
if (permission_exists('conference_control_edit')) {
|
||||
|
|
@ -215,7 +218,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['control_description'])."</td>\n";
|
||||
if (permission_exists('conference_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_control_edit') && $list_row_edit_button == '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";
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$profile_name = '';
|
||||
$profile_description = '';
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_profile_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -31,13 +35,13 @@
|
|||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
if (!empty($_POST)) {
|
||||
$profile_name = $_POST["profile_name"];
|
||||
$profile_enabled = $_POST["profile_enabled"] ?: 'false';
|
||||
$profile_description = $_POST["profile_description"];
|
||||
}
|
||||
//check to see if the http post exists
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid
|
||||
if ($action == "update") {
|
||||
|
|
@ -72,7 +76,7 @@
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if (empty($_POST["persistformvar"])) {
|
||||
|
||||
$array['conference_profiles'][0]['profile_name'] = $profile_name;
|
||||
$array['conference_profiles'][0]['profile_enabled'] = $profile_enabled;
|
||||
|
|
@ -103,7 +107,7 @@
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
$conference_profile_uuid = $_GET["id"];
|
||||
$sql = "select * from v_conference_profiles ";
|
||||
$sql .= "where conference_profile_uuid = :conference_profile_uuid ";
|
||||
|
|
@ -111,7 +115,7 @@
|
|||
$parameters['conference_profile_uuid'] = $conference_profile_uuid;
|
||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$profile_name = $row["profile_name"];
|
||||
$profile_enabled = $row["profile_enabled"];
|
||||
|
|
|
|||
|
|
@ -21,8 +21,13 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$profile_param_name = '';
|
||||
$profile_param_value = '';
|
||||
$profile_param_description = '';
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_profile_param_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -31,12 +36,12 @@
|
|||
}
|
||||
|
||||
//set the parent uuid
|
||||
if (is_uuid($_GET["conference_profile_uuid"])) {
|
||||
if (!empty($_GET["conference_profile_uuid"]) && is_uuid($_GET["conference_profile_uuid"])) {
|
||||
$conference_profile_uuid = $_GET["conference_profile_uuid"];
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
if (!empty($_POST)) {
|
||||
$profile_param_name = $_POST["profile_param_name"];
|
||||
$profile_param_value = $_POST["profile_param_value"];
|
||||
$profile_param_enabled = $_POST["profile_param_enabled"] ?: 'false';
|
||||
|
|
@ -44,7 +49,7 @@
|
|||
}
|
||||
|
||||
//process the http post if it exists
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid
|
||||
if ($action == "update") {
|
||||
|
|
@ -79,7 +84,7 @@
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if (!empty($_POST["persistformvar"])) {
|
||||
|
||||
$array['conference_profile_params'][0]['conference_profile_uuid'] = $conference_profile_uuid;
|
||||
$array['conference_profile_params'][0]['profile_param_name'] = $profile_param_name;
|
||||
|
|
@ -112,14 +117,14 @@
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$conference_profile_param_uuid = $_GET["id"];
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
$conference_profile_param_uuid = $_GET["id"] ?? '';
|
||||
$sql = "select * from v_conference_profile_params ";
|
||||
$sql .= "where conference_profile_param_uuid = :conference_profile_param_uuid ";
|
||||
$parameters['conference_profile_param_uuid'] = $conference_profile_param_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row)) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$profile_param_name = $row["profile_param_name"];
|
||||
$profile_param_value = $row["profile_param_value"];
|
||||
$profile_param_enabled = $row["profile_param_enabled"];
|
||||
|
|
|
|||
|
|
@ -22,15 +22,18 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['conference_profile_params'])) {
|
||||
if (!empty($_POST['conference_profile_params'])) {
|
||||
$action = $_POST['action'];
|
||||
$conference_profile_uuid = $_POST['conference_profile_uuid'];
|
||||
$conference_profile_params = $_POST['conference_profile_params'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conference_profile_params) && @sizeof($conference_profile_params) != 0) {
|
||||
if (!empty($action) && !empty($conference_profile_params)) {
|
||||
switch ($action) {
|
||||
case 'toggle':
|
||||
if (permission_exists('conference_profile_param_edit')) {
|
||||
|
|
@ -53,8 +56,8 @@
|
|||
}
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(conference_profile_param_uuid) ";
|
||||
|
|
@ -65,10 +68,10 @@
|
|||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&id=".$conference_profile_uuid;
|
||||
if (isset($_GET['page'])) {
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
}
|
||||
|
|
@ -76,9 +79,9 @@
|
|||
//get the list
|
||||
$sql = str_replace('count(conference_profile_param_uuid)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order, 'profile_param_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$sql .= limit_offset($rows_per_page ?? '', $offset ?? '');
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -121,19 +124,19 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('conference_profile_param_edit') || permission_exists('conference_profile_param_delete')) {
|
||||
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_order_by('profile_param_name', $text['label-profile_param_name'], $order_by, $order, null, null, $param);
|
||||
echo th_order_by('profile_param_value', $text['label-profile_param_value'], $order_by, $order, null, "class='pct-40'", $param);
|
||||
echo th_order_by('profile_param_enabled', $text['label-profile_param_enabled'], $order_by, $order, null, "class='center'", $param);
|
||||
echo th_order_by('profile_param_description', $text['label-profile_param_description'], $order_by, $order, null, "class='hide-sm-dn'", $param);
|
||||
if (permission_exists('conference_profile_param_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
if (!empty($result)) {
|
||||
$x = 0;
|
||||
foreach ($result as $row) {
|
||||
if (permission_exists('conference_profile_param_edit')) {
|
||||
|
|
@ -165,7 +168,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['profile_param_description'])." </td>\n";
|
||||
if (permission_exists('conference_profile_param_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button == '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";
|
||||
|
|
@ -178,7 +181,7 @@
|
|||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
echo "<div align='center'>".!empty($paging_controls)."</div>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
|
|
@ -200,4 +203,4 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -45,15 +45,21 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$search = $_GET["search"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['conference_profiles'])) {
|
||||
if (!empty($_POST['conference_profiles'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$conference_profiles = $_POST['conference_profiles'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conference_profiles) && @sizeof($conference_profiles) != 0) {
|
||||
if (!empty($action) && !empty($conference_profiles)) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('conference_profile_add')) {
|
||||
|
|
@ -75,13 +81,13 @@
|
|||
break;
|
||||
}
|
||||
|
||||
header('Location: conference_profiles.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
header('Location: conference_profiles.php'.(!empty($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 (isset($_GET["search"])) {
|
||||
|
|
@ -99,14 +105,14 @@
|
|||
$sql .= "where ".$sql_search;
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(conference_profile_uuid)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order, 'profile_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$sql .= limit_offset($rows_per_page ?? '', $offset ?? '');
|
||||
$database = new database;
|
||||
$conference_profiles = $database->select($sql, $parameters, 'all');
|
||||
$conference_profiles = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -137,7 +143,7 @@
|
|||
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'=>'conference_profiles.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
|
||||
}
|
||||
echo " </form>\n";
|
||||
|
|
@ -166,18 +172,18 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('conference_profile_add') || permission_exists('conference_profile_edit') || permission_exists('conference_profile_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($conference_profiles ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($conference_profiles) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo th_order_by('profile_name', $text['label-profile_name'], $order_by, $order);
|
||||
echo th_order_by('profile_enabled', $text['label-profile_enabled'], $order_by, $order, null, "class='center'");
|
||||
echo " <th class='hide-sm-dn'>".$text['label-profile_description']."</th>\n";
|
||||
if (permission_exists('conference_profile_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_profile_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($conference_profiles) && @sizeof($conference_profiles) != 0) {
|
||||
if (!empty($conference_profiles)) {
|
||||
$x = 0;
|
||||
foreach ($conference_profiles as $row) {
|
||||
if (permission_exists('conference_profile_edit')) {
|
||||
|
|
@ -208,7 +214,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['profile_description'])."</td>\n";
|
||||
if (permission_exists('conference_profile_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_profile_edit') && $list_row_edit_button == '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";
|
||||
|
|
@ -221,7 +227,7 @@
|
|||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||
echo "<div align='center'>".!empty($paging_controls)."</div>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,16 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set the defaults
|
||||
$conference_name = '';
|
||||
$conference_extension = '';
|
||||
$conference_pin_number = '';
|
||||
$conference_flags = '';
|
||||
$conference_account_code = '';
|
||||
$conference_description = '';
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_uuid = $_REQUEST["id"];
|
||||
}
|
||||
|
|
@ -55,7 +63,7 @@
|
|||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
if (!empty($_POST)) {
|
||||
$dialplan_uuid = $_POST["dialplan_uuid"];
|
||||
$conference_name = $_POST["conference_name"];
|
||||
$conference_extension = $_POST["conference_extension"];
|
||||
|
|
@ -74,7 +82,7 @@
|
|||
}
|
||||
|
||||
//delete the user from the v_conference_users
|
||||
if ($_GET["a"] == "delete" && permission_exists("conference_delete")) {
|
||||
if (!empty($_GET["a"]) && $_GET["a"] == "delete" && permission_exists("conference_delete")) {
|
||||
|
||||
$user_uuid = $_REQUEST["user_uuid"];
|
||||
$conference_uuid = $_REQUEST["id"];
|
||||
|
|
@ -101,7 +109,7 @@
|
|||
}
|
||||
|
||||
//add the user to the v_conference_users
|
||||
if (is_uuid($_REQUEST["user_uuid"]) && is_uuid($_REQUEST["id"]) && $_GET["a"] != "delete") {
|
||||
if (!empty($_REQUEST["user_uuid"]) && is_uuid($_REQUEST["user_uuid"]) && is_uuid($_REQUEST["id"]) && $_GET["a"] != "delete") {
|
||||
//set the variables
|
||||
$user_uuid = $_REQUEST["user_uuid"];
|
||||
$conference_uuid = $_REQUEST["id"];
|
||||
|
|
@ -131,7 +139,7 @@
|
|||
}
|
||||
|
||||
//process http post variables
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the conference id
|
||||
if ($action == "add") {
|
||||
|
|
@ -176,7 +184,7 @@
|
|||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if (!empty($_POST["persistformvar"])) {
|
||||
|
||||
//update the conference extension
|
||||
$array['conferences'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
|
|
@ -245,7 +253,7 @@
|
|||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['dialplan_uuid'] = $dialplan_uuid;
|
||||
$database = new database;
|
||||
$database->execute($sql, $parameters);
|
||||
$database->execute($sql, $parameters ?? null);
|
||||
unset($sql, $parameters);
|
||||
|
||||
//add the message
|
||||
|
|
@ -271,7 +279,7 @@
|
|||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
if (!empty($_GET) && !empty($_POST["persistformvar"])) {
|
||||
$conference_uuid = $_GET["id"];
|
||||
$sql = "select * from v_conferences ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
|
|
@ -279,8 +287,8 @@
|
|||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_uuid'] = $conference_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$row = $database->select($sql, $parameters ?? null, 'row');
|
||||
if (!empty($row)) {
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$conference_name = $row["conference_name"];
|
||||
$conference_extension = $row["conference_extension"];
|
||||
|
|
@ -316,9 +324,9 @@
|
|||
$sql .= "and e.domain_uuid = :domain_uuid ";
|
||||
$sql .= "and e.conference_uuid = :conference_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['conference_uuid'] = $conference_uuid;
|
||||
$parameters['conference_uuid'] = $conference_uuid ?? '';
|
||||
$database = new database;
|
||||
$conference_users = $database->select($sql, $parameters, 'all');
|
||||
$conference_users = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the users
|
||||
|
|
@ -327,11 +335,11 @@
|
|||
$sql .= "and user_enabled = 'true' ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$users = $database->select($sql, $parameters, 'all');
|
||||
$users = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//set the default
|
||||
if ($conference_profile == "") { $conference_profile = "default"; }
|
||||
if (empty($conference_profile)) { $conference_profile = "default"; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
@ -411,7 +419,7 @@
|
|||
echo " <td class='vncell' valign='top'>".$text['label-user_list']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
|
||||
if (is_array($conference_users) && @sizeof($conference_users) != 0) {
|
||||
if (!empty($conference_users)) {
|
||||
echo " <table width='50%'>\n";
|
||||
foreach ($conference_users as $field) {
|
||||
echo " <tr>\n";
|
||||
|
|
@ -557,7 +565,7 @@
|
|||
echo "<br><br>";
|
||||
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n";
|
||||
echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid ?? '')."'>\n";
|
||||
echo "<input type='hidden' name='conference_uuid' value='".escape($conference_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
|
|
|||
|
|
@ -46,15 +46,21 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get posted data
|
||||
if (is_array($_POST['conferences'])) {
|
||||
if (!empty($_POST['conferences'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$conferences = $_POST['conferences'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($conferences) && @sizeof($conferences) != 0) {
|
||||
if (!empty($action) && !empty($conferences)) {
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('conference_add')) {
|
||||
|
|
@ -81,11 +87,11 @@
|
|||
}
|
||||
|
||||
//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
|
||||
$search = strtolower($_GET["search"]);
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "lower(conference_name) like :search ";
|
||||
|
|
@ -101,7 +107,7 @@
|
|||
//show all extensions
|
||||
$sql = "select count(*) from v_conferences ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] != "all" || !permission_exists('conference_all')) {
|
||||
if ($show != "all" || !permission_exists('conference_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -114,17 +120,17 @@
|
|||
$sql .= "and u.user_uuid = :user_uuid ";
|
||||
$parameters['user_uuid'] = $_SESSION['user_uuid'];
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$sql .= $sql_search ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($_GET['show'] == "all" && permission_exists('conference_all')) {
|
||||
if ($show == "all" && permission_exists('conference_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'];
|
||||
$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);
|
||||
|
|
@ -135,7 +141,7 @@
|
|||
$sql .= order_by($order_by, $order);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$conferences = $database->select($sql, $parameters, 'all');
|
||||
$conferences = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -167,7 +173,7 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('conference_all')) {
|
||||
if ($_GET['show'] == 'all') {
|
||||
if ($show == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
else {
|
||||
|
|
@ -206,10 +212,10 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('conference_add') || permission_exists('conference_edit') || permission_exists('conference_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($conferences ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($conferences) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('conference_all')) {
|
||||
if ($show == "all" && permission_exists('conference_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('conference_name', $text['table-name'], $order_by, $order);
|
||||
|
|
@ -219,12 +225,12 @@
|
|||
echo "<th style='text-align: center;'>".$text['label-tools']."</th>\n";
|
||||
echo th_order_by('conference_enabled', $text['table-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('conference_description', $text['table-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('conference_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($conferences) && @sizeof($conferences) != 0) {
|
||||
if (!empty($conferences)) {
|
||||
$x = 0;
|
||||
foreach($conferences as $row) {
|
||||
if (permission_exists('conference_edit')) {
|
||||
|
|
@ -237,7 +243,7 @@
|
|||
echo " <input type='hidden' name='conferences[$x][uuid]' value='".escape($row['conference_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('conference_all')) {
|
||||
if ($show == "all" && permission_exists('conference_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
|
|
@ -273,7 +279,7 @@
|
|||
echo $text['label-'.$row['conference_enabled']];
|
||||
}
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_description'])." </td>\n";
|
||||
if (permission_exists('conference_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
|
||||
//replace the space with underscore
|
||||
$conference_name = $conference_id.'@'.$_SESSION['domain_name'];
|
||||
$conference_name = !empty($conference_id).'@'.$_SESSION['domain_name'];
|
||||
|
||||
//create the conference list command
|
||||
$switch_cmd = "conference '".$conference_name."' xml_list";
|
||||
|
|
@ -276,4 +276,4 @@
|
|||
echo "<br /><br />";
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -46,15 +46,21 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set additional variables
|
||||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
|
||||
//get posted data
|
||||
if (is_array($_POST['contacts'])) {
|
||||
if (!empty($_POST['contacts'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
$contacts = $_POST['contacts'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($contacts) && @sizeof($contacts) != 0) {
|
||||
if (!empty($action) && !empty($contacts)) {
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
if (permission_exists('contact_delete')) {
|
||||
|
|
@ -64,7 +70,7 @@
|
|||
break;
|
||||
}
|
||||
|
||||
header('Location: contacts.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
header('Location: contacts.php'.(!empty($search) ? '?search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -90,14 +96,14 @@
|
|||
$sql .= " contact_uuid in ( ";
|
||||
$sql .= " select contact_uuid from v_contact_groups ";
|
||||
$sql .= " where ";
|
||||
if (is_array($user_group_uuids) && @sizeof($user_group_uuids) != 0) {
|
||||
if (!empty($user_group_uuids)) {
|
||||
foreach ($user_group_uuids as $index => $user_group_uuid) {
|
||||
if (is_uuid($user_group_uuid)) {
|
||||
$sql_where_or[] = "group_uuid = :group_uuid_".$index;
|
||||
$parameters['group_uuid_'.$index] = $user_group_uuid;
|
||||
}
|
||||
}
|
||||
if (is_array($sql_where_or) && @sizeof($sql_where_or) != 0) {
|
||||
if (!empty($sql_where_or)) {
|
||||
$sql .= " ( ".implode(' or ', $sql_where_or)." ) ";
|
||||
}
|
||||
unset($sql_where_or, $index, $user_group_uuid);
|
||||
|
|
@ -113,10 +119,10 @@
|
|||
$sql .= ") ";
|
||||
}
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$parameters['group_uuid'] = $_SESSION['group_uuid'];
|
||||
$parameters['group_uuid'] = $_SESSION['group_uuid'] ?? '';
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach($result as $row) {
|
||||
$contact_sync_sources[$row['contact_uuid']][] = $row['contact_setting_value'];
|
||||
}
|
||||
|
|
@ -124,11 +130,11 @@
|
|||
unset($sql, $parameters, $result);
|
||||
|
||||
//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
|
||||
$search = strtolower($_GET["search"]);
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
if (!empty($search)) {
|
||||
if (is_numeric($search)) {
|
||||
$sql_search .= "and contact_uuid in ( ";
|
||||
|
|
@ -186,7 +192,7 @@
|
|||
$sql = "select count(*) ";
|
||||
$sql .= "from v_contacts as c ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] != "all" || !permission_exists('contact_all')) {
|
||||
if ($show != "all" || !permission_exists('contact_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -195,14 +201,14 @@
|
|||
$sql .= " contact_uuid in ( ";
|
||||
$sql .= " select contact_uuid from v_contact_groups ";
|
||||
$sql .= " where ";
|
||||
if (is_array($user_group_uuids) && @sizeof($user_group_uuids) != 0) {
|
||||
if (!empty($user_group_uuids)) {
|
||||
foreach ($user_group_uuids as $index => $user_group_uuid) {
|
||||
if (is_uuid($user_group_uuid)) {
|
||||
$sql_where_or[] = "group_uuid = :group_uuid_".$index;
|
||||
$parameters['group_uuid_'.$index] = $user_group_uuid;
|
||||
}
|
||||
}
|
||||
if (is_array($sql_where_or) && @sizeof($sql_where_or) != 0) {
|
||||
if (!empty($sql_where_or)) {
|
||||
$sql .= " ( ".implode(' or ', $sql_where_or)." ) ";
|
||||
}
|
||||
unset($sql_where_or, $index, $user_group_uuid);
|
||||
|
|
@ -218,17 +224,17 @@
|
|||
$sql .= ") ";
|
||||
$parameters['user_uuid'] = $_SESSION['user_uuid'];
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$sql .= $sql_search ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? null, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".urlencode($search);
|
||||
if ($_GET['show'] == "all" && permission_exists('contact_all')) {
|
||||
if ($show == "all" && permission_exists('contact_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'];
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); //bottom
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true); //top
|
||||
|
|
@ -239,7 +245,7 @@
|
|||
$sql .= "(select a.contact_attachment_uuid from v_contact_attachments as a where a.contact_uuid = c.contact_uuid and a.attachment_primary = 1) as contact_attachment_uuid ";
|
||||
$sql .= "from v_contacts as c ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] != "all" || !permission_exists('contact_all')) {
|
||||
if ($show != "all" || !permission_exists('contact_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
|
@ -248,14 +254,14 @@
|
|||
$sql .= " contact_uuid in ( ";
|
||||
$sql .= " select contact_uuid from v_contact_groups ";
|
||||
$sql .= " where ";
|
||||
if (is_array($user_group_uuids) && @sizeof($user_group_uuids) != 0) {
|
||||
if (!empty($user_group_uuids)) {
|
||||
foreach ($user_group_uuids as $index => $user_group_uuid) {
|
||||
if (is_uuid($user_group_uuid)) {
|
||||
$sql_where_or[] = "group_uuid = :group_uuid_".$index;
|
||||
$parameters['group_uuid_'.$index] = $user_group_uuid;
|
||||
}
|
||||
}
|
||||
if (is_array($sql_where_or) && @sizeof($sql_where_or) != 0) {
|
||||
if (!empty($sql_where_or)) {
|
||||
$sql .= " ( ".implode(' or ', $sql_where_or)." ) ";
|
||||
}
|
||||
unset($sql_where_or, $index, $user_group_uuid);
|
||||
|
|
@ -271,15 +277,15 @@
|
|||
$sql .= ") ";
|
||||
$parameters['user_uuid'] = $_SESSION['user_uuid'];
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$sql .= $sql_search ?? '';
|
||||
$database = new database;
|
||||
if ($order_by != '') {
|
||||
if (!empty($order_by)) {
|
||||
$sql .= order_by($order_by, $order);
|
||||
$sql .= ", contact_organization asc ";
|
||||
}
|
||||
else {
|
||||
$contact_default_sort_column = $_SESSION['contacts']['default_sort_column']['text'] != '' ? $_SESSION['contacts']['default_sort_column']['text'] : "last_mod_date";
|
||||
$contact_default_sort_order = $_SESSION['contacts']['default_sort_order']['text'] != '' ? $_SESSION['contacts']['default_sort_order']['text'] : "desc";
|
||||
$contact_default_sort_column = !empty($_SESSION['contacts']['default_sort_column']['text']) ? $_SESSION['contacts']['default_sort_column']['text'] : "last_mod_date";
|
||||
$contact_default_sort_order = !empty($_SESSION['contacts']['default_sort_order']['text']) ? $_SESSION['contacts']['default_sort_order']['text'] : "desc";
|
||||
|
||||
$sql .= order_by($contact_default_sort_column, $contact_default_sort_order);
|
||||
if ($db_type == "pgsql") {
|
||||
|
|
@ -288,7 +294,7 @@
|
|||
}
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$contacts = $database->select($sql, $parameters, 'all');
|
||||
$contacts = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -329,17 +335,17 @@
|
|||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('contact_all')) {
|
||||
if ($_GET['show'] == 'all') {
|
||||
if ($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=&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=&show=all'.(!empty($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','collapse'=>'hide-sm-dn']);
|
||||
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','collapse'=>'hide-sm-dn','link'=>'contacts.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
}
|
||||
echo " </form>\n";
|
||||
|
|
@ -362,10 +368,10 @@
|
|||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('contact_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($contacts ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($contacts) ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('contact_all')) {
|
||||
if ($show == "all" && permission_exists('contact_all')) {
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('contact_type', $text['label-contact_type'], $order_by, $order);
|
||||
|
|
@ -377,12 +383,12 @@
|
|||
echo th_order_by('contact_title', $text['label-contact_title'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
echo th_order_by('contact_role', $text['label-contact_role'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
echo "<th class='shrink hide-sm-dn'> </th>\n";
|
||||
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if ($list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($contacts) && @sizeof($contacts) != 0) {
|
||||
if (!empty($contacts)) {
|
||||
$x = 0;
|
||||
foreach($contacts as $row) {
|
||||
$list_row_url = "contact_view.php?id=".urlencode($row['contact_uuid'])."&query_string=".urlencode($_SERVER["QUERY_STRING"]);
|
||||
|
|
@ -393,7 +399,7 @@
|
|||
echo " <input type='hidden' name='contacts[$x][uuid]' value='".escape($row['contact_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('contact_all')) {
|
||||
if ($show == "all" && permission_exists('contact_all')) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
|
|
@ -415,7 +421,7 @@
|
|||
echo " <td class='overflow hide-sm-dn'>".escape($row['contact_title'])." </td>\n";
|
||||
echo " <td class='overflow hide-sm-dn'>".escape($row['contact_role'])." </td>\n";
|
||||
echo " <td class='hide-sm-dn'>";
|
||||
if (is_array($contact_sync_sources[$row['contact_uuid']]) && @sizeof($contact_sync_sources[$row['contact_uuid']]) != 0) {
|
||||
if (!empty($contact_sync_sources[$row['contact_uuid']])) {
|
||||
foreach ($contact_sync_sources[$row['contact_uuid']] as $contact_sync_source) {
|
||||
switch ($contact_sync_source) {
|
||||
case 'google': echo "<img src='resources/images/icon_gcontacts.png' style='width: 21px; height: 21px; border: none; padding-left: 2px;' alt='".$text['label-contact_google']."'>"; break;
|
||||
|
|
@ -426,7 +432,7 @@
|
|||
echo " ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if ($list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue