21 lines
453 B
PHP
21 lines
453 B
PHP
<?php
|
|
if(isset($_SESSION['auth']))
|
|
{
|
|
if(isset($_SESSION['loggedInUserRole'])){
|
|
$role = validate($_SESSION['loggedInUserRole']);
|
|
|
|
if($role != 'student'){
|
|
logoutSession();
|
|
redirect('../index.php', 'Zugriff verweigert', 'danger');
|
|
}
|
|
}
|
|
else
|
|
{
|
|
redirect('../index.php', 'Zugriff verweigert', 'danger');
|
|
}
|
|
}
|
|
else
|
|
{
|
|
redirect('../index.php', 'Bitte melde dich an', 'warning');
|
|
}
|
|
?>
|