<?
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';

$set['title']='В этот день родились'; // заголовок страницы
include_once 'sys/inc/thead.php';
title();
aut();

$currD=date("d", time());
$currm=date("m", time());


$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm'",$db), 0);
$k_page=k_page($k_post,5);
$page=page($k_page);
$start=5*$page-5;
$q_bday=mysql_query("SELECT * FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm' LIMIT ".$start.", 5 ");
while ($bday = mysql_fetch_array($q_bday))
{

$bday['ank_age']=date("Y")-$bday['ank_g_r'];
if (date("n")<$bday['ank_m_r'])$bday['ank_age']=$bday['ank_age']-1;
elseif (date("n")==$bday['ank_m_r']&& date("j")<$bday['ank_d_r'])$bday['ank_age']=$bday['ank_age']-1;

if($num==1){ 
echo "<div class='rowdown'>"; 
$num=0;
}else{ 
echo "<div class='rowup'>"; 
$num=1;}

echo' '.online($bday['id']).'   <a href="info.php?id='.$bday['id'].'"><span style=\'color:'.$bday['color'].'\'>'.$bday['nick'].'</span></a> ('.$bday['ank_age'].')<br/>';
if (isset($user)){echo"<img src=\"/style/icons/14.gif\" alt=\"\"/> <a href='/present/presentlist.php?user=$bday[id]'>Сделать подарок</a> </span><br />\n";}
echo "</div>"; 

}
if ($k_page>1)str('list_bday.php?all=1&amp;',$k_page,$page);


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