Primer subida completa
This commit is contained in:
16
public/index.php
Executable file
16
public/index.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?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;
|
||||
Reference in New Issue
Block a user