Файл: poisk.php
Строк: 42
<?php
include 'inc/mysql.php';
include 'inc/check.php';
include ("inc/gzip.php");
if(isset($_SESSION['auth']) && $_SESSION['auth']==1){
include 'inc/shapka.php';
if(empty($_POST[login])){
$login=$_GET[login];
}else{
$login=$_POST[login];}
$login = htmlspecialchars(stripslashes($login));
switch($_GET[go]) {
default:
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>";
break;
case 'go':
$req = mysql_query("SELECT id FROM `account` WHERE `login` = '$login'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto=="0"){
echo'Нет такого персонажа!';
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';
?>