All
This commit is contained in:
@@ -6,10 +6,15 @@ if (!isset($_SESSION['user'])){
|
||||
}
|
||||
|
||||
$user = unserialize($_SESSION['user']);
|
||||
print_r($user);
|
||||
print_r($user->profesor);
|
||||
print_r($user->acceso);//null sin permisos, w o r
|
||||
//profesor, admin, rol, facultad
|
||||
if (!$user->profesor && !$user->admin){
|
||||
die(header('Location: index.php'));
|
||||
}
|
||||
$user->access();
|
||||
|
||||
|
||||
//if (!$user->admin && in_array($user->acceso, ['n']))
|
||||
//die(header('Location: main.php?error=1'));
|
||||
$user->print_to_log('Reposiciones');
|
||||
@@ -42,8 +47,7 @@ else{
|
||||
}
|
||||
|
||||
// Materias
|
||||
//$id_prof = $user->user["id"];
|
||||
$id_prof = 2142;
|
||||
$id_prof = $user->user["id"];
|
||||
//$facultad_id = 28;
|
||||
$materias_rs = $db->query('SELECT * FROM fs_materiasprofesor(:id)', [':id' => $id_prof]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user