From fda07d848371f9520c84d62deb86bc67d79b6ad0 Mon Sep 17 00:00:00 2001 From: hypax Date: Sun, 2 Nov 2025 01:14:50 +0100 Subject: [PATCH 01/61] =?UTF-8?q?Adding=20FontAwesome;=20Antr=C3=A4ge=20re?= =?UTF-8?q?pathed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-version.yml | 6 +- .htaccess | 8 +- admin/enotf/delete.php | 6 +- admin/enotf/list.php | 10 +- admin/enotf/qm-actions-modal.php | 2 +- admin/index.php | 234 ------------------ admin/login.php | 76 ------ admin/logout.php | 8 - admin/personal/comment-delete.php | 4 +- admin/personal/create.php | 6 +- admin/personal/delete.php | 6 +- admin/personal/dokument-delete.php | 4 +- admin/personal/list.php | 10 +- admin/personal/profile.php | 8 +- admin/settings/antraege/create.php | 8 +- admin/settings/antraege/edit.php | 18 +- admin/settings/antraege/list.php | 16 +- .../settings/dashboard/categories/create.php | 10 +- .../settings/dashboard/categories/delete.php | 12 +- .../settings/dashboard/categories/update.php | 10 +- admin/settings/dashboard/index.php | 16 +- admin/settings/dashboard/tiles/create.php | 10 +- admin/settings/dashboard/tiles/delete.php | 12 +- admin/settings/dashboard/tiles/update.php | 10 +- admin/settings/documents/templates.php | 4 +- admin/settings/enotf/ziele/create.php | 10 +- admin/settings/enotf/ziele/delete.php | 12 +- admin/settings/enotf/ziele/index.php | 10 +- admin/settings/enotf/ziele/update.php | 10 +- .../beladelisten/beladung_handler.php | 2 +- .../settings/fahrzeuge/beladelisten/index.php | 4 +- admin/settings/fahrzeuge/fahrzeuge/create.php | 10 +- admin/settings/fahrzeuge/fahrzeuge/delete.php | 12 +- admin/settings/fahrzeuge/fahrzeuge/index.php | 10 +- admin/settings/fahrzeuge/fahrzeuge/update.php | 10 +- .../settings/personal/dienstgrade/create.php | 10 +- .../settings/personal/dienstgrade/delete.php | 12 +- admin/settings/personal/dienstgrade/index.php | 10 +- .../settings/personal/dienstgrade/update.php | 10 +- admin/settings/personal/qualifd/create.php | 10 +- admin/settings/personal/qualifd/delete.php | 12 +- admin/settings/personal/qualifd/index.php | 10 +- admin/settings/personal/qualifd/update.php | 10 +- admin/settings/personal/qualifw/create.php | 10 +- admin/settings/personal/qualifw/delete.php | 12 +- admin/settings/personal/qualifw/index.php | 10 +- admin/settings/personal/qualifw/update.php | 10 +- admin/settings/personal/qualird/create.php | 10 +- admin/settings/personal/qualird/delete.php | 12 +- admin/settings/personal/qualird/index.php | 10 +- admin/settings/personal/qualird/update.php | 10 +- admin/support_pass.php | 2 +- admin/system/updates/UpdateManager.php | 12 +- admin/system/updates/index.php | 4 +- admin/users/auditlog.php | 6 +- admin/users/delete.php | 6 +- admin/users/edit.php | 8 +- admin/users/editprofile.php | 4 +- admin/users/list.php | 6 +- admin/users/roles/create.php | 10 +- admin/users/roles/delete.php | 12 +- admin/users/roles/index.php | 10 +- admin/users/roles/update.php | 10 +- {admin/antraege => antrag/admin}/list.php | 28 +-- {admin/antraege => antrag/admin}/view.php | 12 +- {antraege => antrag}/create.php | 39 ++- {antraege => antrag}/select.php | 52 ++-- {antraege => antrag}/view.php | 55 ++-- assets/components/_base/admin/head.php | 31 +++ assets/components/enotf/qm-modals.php | 4 +- assets/components/index/applications.php | 4 +- assets/components/index/documents.php | 2 +- assets/components/index/protocols.php | 2 +- assets/components/navbar.php | 59 ++--- assets/components/navbar_antraege.php | 10 +- assets/components/profiles/comments/main.php | 2 +- assets/components/profiles/documents/main.php | 2 +- assets/components/profiles/modals.php | 2 +- assets/components/support/banner.php | 2 +- assets/config/config.php | 3 +- assets/css/style.css | 4 +- assets/css/style.min.css | 2 +- assets/css/style.scss | 6 +- auth/callback.php | 2 +- composer.json | 3 +- composer.lock | 53 +++- dashboard.php | 32 +-- index.html | 5 +- index.php | 96 +++++++ login.php | 54 ++++ logout.php | 8 + src/Helpers/Flash.php | 2 +- support/login.php | 4 +- 93 files changed, 638 insertions(+), 804 deletions(-) delete mode 100644 admin/index.php delete mode 100644 admin/login.php delete mode 100644 admin/logout.php rename {admin/antraege => antrag/admin}/list.php (84%) rename {admin/antraege => antrag/admin}/view.php (97%) rename {antraege => antrag}/create.php (87%) rename {antraege => antrag}/select.php (63%) rename {antraege => antrag}/view.php (84%) create mode 100644 assets/components/_base/admin/head.php create mode 100644 index.php create mode 100644 login.php create mode 100644 logout.php diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 5d6b23ea..95d39dff 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -30,7 +30,7 @@ jobs: TIMESTAMP=$(date -u '+%Y-%m-%d %H:%M:%S') # Erstelle version.json - cat > admin/system/updates/version.json << EOF + cat > system/updates/version.json << EOF { "version": "$VERSION", "updated_at": "$TIMESTAMP", @@ -40,14 +40,14 @@ jobs: EOF echo "Created version.json with version $VERSION" - cat admin/system/updates/version.json + cat system/updates/version.json - name: Commit and push version.json run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git add admin/system/updates/version.json + git add system/updates/version.json # Prüfen ob es Änderungen gibt if git diff --staged --quiet; then diff --git a/.htaccess b/.htaccess index dcb154da..c47f6b15 100644 --- a/.htaccess +++ b/.htaccess @@ -23,8 +23,8 @@ RewriteRule ^dokumente/urkunden/entlassung/(\d+)$ dokumente/urkunden/entlassung. RewriteRule ^dokumente/zertifikate/ausbildung/(\d+)$ dokumente/zertifikate/ausbildung.php?dok=$1 [L] RewriteRule ^dokumente/zertifikate/lehrgang/(\d+)$ dokumente/zertifikate/lehrgang.php?dok=$1 [L] RewriteRule ^dokumente/zertifikate/fachlehrgang/(\d+)$ dokumente/zertifikate/fachlehrgang.php?dok=$1 [L] -# RewriteRule ^admin/antraege/antrag(\d+)$ admin/antraege/t-view.php?antrag=$1 [L] -# RewriteRule ^admin/enotf/divi(\d+)$ admin/enotf/view.php?id=$1 [L] -# RewriteRule ^admin/users/user(\d+)$ admin/users/edit.php?id=$1 [L] +# RewriteRule ^antraege/antrag(\d+)$ antraege/t-view.php?antrag=$1 [L] +# RewriteRule ^enotf/divi(\d+)$ enotf/view.php?id=$1 [L] +# RewriteRule ^users/user(\d+)$ users/edit.php?id=$1 [L] RewriteRule ^enotf/([\w-]+)$ enotf/protokoll.php?enr=$1 [L] -# RewriteRule ^admin/personal/(\d+)$ admin/personal/profile.php?id=$1 [L] \ No newline at end of file +# RewriteRule ^personal/(\d+)$ personal/profile.php?id=$1 [L] \ No newline at end of file diff --git a/admin/enotf/delete.php b/admin/enotf/delete.php index 1f7ad4a2..660c4f6d 100644 --- a/admin/enotf/delete.php +++ b/admin/enotf/delete.php @@ -5,7 +5,7 @@ require __DIR__ . '/../../assets/config/database.php'; if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -15,7 +15,7 @@ if (!Permissions::check(['admin', 'edivi.edit'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/enotf/list.php"); + header("Location: " . BASE_PATH . "enotf/list.php"); } $userid = $_SESSION['userid']; @@ -29,5 +29,5 @@ Flash::set('edivi', 'deleted'); $auditLogger = new AuditLogger($pdo); $auditLogger->log($userid, 'Protokoll gelöscht [ID: ' . $id . ']', NULL, 'eNOTF', 1); -header("Location: " . BASE_PATH . "admin/enotf/list.php"); +header("Location: " . BASE_PATH . "enotf/list.php"); exit; diff --git a/admin/enotf/list.php b/admin/enotf/list.php index a376844a..ec25ab5f 100644 --- a/admin/enotf/list.php +++ b/admin/enotf/list.php @@ -5,7 +5,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -14,7 +14,7 @@ if (!Permissions::check(['admin', 'edivi.view'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); } ?> @@ -142,7 +142,7 @@ $patname = $row['patname'] ?? "Unbekannt"; $actions = (Permissions::check(['admin', 'edivi.edit'])) - ? " " + ? " " : ""; echo ""; @@ -261,7 +261,7 @@ modal.show(); // Load content via AJAX - fetch(`admin/enotf/qm-actions-modal.php?id=${id}`) + fetch(`enotf/qm-actions-modal.php?id=${id}`) .then(response => response.text()) .then(data => { document.getElementById('qmActionsContent').innerHTML = data; @@ -292,7 +292,7 @@ modal.show(); // Load content via AJAX - fetch(`admin/enotf/qm-log-modal.php?id=${id}`) + fetch(`enotf/qm-log-modal.php?id=${id}`) .then(response => response.text()) .then(data => { document.getElementById('qmLogContent').innerHTML = data; diff --git a/admin/enotf/qm-actions-modal.php b/admin/enotf/qm-actions-modal.php index 45ff7f82..6d9dc6eb 100644 --- a/admin/enotf/qm-actions-modal.php +++ b/admin/enotf/qm-actions-modal.php @@ -106,7 +106,7 @@ ?>
-
+
Gesichtet von
diff --git a/admin/index.php b/admin/index.php deleted file mode 100644 index b1d1efa9..00000000 --- a/admin/index.php +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - Administration › <?php echo SYSTEM_NAME ?> - - - - - - - - - - - - - - - - - - - - - - - " /> - - - - - - - -
- - - -
-
-
-
-

