-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
30 lines (20 loc) · 813 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
// Insert a page header
require 'header.php';
// If we have a session message registered, we show it
if(Session::exists('home')) {
echo '<p>' . Session::flash('home') . '</p>';
}
// If user is logged in
if($logged) {
$user->loadInitialApp();
// We load and render all modules - unlocked, purchased, available, locked
$handler = new ModuleHandler($user->data()->id);
$handler->loopModules($handler->loadAllModules());
$handler->renderAllModules();
// If user is not logged in
} else {
echo '<p class="msg">Hello! You have to <a href="login.php">log in</a> or <a href="register.php">sign in</a> to go on English Quest!</p>';
}
//Insert a page footer
require 'footer.php';