debug und so

This commit is contained in:
2025-12-27 02:21:11 +01:00
parent 55bf6d7298
commit 330751d83c
6 changed files with 99 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
<?php
$app = app();
$isLoggedIn = isset($_SESSION['user_id']);
$isDebug = defined('APP_DEBUG') && APP_DEBUG === true;
?>
<header class="site-header">
<div class="container nav-row">
@@ -21,6 +22,9 @@ $isLoggedIn = isset($_SESSION['user_id']);
<?php if ($isLoggedIn): ?>
<a class="btn ghost" href="/dashboard">Dashboard</a>
<a class="btn ghost" href="/logout">Logout</a>
<?php if ($isDebug): ?>
<a class="btn ghost" href="/debug">Debug</a>
<?php endif; ?>
<?php else: ?>
<a class="btn ghost" href="/login">Anmelden</a>
<a class="btn" href="/register">Kostenlos registrieren</a>
@@ -36,6 +40,9 @@ $isLoggedIn = isset($_SESSION['user_id']);
<?php if ($isLoggedIn): ?>
<a class="btn ghost" href="/dashboard">Dashboard</a>
<a class="btn block" href="/logout">Logout</a>
<?php if ($isDebug): ?>
<a class="btn ghost block" href="/debug">Debug</a>
<?php endif; ?>
<?php else: ?>
<a class="btn ghost" href="/login">Anmelden</a>
<a class="btn block" href="/register">Kostenlos registrieren</a>