Файл: sys/fnc/group.php
Строк: 92
<?
function group($user = NULL)
{
global $set, $time;
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$user' AND (`time` > '$time' OR `navsegda` = '1')"), 0) != 0)
{
$ban = ' <img src="/style/user/ban.png" alt="*" class="icon" id="icon_group" /> ';
return $ban;
}
else
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$ank[id]' AND `date_last` > '".(time()-600)."' LIMIT 1"),0)==1){
if ($ank['group_access'] > 7 && ($ank['group_access'] < 10 || $ank['group_access'] > 14))
{
if ($ank['pol'] == 1) $von = '<img src="/style/user/admin_man_on.gif" alt="*" class="icon" id="icon_group" />';
else
$von = '<img src="/style/user/admin_woman_on.gif" alt="" class="icon"/> ';
}
elseif (($ank['group_access'] > 1 && $ank['group_access'] <= 7) || ($ank['group_access'] > 10 && $ank['group_access'] <= 14))
{
if ($ank['pol'] == 1)
$von = '<img src="/style/user/mod_man_on.gif" alt="*" class="icon" id="icon_group" /> ';
else
$von = '<img src="/style/user/mod_woman_on.gif" alt="*" class="icon" id="icon_group" /> ';
}
else
{
if ($ank['pol'] == 1)
$von = '<img src="/style/user/man_on.gif" alt="" class="icon" id="icon_group" /> ';
else
$von = '<img src="/style/user/woman_on.gif" alt="" class="icon" id="icon_group" /> ';
}}else{
if ($ank['group_access'] > 7 && ($ank['group_access'] < 10 || $ank['group_access'] > 14))
{
if ($ank['pol'] == 1) $von = '<img src="/style/user/admin_man_off.gif" alt="*" class="icon" id="icon_group" /> ';
else
$von = '<img src="/style/user/admin_woman_off.gif" alt="" class="icon"/> ';
}
elseif (($ank['group_access'] > 1 && $ank['group_access'] <= 7) || ($ank['group_access'] > 10 && $ank['group_access'] <= 14))
{
if ($ank['pol'] == 1)
$von = '<img src="/style/user/mod_man_off.gif" alt="*" class="icon" id="icon_group" /> ';
else
$von = '<img src="/style/user/mod_woman_off.gif" alt="*" class="icon" id="icon_group" /> ';
}
else
{
if ($ank['pol'] == 1)
$von = '<img src="/style/user/man_off.gif" alt="" class="icon" id="icon_group" /> ';
else
$von = '<img src="/style/user/woman_off.gif" alt="" class="icon" id="icon_group" /> ';
}}
return $von;
}
}
?>