|
<?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&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&submode=edit&id=<?php echo $row['id']; ?>">Popraw</td>
|
|
<td width="50"><a href="index.php?mode=admin_gallery&submode=delete&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&submode=add">Dodaj nowe zdjęcie...</a></div>
|
|
<?php StopkaPA(); ?>
|