Dashboard

- - -
-
- prepare(" - SELECT cirs_status, COUNT(*) as count - FROM intra_antraege - GROUP BY cirs_status - "); - $stmt->execute(); - $result3 = $stmt->fetchAll(PDO::FETCH_ASSOC); - - $data3 = []; - $labels3 = []; - - $antragStatus = [ - 0 => "in Bearbeitung", - 1 => "Abgelehnt", - 2 => "Aufgeschoben", - 3 => "Angenommen", - ]; - - if (!empty($result3)) { - foreach ($result3 as $row) { - $status = $row['cirs_status']; - $rankLabel = isset($antragStatus[$status]) ? $antragStatus[$status] : 'Unbekannt'; - - $data3[] = $row['count']; - $labels3[] = $rankLabel; - } - } - - ?> - - - -
-
- - 'Ungesehen', - 1 => 'in Prüfung', - 2 => 'Freigegeben', - 3 => 'Ungenügend', - ]; - - $stmt = $pdo->prepare("SELECT protokoll_status, COUNT(*) as count FROM intra_edivi WHERE protokoll_status <> 4 GROUP BY protokoll_status"); - $stmt->execute(); - $result2 = $stmt->fetchAll(PDO::FETCH_ASSOC); - - $data2 = []; - $labels2 = []; - - if (!empty($result2)) { - foreach ($result2 as $row) { - $status = $row['protokoll_status']; - $statusLabel = isset($statusMapping[$status]) ? $statusMapping[$status] : 'Unbekannt'; - - $data2[] = $row['count']; - $labels2[] = $statusLabel; - } - } - ?> - - -
-
-
-
-
-
-

