-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
45 lines (41 loc) · 963 Bytes
/
profile.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
require_once 'core/init.php';
if (!$username = Input::get('user')) {
Redirect::to('index.php');
} else {
$user = new User($username);
if (!$user->exists()) {
Redirect::to(404);
} else {
$data = $user->data();
?>
<?php if (Session::exists('success')) : ?>
<div class="alert alert-success">
<?php echo Session::flash('success'); ?>
</div>
<?php endif; ?>
<?php if (Session::exists('error')) : ?>
<div class="alert alert-danger">
<?php echo Session::flash('error'); ?>
</div>
<?php endif; ?>
<table class="table table-bordered table-striped text-white">
<tbody>
<tr>
<th>Username</th>
<td><?php echo escape($data->username); ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo escape($data->name); ?></td>
</tr>
<tr>
<th>Email</th>
<td><?php echo escape($data->email); ?></td>
</tr>
</tbody>
</table>
<?php
}
}
?>