<?php
require_once '../core/system.php';

$header = 'Поиск игроков';
require_once '../core/head.php';
echo"<div class='mini-line'></div><div class='player'><a href='/user/online.php'>Все игроки</a> | <a href='/user/onlinencl.php'>Без клана</a> | Поиск</div>";

echo'<div class="player"><form action="?search" method="post">Имя персонажа:<br/>
<input class="text medium-text" type="text" name="login"/></br><span class="btn"><span class="end"><input class="label" type="submit" value="Искать"/></form></div>';


if(isset($_GET['search'])){
$nick2 = check($_POST['login']);
$nick = mysql_fetch_assoc(mysql_query("SELECT id,online,nick,storona from `user` where `nick` = '".$nick2."' limit 1"));
if(empty($nick['nick'])){
echo'<div class="player">Игрок не найден!</div>';
}else{
echo '<div class="player" style = "color: #d3e2ed;">';
if ($nick['storona'] == '0') {echo '<img src="/images/icon/0.png" height="11" alt="Angel"/> '; }
	    if ($nick['storona'] == '1') {echo'<img src="/images/icon/1.png" height="11" alt="Demon"/> '; }
echo online($nick['id']);
echo ' <a href="/user/?id='.$nick['id'].'"><b><span style = "color: #becdd8;">'.$nick['nick'].'</span></b></a> <span class="dgreen">['.vremja($nick['online']).']</span>';
echo "</div>";
}
}
require_once '../core/foot.php';
?>