17 lines
270 B
PHP
Executable File
17 lines
270 B
PHP
Executable File
<?php
|
|
require_once __DIR__ . '/../src/Auth.php';
|
|
|
|
$auth = new Auth();
|
|
|
|
if (!$auth->isLoggedIn()) {
|
|
header('Location: /login.php');
|
|
exit;
|
|
}
|
|
|
|
if ($auth->isAdmin()) {
|
|
header('Location: /admin/index.php');
|
|
} else {
|
|
header('Location: /ayudante.php');
|
|
}
|
|
exit;
|