-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
49 lines (39 loc) · 1.04 KB
/
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
46
47
48
49
<?php
session_start();
require_once('./elements/header_allowed.php');
require_once('./config/config.php');
require_once('./elements/helpers.php');
$u = User::userById($_SESSION['user']['id']);
$title = ucfirst($u['username']);
?>
<!DOCTYPE html>
<html>
<?php include('./elements/header.php'); ?>
<body>
<?php include('./elements/nav.php'); ?>
<section class="section">
<div class="column is-half container has-text-centered">
<a class="button is-info is-outlined" href="/upload.php">
<span class="icon"><i class="fa fa-upload"></i></span>
<span>Upload</span>
</a>
</div>
<?php if (count($u['images']) > 0): ?>
<hr>
<?php if (!empty($err)): ?>
<div class="column notification is-danger is-one-third container">
<p><b>ERREUR:</b> <?php echo $err; ?></p>
</div>
<?php endif; ?>
<div class="columns is-multiline is-flex profile">
<?php
$images = $u['images'];
foreach ($images as $img) {
echo itemImage($img, true);
}
?>
</div>
<?php endif; ?>
</section>
</body>
</html>