This commit is contained in:
2024-10-11 16:36:56 +02:00
parent 0e0e141982
commit a390944917
5 changed files with 115 additions and 68 deletions

View File

@@ -16,40 +16,46 @@ require_once('close.php');
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Liste des utilisateurs</title>
</head>
<body>
<h1>Liste des utilisateurs</h1>
<table>
<thead>
<th>ID</th>
<th>Login</th>
<th>Nom</th>
<th>Prenom</th>
<th>Rôle</th>
</thead>
<tbody>
<?php
foreach ($result as $user) {
?>
<tr>
<td><?= $user['id'] ?></td>
<td><?= $user['login'] ?></td>
<td><?= $user['firstname'] ?></td>
<td><?= $user['lastname'] ?></td>
<td><?= $user['role'] ?></td>
<td><a href="details.php?id=<?= $user['id'] ?>">Voir</a> <a
href="edit.php?id=<?= $user['id'] ?>">Modifier</a> <a href="delete.php?id=<?=
$user['id'] ?>">Supprimer</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<a href="add.php">Ajouter</a>
<div>
<h1>Liste des utilisateurs</h1>
<table>
<thead>
<th>ID</th>
<th>Login</th>
<th>Nom</th>
<th>Prenom</th>
<th>Rôle</th>
<th>Actions</th>
</thead>
<tbody>
<?php
foreach ($result as $user) {
?>
<tr>
<td><?= $user['id'] ?></td>
<td><?= $user['login'] ?></td>
<td><?= $user['firstname'] ?></td>
<td><?= $user['lastname'] ?></td>
<td><?= $user['role'] ?></td>
<td>
<button onclick="window.location.href='details.php?id=<?= $user['id'] ?>'">Voir</button>
<button onclick="window.location.href='edit.php?id=<?= $user['id'] ?>'">Modifier</button>
<button onclick="window.location.href='delete.php?id=<?= $user['id'] ?>'">Supprimer</button>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<button onclick="window.location.href='add.php'">Ajouter</button>
</div>
</body>
</html>