Файл: b_str_enemy.php
Строк: 18
<?
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['enemy']);
$enemy=mysql_num_rows(mysql_query("SELECT * FROM `stt_usr` WHERE `status`='0' and `b`='".$bt['b']."' and `arr`='".$bt['arr']."' and `kom`!='".$bt['kom']."' and `id`='".$id."'"));
if($enemy!=0)
{
mysql_query("UPDATE `stt_usr` SET `enemy`='".$id."' WHERE `id`='".$bt['id']."'");
}
header('location: b_str.php');exit;
?>