Файл: poisk.php
Строк: 45
<?php
include 'inc/mysql.php';
include 'inc/check.php';
if(isset($_SESSION['auth']) && $_SESSION['auth']==1){
include 'inc/shapka.php';
echo'<div class="menudiv">Поиск Игроков</div>';
$login = htmlspecialchars(stripslashes($login));
if(empty($_POST[login])){
$login=$_GET[login];
}else{
$login=$_POST[login];}
switch($_GET[go]) {
default:
echo'<div class="text">';
echo "<form action="poisk.php?go=go" method="post">Ник игрока:<br/>";
echo "<input name="login" maxlength="16" title="login" emptyok="true"/><br/>";
echo "<input type="submit" value="Найти" /></form></div>";
break;
case 'go':
echo'<div class="text">';
$login = htmlspecialchars(stripslashes($login));
$req = mysql_query("SELECT `id` FROM `account` WHERE `login` = '$login'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto=="0"){
echo"<img src='pic/index/!.png' alt='*'/> Нет такого игрока!</div>";
include 'inc/nogi.php';
exit;
}
$usdata = mysql_fetch_array($req);
if($login==$account[login]){ header ("Location: personaj.php?");
}else{
header ("Location: infa.php?id=$usdata[id]");
}
}
}else{
header ("Location: index.php"); exit;
}
include 'inc/nogi.php';
?>