Файл: search.php
Строк: 49
<?
require_once 'core/system.php';
$header = 'Поиск игроков';
require_once 'core/head.php';
echo"<div class='mini-line'></div><div class='player'><a href='/online.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 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') {?><img src="/images/icon/0.png" height="11" alt="a"/> <?php }
if ($nick['storona'] == '1') {?><img src="/images/icon/1.png" height="11" alt="d"/> <?php }
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';
?>