<?

include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
if(isset($_GET['znachki']) and $_GET['znachki']=='cat')
$set['title']='Значки';





include_once '../sys/inc/thead.php';

title();

err();

aut();

if (isset($user) & $user['dopusk_snachki']==1)
{
Echo "Наша добрая Администация, запретила тебе покупать значки";
}else
{
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `znachki` "),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($k_post==0)
{
echo "<div class='p_t'>\n";
echo "Иконок нету";
echo "</div>\n"; 
}
$zna = mysql_query("select * from `znachki` ORDER by `id` DESC LIMIT $start, $set[p_str];"); 
while ($znac = mysql_fetch_array($zna)){
echo "<div class='p_m'><center><a href='icon.php?znac=$znac[id]'><img src='$znac[url]' alt='' /></a></center></div>";

}

if ($k_page>1)str("?znachki=$zn[id]&amp;",$k_page,$page);
}


include_once '../sys/inc/tfoot.php';

?>

