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;
}
}
require_once 'inc/header.php'; ?>
?>
<!DOCTYPE html>
<html>
<h1>Benutzerverwaltung</h1>
<head>
<meta charset="UTF-8">
<title>Benutzerverwaltung</title>
<link rel="stylesheet" href="style.css">
</head>
<?php if (isset($message)) echo "<p><strong>$message</strong></p>"; ?>
<body>
<h1>Benutzerverwaltung</h1>
<form method="post">
<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>"; ?>
<form method="post">
<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>
<h2>Benutzerübersicht</h2>
<table border="1" cellpadding="5">
<h2>Benutzerübersicht</h2>
<table border="1" cellpadding="5">
<tr>
<th>ID</th>
<th>Benutzername</th>
<th>Rolle</th>
</tr>
<?php foreach ($users as $user): ?>
<tr>
<th>ID</th>
<th>Benutzername</th>
<th>Rolle</th>
<td><?= htmlspecialchars($user['id']) ?></td>
<td><?= htmlspecialchars($user['username']) ?></td>
<td><?= htmlspecialchars($user['role']) ?></td>
</tr>
<?php foreach ($users as $user): ?>
<tr>
<td><?= htmlspecialchars($user['id']) ?></td>
<td><?= htmlspecialchars($user['username']) ?></td>
<td><?= htmlspecialchars($user['role']) ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php endforeach; ?>
</table>
<?php include('inc/footer.php'); ?>
<?php include('inc/footer.php'); ?>