Файл: play/random_user_profile.php
Строк: 181
<?
include_once '../connect.php';
$location = '(В топ 10-ке случайных анкет)';
include_once '../head.php';
include '../core/page_ava.php';
$q = mysql_query("SELECT * FROM `users` ORDER BY rand() LIMIT 10;");
echo "<div class='title'>";
echo " Топ 10-ка случайных анкет:";
echo "</div>n";
while($ank = mysql_fetch_assoc($q)){
echo "<div class='div'>";
echo "<table class='post'>n";
echo " <tr>n";
echo " <td class='icon48' rowspan='2'>n";
echo page_ava($ank['id'],48);
echo "</a>n";
echo " </td>n";
echo " <td class='anput'>n";
if(ban($ank['id']) || ($ank['delete'] == 1)){
echo ''. ico($ank['sex'], $ank['admin'], $ank['online']) .' ';
if ($ank['anketa_name']!=NULL){echo '<a href = "/page.php?id='.$ank['id'].'"><b><del>'.$ank['login'].'</del></b></a>';}
else{
echo '<a href = "/page.php?id='.$ank['id'].'"><b><del><font color="#8f8c85"><b>'.$ank['login'].'</font></del></b></a>';
}
} else {
echo ''. ico($ank['sex'], $ank['admin'], $ank['online']) .' ';
if ($ank['anketa_name']!=NULL){echo '<a href = "/page.php?id='.$ank['id'].'"><b>'.$ank['login'].'</b></a>';}
else{
echo '<a href = "/page.php?id='.$ank['id'].'"><b><font color="#8f8c85"><b>'.$ank['login'].'</font></b></a>';
}
}
if($ank['rating']>=1000 && $ank['rating']<=1999)echo "<img src='/ico/b.png' alt='' class='icon'</a>n";
if($ank['rating']>=2000 && $ank['rating']<=2999)echo "<img src='/ico/s.png' alt='' class='icon'</a>n";
if($ank['rating']>=3000)echo "<img src='/ico/z.png' alt='' class='icon'</a>n";
echo '<br/>';
if ($ank['strana']==0)echo "n";
if ($ank['strana']==1)echo "<img src='/style/strana/ru.png'>n";
if ($ank['strana']==2)echo "<img src='/style/strana/ua.png'>n";
if ($ank['strana']==3)echo "<img src='/style/strana/by.png'>n";
if ($ank['strana']==4)echo "<img src='/style/strana/az.png'>n";
if ($ank['strana']==5)echo "<img src='/style/strana/kz.png'>n";
if ($ank['strana']==6)echo "<img src='/style/strana/uz.png'>n";
if ($ank['strana']==7)echo "<img src='/style/strana/england.png'>n";
if ($ank['strana']==8)echo "<img src='/style/strana/de.png'>n";
if ($ank['anketa_city']!=NULL)echo " <font color='#424140'>$ank[anketa_city]</font><br />n";
else
echo " <font color='#8f8c85'>Город не указан</font><br />n";
if ($ank['anketa_name']!=NULL){echo "<span class="ank_d">$ank[anketa_name]</span>n";}
else{
}
if ($ank['sex']==m)
echo " (Муж),n";
else
echo "(Жен),n";
$ank['ank_age']=date("Y")-$ank['anketa_byear'];
if (date("n")<$ank['anketa_bmonth'])$ank['ank_age']=$ank['ank_age']-1;
elseif (date("n")==$ank['anketa_bmonth']&& date("j")<$ank['anketa_bday'])$ank['ank_age']=$ank['ank_age']-1;
echo "<span class="ank_d"><font color='#8f8c85'>/$ank[ank_age]</font> лет</span><br />n";
echo " </td>n";
echo " </tr>n";
echo " <tr>n";
echo "</table>n";
echo "</form>n";
echo '</div>';
}
echo "<div class='div'>- ";
echo " <a href='top_users.php'>Вернутся в топы</a>";
echo"</div>";
require('../foot.php');
?>