22 lines
477 B
PHP
22 lines
477 B
PHP
|
<?php
|
||
|
if(isset($_SESSION['auth']))
|
||
|
{
|
||
|
if(isset($_SESSION['loggedInUserRole'])){
|
||
|
$role = validate($_SESSION['loggedInUserRole']);
|
||
|
|
||
|
if($role != 'admin'){
|
||
|
logoutSession();
|
||
|
redirect('../index.php', 'Zugriff verweigert', 'danger');
|
||
|
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
redirect('../index.php', 'Zugriff verweigert', 'danger');
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
redirect('../index.php', 'Bitte gib den Verifikations-Code ein', 'warning');
|
||
|
}
|
||
|
?>
|