2022-06-06 21:30:34 +00:00
|
|
|
|
<?php
|
2022-07-01 12:45:43 +00:00
|
|
|
|
|
2022-12-30 19:03:37 +00:00
|
|
|
|
use Insallah\Db, Insallah\TournamentModel;
|
|
|
|
|
|
|
|
|
|
$db = new Db();
|
|
|
|
|
$members = [];
|
|
|
|
|
$user = $db::getRow('select id, room, level, login from users where login = ?', [$_COOKIE['login']]);
|
|
|
|
|
$tournamentStartTime = $db::getValue('select start_time from tournaments where tid = ?', [$user['level']]);
|
|
|
|
|
foreach (TournamentModel::getFreeFighters($user['level']) as $member) {
|
|
|
|
|
$members[] = TournamentModel::uidToLogin($member);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<strong>Турнир для <?= $user['level'] ?> уровней.</strong><br>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if (empty($members) || empty($tournamentStartTime)): ?>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Турнира - нет. Участников - нет. Как вы сюда забрели? Не-ет, своим ходом вы отсюда не выберетесь!
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<?php
|
|
|
|
|
exit(); endif; ?>
|
|
|
|
|
<?php
|
2023-04-08 15:14:19 +00:00
|
|
|
|
if ((int)$tournamentStartTime == -1): ?>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Турнир начался!
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<?php
|
|
|
|
|
else: ?>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Время подачи заявки: <?= date('G:i', $tournamentStartTime) ?>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<?php
|
|
|
|
|
if (date('j', time()) !== date('j', $tournamentStartTime)): ?>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
(не сегодня!)
|
2022-12-30 19:03:37 +00:00
|
|
|
|
<?php
|
|
|
|
|
endif; ?>
|
|
|
|
|
<?php
|
|
|
|
|
endif; ?>
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
<?= $user['login'] ?><br>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Участники: <?= implode(', ', $members) ?>
|
2022-12-30 19:03:37 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|