Amelioration interface adhesions

This commit is contained in:
indev 2024-12-07 11:00:06 +00:00
parent aa057a1090
commit c94c29b967

View File

@ -62,27 +62,16 @@ if (isset($_POST['adherent-id'])) {
<head> <head>
<?php fillHead($rootPageURL, "Admin - " . $pageName, $darkTheme, $lightTheme);?> <?php fillHead($rootPageURL, "Admin - " . $pageName, $darkTheme, $lightTheme);?>
<style> <style>
.users-list { table {
display: flex; width: 100%;
flex-direction: column; text-align: left;
} }
.user-row { tr {
margin: 0.5em; height: 30px;
border: 1px solid var(--text);
border-radius: 100px;
padding: 0 0.5em 0 1em;
} }
.user-row form { th, td {
display: flex; border: 1px solid gray;
flex-direction: row; padding: 5px;
justify-content: space-between;
align-items: center;
}
.user-row button {
display: inline;
}
.users {
min-height: 25em;
} }
.admin-links { .admin-links {
margin-bottom: 4em; margin-bottom: 4em;
@ -136,14 +125,15 @@ if (isset($_POST['adherent-id'])) {
$result = $request->fetchAll(PDO::FETCH_ASSOC); $result = $request->fetchAll(PDO::FETCH_ASSOC);
if ($result) { if ($result) {
echo ('<div class="users-list">'); echo ('<table>');
echo ("<tr><th>Prénom Nom</th><th>Date de demande</th><th></th></tr>");
foreach($result as $row) { foreach($result as $row) {
echo ('<div class="user-row">'); echo ('<tr>');
echo ('<form action="#" method="post">'); echo ('<form action="#" method="post">');
echo ('<div>' . $row['firstname'] . ' ' . $row['lastname'] . '</div><div>' . $row['join_date'] . '</div><div><input type="hidden" name="adherent-id" value="' . $row['ID'] . '"><button type="submit" style="margin-left: 1em;">Accepter</button></div>'); echo ('<td>' . $row['firstname'] . ' ' . $row['lastname'] . '</td><td>' . $row['join_date'] . '</td><td><input type="hidden" name="adherent-id" value="' . $row['ID'] . '"><button type="submit" style="margin-left: 1em;">Accepter</button></td>');
echo ('</form></div>'); echo ('</form></tr>');
} }
echo ('</div>'); echo ('</table>');
} else { } else {
echo ('Aucun utilisateur trouvé.'); echo ('Aucun utilisateur trouvé.');
} }