Wstępna administracja zdjęć oraz działająca opcja ich usuwania.

git-svn-id: https://svn.pioder.pl/sg-svn@21 3ed2631f-fe0d-47e0-9194-a46bc0f18ee8
This commit is contained in:
pioder
2009-09-22 14:38:37 +00:00
parent 3b78022753
commit 73d0952fcc
8 changed files with 176 additions and 78 deletions

View File

@@ -1,59 +1,59 @@
<?php
/**
* @package Galeria Suczawa 2009
* @file gallery.php
* @version $Id$
**/
$page = (isset($_GET['page'])) ? intval($_GET['page']) : 0;
require_once('./init.php'); #init stuff
NaglowekXHTML();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
<head>
<title>Galeria Zdjęć</title>
<?php
/**
* @package Galeria Suczawa 2009
* @file gallery.php
* @version $Id$
**/
$page = (isset($_GET['page'])) ? intval($_GET['page']) : 0;
require_once('./init.php'); #init stuff
NaglowekXHTML();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
<head>
<title>Galeria Zdjęć</title>
<link type="text/css" href="style.css" rel="stylesheet" />
<meta http-equiv="Content-Type" content="<?=$xhtml?'application/xhtml+x':'text/ht'?>ml; charset=utf-8" />
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<div id="page">
<img src="images/logo.png" width="800px" alt="Logo strony" />
<div id="content">
<div id="images">
<?php
$sql = "SELECT * FROM `photos` $limit";
if (!$result = $DB->query($sql))
{
blad('Nie mozna pobrac zdjec uzytkownikow!');
}
while($row = $result->fetch_assoc() )
{
?>
<div class="image_outer">
<a target="blank" href="display.php?id=<?=$row['id']?>">
<img class="image" height="100px" alt="Zdj___cie: <?= $row['photo_name']; ?>" src="images/upload/<?= $row['thumb_name']; ?>" id="image_<?=$row['id']?>" />
</a>
</div>
<?
}
?>
</div>
<div id="pages">Strony:
<?
GenerujListeStron();
?>
</div>
</div>
<div id="footer">
<a id="copyright">Copyright © 2009 ...</a><br />
<div id="links">
<a href="index.php">Strona Główna</a> | <a href="gallery.php">Fotogaleria</a> | <a href="download.php">Download</a> | <a href="http://suczawa.ath.cx">Forum</a> | <a href="admin/">Administracja</a>
</div>
</div>
</div>
</body>
</html>
<meta http-equiv="Content-Type" content="<?=$xhtml?'application/xhtml+x':'text/ht'?>ml; charset=utf-8" />
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<div id="page">
<img src="images/logo.png" width="800px" alt="Logo strony" />
<div id="content">
<div id="images">
<?php
$sql = "SELECT * FROM `photos` $limit";
if (!$result = $DB->query($sql))
{
blad('Nie mozna pobrac zdjec uzytkownikow!');
}
while($row = $result->fetch_assoc() )
{
?>
<div class="image_outer">
<a target="blank" href="display.php?id=<?=$row['id']?>">
<img class="image" height="100px" alt="Zdjęcie: <?= $row['photo_name']; ?>" src="images/upload/<?= $row['thumb_name']; ?>" id="image_<?=$row['id']?>" />
</a>
</div>
<?
}
?>
</div>
<div id="pages">Strony:
<?
GenerujListeStron();
?>
</div>
</div>
<div id="footer">
<a id="copyright">Copyright © 2009 ...</a><br />
<div id="links">
<a href="index.php">Strona Główna</a> | <a href="gallery.php">Fotogaleria</a> | <a href="download.php">Download</a> | <a href="http://suczawa.ath.cx">Forum</a> | <a href="admin/">Administracja</a>
</div>
</div>
</div>
</body>
</html>