diff --git a/admin/colors.php b/admin/colors.php
index d2d4a3a..542722b 100755
--- a/admin/colors.php
+++ b/admin/colors.php
@@ -135,7 +135,7 @@ require_once '../inc/header.php';
| Name |
Hex-Code |
- Vorschau |
+ Farbe |
Aktionen |
diff --git a/admin/users.php b/admin/users.php
index 36f13c9..d8bd105 100755
--- a/admin/users.php
+++ b/admin/users.php
@@ -7,8 +7,10 @@ if ($_SESSION['role'] !== 'admin') {
die("Zugriff nur für Admins");
}
-// Datenbankverbindung einbinden
-
+$message = '';
+$message_type = '';
+$edit_mode = false;
+$edit_user = null;
// Benutzer hinzufügen
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['username'], $_POST['password'], $_POST['role'])) {
@@ -19,8 +21,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['username'], $_POST['pa
$sql = "INSERT INTO users (username, password, role) VALUES ('$username', '$password', '$role')";
if (mysqli_query($conn, $sql)) {
$message = "Benutzer erfolgreich hinzugefügt.";
+ $message_type = 'success';
} else {
$message = "Fehler beim Hinzufügen: " . mysqli_error($conn);
+ $message_type = 'danger';
}
}
@@ -33,39 +37,91 @@ if ($result) {
}
}
-require_once '../inc/header.php';
+require_once('../inc/header.php');
?>
-
Benutzerverwaltung
+
+
Benutzerverwaltung
-
$message"; ?>
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+ | ID |
+ Benutzername |
+ Rolle |
+ Aktionen |
+
+
+
+
+
+ | = htmlspecialchars($user['id']) ?> |
+ = htmlspecialchars($user['username']) ?> |
+
+
+ = htmlspecialchars($user['role']) ?>
+
+ |
+
+
+ mode_edit_outline
+
+
+ delete_outline
+
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/css/style.css b/css/style.css
index 0b81c50..09a6fde 100755
--- a/css/style.css
+++ b/css/style.css
@@ -1,5 +1,6 @@
body {
background-color: #e6e6e6ff;
+ padding-top: 40px; /* Anpassen an die Höhe Ihres Menüs */
}
.container {
diff --git a/inc/header.php b/inc/header.php
index 19c8490..fdf8bf1 100755
--- a/inc/header.php
+++ b/inc/header.php
@@ -14,9 +14,6 @@
-
-
-
include('menu.php') ?>
\ No newline at end of file
diff --git a/inc/menu.php b/inc/menu.php
index cc0ae7c..afc0c3e 100755
--- a/inc/menu.php
+++ b/inc/menu.php
@@ -1,4 +1,4 @@
-