<?php
session_start();
ob_start();
ob_start( 'ob_gzhandler' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php include_once('languages.php'); echo $lang['PAGE_TITLE']; ?></title>
<style type="text/css" media="screen"> @import url( styles.php ); @import url(css/lightbox.css); </style>
<script type="text/javascript"> if (top != self) top.location.href = location.href; </script>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="shortcut icon" href="favicon.ico" />
<meta http-equiv="Content-Language" content="bg" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta name="keywords" content="hunt,hunting,shooting,стрелба,федерация,federation,новини,news,документация,documentation,контакти,contacts,връзки,links" />
<meta name="author" content="Димитър Иванов" />
<meta name="revisit-after" content="3 days" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="robots" content="index,follow" />
<meta name="googlebot" content="index, follow" />
<meta name="google-site-verification" content="EmJgS1e7OWu7P-VumL-J8ayAzsnIIakkjT4nZg9dByQ" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<meta name="rating" content="general" />
<meta name="pubdate" content="2011-03-19" />
<meta name="categories" content="hunting" />
</head>
<body>
<center>
<a href ="<?php include_once('languages.php'); echo $lang['link']; ?>"><div class="logo"></div></a>
<div class="logo_text"><?php include_once('languages.php'); echo $lang['222']; ?></div>
<div class="right">
<a href="?lang=bg"><img src="img/lang_icon_bg.png" height="14" width="20" alt="Български" border="0" /></a>
<a href="?lang=en"><img src="img/lang_icon_en.png" height="14" width="20" alt="Английски" border="0" /></a>
</div>
<div class="clear">
<div id="hover">
<ul class="main">
<li class="margin">
<a href="<?php include_once('languages.php'); echo $lang['link']; ?>" class="btn" id="btn0"><?php include_once('languages.php'); echo $lang['MENU_NEWS']; ?></a>
</li>
<li class="margin">
<a href="forus.php" class="btn" id="btn1"><?php include_once('languages.php'); echo $lang['forus']; ?></a>
</li>
<li class="margin">
<a href="links.php" class="btn" id="btn2" ><?php include_once('languages.php'); echo $lang['menu_prav']; ?></a>
</li>
<li class="margin">
<a href="calendar.php" class="btn" id="btn3" ><?php include_once('languages.php'); echo $lang['menu_cal']; ?></a>
</li>
<li class="margin">
<a href="results.php" class="btn" id="btn4"><?php include_once('languages.php'); echo $lang['result']; ?></a>
</li>
<li class="margin">
<a href="ranklist.php" class="btn" id="btn5"><?php include_once('languages.php'); echo $lang['menu_rank']; ?></a>
</li>
<li class="margin">
<a href="links1.php" class="btn" id="btn6"><?php include_once('languages.php'); echo $lang['links1']; ?></a>
</li>
<li class="margin">
<a href="gallery.php" class="btn" id="btn7"><?php include_once('languages.php'); echo $lang['menu_gallery']; ?></a>
</li>
<li class="margin">
<a href="clubs.php" class="btn" id="btn8"><?php include_once('languages.php'); echo $lang['menu_clubs']; ?></a>
</li>
<li class="margin">
<a href="contacts.php" class="btn" id="btn9"><?php include_once('languages.php'); echo $lang['menu_contact']; ?></a>
</li>
</ul>
</div></div>
</center>
<div id="main">
<div class="clear"></div>
<div class="cont">
<div class="zaglavie">Нашата галерия</div>
<div class="novini">
<div class ="col">
<?php
echo"
<center>
Изберете Категория:<br /><a href = '?cat=tournaments&page=0' class='none'> Турнири , </a> <a href = '?cat=club&page=0' class='none'> Клубни мероприятия, </a><a href = '?cat=meetings&page=0' class='none'> Сбирки</a>
</center><br />";
define('IN_VALID', true);
include_once('conf.php');
$category = addslashes(htmlspecialchars($_GET['cat']));
If ($category == "tournaments" || $category == "club" || $category == "meetings") {
$the_limit = "10";
$the_query = "SELECT * FROM snimki WHERE category = '$category'";
$listed = "<br />";
$listed_end = "";
$page = trim((int)$_GET['page']);
if(is_numeric ($_GET['page'])){
$page = $page * $the_limit;
if( (!$page) or ($page == "0") ){
$a = "0";
$b = $the_limit;
} else {
$a = $page;
$b = $a + $the_limit;
}
} else { echo "<center>Стараницата която търсите неможе да бъде намерена !</center>";exit();
$a = "0";
$b = $the_limit;
}
$query = $the_query." limit $a, $the_limit";
$result = mysql_query($query, $conn) or die (mysql_error());
$result_all = mysql_query($the_query, $conn) or die (mysql_error());
$num_all = mysql_num_rows($result_all);
while($red = mysql_fetch_array($result)){
$listed.= "<table border='0' align='left'><tr><td>".$red['name']."</td></tr>";
$listed.= '<tr><td><a href = "'.$red['url'].'" rel="lightbox"><img src ="'.$red['full'].'" alt="'.$red['name'].'" border="0" /></a></td></tr></table>';
}
$num_pages = ceil($num_all / $the_limit);
for($i=0;$i<$num_pages;$i++){
$name = $i;
$name++;
if($name != $num_pages){
$last = " | ";
} else $last = "";
$pages.= "<a href=\"?cat=$category&page=".$i."\">".$name."</a>".$last;
}
echo $listed.$listed_end;
echo "<br /><br />";
echo $pages;
}
@mysql_close();
?>
</div></div>
<div class="krai"></div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
<?php @ob_end_flush(); ?>