From b66ca403557e95fb059a3fdb8d62e25879069441 Mon Sep 17 00:00:00 2001 From: RomanGolienko Date: Tue, 24 Dec 2024 13:45:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A7=D0=B0=D1=81=D1=82=D0=B8=D1=87=D0=BD?= =?UTF-8?q?=D0=BE=D0=B5=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B8=20=D1=80?= =?UTF-8?q?=D0=BE=D0=BB=D0=B8=20=D1=81=D0=B5=D0=BA=D1=80=D0=B5=D1=82=D0=B0?= =?UTF-8?q?=D1=80=D1=8F=20=D0=B4=D0=B5=D0=BA=D0=B0=D0=BD=D0=B0=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/attendancelog.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/inc/attendancelog.php b/inc/attendancelog.php index b270d50..9812d97 100644 --- a/inc/attendancelog.php +++ b/inc/attendancelog.php @@ -8,9 +8,9 @@ class attendancelog { } public function currentUserInfo(){ $currentUserInfo = array(); + $currentUserInfo['user_id'] = $_SESSION['user']['id']; if(isset($_SESSION['user']['teacher'])) { $currentUserInfo['role'] = 'teacher'; - $currentUserInfo['user_id'] = $_SESSION['user']['id']; $currentUserInfo['teacher_id'] = $_SESSION['user']['teacher']['id']; if(isset($_SESSION['user']['teacher']['fakultet'])){ $sql_search = 'SELECT id FROM acs_faculties WHERE name="'. $_SESSION['user']['teacher']['fakultet'] .'"'; @@ -27,9 +27,11 @@ class attendancelog { } return $currentUserInfo; + }else if(isset($_SESSION['user']['statuses']['25'])) { + $currentUserInfo['role'] = 'secretary'; + return $currentUserInfo; }else if(isset($_SESSION['user']['student'])) { $currentUserInfo['role'] = 'student'; - $currentUserInfo['user_id'] = $_SESSION['user']['id']; $sql_search = 'SELECT * FROM acs_attendancelog_headmen WHERE user_id='. $currentUserInfo['user_id'] .' '; $rez = $this->DB->QUR_SEL($sql_search); if(!isset($rez[1])){ @@ -45,13 +47,9 @@ class attendancelog { } return $currentUserInfo; + }else{ + return 0; } -// else if(isset($_SESSION['user']['statuses']['25'])) -// { -// -// }else{ -// -// } } function getAllGrupps($facult = '') { if($facult != ''){