Файл: test.masteram.us/list_bday.php
Строк: 47
<?
include 'Core.php';
$set['title']='Дни рождения'; // заголовок страницы
include_once 'sys/inc/thead.php';
title();
echo"<div class='aut'><center><img src='/style/6.gif' alt='' class='icon'/><br/>В этот день родились:</center></div>n";
$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;
echo"<div class='linechat'>";
echo"<img src='/style/icons/pod16.gif' alt='' class='icon'/>n";
echo' <a href="info.php?id='.$bday['id'].'"><span style="color:$bday[ncolor]">'.$bday['nick'].'</span></a> ('.$bday['ank_age'].')<br/>';
echo "<img src='/style/icons/14.png' alt='' class='icon'/>n";
echo"<a href='/present/podarok.php?user=$bday[id]'>Сделать подарок</a> <br />n";
echo"</div>";
}
if ($k_page>1)str('list_bday.php?all=1&',$k_page,$page);
echo"<div class='aut'>";
echo "<img src='/style/back.gif' alt='' class='icon'/>n";
echo"<a href='/love/'>Назад</a></div>";
include_once 'sys/inc/tfoot.php';
?>