Вход Регистрация
Файл: sys/fnc/online.php
Строк: 162
<?
function online($user=NULL)
{
global 
$set,$time;

if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$user' AND `date_last` > '".(time()-600)."' LIMIT 1"),0)==1)
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));

if (
$ank['group_access']==0)
{
if (
$ank['pol']==1$on='<img src="/style/user/1.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/0.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==1)
{
if (
$ank['pol']==1$on='<img src="/style/user/1.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/0.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==2)
{
if (
$ank['pol']==1$on='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==3)
{
if (
$ank['pol']==1$on='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==4)
{
if (
$ank['pol']==1$on='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==5)
{
if (
$ank['pol']==1$on='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==6)
{
if (
$ank['pol']==1$on='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==7)
{
if (
$ank['pol']==1$on='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/5.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==8)
{
if (
$ank['pol']==1$on='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/5.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==9)
{
if (
$ank['pol']==1$on='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/5.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==15)
{
if (
$ank['pol']==1$on='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$on='<img src="/style/user/5.png" alt="" class="icon"/>';
}
echo 
"".$on."";

}
else
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));
if (
$ank['group_access']==0)
{
if (
$ank['pol']==1$off='<img src="/style/user/1.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/0.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==1)
{
if (
$ank['pol']==1$off='<img src="/style/user/1.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/0.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==2)
{
if (
$ank['pol']==1$off='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==3)
{
if (
$ank['pol']==1$off='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==4)
{
if (
$ank['pol']==1$off='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==5)
{
if (
$ank['pol']==1$off='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==6)
{
if (
$ank['pol']==1$off='<img src="/style/user/2.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/3.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==7)
{
if (
$ank['pol']==1$off='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/5.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==8)
{
if (
$ank['pol']==1$off='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/5.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==9)
{
if (
$ank['pol']==1$off='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/5.png" alt="" class="icon"/>';
}
if (
$ank['group_access']==15)
{
if (
$ank['pol']==1$off='<img src="/style/user/4.png" alt="" class="icon"/>';
else
$off='<img src="/style/user/5.png" alt="" class="icon"/>';
}
echo
''.$off.'';
}
}

?>
Онлайн: 2
Реклама