From 320420a4ce911d11a098f3415ac4ef8e36bc5946 Mon Sep 17 00:00:00 2001 From: Bruno Eckhardt Date: Thu, 19 Feb 2026 15:32:50 +0100 Subject: [PATCH] update: login --- WEBROOT/services/user_control.php | 26 +++++++++++++++++++++++++- WEBROOT/style.css | 1 - 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/WEBROOT/services/user_control.php b/WEBROOT/services/user_control.php index d0781d1..baf0b65 100644 --- a/WEBROOT/services/user_control.php +++ b/WEBROOT/services/user_control.php @@ -19,6 +19,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_user'])) { } } +if (isset($_POST['password'])) { + if (isset($superuser['admin']['password']) && $_POST['password'] === $superuser['admin']['password']) { + $_SESSION['logged_in'] = true; + } else { + $error = "Falsches Passwort!"; + } +} + // 2. Daten für die Tabelle holen (dein bestehender Code) $specificData = new getSpecificData(); $isAdmin = $specificData->getIsAdmin(); @@ -36,6 +44,21 @@ if ($isAdmin) { ?>
+ + +

Benutzerverwaltung

@@ -92,4 +115,5 @@ if ($isAdmin) {
- \ No newline at end of file + + \ No newline at end of file diff --git a/WEBROOT/style.css b/WEBROOT/style.css index c205121..38f9376 100644 --- a/WEBROOT/style.css +++ b/WEBROOT/style.css @@ -46,7 +46,6 @@ header { .content { flex: 1; - padding: 20px; overflow: auto; }