2022-06-06 21:30:34 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
2022-12-30 19:03:37 +00:00
|
|
|
|
use Core\Config;
|
|
|
|
|
use Core\Db;
|
2023-04-15 19:17:40 +00:00
|
|
|
|
use Tournament\Tournament;
|
|
|
|
|
use Tournament\TournamentModel;
|
2023-04-15 19:52:33 +00:00
|
|
|
|
use User\Stats;
|
2022-12-30 19:03:37 +00:00
|
|
|
|
|
|
|
|
|
if (!defined('GAME')) {
|
|
|
|
|
die();
|
|
|
|
|
}
|
2023-04-11 20:21:03 +00:00
|
|
|
|
/** @var User $u */
|
2022-12-30 19:03:37 +00:00
|
|
|
|
if ($u->info['inTurnir'] > 0 && $u->info['inUser'] == 0 && $u->info['room'] == 318) {
|
|
|
|
|
die('<script>location="main.php";</script>');
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
2022-12-30 19:03:37 +00:00
|
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
|
$zv = new FightRequest();
|
2024-01-08 01:33:20 +00:00
|
|
|
|
$r = $_GET['r'] ?? '';
|
2023-04-15 19:17:40 +00:00
|
|
|
|
|
|
|
|
|
// Турниры по умолчанию.
|
|
|
|
|
// 4-group,5-chaos,6-current,7-ended,10-tournament
|
2024-01-08 01:33:20 +00:00
|
|
|
|
$r = match ($r) {
|
2023-11-06 00:40:12 +00:00
|
|
|
|
'4' => FightRequest::BATTLE_RAZDEL_GROUP,
|
|
|
|
|
'5' => FightRequest::BATTLE_RAZDEL_CHAOTIC,
|
|
|
|
|
'6' => FightRequest::BATTLE_RAZDEL_CURRENT,
|
|
|
|
|
'7' => FightRequest::BATTLE_RAZDEL_ENDED,
|
|
|
|
|
default => FightRequest::BATTLE_RAZDEL_TOURNAMENTS
|
|
|
|
|
};
|
2023-04-15 19:17:40 +00:00
|
|
|
|
|
2022-12-30 19:03:37 +00:00
|
|
|
|
$js_5356 = sprintf(
|
|
|
|
|
"top.lafstReg[%d] = 0; top.startHpRegen(\"main\",%d,%d,%d,%d,%d,%d,%d,%d,%d,1);",
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$u->info['id'],
|
|
|
|
|
$u->info['id'],
|
|
|
|
|
$u->stats['hpNow'],
|
|
|
|
|
$u->stats['hpAll'],
|
|
|
|
|
$u->stats['mpNow'],
|
|
|
|
|
$u->stats['mpAll'],
|
|
|
|
|
time() - $u->info['regHP'],
|
|
|
|
|
time() - $u->info['regMP'],
|
|
|
|
|
$u->rgd[0],
|
|
|
|
|
$u->rgd[1]
|
2022-12-30 19:03:37 +00:00
|
|
|
|
);
|
2023-04-11 20:21:03 +00:00
|
|
|
|
|
|
|
|
|
$code ??= PassGen::intCode();
|
2023-04-15 19:52:33 +00:00
|
|
|
|
$userinfo = Stats::getLoginHpManaBars($u);
|
2023-04-11 20:21:03 +00:00
|
|
|
|
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$slogin = null;
|
|
|
|
|
$dt = null;
|
|
|
|
|
$dateformatter = null;
|
|
|
|
|
if ($r === FightRequest::BATTLE_RAZDEL_ENDED) {
|
|
|
|
|
$dateformatter = new IntlDateFormatter(
|
|
|
|
|
'ru_RU',
|
|
|
|
|
IntlDateFormatter::LONG,
|
|
|
|
|
IntlDateFormatter::NONE
|
|
|
|
|
);
|
2024-01-05 22:14:35 +00:00
|
|
|
|
$dt = $_GET['logs2'] ??= (new DateTime('now midnight'))->gettimestamp();
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$slogin = $_GET['filter'] ?? $_POST['filter'] ?? $u->info['login'];
|
|
|
|
|
$slogin = str_replace('"', '', $slogin);
|
|
|
|
|
$slogin = str_replace("'", '', $slogin);
|
|
|
|
|
$slogin = str_replace('\\', '', $slogin);
|
|
|
|
|
}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
?>
|
|
|
|
|
<script type="text/javascript" src="js/jquery.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
var zv_Priem = 0;
|
2022-12-30 19:03:37 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
function openfizrmk() {
|
2022-12-30 19:03:37 +00:00
|
|
|
|
$('#hidezv1_btn').slideUp(300, function () {
|
|
|
|
|
$('#hidezv1').slideDown(700);
|
|
|
|
|
});
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
2022-12-30 19:03:37 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
<?= $js_5356 ?>
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
table.wfix {
|
|
|
|
|
table-layout: fixed;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.m {
|
|
|
|
|
background: #99CCCC;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.s {
|
|
|
|
|
background: #BBDDDD;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.firsttd {
|
|
|
|
|
width: 70px;
|
|
|
|
|
}
|
2023-04-15 19:17:40 +00:00
|
|
|
|
|
|
|
|
|
.seehp, .hpborder, .senohp, .senomp, .hp_none, .seemp {
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.seehp, .hpborder, .hp_none, .seemp {
|
|
|
|
|
width: 120px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.seehp, .hp_none, .seemp {
|
|
|
|
|
height: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hpborder, .senohp, .senomp {
|
|
|
|
|
height: 9px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.seehp {
|
|
|
|
|
z-index: 12;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hpborder {
|
|
|
|
|
z-index: 13;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.senohp {
|
|
|
|
|
width: <?= $userinfo->hpbarwidth ?>px;
|
|
|
|
|
z-index: 11;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.senomp {
|
|
|
|
|
width: <?= $userinfo->hpbarwidth ?>px;
|
|
|
|
|
z-index: 11;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hp_none {
|
|
|
|
|
z-index: 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.seemp {
|
|
|
|
|
z-index: 12;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hptop {
|
|
|
|
|
top: -10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mptop {
|
|
|
|
|
top: 0px;
|
|
|
|
|
}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
</style>
|
|
|
|
|
<TABLE class="wfix" cellspacing=1 cellpadding=3>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<TR>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<TD colspan=6 align=right>
|
|
|
|
|
<div style="float:left">
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" height="20">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="middle"> <?= $userinfo->login ?> </td>
|
|
|
|
|
<td valign="middle" width="120">
|
|
|
|
|
<div style="position:relative;<?= $userinfo->divstyle ?>">
|
|
|
|
|
<div id="vhp$uid" title="Уровень жизни"
|
|
|
|
|
class="seehp hptop"><?= $userinfo->hpbartext ?></div>
|
|
|
|
|
<div title="Уровень жизни" class="hpborder hptop">
|
|
|
|
|
<img src="//img.new-combats.tech/1x1.gif" height="9" width="1" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="hp_3 senohp hptop" id="lhp$uid">
|
|
|
|
|
<img src="//img.new-combats.tech/1x1.gif" height="9" width="1">
|
|
|
|
|
</div>
|
|
|
|
|
<div title="Уровень жизни" class="hp_none hptop">
|
|
|
|
|
<img src="//img.new-combats.tech/1x1.gif" height="10">
|
|
|
|
|
</div>
|
|
|
|
|
<?php if ($userinfo->hasmana): ?>
|
|
|
|
|
<div id="vmp$uid" title="Уровень маны"
|
|
|
|
|
class="seemp mptop"><?= $userinfo->mpbartext ?></div>
|
|
|
|
|
<div title="Уровень маны" class="hpborder mptop">
|
|
|
|
|
<img src="//img.new-combats.tech/1x1.gif" height="9" width="1" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="hp_mp senomp mptop" id="lmp$uid">
|
|
|
|
|
<img src="//img.new-combats.tech/1x1.gif" height="9" width="1" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
<div title="Уровень маны" class="hp_none mptop"></div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<div style="float:right;">
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<INPUT class="btn" onClick="location='main.php?zayvka&r=<?= $r ?>&rnd=<?= $code ?>';"
|
2023-01-10 16:29:32 +00:00
|
|
|
|
TYPE=button name=tmp value="Обновить">
|
|
|
|
|
<INPUT class="btn" TYPE=button value="Вернуться" onClick="location.href='main.php?rnd=<?= $code ?>';">
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td class="firsttd m"> <b>Бои:</b> </td>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<td class="<?= $r == FightRequest::BATTLE_RAZDEL_TOURNAMENTS ? 's' : 'm' ?>">
|
|
|
|
|
<a href="/main.php?zayvka=1&r=<?= FightRequest::BATTLE_RAZDEL_TOURNAMENTS ?>&rnd=<?= $code ?>">Турниры</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="<?= $r == FightRequest::BATTLE_RAZDEL_GROUP ? 's' : 'm' ?>">
|
2024-01-05 22:14:35 +00:00
|
|
|
|
<a href="/main.php?zayvka=1&r=<?= FightRequest::BATTLE_RAZDEL_GROUP ?>&rnd=<?= $code ?>">Групповые</a>
|
2023-04-11 20:21:03 +00:00
|
|
|
|
</td>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<td class="<?= $r == FightRequest::BATTLE_RAZDEL_CHAOTIC ? 's' : 'm' ?>">
|
2024-01-05 22:14:35 +00:00
|
|
|
|
<a href="/main.php?zayvka=1&r=<?= FightRequest::BATTLE_RAZDEL_CHAOTIC ?>&rnd=<?= $code ?>">Хаотичные</a>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td class="<?= $r == FightRequest::BATTLE_RAZDEL_CURRENT ? 's' : 'm' ?>">
|
|
|
|
|
<a href="/main.php?zayvka=1&r=<?= FightRequest::BATTLE_RAZDEL_CURRENT ?>&rnd=<?= $code ?>">Текущие</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="<?= $r == FightRequest::BATTLE_RAZDEL_ENDED ? 's' : 'm' ?>">
|
|
|
|
|
<a href="/main.php?zayvka=1&r=<?= FightRequest::BATTLE_RAZDEL_ENDED ?>&rnd=<?= $code ?>">Завершенные</a>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2022-06-06 21:30:34 +00:00
|
|
|
|
<div style="padding:2px;">
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<?php
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$zi = [];
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2023-04-15 19:17:40 +00:00
|
|
|
|
if (
|
|
|
|
|
$u->info['battle'] == 0 &&
|
|
|
|
|
(isset($_GET['add_group']) || isset($_GET['start_haot']))
|
|
|
|
|
) {
|
|
|
|
|
$zv->addGroupOrChaoticRequest($r);
|
2022-12-30 19:03:37 +00:00
|
|
|
|
}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2022-12-30 19:03:37 +00:00
|
|
|
|
if ($u->info['zv'] != 0) {
|
2023-04-15 19:17:40 +00:00
|
|
|
|
//fixme результаты этого запроса используются в методах класса FightRequest как global $zi.
|
|
|
|
|
$zi = Db::getRow(
|
|
|
|
|
'select * from zayvki where id = ? and start = 0 and cancel = 0 and time > unix_timestamp() - 60 * 60 * 2 or razdel > 3',
|
|
|
|
|
[$u->info['zv']]
|
|
|
|
|
);
|
2022-12-30 19:03:37 +00:00
|
|
|
|
if (!isset($zi['id'])) {
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$zi = [];
|
2022-12-30 19:03:37 +00:00
|
|
|
|
$u->info['zv'] = 0;
|
2023-04-11 20:21:03 +00:00
|
|
|
|
Db::sql('update stats set zv = 0 where id = ?', [$u->info['id']]);
|
2022-12-30 19:03:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($u->info['battle'] == 0) {
|
|
|
|
|
if (isset($_POST['groupClick']) && !isset($zi['id'])) {
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$zg = Db::getRow(
|
|
|
|
|
'select * from zayvki where id = ? and start = 0 and cancel = 0 and time > unix_timestamp() - 60 * 60 * 2 and btl_id = 0 and razdel = 4',
|
|
|
|
|
[(int)$_POST['groupClick']]
|
|
|
|
|
);
|
2022-12-30 19:03:37 +00:00
|
|
|
|
if (!isset($zg['id'])) {
|
2023-04-11 20:21:03 +00:00
|
|
|
|
echo '<div style="text-align: center;"><br><br>Заявка на групповой бой не найдена.</div>';
|
2022-12-30 19:03:37 +00:00
|
|
|
|
} else {
|
|
|
|
|
$tm_start = floor(($zg['time'] + $zg['time_start'] - time()) / 6) / 10;
|
|
|
|
|
$tm_start = $zv->rzv($tm_start);
|
|
|
|
|
$tm1 = '';
|
|
|
|
|
$tm2 = '';
|
2023-04-11 20:21:03 +00:00
|
|
|
|
$tm3 = '';
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$users = Db::getRow(
|
|
|
|
|
'select users.id, login, level, align, clan, admin, team from users left join stats on users.id = stats.id where zv = ?',
|
|
|
|
|
[$zg['id']]
|
|
|
|
|
);
|
2023-04-11 20:21:03 +00:00
|
|
|
|
foreach ($users as $user) {
|
2023-11-06 00:40:12 +00:00
|
|
|
|
${'tm' . $user['team']} .= '<b>' . $user['login'] . '</b> [' . $user['level'] . ']<a href="info/' . $user['id'] . '" target="_blank"><img src="' . Config::img(
|
|
|
|
|
) . '/i/inf_capitalcity.gif" title="Инф. о ' . $user['login'] . '" alt="inf"></a><br>';
|
2022-12-30 19:03:37 +00:00
|
|
|
|
}
|
|
|
|
|
if (empty($tm1)) {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$tm1 = 'группа пока не набрана';
|
2022-12-30 19:03:37 +00:00
|
|
|
|
} else {
|
|
|
|
|
$tm1 = rtrim($tm1, '<br />');
|
|
|
|
|
}
|
|
|
|
|
if (empty($tm2)) {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$tm2 = 'группа пока не набрана';
|
2022-12-30 19:03:37 +00:00
|
|
|
|
} else {
|
|
|
|
|
$tm2 = rtrim($tm2, '<br />');
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
if ($zg['teams'] == 3) {
|
|
|
|
|
if (empty($tm3)) {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$tm3 = 'группа пока не набрана';
|
2022-12-30 19:03:37 +00:00
|
|
|
|
} else {
|
|
|
|
|
$tm3 = rtrim($tm3, '<br />');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sv1 = Db::getValue('select count(*) from stats where zv = ? and team = 1');
|
|
|
|
|
$sv2 = Db::getValue('select count(*) from stats where zv = ? and team = 2');
|
|
|
|
|
$sv3 = Db::getValue('select count(*) from stats where zv = ? and team = 3');
|
|
|
|
|
|
|
|
|
|
$sv1 = $zg['tm1max'] - $sv1;
|
|
|
|
|
$sv2 = $zg['tm2max'] - $sv2;
|
|
|
|
|
|
|
|
|
|
if ($zg['teams'] == 3) {
|
|
|
|
|
$sv3 = $zg['tm2max'] - $sv3;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-11 20:21:03 +00:00
|
|
|
|
?>
|
|
|
|
|
</div>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<table style="margin-top:2px;" width="100%">
|
|
|
|
|
<tr>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
<td> Бой начнется через <?= $tm_start; ?> мин.</td>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<td align="right">
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<INPUT class="btn" onClick="location='main.php?zayvka&r=<?= $r; ?>&rnd=<?= $code; ?>';"
|
2023-01-10 16:29:32 +00:00
|
|
|
|
TYPE=button name=tmp value="Обновить">
|
|
|
|
|
<input class="btn" type="button" value="Вернуться"
|
2023-04-15 19:17:40 +00:00
|
|
|
|
onclick="location.href='main.php?zayvka&r=<?= $r; ?>&rnd=<?= $code; ?>';">
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<h3 align="center">На чьей стороне будете сражаться?</h3>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<table align="center" cellspacing="4" cellpadding="1">
|
|
|
|
|
<tr>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td bgcolor="99CCCC"><b>Группа один:</b><br/>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
Максимальное кол-во: <?= $zg['tm1max']; ?><br/>
|
|
|
|
|
Ограничения по уровню: <?= $zg['min_lvl_1'] . ' - ' . $zg['max_lvl_1']; ?></td>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td bgcolor="99CCCC"><b>Группа два:</b><br/>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
Максимальное кол-во: <?= $zg['tm2max']; ?><br/>
|
|
|
|
|
Ограничения по уровню: <?= $zg['min_lvl_2'] . ' - ' . $zg['max_lvl_2']; ?> </td>
|
2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-12-30 19:03:37 +00:00
|
|
|
|
if ($zg['teams'] == 3) {
|
|
|
|
|
?>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td bgcolor="99CCCC"><b>Группа три:</b><br/>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
Максимальное кол-во: <?= $zg['tm2max']; ?><br/>
|
|
|
|
|
Ограничения по уровню: <?= $zg['min_lvl_2'] . ' - ' . $zg['max_lvl_2']; ?> </td>
|
2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-12-30 19:03:37 +00:00
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
<td align="center"><?= $tm1; ?>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<br/>
|
|
|
|
|
</td>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
<td align="center"><?= $tm2; ?>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<br/>
|
|
|
|
|
</td>
|
2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-12-30 19:03:37 +00:00
|
|
|
|
if ($zg['teams'] == 3) {
|
|
|
|
|
?>
|
2023-03-31 16:54:33 +00:00
|
|
|
|
<td align="center"><?= $tm3; ?>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<br/>
|
|
|
|
|
</td>
|
2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-12-30 19:03:37 +00:00
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="center">
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<input class="btn" title="На данный момент свободно мест: <?= $sv1 ?>"
|
2023-04-15 19:17:40 +00:00
|
|
|
|
onclick="location='main.php?r=<?= $r ?>&zayvka&btl_go=<?= $zg['id'] ?>&tm1=<?= $code ?>'"
|
2023-01-10 16:29:32 +00:00
|
|
|
|
type="submit" name="confirm1" value="Я за этих!"/>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td align="center">
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<input class="btn" title="На данный момент свободно мест: <?= $sv2 ?>"
|
2023-04-15 19:17:40 +00:00
|
|
|
|
onclick="location='main.php?r=<?= $r ?>&zayvka&btl_go=<?= $zg['id'] ?>&tm2=<?= $code ?>'"
|
2023-01-10 16:29:32 +00:00
|
|
|
|
type="submit" name="confirm2" value="Я за этих!"/>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</td>
|
|
|
|
|
<?php
|
|
|
|
|
if ($zg['teams'] == 3) {
|
|
|
|
|
?>
|
|
|
|
|
<td align="center">
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<input class="btn" title="На данный момент свободно мест: <?= $sv3 ?>"
|
2023-04-15 19:17:40 +00:00
|
|
|
|
onclick="location='main.php?r=<?= $r ?>&zayvka&btl_go=<?= $zg['id'] ?>&tm3=<?= $code ?>'"
|
2023-01-10 16:29:32 +00:00
|
|
|
|
type="submit" name="confirm3" value="Я за этих!"/>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</td>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
2023-04-11 20:21:03 +00:00
|
|
|
|
} elseif (isset($_GET['startBattle']) && isset($zi['id']) && ($zi['razdel'] >= 1 && $zi['razdel'] <= 3)) {
|
2022-12-30 19:03:37 +00:00
|
|
|
|
$zv->startBattle($zi['id']);
|
|
|
|
|
}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-11-06 00:40:12 +00:00
|
|
|
|
$btl_go = 0;
|
|
|
|
|
if (isset($_POST['btl_go']) || isset($_GET['btl_go'])) {
|
|
|
|
|
$btl_go = (int)$_POST['btl_go'] ?? (int)$_GET['btl_go'];
|
|
|
|
|
}
|
2023-04-15 19:17:40 +00:00
|
|
|
|
$zv->go($btl_go);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2023-04-11 20:21:03 +00:00
|
|
|
|
if ($zv->error) {
|
|
|
|
|
echo '<b style="color: red">' . $zv->error . '</b><br>';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<table style="padding:2px;" width="100%" border="0" cellspacing="0" cellpadding="2">
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<tr>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<td>
|
|
|
|
|
<?php if ($r === FightRequest::BATTLE_RAZDEL_GROUP && $u->room['zvsee'] == 0): ?>
|
|
|
|
|
<span id="hidezv1_btn"><INPUT class="btn" onClick="openfizrmk();" TYPE=button name=tmp
|
|
|
|
|
value="Подать заявку на групповой бой" style="margin:3px;"></span>
|
|
|
|
|
<FIELDSET id="hidezv1" style="display:none; border-color:#FFF; width:500px;">
|
|
|
|
|
<LEGEND><B style="color:#8f0000">Подать заявку на групповой бой</B></LEGEND>
|
|
|
|
|
<form method="post" action="/main.php?zayvka&r=<?= $r ?>&add_group&rnd=<?= $code ?>">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
Начало боя через
|
|
|
|
|
<select style="padding:2px;" name="startime">
|
|
|
|
|
<option value="300" selected>5 минут</option>
|
|
|
|
|
<option value="600">10 минут</option>
|
|
|
|
|
</select>
|
|
|
|
|
Таймаут
|
|
|
|
|
<select style="padding:2px;" name="timeout">
|
|
|
|
|
<option value="1" selected>1 мин.</option>
|
|
|
|
|
<option value="2">2 мин.</option>
|
|
|
|
|
<option value="3">3 мин.</option>
|
|
|
|
|
</select>
|
|
|
|
|
<br/>
|
|
|
|
|
Ваша команда
|
|
|
|
|
<input style="padding:2px;" type="text" name="nlogin1" size="3" maxlength="2"/>
|
|
|
|
|
игроков
|
|
|
|
|
<select style="padding:2px;" name="levellogin1">
|
|
|
|
|
<option value="0">любой</option>
|
|
|
|
|
<option value="1">только моего и ниже</option>
|
|
|
|
|
<option value="2">только ниже моего уровня</option>
|
|
|
|
|
<option value="3" selected>только моего уровня</option>
|
|
|
|
|
<option value="4">не старше меня более чем на уровень</option>
|
|
|
|
|
<option value="5">не младше меня более чем на уровень</option>
|
|
|
|
|
<option value="6">мой уровень +/- 1</option>
|
|
|
|
|
<option value="99">мой клан</option>
|
|
|
|
|
<option value="98">моя склонность</option>
|
|
|
|
|
</select>
|
|
|
|
|
<br>
|
|
|
|
|
Противники
|
|
|
|
|
<input style="padding:2px;" type="text" name="nlogin2" size="3" maxlength="2"/>
|
|
|
|
|
игроков
|
|
|
|
|
<select style="padding:2px;" name="levellogin2">
|
|
|
|
|
<option value="0">любой</option>
|
|
|
|
|
<option value="1">только моего и ниже</option>
|
|
|
|
|
<option value="2">только ниже моего уровня</option>
|
|
|
|
|
<option value="3" selected>только моего уровня</option>
|
|
|
|
|
<option value="4">не старше меня более чем на уровень</option>
|
|
|
|
|
<option value="5">не младше меня более чем на уровень</option>
|
|
|
|
|
<option value="6">мой уровень +/- 1</option>
|
|
|
|
|
<option value="99">только клан</option>
|
|
|
|
|
<option value="98">только склонность</option>
|
|
|
|
|
</select>
|
|
|
|
|
<br/>
|
|
|
|
|
<input type="checkbox" name="travma">
|
|
|
|
|
<label for="travma">Бой без правил <span class="dsc">(проигравшая сторона
|
|
|
|
|
получает инвалидность)</span></label><br>
|
|
|
|
|
<INPUT maxLength="40" size="40" name="cmt" placeholder="Комментарий к бою"><BR>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left">
|
|
|
|
|
<input class="btn" type="submit" value="Подать заявку" name="open">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</form>
|
|
|
|
|
</FIELDSET>
|
|
|
|
|
<?php elseif ($r === FightRequest::BATTLE_RAZDEL_CHAOTIC && $u->room['zvsee'] == 0): ?>
|
|
|
|
|
<div id="hidezv1_btn">
|
|
|
|
|
<INPUT class="btn" onClick="openfizrmk();" TYPE=button name=tmp
|
|
|
|
|
value="Подать заявку на хаотичный бой" style="margin:3px;">
|
|
|
|
|
</div>
|
|
|
|
|
<form method="post" action="/main.php?zayvka&r=<?= $r ?>&add_group&rnd=<?= $code ?>">
|
|
|
|
|
<input type="hidden" name="timeout" value="1">
|
|
|
|
|
<div style="display:none; width:600px;" id="hidezv1">
|
|
|
|
|
<br>
|
|
|
|
|
<FIELDSET style="border-color:#FFF;">
|
|
|
|
|
<LEGEND><strong style="color:#8f0000">Подать заявку на хаотичный бой</strong></LEGEND>
|
|
|
|
|
Начало боя через
|
|
|
|
|
<SELECT name="startime2">
|
|
|
|
|
<option value="60" selected>1 минута
|
|
|
|
|
<OPTION value="180">3 минуты
|
|
|
|
|
<OPTION value="300">5 минут
|
|
|
|
|
</SELECT>
|
|
|
|
|
Игроков
|
|
|
|
|
<SELECT name="players">
|
|
|
|
|
<OPTION selected value="6">6</OPTION>
|
|
|
|
|
<OPTION value="8">8</OPTION>
|
|
|
|
|
<OPTION value="10">10</OPTION>
|
|
|
|
|
<OPTION value="12">12</OPTION>
|
|
|
|
|
</SELECT>
|
|
|
|
|
<BR>
|
|
|
|
|
Уровни бойцов
|
|
|
|
|
<SELECT name="levellogin1">
|
|
|
|
|
<OPTION value="0">любой
|
|
|
|
|
<OPTION selected value="3">только моего уровня
|
|
|
|
|
<OPTION value="6">мой уровень +/- 1</OPTION>
|
|
|
|
|
</SELECT>
|
|
|
|
|
<BR><BR>
|
|
|
|
|
<INPUT type="checkbox" name="travma">
|
|
|
|
|
Бой без правил <span
|
2023-08-28 11:23:41 +00:00
|
|
|
|
style="color: #777; ">(проигравшая сторона получает инвалидность)</span><BR>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<INPUT type="checkbox" name="noatack"> Закрытый поединок <span style="color: #777; ">(бой будет изолирован от нападений)</span><BR>
|
|
|
|
|
<INPUT type="checkbox" name="noeff">
|
|
|
|
|
Запрет на использование свитков восстановления НР и Маны<BR>
|
2023-08-28 11:23:41 +00:00
|
|
|
|
<?php if (!$u->info['no_zv_key']):
|
|
|
|
|
$security = new Captcha\Captcha();
|
|
|
|
|
$security->width(70)->height(20)->newImage();
|
|
|
|
|
$_SESSION['code'] = $security->getSum();
|
|
|
|
|
?>
|
|
|
|
|
Код подтверждения: <input style="width:40px;" type="text" name="code21">
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<INPUT maxLength="40" size="40" name="cmt" placeholder="Комментарий к бою"><BR>
|
|
|
|
|
<INPUT class="btn" value="Подать заявку" type="submit" name="open">
|
|
|
|
|
</FIELDSET>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<?php elseif ($r === FightRequest::BATTLE_RAZDEL_CURRENT): ?>
|
|
|
|
|
<h3>Записи текущих боев на <?= date('d.m.Y'); ?></h3>
|
|
|
|
|
<?php $zv->getCurrentBattlesList(); ?>
|
|
|
|
|
<?php elseif ($r === FightRequest::BATTLE_RAZDEL_ENDED): ?>
|
|
|
|
|
<TABLE width=100% cellspacing=0 cellpadding=0>
|
|
|
|
|
<TR>
|
|
|
|
|
<TD valign=top>
|
|
|
|
|
|
|
|
|
|
<A HREF="?filter=<?= $slogin ?>&zayvka=1&r=7&logs2=<?= $dt - 86400 ?>">« Предыдущий день</A>
|
|
|
|
|
</TD>
|
|
|
|
|
<TD valign=top align=center>
|
|
|
|
|
<H3>Записи о завершенных боях за <?= $dateformatter->format($dt) ?></H3>
|
|
|
|
|
</TD>
|
|
|
|
|
<TD valign=top align=right>
|
|
|
|
|
<A HREF="?filter=<?= $slogin ?>&zayvka=1&r=7&logs2=<?= $dt + 86400 ?>">Следующий день »</A>
|
|
|
|
|
|
|
|
|
|
</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
<TR>
|
|
|
|
|
<TD colspan=3 align=center>
|
|
|
|
|
<form method="POST" action="main.php?zayvka=1&r=7&rnd=<?= $code ?>">
|
|
|
|
|
Показать только бои персонажа:
|
|
|
|
|
<INPUT TYPE=text NAME=filter value="<?= $slogin ?>"> за
|
|
|
|
|
<INPUT TYPE=text NAME=logs size=12 value="<?= date('d.m.Y', $dt) ?>">
|
|
|
|
|
<INPUT class="btn" TYPE=submit value="фильтр!">
|
|
|
|
|
</form>
|
|
|
|
|
</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
</TABLE>
|
|
|
|
|
<?php $zv->getEndedBattlesList($slogin, $dt); ?>
|
|
|
|
|
<?php elseif ($r === FightRequest::BATTLE_RAZDEL_TOURNAMENTS): ?>
|
|
|
|
|
<?php if (Tournament::IS_ENABLED): ?>
|
|
|
|
|
<div>
|
|
|
|
|
<strong style="color: red;">Внимание!</strong>
|
|
|
|
|
<ul>
|
|
|
|
|
<li style="color: blue;">В случае создания либо присоединения к Турниру, покинуть его -
|
|
|
|
|
<u>невозможно</u>!
|
|
|
|
|
</li>
|
|
|
|
|
<?php if (TournamentModel::isEkrOverpriced($u->info['id'])): ?>
|
|
|
|
|
<li>Стоимость предметов, одетых на вас не должна
|
|
|
|
|
превышать <?= Tournament::ekrOverpriceFormula($u->info['level']) ?> еврокредитов.
|
|
|
|
|
</li>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if ($u->info['exp'] < Tournament::MIN_EXP): ?>
|
|
|
|
|
<li>У вас должно быть не менее <?= Tournament::MIN_EXP ?> опыта.</li>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<li style="color: blue;">Турнир начнётся, когда в заявке
|
|
|
|
|
наберётся <?= Tournament::START_TOURNAMENT ?> человек.
|
|
|
|
|
</li>
|
2023-06-13 00:44:13 +00:00
|
|
|
|
<li style="color: blue;">Игроки занявшие 1, 2 и 3 места получат ----, а так же задержки на участие в турнире 12 часов, 6 и 3 часа соответственно!
|
2023-04-15 19:17:40 +00:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<?php $trn = $zv->getTournaments(); ?>
|
|
|
|
|
<?php if ($trn->hasTournaments): ?>
|
|
|
|
|
<div>
|
|
|
|
|
<strong>Активные турниры.</strong><br>
|
|
|
|
|
<?= $trn->listTournaments ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if (!TournamentModel::getTournamentIdByUserId(
|
|
|
|
|
$this->u->info['id']
|
|
|
|
|
) || !TournamentModel::isStarted($this->u->info['level'])): ?>
|
|
|
|
|
<form method="post">
|
|
|
|
|
<input type="submit" name="tournament_start" value="Принять участие в турнире">
|
|
|
|
|
<input type="hidden" name="key" value="<?= $_SESSION['bypass'] ?>">
|
|
|
|
|
</form>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
Вы учавствуете.
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<div style="font-weight: bold; color: firebrick;">В данный момент турниры не проводятся!</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
nan
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php $zv->getCurrentStatus($zi, $r); ?>
|
|
|
|
|
</td>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
<td><?php $zv->seeZv($zi, $r); ?></td>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
</tr>
|
2023-04-15 19:17:40 +00:00
|
|
|
|
</table>
|
|
|
|
|
<div style="text-align: right; margin-top: 5px;">
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<?= Config::get('counters') ?>
|
|
|
|
|
</div>
|