-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfriends.php
More file actions
52 lines (42 loc) · 1.46 KB
/
friends.php
File metadata and controls
52 lines (42 loc) · 1.46 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
<?php
include_once(__DIR__ . "/classes/Buddy.php");
session_start();
if (!isset($_SESSION['user'])) {
header("Location: login.php");
}
$user = new Buddy();
$userFriends = $user->searchFriends();
?>
<!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>Vriendenlijst</title>
</head>
<body>
<?php include_once('nav.inc.php'); ?>
<div class="form form--login friends__list">
<h1 class="center">Alle IMD Buddies!</h1>
<?php if (isset($error)) {
echo $error;
} ?>
<div class="friends">
<?php foreach ($userFriends as $u): ?>
<div class="card-friend1">
<h2><span class="blue"><?php echo " " . htmlspecialchars($u['firstname1']) . " " . htmlspecialchars($u['lastname1'])?></h2>
<img class="friend-image" src="uploads/<?php echo $u['avatar1']; ?>"></span>
</div>
<h2 class="friend-with">+</h2>
<div class="card-friend2">
<h2><span class="blue"><?php echo " " . htmlspecialchars($u['firstname2']) . " " . htmlspecialchars($u['lastname2']);?></span></h2>
<img class="friend-image" src="uploads/<?php echo $u['avatar2']; ?>">
</div>
<?php endforeach; ?>
</div>
</div>
<?php include_once('footer.inc.php'); ?>
</body>
</html>