- admins and login_attempts tables - cli/create_admin.php: create an admin or reset a password over SSH (no email involved) - includes/auth.php: hardened admin sessions, login throttling (5 failures per IP per 15 minutes) and CSRF helpers - admin/: login, logout and a dashboard showing broadcast status - includes/admin_layout.php: shared admin page layout Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
757 B
PHP
28 lines
757 B
PHP
<?php
|
|
require __DIR__ . '/../includes/auth.php';
|
|
require __DIR__ . '/../includes/admin_layout.php';
|
|
require __DIR__ . '/../includes/broadcasts.php';
|
|
|
|
$admin = requireAdmin();
|
|
$db = getDB();
|
|
|
|
$live = liveBroadcast($db);
|
|
$show = currentShow($db);
|
|
|
|
adminHeader('Dashboard', $admin);
|
|
?>
|
|
<p>Logged in as <strong><?= e($admin['username']) ?></strong>.</p>
|
|
|
|
<h3>Broadcast status</h3>
|
|
<p>
|
|
<?php if ($live): ?>
|
|
Live now<?= $show ? ': <strong>' . e($show['name']) . '</strong>' : ' (no show set)' ?>, since <?= e($live['started_at']) ?> UTC.
|
|
<?php elseif ($show): ?>
|
|
Offline. <strong><?= e($show['name']) ?></strong> is queued for the next broadcast.
|
|
<?php else: ?>
|
|
Offline. No show is queued.
|
|
<?php endif; ?>
|
|
</p>
|
|
<?php
|
|
adminFooter();
|