| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- require dirname(__DIR__) . '/app/bootstrap.php';
- auth_require();
- $site = site_get();
- $galleries = galleries_all();
- $active = count(array_filter($galleries, fn($g) => !gallery_is_expired($g)));
- $stats = array_map(fn($g) => gallery_stats($g['slug']), $galleries);
- $views = array_sum(array_column($stats, 'views'));
- $downloads = array_sum(array_column($stats, 'downloads'));
- admin_header('Dashboard');
- flash_render();
- ?>
- <h1>Dashboard</h1>
- <div class="card">
- <table>
- <tr><td>Showreel images</td><td><?= count($site['showreel'] ?? []) ?></td>
- <td><a href="showreel.php">Manage →</a></td></tr>
- <tr><td>Galleries</td><td><?= count($galleries) ?> (<?= $active ?> active)</td>
- <td><a href="galleries.php">Manage →</a></td></tr>
- <tr><td>Gallery views</td><td><?= $views ?></td>
- <td><a href="galleries.php">Per gallery →</a></td></tr>
- <tr><td>Archive downloads</td><td><?= $downloads ?></td>
- <td><a href="galleries.php">Per gallery →</a></td></tr>
- <tr><td>Front page</td><td><?= e($site['intro_title']) ?></td>
- <td><a href="frontpage.php">Edit →</a></td></tr>
- </table>
- </div>
- <p class="help">
- Tip: create a gallery under <em>Galleries</em>, then share its link with your client.
- Password and expiry date are optional per gallery.
- </p>
- <?php admin_footer(); ?>
|