-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
26 lines (21 loc) · 749 Bytes
/
Copy pathindex.php
File metadata and controls
26 lines (21 loc) · 749 Bytes
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
<?php
require_once 'core/init.php';
if(Session::exists('home')) {
echo '<p>' . Session::flash('home'). '</p>';
}
$user = new User(); //Current
if($user->isLoggedIn()) {
?>
<p>Hello, <a href="profile.php?user=<?php echo escape($user->data()->username);?>"><?php echo escape($user->data()->username); ?></p>
<ul>
<li><a href="update.php">Update Profile</a></li>
<li><a href="changepassword.php">Change Password</a></li>
<li><a href="logout.php">Log out</a></li>
</ul>
<?php
if($user->hasPermission('admin')) {
echo '<p>You are a Administrator!</p>';
}
} else {
echo '<p>You need to <a href="login.php">login</a> or <a href="register.php">register.</a></p>';
}