index.php 946 B

123456789101112131415161718192021222324252627
  1. <?php
  2. require dirname(__DIR__, 2) . '/app/bootstrap.php';
  3. auth_require();
  4. $site = site_get();
  5. $galleries = galleries_all();
  6. $active = count(array_filter($galleries, fn($g) => !gallery_is_expired($g)));
  7. admin_header('Dashboard');
  8. flash_render();
  9. ?>
  10. <h1>Dashboard</h1>
  11. <div class="card">
  12. <table>
  13. <tr><td>Showreel images</td><td><?= count($site['showreel'] ?? []) ?></td>
  14. <td><a href="showreel.php">Manage →</a></td></tr>
  15. <tr><td>Galleries</td><td><?= count($galleries) ?> (<?= $active ?> active)</td>
  16. <td><a href="galleries.php">Manage →</a></td></tr>
  17. <tr><td>Front page</td><td><?= e($site['intro_title']) ?></td>
  18. <td><a href="frontpage.php">Edit →</a></td></tr>
  19. </table>
  20. </div>
  21. <p class="help">
  22. Tip: create a gallery under <em>Galleries</em>, then share its link with your client.
  23. Password and expiry date are optional per gallery.
  24. </p>
  25. <?php admin_footer(); ?>