Portions created by the Initial Developer are Copyright (C) 2008-2024 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ //includes files require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once "resources/check_auth.php"; require_once "resources/paging.php"; //check permissions if (!permission_exists('conference_session_view')) { echo "access denied"; exit; } //add multi-lingual support $language = new text; $text = $language->get(); //set from session variables $list_row_edit_button = $settings->get('theme', 'list_row_edit_button', false); //get the http post data 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 (!empty($action) && !empty($conference_sessions)) { switch ($action) { case 'delete': if (permission_exists('conference_session_delete')) { $obj = new conference_centers; $obj->meeting_uuid = $meeting_uuid; $obj->delete_conference_sessions($conference_sessions); } break; } header('Location: conference_sessions.php?id='.urlencode($meeting_uuid)); exit; } //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'; //add meeting_uuid to a session variable if (!empty($meeting_uuid) && is_uuid($meeting_uuid)) { $_SESSION['meeting']['uuid'] = $meeting_uuid; } //prepare to page the results $sql = "select count(*) from v_conference_sessions "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and meeting_uuid = :meeting_uuid "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $parameters['meeting_uuid'] = $_SESSION['meeting']['uuid'] ?? ''; $num_rows = $database->select($sql, $parameters ?? null, 'column'); unset($sql, $parameters); //prepare to page the results $rows_per_page = $settings->get('domain', 'paging', 50); $param = ''; $page = isset($_GET['page']) ? $_GET['page'] : 0; list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true); $offset = $rows_per_page * $page; //get the list $sql = "select * from v_conference_sessions "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and meeting_uuid = :meeting_uuid "; $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'] ?? ''; $conference_sessions = $database->select($sql, $parameters ?? null, 'all'); unset($sql, $parameters); //create token $object = new token; $token = $object->create($_SERVER['PHP_SELF']); //includes the header $document['title'] = $text['title-conference_sessions']; require_once "resources/header.php"; //styles echo "\n"; echo "\n"; echo "\n"; //show the content echo "
\n"; echo "
".$text['title-conference_sessions']."
".number_format($num_rows)."
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','link'=>'conference_rooms.php']); if (permission_exists('conference_session_delete') && $conference_sessions) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$settings->get('theme', 'button_icon_delete'),'name'=>'btn_delete','style'=>'margin-left: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } if ($paging_controls_mini != '') { echo "".$paging_controls_mini."\n"; } echo "
\n"; echo "
\n"; echo "
\n"; if (permission_exists('conference_session_delete') && $conference_sessions) { echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); } echo $text['description-conference_sessions']."\n"; echo "

\n"; echo "
\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; if (permission_exists('conference_session_delete')) { echo " \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); echo "\n"; echo th_order_by('profile', $text['label-profile'], $order_by, $order); //echo th_order_by('recording', $text['label-recording'], $order_by, $order); echo "\n"; if ($list_row_edit_button) { echo " \n"; } echo "\n"; if (!empty($conference_sessions)) { $x = 0; foreach($conference_sessions as $row) { $tmp_year = date("Y", $row['start_epoch']); $tmp_month = date("M", $row['start_epoch']); $tmp_day = date("d", $row['start_epoch']); if (defined('TIME_24HR') && TIME_24HR == 1) { $start_date = date("j M Y H:i:s", $row['start_epoch']); $end_date = date("j M Y H:i:s", $row['end_epoch']); } else { $start_date = date("j M Y h:i:sa", $row['start_epoch']); $end_date = date("j M Y h:i:sa", $row['end_epoch']); } $time_difference = ''; if (!empty($row['end_epoch'])) { $time_difference = $row['end_epoch'] - $row['start_epoch']; $time_difference = gmdate("G:i:s", $time_difference); } if (!empty($row['start_epoch'])) { $list_row_url = "conference_session_details.php?uuid=".urlencode($row['conference_session_uuid']); echo "\n"; if (permission_exists('conference_session_delete')) { echo " \n"; } echo " \n"; echo " \n"; echo " \n"; echo " \n"; $recording_name = $row['recording']; echo " \n"; if ($list_row_edit_button) { echo " \n"; } echo "\n"; $x++; } } unset($result); } echo "
\n"; echo " \n"; echo " ".$text['label-time']."".$text['label-tools']." 
\n"; echo " \n"; echo " \n"; echo " ".$start_date." ".$end_date." ".$time_difference." ".escape($row['profile'])." \n"; echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$settings->get('theme', 'button_icon_view'),'link'=>$list_row_url]); echo "
\n"; echo "
\n"; echo "
\n"; echo "
".$paging_controls."
\n"; echo "\n"; echo "
\n"; //include the footer require_once "resources/footer.php"; ?>