info['inTurnir'] > 0 && $u->info['inUser'] == 0 && $u->info['room'] == 318) {
die('');
}
include('_incl_data/class/__zv.php');
$js_5356 = sprintf("top.lafstReg[%d] = 0; top.startHpRegen(\"main\",%d,%d,%d,%d,%d,%d,%d,%d,%d,1);",
$u->info['id'], $u->info['id'], 0+$u->stats['hpNow'], 0+$u->stats['hpAll'],
0+$u->stats['mpNow'], 0+$u->stats['mpAll'], time() - $u->info['regHP'], time() - $u->info['regMP'],
0+$u->rgd[0], 0+$u->rgd[1]);
?>
$zi = false;
if($u->info['battle'] == 0) {
if(isset($_POST['add_new_zv'])) {
$zv->add();
} elseif(isset($_GET['bot']) && ( $u->info['level'] <= 7 || $u->info['admin'] > 0)) {
$zv->addBot();
} elseif(isset($_GET['bot_clone'])) {
$zvclone = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `admin` = 0 AND `real` = 1 AND `login` = "'.mysql_real_escape_string($_GET['bot_clone']).'" ORDER BY `id` ASC LIMIT 1'));
$zv->addBotClone($zvclone['id']);
} elseif(isset($_GET['add_group'])) {
$zv->add();
} elseif(isset($_GET['start_haot'])) {
$zv->add();
}
}
if($u->info['zv'] != 0) {
$zi = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id`="'.$u->info['zv'].'" /*AND `city` = "'.$u->info['city'].'"*/ AND `start` = "0" AND `cancel` = "0" AND (`time` > "'.(time()-60*60*2).'" OR `razdel` > 3) LIMIT 1'));
if(!isset($zi['id'])) {
$zi = false;
$u->info['zv'] = 0;
mysql_query('UPDATE `stats` SET `zv` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
}
if($u->info['battle'] == 0) {
if(isset($_POST['groupClick']) && !isset($zi['id'])) {
$zg = mysql_fetch_array(mysql_query('SELECT * FROM `zayvki` WHERE `id` = "'.mysql_real_escape_string((int)$_POST['groupClick']).'" AND `cancel` = "0" AND `btl_id` = "0" /*AND `city` = "'.$u->info['city'].'"*/ AND `razdel` = "4" AND `start` = "0" AND `time` > "'.(time()-60*60*2).'" LIMIT 1'));
if(!isset($zg['id'])) {
echo '
Заявка на групповой бой не найдена.';
} else {
$tm_start = floor(($zg['time']+$zg['time_start']-time())/6)/10;
$tm_start = $zv->rzv($tm_start);
$tm1 = ''; $tm2 = '';
$users = mysql_query('SELECT `u`.`id`, `u`.`login`, `u`.`level`, `u`.`align`, `u`.`clan`, `u`.`admin`, `st`.`team` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `st`.`zv` = "'.$zg['id'].'"');
while($s = mysql_fetch_array($users)) {
${'tm'.$s['team']} .= '
'.$s['login'].' ['.$s['level'].']
';
}
if($tm1 == '') {
$tm1 = 'группа пока не набрана';
} else {
$tm1 = rtrim($tm1, '
');
}
if($tm2 == '') {
$tm2 = 'группа пока не набрана';
} else {
$tm2 = rtrim($tm2, '
');
}
//
if( $zg['teams'] == 3 ) {
if($tm3 == '') {
$tm3 = 'группа пока не набрана';
} else {
$tm3 = rtrim($tm3, '
');
}
}
//
$sv1 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$zg['id'].'" AND `team` = "1" LIMIT 100'));
$sv2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$zg['id'].'" AND `team` = "2" LIMIT 100'));
$sv3 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `stats` WHERE `zv` = "'.$zg['id'].'" AND `team` = "3" LIMIT 100'));
$sv1 = $zg['tm1max']-$sv1[0];
$sv2 = $zg['tm2max']-$sv2[0];
//
if( $zg['teams'] == 3 ) {
$sv3 = $zg['tm2max']-$sv3[0];
}
//
?>
На чьей стороне будете сражаться?
}
} elseif(isset($_GET['cancelzv']) && !isset($_POST['add_new_zv'])) {
$zv->cancelzv();
} elseif(isset($_GET['startBattle']) && isset($zi['id']) && ($zi['razdel'] >= 1 || $zi['razdel'] <= 3)) {
$zv->startBattle($zi['id']);
} elseif($u->info['level'] >= 2 && $_GET['r'] == 4 && !isset($zi['id'])) {
//Форма подачи заявки для группового боя
//old
}
}
if(isset($_POST['btl_go'])) {
$zv->go($_POST['btl_go']);
} elseif(isset($_GET['btl_go'])) {
$zv->go($_GET['btl_go']);
}
if($zv->error != '') {
echo ''.$zv->error.'
';
}
if($test_s != '') {
echo ''.$test_s.'
';
}
?>
echo $zv->see(); ?> |
$zv->seeZv(); ?> |
echo $c['counters']; ?>