* * - Unknown or expired galleries show the same neutral "not available" page. * - Password-protected galleries show a password form; a successful unlock * is remembered in the session for that gallery only. * - Thumbnails and full-res originals are loaded by the browser directly * from S3 via short-lived presigned URLs. */ require __DIR__ . '/app/bootstrap.php'; session_boot(); $slug = (string)($_GET['g'] ?? ''); $gallery = $slug !== '' ? gallery_load($slug) : null; if ($gallery === null || gallery_is_expired($gallery)) { http_response_code(404); public_header('Gallery not available'); echo '

Gallery not available

' . '

This gallery does not exist or is no longer online.

'; public_footer(); exit; } $needsPassword = !empty($gallery['password_hash']); $unlocked = !$needsPassword || !empty($_SESSION['gallery_unlocked'][$slug]); if ($needsPassword && !$unlocked && $_SERVER['REQUEST_METHOD'] === 'POST') { csrf_verify(); if (password_verify((string)($_POST['password'] ?? ''), $gallery['password_hash'])) { $_SESSION['gallery_unlocked'][$slug] = true; redirect('gallery.php?g=' . rawurlencode($slug)); } $error = 'Wrong password.'; } if ($needsPassword && !$unlocked) { public_header(e($gallery['title'])); ?>

photos ยท available until

<?= e($img['name'] ?? '') ?>