Просмотр файла love/best.php

Размер файла: 1.46Kb
<?
echo '<hr color="DeepSkyBlue1" hr noshade size="1"></font>';
echo 'Лидеры сайта:<br/>';


$pol0=mysql_query("SELECT * FROM `user` WHERE `pol` = '0' ORDER BY `rating` DESC LIMIT 1");
while ($post = mysql_fetch_array($pol0))
{
echo "<a><a href='/info.php?id=$post[id]'>\n";
avatar($post['id']);


if ($post['ank_d_r']!=NULL && $post['ank_m_r']!=NULL && $post['ank_g_r']!=NULL){
$post['ank_age']=date("Y")-$post['ank_g_r'];
if (date("n")<$post['ank_m_r'])$post['ank_age']=$post['ank_age']-1;
elseif (date("n")==$post['ank_m_r']&& date("j")<$post['ank_d_r'])$post['ank_age']=$post['ank_age']-1;
}
}









$pol1=mysql_query("SELECT * FROM `user` WHERE `pol` = '1' ORDER BY `rating` DESC LIMIT 1");
while ($post = mysql_fetch_array($pol1))
{
echo "<a><a href='/info.php?id=$post[id]'>\n";
avatar($post['id']);

echo '</a><br/> ';

#------------------------------------------------------------
//echo "Хочешь стать лидером сайта? Нет ничего <a href='rati.php'>проще.</a><br />\n";
#------------------------------------------------------------
if ($post['ank_d_r']!=NULL && $post['ank_m_r']!=NULL && $post['ank_g_r']!=NULL){
$post['ank_age']=date("Y")-$post['ank_g_r'];
if (date("n")<$post['ank_m_r'])$post['ank_age']=$post['ank_age']-1;
elseif (date("n")==$post['ank_m_r']&& date("j")<$post['ank_d_r'])$post['ank_age']=$post['ank_age']-1;
}
}
echo '<hr color="DeepSkyBlue1" hr noshade size="1"></font>';
?>