Silnik strony + galerii zdjęć Suczawa 2009
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.6 KiB

  1. <?php
  2. /**
  3. * @package Galeria Suczawa 2009
  4. * @file admin/gallery_view.php
  5. * @version $Id$
  6. **/
  7. $sql = "SELECT * FROM `photos` ORDER BY `id` $limit";
  8. if (!$result = $DB->query($sql))
  9. {
  10. blad('Nie mozna pobrac zdjec uzytkownikow!');
  11. }
  12. NaglowekPA('Listowanie galerii');
  13. ?>
  14. <br />
  15. <br />
  16. <div align="right"><a href="index.php?mode=admin_gallery&amp;submode=add">Dodaj nowe zdjęcie...</a></div>
  17. <table width="900" border="1" style="border-color: gray; border-style: solid; border-collapse: collapse">
  18. <tr>
  19. <td colspan="6" bgcolor="yellow">Lista zdjęć (strona <?php echo $page; ?>)</td>
  20. </tr>
  21. <tr>
  22. <td class="b" width="30">Id</td>
  23. <td class="b" width="190">Miniatura</td>
  24. <td class="b" width="150">Autor</td>
  25. <td class="b">Opis</td>
  26. <td colspan="2" class="b">Operacje</td>
  27. <?php
  28. while ($row = $result->fetch_assoc())
  29. {
  30. ?>
  31. <tr>
  32. <td><?php echo $row['id']; ?></td>
  33. <td><img src="../images/upload/<?php echo $row['thumb_name']; ?>" alt="Zdjęcie" /></td>
  34. <td><?php if ($row['author']!='') { echo $row['author']; } else { echo 'Autor nieznany'; } ?></td>
  35. <td><?php if ($row['description']!='') { echo $row['description']; } else { echo 'Brak opisu'; } ?></td>
  36. <td width="50"><a href="index.php?mode=admin_gallery&amp;submode=edit&amp;id=<?php echo $row['id']; ?>">Popraw</td>
  37. <td width="50"><a href="index.php?mode=admin_gallery&amp;submode=delete&amp;id=<?php echo $row['id']; ?>">Usuń</td>
  38. </tr>
  39. <?php } ?>
  40. </table>
  41. <div align="left">Strony: <?php GenerujListeStron(true); ?></div>
  42. <div align="right"><a href="index.php?mode=admin_gallery&amp;submode=add">Dodaj nowe zdjęcie...</a></div>
  43. <?php StopkaPA(); ?>