41 lines
1.8 KiB
PHP
41 lines
1.8 KiB
PHP
<?php
|
||
require_once __DIR__ . '/../includes/bootstrap.php';
|
||
$staff = require_admin();
|
||
$pdo = get_db();
|
||
|
||
$results = security_check_all($pdo, true);
|
||
$counts = ['error' => 0, 'warn' => 0, 'info' => 0, 'ok' => 0];
|
||
foreach ($results as $r) $counts[$r['level']]++;
|
||
|
||
$pageTitle = 'Sicherheitsprüfung';
|
||
$activePage = 'security_check';
|
||
require __DIR__ . '/_header.php';
|
||
|
||
$style = [
|
||
'error' => ['#dc2626', '❌', 'Handeln'],
|
||
'warn' => ['#d97706', '⚠️', 'Prüfen'],
|
||
'info' => ['#2563eb', 'ℹ️', 'Hinweis'],
|
||
'ok' => ['#15803d', '✅', 'In Ordnung'],
|
||
];
|
||
?>
|
||
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap">
|
||
<div>
|
||
<h1>Sicherheitsprüfung</h1>
|
||
<p class="muted">Prüft die Einrichtung dieser Installation und ruft interne Adressen selbst ab, um zu sehen, ob sie von außen erreichbar wären.</p>
|
||
</div>
|
||
<a href="/staff/security_check.php" class="btn btn-outline" style="flex-shrink:0">🔄 Erneut prüfen</a>
|
||
</div>
|
||
|
||
<div class="card" style="margin-bottom:16px">
|
||
<strong><?= $counts['error'] ?></strong> Handlungsbedarf · <strong><?= $counts['warn'] ?></strong> Prüfen · <strong><?= $counts['info'] ?></strong> Hinweise · <strong><?= $counts['ok'] ?></strong> in Ordnung
|
||
</div>
|
||
|
||
<?php foreach ($results as $r): [$color, $icon, $label] = $style[$r['level']]; ?>
|
||
<div class="card" style="margin-bottom:10px;border-left:4px solid <?= $color ?>">
|
||
<div style="font-weight:600"><?= $icon ?> <?= e($r['title']) ?> <span class="muted" style="font-weight:400;font-size:.78rem">· <?= e($label) ?></span></div>
|
||
<?php if ($r['detail'] !== ''): ?><div class="muted" style="font-size:.88rem;margin-top:4px"><?= e($r['detail']) ?></div><?php endif; ?>
|
||
</div>
|
||
<?php endforeach; ?>
|
||
|
||
<?php require __DIR__ . '/_footer.php'; ?>
|