Файл: world-faces.ru/world-faces.ru/sys/fnc/online.php
Строк: 28
<?
function online($user=NULL)
{
global $set,$time;
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$user' AND `date_last` > '".(time()-3000)."' LIMIT 1"),0)==1)
{
$al=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));
if ($ank['status']==0)
{
if ($al['pol']==1) $on='<img src="/img/online/man_on.gif" alt="" class="icon"/>';
else
$on='<img src="/img/online/woman_on.gif" alt="" class="icon"/>';
}else{
$l=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));
if ($al['pol']==1) return '<img src="/img/online/man_off.gif" alt="" class="icon"/>';
else
return '<img src="/img/online/woman_off.gif" alt="" class="icon"/>';
}
}
}
?>