$slug, 'title' => $title, 'created_at' => date('Y-m-d H:i:s'), 'password_hash' => $password !== '' ? password_hash($password, PASSWORD_DEFAULT) : null, 'expires_at' => trim((string)($_POST['expires_at'] ?? '')) ?: null, // Longest edge the browser downscales uploads to; null = original. 'max_resolution' => parse_max_resolution($_POST), 'images' => [], ]; // A guest upload link is just a per-gallery secret in the URL; presence // of upload_key = guest uploads enabled (revocable from the edit page). if (!empty($_POST['allow_uploads'])) { $gallery['upload_key'] = random_token(24); } gallery_save($gallery); flash_set('Gallery created. Now add images.'); redirect('gallery-edit.php?g=' . rawurlencode($slug)); } if ($action === 'delete') { $gallery = gallery_load((string)($_POST['slug'] ?? '')); if ($gallery !== null) { s3_delete_gallery_objects($gallery); gallery_delete($gallery['slug']); flash_set('Gallery and its S3 images deleted.'); } redirect('galleries.php'); } } $galleries = galleries_all(); admin_header('Galleries', 'galleries'); flash_render(); ?>

Galleries

New gallery

Existing galleries ()

No galleries yet.

TitleImagesAttributesExpiresCreatedActions
password' : 'open' ?> uploads' : '' ?> ' . e(resolution_label((int)$g['max_resolution'])) . '' : '' ?> expired' : '' ?> Edit · View ↗