28 lines
1021 B
PHP
28 lines
1021 B
PHP
<?php
|
|
|
|
require_once 'single_sign_on.php';
|
|
|
|
if (isset($_GET['s'])) { $FOCUS = $_GET['s'] ; }
|
|
else { $FOCUS = "all"; }
|
|
|
|
// Access control: conf_uinforecord.id=6 contains comma-separated conf_user IDs
|
|
$allowed_ids_csv = '';
|
|
$row6 = single_row_select("SELECT value FROM conf_uinforecord WHERE id=6", 0);
|
|
if ($row6 && isset($row6['value'])) { $allowed_ids_csv = $row6['value']; }
|
|
$allowed_ids = array_filter(array_map('trim', explode(',', (string)$allowed_ids_csv)));
|
|
$current_uid = isset($USER['conf_id']) ? (string)$USER['conf_id'] : '';
|
|
$has_access = in_array($current_uid, $allowed_ids, true);
|
|
|
|
$MY_TITLE = "Session Report";
|
|
$MY_CRUMB = "Report";
|
|
|
|
if ($has_access) {
|
|
$CONTENT = "<activityreport :which='{$FOCUS}'></activityreport>";
|
|
} else {
|
|
$CONTENT = "<div class=\"bg-yellow-50 border border-yellow-200 text-yellow-900 p-4 rounded\">"
|
|
. "<strong>Access restricted.</strong> If you need access to this report, please contact the site administrator."
|
|
. "</div>";
|
|
}
|
|
|
|
include 'layout.php';
|