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.
 
 
 
 

47 lines
1.6 KiB

<?php
/**
* @package Galeria Suczawa 2009
* @file admin/gallery_view.php
* @version $Id$
**/
$sql = "SELECT * FROM `photos` ORDER BY `id` $limit";
if (!$result = $DB->query($sql))
{
blad('Nie mozna pobrac zdjec uzytkownikow!');
}
NaglowekPA('Listowanie galerii');
?>
<br />
<br />
<div align="right"><a href="index.php?mode=admin_gallery&amp;submode=add">Dodaj nowe zdjęcie...</a></div>
<table width="900" border="1" style="border-color: gray; border-style: solid; border-collapse: collapse">
<tr>
<td colspan="6" bgcolor="yellow">Lista zdjęć (strona <?php echo $page; ?>)</td>
</tr>
<tr>
<td class="b" width="30">Id</td>
<td class="b" width="190">Miniatura</td>
<td class="b" width="150">Autor</td>
<td class="b">Opis</td>
<td colspan="2" class="b">Operacje</td>
<?php
while ($row = $result->fetch_assoc())
{
?>
<tr>
<td><?php echo $row['id']; ?></td>
<td><img src="../images/upload/<?php echo $row['thumb_name']; ?>" alt="Zdjęcie" /></td>
<td><?php if ($row['author']!='') { echo $row['author']; } else { echo 'Autor nieznany'; } ?></td>
<td><?php if ($row['description']!='') { echo $row['description']; } else { echo 'Brak opisu'; } ?></td>
<td width="50"><a href="index.php?mode=admin_gallery&amp;submode=edit&amp;id=<?php echo $row['id']; ?>">Popraw</td>
<td width="50"><a href="index.php?mode=admin_gallery&amp;submode=delete&amp;id=<?php echo $row['id']; ?>">Usuń</td>
</tr>
<?php } ?>
</table>
<div align="left">Strony: <?php GenerujListeStron(true); ?></div>
<div align="right"><a href="index.php?mode=admin_gallery&amp;submode=add">Dodaj nowe zdjęcie...</a></div>
<?php StopkaPA(); ?>