<?
$DIR = $_SERVER["DOCUMENT_ROOT"];
require_once $DIR.'/sys/inc/start.php';
require_once $DIR.'/sys/inc/compress.php';
require_once $DIR.'/sys/inc/sess.php';
require_once $DIR.'/sys/inc/home.php';
require_once $DIR.'/sys/inc/settings.php';
require_once $DIR.'/sys/inc/db_connect.php';
require_once $DIR.'/sys/inc/ipua.php';
require_once $DIR.'/sys/inc/fnc.php';
require_once $DIR.'/sys/inc/user.php';
only_reg();

$set['title']='Пойманые подарки';

require_once $DIR.'/sys/inc/thead.php';
title();
err();


$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `new_year` WHERE `id_user` = '$user[id]'"),0);

if ($k_post==0)
{

msg('У вас нет подарков');


}

$q=mysql_query("SELECT * FROM `new_year` WHERE `id_user` = '$user[id]' ORDER BY id DESC LIMIT 4");
while ($post = mysql_fetch_assoc($q))
{

echo "
<div class='ankus'>
<img src='/style/podarki/$post[present].png'>
<br />
<b>Осталось</b>: <i>$post[copy]</i> подарков
";
?></div><?
}


require_once $DIR.'/sys/inc/tfoot.php';
?>