_BOTSEPARATOR_) {
$arha = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `prototype` = ' . $jert['id'] . ' LIMIT 1;'));
$jert['battle'] = $arha['battle'];
$jert['id'] = $arha['id'];
$bot = 1;
}
if ($jert['battle'] > 0) {
//вмешиваемся
$bd = mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `id` = ' . $jert['battle'] . ' LIMIT 1;'));
$battle = unserialize($bd['teams']);
$battle[$user['id']] = $battle[$jert['id']];
foreach ($battle[$user['id']] as $k => $v) {
$battle[$k][$user['id']] = [0, 0, time()];
}
$t1 = explode(";", $bd['t1']);
// проставляем кто-где
if (in_array($jert['id'], $t1)) {
$ttt = 1;
} else {
$ttt = 2;
}
addlog($jert['battle'], '' . date("H:i") . ' ' . Nick::id($user['id'])->short() . ' вмешался в поединок1!
');
mysql_query('UPDATE `battle` SET `teams` = \'' . serialize($battle) . '\', `t' . $ttt . '`=CONCAT(`t' . $ttt . '`,\';' . $user['id'] . '\') WHERE `id` = ' . $jert['battle'] . ' ;');
mysql_query("UPDATE users SET `battle` =" . $jert['battle'] . ",`zayavka`=0 WHERE `id`= " . $user['id']);
mysql_query("UPDATE `labirint` SET `boi`='" . $_GET['n'] . "',`di`='0' WHERE `user_id`='" . $user['id'] . "'");
}
}
}
print "";
exit;
}