Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
<?php
session_start();
if (!isset($_SESSION['username'])) {
header('Location: login.php');
exit();
}
include_once 'classes/database.php';
$users = database::getAllUsers();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>Proeve van bekwaamheid - 2024 - level 3 / 4</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body>
<header>
<h1>Proeve van bekwaamheid - 2024 - level 3 / 4</h1>
<p>Welkom <?php echo htmlspecialchars($_SESSION['username']); ?>, je bent <span class="bold">ingelogd</span> in het systeem. Op deze pagina kun je de onderstaande gebruikers wijzigen.
Je kunt het adres (postcode, huisnummer en woonplaats) van de gebruiker wijzigen door op het potloodje te klikken.
</p>
<div>
<nav>
<ul>
<li><a href="logout.php">Uitloggen</a></li>
</ul>
</nav>
</div>
</header>
<div class="container">
<div class="usertable">
<h3>Gebruikerslijst</h3>
<table>
<thead>
<tr>
<th></th>
<th>Gebruikersnaam</th>
<th>Postcode</th>
<th>Huisnummer</th>
<th>Woonplaats</th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $user): ?>
<tr>
<td><a href="edit.php?id=<?php echo htmlspecialchars($user['userid']); ?>"><i class="fas fa-edit"></i></a></td>
<td><?php echo htmlspecialchars($user['username']); ?></td>
<td><?php echo htmlspecialchars($user['postcode']); ?></td>
<td><?php echo htmlspecialchars($user['huisnummer']); ?></td>
<td><?php echo htmlspecialchars($user['woonplaats']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</body>
</html>