Глобальная проверка на доступ к системе

This commit is contained in:
RomanGolienko 2024-12-13 17:13:04 +03:00
parent b4345c1e55
commit 980b761c4b
1 changed files with 6 additions and 3 deletions

View File

@ -3,10 +3,13 @@
include_once "inc/attendancelog.php"; include_once "inc/attendancelog.php";
global $DB; global $DB;
if (isset($_SESSION['user']['fio'])){ if (isset($_SESSION['user']['fio'])){
// $class = new attendancelog($DB, $_SESSION['user']['fio']);
$class = new attendancelog($DB, $_SESSION['user']['fio']); $class = new attendancelog($DB, $_SESSION['user']['fio']);
$OUT = $class->HTML(); $dostup = $class->currentUserInfo();
if($dostup != 0){
$OUT = $class->HTML();
}else{
$OUT = '<h1>У вас нет доступа к модулю!</h1>';
}
} else { } else {
} }