Файл: test.masteram.us/online.php
Строк: 264
<?
include 'Core.php';$show_all=true; // показ для всех
$set['title']='Список онлайн'; // заголовок страницы
include_once 'sys/inc/thead.php';
title();
$ank1=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '".(time()-1500)."'"), 0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT `id` FROM `user` WHERE `date_last` > '".(time()-1500)."' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
echo "<table class='post'>n";
if ($k_post==0)
{
echo "Сейчас на сайте никого нетn";
}
while ($ank = mysql_fetch_array($q))
{
$ank=get_user($ank['id']);
echo "<table class='post'>n";
if ($user['show_online']==0)
{
if ($ank['show_secret']==1)
{
echo '<tr><td class="icon14">';
echo "<img src='/style/secret.png' alt='' class='icon' width='50' height='50'/>n";
echo '<td class="anput">';
echo "".online($ank['id'])." <font color='red'>Невидимка</sont>n";
if (user_access('adm_news'))echo " (<a href='/info.php?id=$ank[id]'><span style="color:$ank[ncolor]">$ank[nick]</span></a>)n";
echo "<br/>n";
echo "<font color='#afb0a3'>(Скрытый профиль)</sont>n";
echo " </td>n";
echo " </tr>n";
}
if ($ank['show_secret']==0)
{
echo '<tr><td class="icon14">';
echo " <a href='/foto/$ank[id]/'>n";
avatar3($ank['id']);
echo "</a>n";
echo '<td class="anput">';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]' AND `time` > '$time'"), 0)!=0)
echo "<font color='red'>[BAN]</font>n";
if ($ank['pobeda']!=NULL)echo "<img src='/style/icons/pobeditel.png' alt='' class='icon'/>n";
echo "".online($ank['id'])." <a href='/info.php?id=$ank[id]'><span style="color:$ank[ncolor]">$ank[nick]</span></a>n";
if ($ank['obit']==0)
{
if ($ank['group_access']>1)echo "<img src='/img/online/$ank[pol].png'>n";
///if ($ank['group_access']>1)echo "<img src='/style/adm.png'>n";
}
if ($ank['status_vip']==1)echo " <img src='/status_vip/img/vip.gif'<br />"; ////vip статус
if ($ank['priz']>1)echo "<img src='/style/back.gif'>n";
if($ank['akt_rating']>=0 && $ank['akt_rating']<=1.000)echo " ";
if($ank['akt_rating']>=1.001 && $ank['akt_rating']<=2.500)echo " <img src='/style/rating/bronze.gif'></img> ";
if($ank['akt_rating']>=2.501 && $ank['akt_rating']<=5.000)echo " <img src='/style/rating/silver.gif'></img> ";
if($ank['akt_rating']>=5.001 && $ank['akt_rating']<=7.500)echo " <img src='/style/rating/gold.gif'></img> ";
if($ank['akt_rating']>=7.501 && $ank['akt_rating']<=10.000)echo " <img src='/style/rating/lafes_user.gif'></img> ";
if($ank['akt_rating']>=10.001 && $ank['akt_rating']<=200.000)echo " <img src='/rating/konkurs.png'></img> ";
if ($ank['brak']!=NULL)echo "<img src='/style/icons/rings.gif' alt='' class='icon'/> n";
if ($ank['braks']!=NULL)echo "<img src='/style/icons/rings.gif' alt='' class='icon'/> n";
if ($ank['stran']==0)echo "n";
if ($ank['stran']==1)echo "<img src='/style/strana/ru.png'>n";
if ($ank['stran']==2)echo "<img src='/style/strana/ua.png'>n";
if ($ank['stran']==3)echo "<img src='/style/strana/by.png'>n";
if ($ank['stran']==4)echo "<img src='/style/strana/az.png'>n";
if ($ank['stran']==5)echo "<img src='/style/strana/kz.png'>n";
if ($ank['stran']==6)echo "<img src='/style/strana/uz.png'>n";
if ($ank['stran']==7)echo "<img src='/style/strana/england.png'>n";
if ($ank['stran']==8)echo "<img src='/style/strana/de.png'>n";
if ($ank['akt_rating']!=NULL){echo'('.$ank['akt_rating'].')';}else{echo "(0.0)";}
if (isset($user) && $user['id']==$ank['id'])
{
echo " (Это Вы)<br/>n";
}
if (isset($user) && $user['id']!=$ank['id'])echo " <a href='/mail.php?id=$ank[id]'><img src='/img/mail.gif' alt='' /></a> <br/>n";
if($ank['akt_rating']>=0 && $ank['akt_rating']<=1.000)echo "<img src='/style/stat.png'> <font color='red'>Новичок </font></img><br />";
if($ank['akt_rating']>=1.001 && $ank['akt_rating']<=2.500)echo "<img src='/style/stat.png'> <font color='red'>Продвинутый </font></img><br />";
if($ank['akt_rating']>=2.501 && $ank['akt_rating']<=5.000)echo "<img src='/style/stat.png'> <font color='red'>Бывалый </font></img><br />";
if($ank['akt_rating']>=5.001 && $ank['akt_rating']<=7.500)echo "<img src='/style/stat.png'> <font color='red'>МегаОбитатель </font></img><br />";
if($ank['akt_rating']>=7.501 && $ank['akt_rating']<=10.000)echo "<img src='/style/stat.png'> <font color='red'>Ветеран </font></img><br />";
if($ank['akt_rating']>=10.001 && $ank['akt_rating']<=20.000)echo "<img src='/style/stat.png'> <font color='red'>Почетный Юзер </font></img><br />";
if ($ank['srating']!=NULL)
echo "<img src='/style/stat.png'><span style="color:$ank[mcolor]"> $ank[srating]</span> <br/>n";
else
if($ank['akt_rating']>=20.001 && $ank['akt_rating']<=200.000)echo "<img src='/style/stat.png'> <font color='red'>Лидер </font></img><br />";
if ($ank['show_url']==0)
{
if (otkuda($ank['url'])){echo " <font color='#afb0a3'>(".otkuda($ank['url']).")</font><br />n";
}else{echo "<font color='#afb0a3'>(На сайте)</font><br />n";}
}
}}
echo " </table>n";
}
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class='p_t'>";
echo "<center>Сейчас онлайн <font color='red'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > ".(time()-1500).""), 0)."</font> обитателя</a> + n";
echo "<a href='/online_g.php'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > ".(time()-1500)." AND `pereh` > '0'"), 0)."</a> гостей</center></div> n";
echo "<div class='rekl_main'><center>";
echo "На сайте были: <a href='/2days.php'>за последние 2-е суток</a> | <a href='/7days.php'>неделю</a>n";
echo "</center></div>n";
include_once 'sys/inc/tfoot.php';
?>