index.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. require_once('include/config.php');
  3. require_once('include/db.php');
  4. require_once('include/comment.php');
  5. $dirs = get_dir_list();
  6. $dirs_html = '';
  7. foreach ($dirs as $dir) {
  8. $dirs_html .= '<tr><td><a href="' . $config['basepath'] . 'dir.php?dir=' . urlencode($dir['path']) . '">' . htmlspecialchars($dir['name']) . '</a></td>';
  9. $dirs_html .= '<td>' . $dir['count'] . '</td>';
  10. $dirs_html .= '<td>' . date('j.m.Y', $dir['date']) . '</td>';
  11. $dirs_html .= '<td>' . count_comments($dir['id'], 'dir') . '</td>';
  12. $dirs_html .= '<td>';
  13. $comments = count_comments_all_dir_images($dir['id']);
  14. if ($comments > 0) {
  15. $dirs_html .= '<a href="' . $config['basepath'] . 'dir.php?dir=' . urlencode($dir['path']) . '&mode=viewcomments">';
  16. }
  17. $dirs_html .= $comments;
  18. if ($comments > 0) {
  19. $dirs_html .= '</a>';
  20. }
  21. $dirs_html .= '</td></tr>';
  22. }
  23. ?><!DOCTYPE html>
  24. <html>
  25. <head>
  26. <title>Obrazki</title>
  27. <link rel="stylesheet" href="/obrazki/style.css?<?=$time?>" type="text/css">
  28. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  29. </head>
  30. <body>
  31. <h1>Dostępne katalogi z obrazkami</h1>
  32. Uwaga, nowy skrypt. Zgłoś problemy administratorowi.
  33. <table id="dirlist"><tr><th>Nazwa</th><th>Obrazków</th><th>Utworzono</th><th>Komentarzy<br>do katalogu</th><th>Komentarzy<br>do obrazków</th></tr>
  34. <?=$dirs_html?>
  35. </table>
  36. <a class="k4" href="http://k4be.pl/"></a>
  37. </body>
  38. </html>