game/modules_data/location/tournaments_lobby.php
2022-06-07 00:30:34 +03:00

22 lines
701 B
PHP

<?php
use Insallah\Db, Insallah\TournamentModel;
$db = new Db();
$members = [];
$user = $db::getRow('select id, room, level 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['uid']);
}
?>
<strong>Òóðíèð äëÿ <?= $user['level'] ?> óðîâíåé.</strong><br>
Âðåìÿ ïîäà÷è çàÿâêè: <?= date('G:i', $tournamentStartTime) ?>
<?php if (date('j', time()) !== date('j', $tournamentStartTime)): ?>
(íå ñåãîäíÿ!)
<?php endif; ?>
<br>
Ó÷àñòíèêè: <?= implode(', ', $members) ?>