Skip to content
Permalink
Newer
Older
100644 18 lines (16 sloc) 465 Bytes
1
<?php
2
defined('APP_DIR') or define('APP_DIR', __DIR__ . '/../app/');
3
include_once(APP_DIR . 'model/User.php');
4
include_once(APP_DIR . 'include/http.php');
5
6
$data = User::authenticated();
7
if ($data) {
8
if ($data->access == 'user') {
9
Http::redirect('user.php');
10
} else if ($data->access == 'admin') {
11
Http::redirect('admin.php');
12
}
13
}
14
15
include 'template/header.html';
16
include(APP_DIR . 'forms/login.php');
17
include 'template/footer.html';
18
?>
You can’t perform that action at this time.