-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
55 lines (46 loc) · 1.56 KB
/
profile.php
File metadata and controls
55 lines (46 loc) · 1.56 KB
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
50
51
52
53
54
55
<?php
include_once(__DIR__ . "/classes/Buddy.php");
session_start();
$email = $_SESSION["user"];
if (!isset($_SESSION['user'])) {
header("Location: login.php");
}
$user = new Buddy();
$user->setId($_SESSION["id"]);
$userData = $user->allUserData();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<title>Profiel</title>
</head>
<body>
<?php include_once('nav.inc.php'); ?>
<div class="container">
<div class="form form--login">
<h2 form__title><?php echo htmlspecialchars($userData['firstname']) . " " . htmlspecialchars($userData['lastname']) ; ?>
</h2>
<a class="a__activate a__right" href="profileEdit.php">Wijzig je profiel</a>
<div class="form__field">
<div class="avatar__img">
<img class="avatar" src="<?php if (!empty($userData['avatar'])) {
echo "uploads/" . htmlspecialchars($userData['avatar']);
} else {
echo "https://via.placeholder.com/150";
} ?>
" alt="profielfoto"></div>
</div>
<div class="form__field">
<label for="description">profieltekst:</label>
<p> <?php echo htmlspecialchars($userData['description']); ?>
</p>
</div>
</div>
</div>
<?php include_once('footer.inc.php'); ?>
</body>
</html>