Файл: sys/fnc/status.php
Строк: 96
<?
function status($user=NULL)
{
global $set,$time;
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '".$user."' AND `view` = '3'"), 0)!=0)echo "<s>";
elseif (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]' AND (`time` > '$time' OR `view` = '0')"), 0)!=0)
{
if($ank['pol']==1)echo "<img src='/style/user/user_man_baned.png' alt='*' class='icon'/>";
else echo "<img src='/style/user/user_woman_baned.png' alt='*' class='icon'/>";
}
elseif (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$user' AND `date_last` > '".(time()-1200)."' LIMIT 1"),0)==1)
{
if ($ank['group_access']>1 && $ank['group_access']<=7)
{
if ($ank['pol']==1)echo '<img src="/style/user/user_moder_man_online.png" alt="*"/>';
else echo '<img src="/style/user/user_moder_woman_online.png" alt="*" class="icon"/>';
}
elseif ($ank['group_access']>7 && $ank['group_access']<16)
{
if ($ank['pol']==1)echo '<img src="/style/user/user_admin_man_online.png" alt="*" class="icon"/>';
else echo '<img src="/style/user/user_admin_woman_online.png" alt="*" class="icon"/>';
}
elseif($ank['onlyhelp']==1)
{
if($ank['pol']==1)echo "<img src='/style/user/user_help_man_online.png' alt='*' class='icon'/>";
else echo "<img src='/style/user/user_help_woman_online.png' alt='*' class='icon'/>";
}
else
{
if ($ank['pol']==1)echo '<img src="/style/user/user_man_online.png" alt="*" class="icon"/>';
else echo '<img src="/style/user/user_woman_online.png" alt="*" class="icon"/>';
}
}
else
{
if ($ank['group_access']>1 && $ank['group_access']<=7)
{
if ($ank['pol']==1)echo '<img src="/style/user/user_man_off.png" alt="" class="icon"/>';
else echo '<img src="/style/user/user_woman_off.png" alt="" class="icon"/>';
}
elseif($ank['group_access']>7 && $ank['group_access']<16)
{
if ($ank['pol']==1)echo '<img src="/style/user/user_man_off.png" alt="" class="icon"/>';
else echo '<img src="/style/user/user_woman_off.png" alt="" class="icon"/>';
}
elseif($ank['onlyhelp']==1)
{
echo "<img src='/style/user/user_help_off.png' alt='*' class='icon'/>";
}
else
{
if ($ank['pol']==1)echo '<img src="/style/user/user_man_off.png" alt="" class="icon"/>';
else echo '<img src="/style/user/user_woman_off.png" alt="" class="icon"/>';
}
}
}
?>