Размер файла: 1.74Kb
<?
require_once '../core/system.php';
$req = mysql_query("SELECT ban from `ban` where `id_us` = '".$user['id']."' and `time` > '".$_SERVER['REQUEST_TIME']."'");
$ban = mysql_fetch_array($req);
if($ban['ban'] == 3){
header('Location: /moduls/ban');
}
if(!isset($user['id'])) header('Location: /');
$header = 'Поиск игроков';
require_once '../core/head.php';
if($user['mesto'] != 'Поиск игроков') mysql_query("UPDATE `user` set `mesto` = 'Поиск игроков' where `id` = '".$user['id']."'");
echo'<div class="player">
<form action="?search" method="post">Введите ник:
<br/>
<input type="text" class="text-area" name="login"/>
<input class="inpc-ar form-submit" type="submit" value="Искать"/>
</form>
</div>';
if(isset($_GET['search'])){
$nick2 = check($_POST['login']);
$nick = mysql_fetch_array(mysql_query("SELECT * from `user` where `nick` LIKE '".$nick2."%' "));
if(empty($nick['nick'])){
echo'<div class="line"></div>
<div class="foot">
Игрок не найден
</div>';
} else {
if($nick['prava'] == 5){
$status = "<font color='ffc22b'>[A]</font>";
$color = "#F7990D";
}
if($nick['prava'] == 4){
$status = "<font color='ffc22b'>[a]</font>";
$color = "EBC621";
}
if($nick['prava'] == 3){
$status = "<font color='ffc22b'>[M]</font>";
}
if($nick['prava'] == 2){
$status = "<font color='ffc22b'>[m]</font>";
}
echo '<div class="line"></div>
<div class="but-list" style = "color: #d3e2ed;"><a href="/user/'.$nick['id'].'/">';
echo online($nick['id']);
echo ' <font color="'.$nick[font].'">'.$nick['nick'].'</font> ';
if($nick['prava'] > 1){
echo $status;
}
echo', <img src="/images/icon/level.png">'.$nick['level'].' ур. </a></div>';
}
}
require_once '../core/foot.php';
?>