game/modules_data/location/tournaments_lobby.php

22 lines
701 B
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?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><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <?= $user['level'] ?> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</strong><br>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <?= date('G:i', $tournamentStartTime) ?>
<?php if (date('j', time()) !== date('j', $tournamentStartTime)): ?>
(<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!)
<?php endif; ?>
<br>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <?= implode(', ', $members) ?>