Файл: world-faces.ru/world-faces.ru/sys/inc/best.php
Строк: 71
<?
echo '<div class="gend"><center>Лучшая девушка</center>';
echo "</div>";
echo "<div class='adm2'>";
echo '<table>';
$pol1=mysql_query("SELECT * FROM `user` WHERE `pol` = '0' ORDER BY `rating` DESC LIMIT 1");
while ($post = mysql_fetch_array($pol1))
{
echo '<td valign="syr">';
avatar2($post['id']);
echo '<br />';
echo '<td valign="top" style="padding-left:4px;"> ';
echo "".online($post['id'])."n";
echo "<span class='small minor'><a href='/info.php?id=$post[id]'>$post[nick]</span></a>";
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 " $post[ank_age]n";
}
echo "<br/><span class='small minor'>Рейт: $post[rating]</span><br />";
}
echo '</tr>';
echo '</table>';
echo "</div>";
echo '<div class="gend"><center>Лучший парень</center>';
echo "</div>";
echo "<div class='adm'>";
echo '<table>';
echo '<tr>';
echo '<td valign="top"> ';
$pol1=mysql_query("SELECT * FROM `user` WHERE `pol` = '1' ORDER BY `rating` DESC LIMIT 1");
while ($post = mysql_fetch_array($pol1))
{
avatar2($post['id']);
echo '</td>';
echo '<td valign="top" style="padding-left:4px;"> ';
echo "".online($post['id'])."n";
echo "<span class='small minor'><a href='/info.php?id=$post[id]'>$post[nick]</a></span>";
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 " $post[ank_age]n";
}
echo "<br/><span class='small minor'>Рейт: $post[rating]</span>";
}
echo '</tr> ';
echo '</table>';
echo "</div>";
?>