Файл: user/search.php
Строк: 37
<?
require_once 'core/system.php';
$header = 'Поиск игроков';
require_once 'core/head.php';
echo"<div class='exp_bar'>
<div class='progress' style='width:1%'></div>
</div><div class='player title'>Поиск</div><div class='mini-line'></div><div class='player'><a href='/user/online.php'>Все игроки</a> | Поиск</div>";
echo'<div class="player"><form action="?search" method="post">Логин:<br/>
<input type="text" name="login"/> <input type="submit" value="Искать"/></form></div>';
if(isset($_GET['search'])){
$nick2 = check($_POST['login']);
$nick = mysql_fetch_assoc(mysql_query("SELECT id,online,nick from `user` where `nick` = '".$nick2."' limit 1"));
if(empty($nick['nick'])){
echo'<div class="player">Игрок не найден!</div>';
}else{
echo '<div class="player" style = "color: #d3e2ed;">';
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';
?>