diff --git a/app/inc.php b/app/inc.php index f02c21f..5245ab6 100644 --- a/app/inc.php +++ b/app/inc.php @@ -22,16 +22,25 @@ spl_autoload_register(function ($class_name) { /* === App Setup === */ + +// Displays a custom page on error or exception new ErrorHandler; +// Grab configuration file $config = ( new Config(__DIR__ . '/config.php') )->config; +// Start database connection $database = new Database($config['database']); + +// Session wrapper $session = new Session; + +// Handles current user session $user = new User($session, $database); +// Decides if the user is allowed to view current page new AccessControl($user); $app = new App( diff --git a/app/view/template/header.php b/app/view/template/header.php index 8395110..823d19f 100644 --- a/app/view/template/header.php +++ b/app/view/template/header.php @@ -34,10 +34,12 @@