Частичное добавление логики роли секретаря деканата
This commit is contained in:
parent
2b3a2083b5
commit
b66ca40355
|
@ -8,9 +8,9 @@ class attendancelog {
|
||||||
}
|
}
|
||||||
public function currentUserInfo(){
|
public function currentUserInfo(){
|
||||||
$currentUserInfo = array();
|
$currentUserInfo = array();
|
||||||
|
$currentUserInfo['user_id'] = $_SESSION['user']['id'];
|
||||||
if(isset($_SESSION['user']['teacher'])) {
|
if(isset($_SESSION['user']['teacher'])) {
|
||||||
$currentUserInfo['role'] = 'teacher';
|
$currentUserInfo['role'] = 'teacher';
|
||||||
$currentUserInfo['user_id'] = $_SESSION['user']['id'];
|
|
||||||
$currentUserInfo['teacher_id'] = $_SESSION['user']['teacher']['id'];
|
$currentUserInfo['teacher_id'] = $_SESSION['user']['teacher']['id'];
|
||||||
if(isset($_SESSION['user']['teacher']['fakultet'])){
|
if(isset($_SESSION['user']['teacher']['fakultet'])){
|
||||||
$sql_search = 'SELECT id FROM acs_faculties WHERE name="'. $_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;
|
return $currentUserInfo;
|
||||||
|
}else if(isset($_SESSION['user']['statuses']['25'])) {
|
||||||
|
$currentUserInfo['role'] = 'secretary';
|
||||||
|
return $currentUserInfo;
|
||||||
}else if(isset($_SESSION['user']['student'])) {
|
}else if(isset($_SESSION['user']['student'])) {
|
||||||
$currentUserInfo['role'] = 'student';
|
$currentUserInfo['role'] = 'student';
|
||||||
$currentUserInfo['user_id'] = $_SESSION['user']['id'];
|
|
||||||
$sql_search = 'SELECT * FROM acs_attendancelog_headmen WHERE user_id='. $currentUserInfo['user_id'] .' ';
|
$sql_search = 'SELECT * FROM acs_attendancelog_headmen WHERE user_id='. $currentUserInfo['user_id'] .' ';
|
||||||
$rez = $this->DB->QUR_SEL($sql_search);
|
$rez = $this->DB->QUR_SEL($sql_search);
|
||||||
if(!isset($rez[1])){
|
if(!isset($rez[1])){
|
||||||
|
@ -45,13 +47,9 @@ class attendancelog {
|
||||||
}
|
}
|
||||||
return $currentUserInfo;
|
return $currentUserInfo;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
// else if(isset($_SESSION['user']['statuses']['25']))
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// }else{
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
function getAllGrupps($facult = '') {
|
function getAllGrupps($facult = '') {
|
||||||
if($facult != ''){
|
if($facult != ''){
|
||||||
|
|
Loading…
Reference in New Issue