Eigene Dokumente

- -
-
-
-
-
-
-

Eigene Anträge

-
- -
- -
-
-
-
-

Eigene eNOTF-Protokolle

- -
-
-
-
- - - - - \ No newline at end of file diff --git a/admin/login.php b/admin/login.php deleted file mode 100644 index d702721b..00000000 --- a/admin/login.php +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - Login › <?php echo SYSTEM_NAME ?> - - - - - - - - - - - - - - - - - - - - - " /> - - - -
- -
- -
-
-
- intraRP Logo -
-

-

Das Intranet der Stadt !

- -
- Login -
-
-
-
-

Hintergrundvideo: Rosenbauer Group: "Alles für diesen Moment. - Rosenbauer" (YouTube)
- © intraRP | Alle Rechte vorbehalten

-
- - - \ No newline at end of file diff --git a/admin/logout.php b/admin/logout.php deleted file mode 100644 index bafc3753..00000000 --- a/admin/logout.php +++ /dev/null @@ -1,8 +0,0 @@ -prepare("SELECT * FROM intra_mitarbeiter_rdquali WHERE none = 1 LIMIT 1"); @@ -144,7 +144,7 @@ $response['success'] = true; $response['message'] = "Benutzer erfolgreich erstellt!"; - $response['redirect'] = BASE_PATH . "admin/personal/profile.php?id=" . $savedId; + $response['redirect'] = BASE_PATH . "personal/profile.php?id=" . $savedId; } catch (Exception $e) { $response['message'] = "Fehler: " . $e->getMessage(); } diff --git a/admin/personal/delete.php b/admin/personal/delete.php index 81ce083b..6b3f20fc 100644 --- a/admin/personal/delete.php +++ b/admin/personal/delete.php @@ -6,7 +6,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -16,7 +16,7 @@ if (!Permissions::check(['admin', 'personnel.delete'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/users/list.php"); + header("Location: " . BASE_PATH . "users/list.php"); } $userid = $_SESSION['userid']; @@ -30,5 +30,5 @@ Flash::set('personal', 'deleted'); $auditLogger = new AuditLogger($pdo); $auditLogger->log($userid, 'Mitarbeiter gelöscht [ID: ' . $id . ']', NULL, 'Mitarbeiter', 1); -header('Location: ' . BASE_PATH . 'admin/personal/list.php'); +header('Location: ' . BASE_PATH . 'personal/list.php'); exit; diff --git a/admin/personal/dokument-delete.php b/admin/personal/dokument-delete.php index dcd085ac..4857339f 100644 --- a/admin/personal/dokument-delete.php +++ b/admin/personal/dokument-delete.php @@ -6,7 +6,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -16,7 +16,7 @@ if (!Permissions::check('admin')) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/users/list.php"); + header("Location: " . BASE_PATH . "users/list.php"); } //Abfrage der Nutzer ID vom Login diff --git a/admin/personal/list.php b/admin/personal/list.php index 640abf18..e897c84b 100644 --- a/admin/personal/list.php +++ b/admin/personal/list.php @@ -6,7 +6,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -15,7 +15,7 @@ if (!Permissions::check(['admin', 'personnel.view'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); } $stmtg = $pdo->prepare("SELECT * FROM intra_mitarbeiter_dienstgrade"); @@ -80,9 +80,9 @@ @@ -147,7 +147,7 @@ echo " " . $rdqualtext . ""; } echo "" . $row['einstdatum'] . "" . $einstellungsdatum . ""; - echo "Ansehen"; + echo "Ansehen"; echo ""; } ?> diff --git a/admin/personal/profile.php b/admin/personal/profile.php index 96d6d22f..593dc07d 100644 --- a/admin/personal/profile.php +++ b/admin/personal/profile.php @@ -4,7 +4,7 @@ require_once __DIR__ . '/../../vendor/autoload.php'; require __DIR__ . '/../../assets/config/database.php'; if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); } use App\Auth\Permissions; @@ -12,12 +12,12 @@ if (!Permissions::check(['admin', 'personnel.view'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); } if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { Flash::set('error', 'invalid-id'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); } //Abfrage der Nutzer ID vom Login @@ -459,7 +459,7 @@
Achtung!
Dieses Mitarbeiterprofil gehört einem Funktionsträger - dieser besitzt ein registriertes Benutzerkonto im Intranet.
- Name u. Benutzername: () + Name u. Benutzername: () Name u. Benutzername: () diff --git a/admin/settings/antraege/create.php b/admin/settings/antraege/create.php index 9d37f560..dde1916d 100644 --- a/admin/settings/antraege/create.php +++ b/admin/settings/antraege/create.php @@ -6,7 +6,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -16,7 +16,7 @@ if (!Permissions::check(['admin'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); exit(); } @@ -58,7 +58,7 @@ ); Flash::set('success', 'Antragstyp erfolgreich erstellt. Sie können jetzt Felder hinzufügen.'); - header("Location: " . BASE_PATH . "admin/settings/antraege/edit.php?id=" . $new_id); + header("Location: " . BASE_PATH . "settings/antraege/edit.php?id=" . $new_id); exit(); } catch (PDOException $e) { Flash::set('error', 'Fehler beim Erstellen: ' . $e->getMessage()); @@ -195,7 +195,7 @@ class="form-control"
- + Abbrechen
- + Zurück zur Übersicht
diff --git a/admin/settings/antraege/list.php b/admin/settings/antraege/list.php index 2859b5b0..e5b378fa 100644 --- a/admin/settings/antraege/list.php +++ b/admin/settings/antraege/list.php @@ -6,7 +6,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -15,7 +15,7 @@ if (!Permissions::check(['admin'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); exit(); } @@ -25,7 +25,7 @@ $stmt = $pdo->prepare("UPDATE intra_antrag_typen SET aktiv = NOT aktiv WHERE id = ?"); $stmt->execute([$id]); Flash::set('success', 'Status erfolgreich geändert'); - header("Location: " . BASE_PATH . "admin/settings/antraege/list.php"); + header("Location: " . BASE_PATH . "settings/antraege/list.php"); exit(); } @@ -46,7 +46,7 @@ Flash::set('success', 'Antragstyp erfolgreich gelöscht'); } - header("Location: " . BASE_PATH . "admin/settings/antraege/list.php"); + header("Location: " . BASE_PATH . "settings/antraege/list.php"); exit(); } @@ -58,7 +58,7 @@ $stmt->execute([$sort, $id]); } Flash::set('success', 'Sortierung aktualisiert'); - header("Location: " . BASE_PATH . "admin/settings/antraege/list.php"); + header("Location: " . BASE_PATH . "settings/antraege/list.php"); exit(); } @@ -107,7 +107,7 @@

