################################################################
#
# Foto katalog I-AM
#
# =============================================================
#
# Author: Andrzej Sobczyk
# andrzej@sobczyk.eu
# Copyright: Andrzej Sobczyk 2011
#
# Rozpowszechnianie lub zmiana bez zgody autora zabronione.
# Distribution or change without author permition is prohibited.
#
###############################################################
include_once('functions.php');
$sql = 'SELECT * FROM `galleries` WHERE `id`='.sql_quote($_GET['id']);
$r = zapytaj($sql);
if ( ! mysql_num_rows($r) ) {
header('Location: /index.php');
exit;
}
$r = mysql_fetch_assoc($r);
if ( ! $r['active'] ) {
header('Location: /index.php');
exit;
}
$r['title'] = htmlspecialchars($r['title']);
$sql = 'UPDATE `galleries` SET `counter`=`counter`+1 WHERE `id`='.sql_quote($r['id']);
zapytaj($sql);
$have_left_menu = 1;
$page_title = $site_name . ' - Produktkategorie - '.$r['title'];
$in_head = '
';
set_pageaction('galeria: '.$r['title']);
pageHeader();
themeHeader();
echo '
';
print_title('Produktkategorie "'.$r['title'].'"');
openTable();
echo $r['description'].'
';
closeTable();
openTable();
$sql = 'SELECT * FROM `pictures` WHERE `active`=1 AND `gallery`='.sql_quote($r['id']);
$sql .= ' ORDER BY `pos`';
$p = zapytaj($sql);
while($row = mysql_fetch_assoc($p)) {
echo '