philippurbschat.de/home/views/admin/dashboard.php

56 lines
No EOL
4.5 KiB
PHP

<?php require_once __DIR__ . '/../inc/admin_header.php'; ?>
<div class="max-w-6xl w-full mx-auto flex flex-col md:flex-row gap-6 p-6">
<aside class="w-full md:w-64 bg-slate-900/80 backdrop-blur-sm border border-slate-700/50 rounded-xl shadow-lg p-4 h-fit">
<div class="flex items-center gap-2 mb-6 border-b border-slate-700/50 pb-3">
<span class="text-xl">⚙️</span>
<h2 class="text-emerald-400 font-mono font-bold text-lg tracking-tight">System_Admin</h2>
</div>
<nav class="flex flex-col gap-2 font-mono text-sm">
<a href="<?= Config::get('BASE_URL', '/') ?>admin" class="px-3 py-2 bg-emerald-500/10 text-emerald-400 rounded-md border border-emerald-500/20 transition-all">> Dashboard</a>
<a href="<?= Config::get('BASE_URL', '/') ?>admin/users" class="px-3 py-2 hover:bg-slate-800 text-slate-400 hover:text-slate-200 rounded-md transition-all">> Benutzer</a>
<a href="<?= Config::get('BASE_URL', '/') ?>admin/settings" class="px-3 py-2 hover:bg-slate-800 text-slate-400 hover:text-slate-200 rounded-md transition-all">> Einstellungen</a>
</nav>
</aside>
<main class="flex-1 bg-slate-900/80 backdrop-blur-sm border border-slate-700/50 rounded-xl shadow-2xl overflow-hidden flex flex-col">
<div class="bg-slate-800/80 px-4 py-3 border-b border-slate-700/50 flex items-center gap-2">
<div class="w-3 h-3 rounded-full bg-rose-500"></div>
<div class="w-3 h-3 rounded-full bg-amber-500"></div>
<div class="w-3 h-3 rounded-full bg-emerald-500"></div>
<div class="ml-2 font-mono text-xs text-slate-400">philcore-dashboard.sh</div>
<div class="ml-auto text-[10px] text-slate-500 font-mono italic">terminal_session_main</div>
</div>
<div class="p-6 sm:p-8 flex-1">
<header class="mb-8 border-b border-slate-800 pb-6">
<h1 class="text-3xl font-extrabold text-transparent bg-clip-text bg-linear-to-r from-emerald-400 to-cyan-400 tracking-tight mb-2">> Dashboard_</h1>
<p class="text-slate-400 font-mono text-sm">System-Status für <span class="text-emerald-400"><?= htmlspecialchars(Auth::user() ?? 'Phili') ?></span></p>
</header>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div class="p-5 bg-slate-950/80 rounded-lg border border-slate-800/80 shadow-inner">
<h3 class="text-slate-500 font-mono text-xs uppercase tracking-wider mb-2">> db_connection</h3>
<p class="text-emerald-400 font-mono text-sm flex items-center gap-2">
<span class="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"></span>
<?= htmlspecialchars($health['db_status'] ?? 'Error') ?>
</p>
</div>
<div class="p-5 bg-slate-950/80 rounded-lg border border-slate-800/80 shadow-inner">
<h3 class="text-slate-500 font-mono text-xs uppercase tracking-wider mb-2">> php_engine</h3>
<p class="text-cyan-400 font-mono text-sm">v<?= htmlspecialchars($health['php_version'] ?? 'N/A') ?> (<?= htmlspecialchars($health['memory'] ?? 'N/A') ?>)</p>
</div>
<div class="p-5 bg-slate-950/80 rounded-lg border border-slate-800/80 shadow-inner">
<h3 class="text-slate-500 font-mono text-xs uppercase tracking-wider mb-2">> disk_space</h3>
<p class="text-slate-300 font-mono text-sm"><?= htmlspecialchars($health['disk_free'] ?? 'Locked') ?></p>
</div>
<div class="p-5 bg-slate-950/80 rounded-lg border border-slate-800/80 shadow-inner">
<h3 class="text-slate-500 font-mono text-xs uppercase tracking-wider mb-2">> write_permissions</h3>
<p class="font-mono text-sm <?= ($health['writable'] ?? '') === 'OK' ? 'text-emerald-400' : 'text-rose-500' ?>"><?= htmlspecialchars($health['writable'] ?? 'Failed') ?></p>
</div>
</div>
<div class="mt-8 p-4 bg-black/40 rounded border border-slate-800 font-mono text-[10px] text-slate-500 leading-relaxed">
<p>> [<?= date('H:i:s') ?>] SYS_LOAD: OPTIMAL</p>
<p>> [<?= date('H:i:s') ?>] ENV_STATUS: <?= htmlspecialchars($health['env_status'] ?? 'Unknown') ?></p>
<p>> [<?= date('H:i:s') ?>] Alle Systeme bereit.</p>
</div>
</div>
</main>
</div>
<?php require_once __DIR__ . '/../inc/admin_footer.php'; ?>