Файл: apahe/fnc/name.php
Строк: 39
<?
function apache($id){
$level_r = mysql_query("SELECT `level` FROM `apache` WHERE `id` = '$id'");
$level = mysql_fetch_assoc($level_r);
$apach_pol = mysql_query("SELECT `pol` FROM `apache` WHERE `id` = '$id'");
$apach_p = mysql_fetch_assoc($apach_pol);
return '<img src="/sheet/icon-apa/icon-'.$level['level'].'-'.$apach_p['pol'].'.png"/> ';
}
function name($id){
$apache_r = mysql_query("SELECT `name` FROM `apache` WHERE `id` = '$id'");
$apach = mysql_fetch_assoc($apache_r);
$apache_sur = mysql_query("SELECT `surname` FROM `apache` WHERE `id` = '$id'");
$apach_s = mysql_fetch_assoc($apache_sur);
return ''.$apach['name'].' '.$apach_s['surname'].'';
}
function status($id){
$apache_ban = mysql_query("SELECT `id` FROM `ban` WHERE `id-apache` = '$id'");
$apache_b = mysql_fetch_assoc($apache_ban);
$apache_on = mysql_query("SELECT `id` FROM `on` WHERE `id-apache` = '$id'");
$apache_o = mysql_fetch_assoc($apache_on);
if ($apache_b)
return '<img src="/sheet/icon-apa/ban.png" alt="ban">';
else if ($apache_o)
return '<img src="/sheet/icon-apa/on.png" alt="on">';
else return '<img src="/sheet/icon-apa/off.png" alt="off">';
}
function level($id) {
$level_r = mysql_query("SELECT `level` FROM `apache` WHERE `id` = '$id'");
$level = mysql_fetch_assoc($level_r);
switch ($level['level']) {
case '1': $level = 'Модер'; break;
case '2': $level = 'Админ'; break;
case '3': $level = 'Создатель'; break;
default: $level = 'Пользователь'; break;
}
return $level;
}
?>