Antragstypen verwalten

- + Neuer Antragstyp
@@ -179,7 +179,7 @@ class="form-control form-control-sm"
- @@ -215,7 +215,7 @@ class="btn btn-danger mx-1" diff --git a/admin/settings/dashboard/categories/create.php b/admin/settings/dashboard/categories/create.php index 680baac9..6a075a3c 100644 --- a/admin/settings/dashboard/categories/create.php +++ b/admin/settings/dashboard/categories/create.php @@ -10,7 +10,7 @@ if (!Permissions::check(['admin', 'dashboard.manage'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); exit; } @@ -20,7 +20,7 @@ if (empty($title)) { Flash::set('error', 'missing-fields'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } @@ -34,15 +34,15 @@ Flash::set('dashboard.category', 'created'); $auditLogger = new AuditLogger($pdo); $auditLogger->log($_SESSION['userid'], 'Kategorie erstellt', 'Titel: ' . $title, 'Dashboard', 1); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } catch (PDOException $e) { error_log("Category creation failed: " . $e->getMessage()); Flash::set('error', 'exception'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } } else { - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } diff --git a/admin/settings/dashboard/categories/delete.php b/admin/settings/dashboard/categories/delete.php index 6ffd2d15..e623e1b6 100644 --- a/admin/settings/dashboard/categories/delete.php +++ b/admin/settings/dashboard/categories/delete.php @@ -10,7 +10,7 @@ if (!Permissions::check(['admin', 'dashboard.manage'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -18,7 +18,7 @@ if ($id <= 0) { Flash::set('dashboard.category', 'invalid-id'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } @@ -27,7 +27,7 @@ $checkStmt->execute([':id' => $id]); if (!$checkStmt->fetch()) { Flash::set('dashboard.category', 'not-found'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } @@ -37,15 +37,15 @@ Flash::set('dashboard.category', 'deleted'); $auditLogger = new AuditLogger($pdo); $auditLogger->log($_SESSION['userid'], 'Kategorie gelöscht [ID: ' . $id . ']', NULL, 'Dashboard', 1); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } catch (PDOException $e) { error_log("PDO Delete Error: " . $e->getMessage()); Flash::set('error', 'exception'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } } else { - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } diff --git a/admin/settings/dashboard/categories/update.php b/admin/settings/dashboard/categories/update.php index ad5e656b..c1ffaed8 100644 --- a/admin/settings/dashboard/categories/update.php +++ b/admin/settings/dashboard/categories/update.php @@ -10,7 +10,7 @@ if (!Permissions::check(['admin', 'dashboard.manage'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); exit; } @@ -21,7 +21,7 @@ if ($id <= 0 || empty($title)) { Flash::set('error', 'missing-fields'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } @@ -37,15 +37,15 @@ $auditLogger->log($_SESSION['userid'], 'Kategorie aktualisiert [ID: ' . $id . ']', NULL, 'Dashboard', 1); Flash::set('success', 'updated'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } catch (PDOException $e) { error_log("Category update failed: " . $e->getMessage()); Flash::set('error', 'exception'); - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } } else { - header("Location: " . BASE_PATH . "admin/settings/dashboard/index.php"); + header("Location: " . BASE_PATH . "settings/dashboard/index.php"); exit; } diff --git a/admin/settings/dashboard/index.php b/admin/settings/dashboard/index.php index 1632af63..709d0d6d 100644 --- a/admin/settings/dashboard/index.php +++ b/admin/settings/dashboard/index.php @@ -5,7 +5,7 @@ if (!isset($_SESSION['userid']) || !isset($_SESSION['permissions'])) { $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI']; - header("Location: " . BASE_PATH . "admin/login.php"); + header("Location: " . BASE_PATH . "login.php"); exit(); } @@ -14,7 +14,7 @@ if (!Permissions::check(['admin', 'dashboard.manage'])) { Flash::set('error', 'no-permissions'); - header("Location: " . BASE_PATH . "admin/index.php"); + header("Location: " . BASE_PATH . "index.php"); } ?> @@ -157,7 +157,7 @@ class="btn btn-sm btn-primary edit-tile-btn"