Файл: b_str_bash.php
Строк: 16
<?
define('PROTECTOR', 1);
$textl='Битва';
include('files/db.php');
include($path.'files/auth.php');
if ($user_id==0){
header('location: index.php');exit;
}
$bat=mysql_query("SELECT * FROM `stt_usr` WHERE `usr`='".$udata['id']."' and `tip`!='pit'");
$bt=mysql_fetch_array($bat);
$id=mysql_real_escape_string($_GET['basn']);
$strz=mysql_query("SELECT * FROM `straz` WHERE `id`='".$id."' and `arr`='".$bt['arr']."'");
$num=mysql_num_rows($strz);
if($num==0)
{
}
else
{
$b=mysql_fetch_array($strz);
$bz=mysql_fetch_array(mysql_query("SELECT * FROM `straz` WHERE `id`='".$bt['b']."' and `arr`='".$bt['arr']."'"));
if($bz['rasa']!=$bt['kom'])
{
}
else
{
mysql_query("UPDATE `stt_usr` SET `b`='".$b['id']."', `enemy`='0' WHERE `usr`='".$bt['usr']."'");
}
}
header('location: b_str.php');exit;
?>