layout angepasst

This commit is contained in:
Borgal
2025-08-09 00:53:22 +02:00
parent 8f6b95b7a6
commit 610150d426

View File

@@ -32,48 +32,41 @@ if ($result) {
$users[] = $row; $users[] = $row;
} }
} }
require_once 'inc/header.php'; ?>
?> ?>
<!DOCTYPE html> <h1>Benutzerverwaltung</h1>
<html>
<head> <?php if (isset($message)) echo "<p><strong>$message</strong></p>"; ?>
<meta charset="UTF-8">
<title>Benutzerverwaltung</title>
<link rel="stylesheet" href="style.css">
</head>
<body> <form method="post">
<h1>Benutzerverwaltung</h1> <label>Benutzername: <input type="text" name="username" required></label><br>
<label>Passwort: <input type="password" name="password" required></label><br>
<label>Rolle:
<select name="role">
<option value="member">Mitglied</option>
<option value="admin">Admin</option>
</select>
</label><br>
<button type="submit">Benutzer hinzufügen</button>
</form>
<?php if (isset($message)) echo "<p><strong>$message</strong></p>"; ?> <h2>Benutzerübersicht</h2>
<table border="1" cellpadding="5">
<form method="post"> <tr>
<label>Benutzername: <input type="text" name="username" required></label><br> <th>ID</th>
<label>Passwort: <input type="password" name="password" required></label><br> <th>Benutzername</th>
<label>Rolle: <th>Rolle</th>
<select name="role"> </tr>
<option value="member">Mitglied</option> <?php foreach ($users as $user): ?>
<option value="admin">Admin</option>
</select>
</label><br>
<button type="submit">Benutzer hinzufügen</button>
</form>
<h2>Benutzerübersicht</h2>
<table border="1" cellpadding="5">
<tr> <tr>
<th>ID</th> <td><?= htmlspecialchars($user['id']) ?></td>
<th>Benutzername</th> <td><?= htmlspecialchars($user['username']) ?></td>
<th>Rolle</th> <td><?= htmlspecialchars($user['role']) ?></td>
</tr> </tr>
<?php foreach ($users as $user): ?> <?php endforeach; ?>
<tr> </table>
<td><?= htmlspecialchars($user['id']) ?></td>
<td><?= htmlspecialchars($user['username']) ?></td>
<td><?= htmlspecialchars($user['role']) ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php include('inc/footer.php'); ?> <?php include('inc/footer.php'); ?>