<?php include_once "procedures.php"; if ($_GET['round']) { $roundId = intval($_GET['round']); } else { $roundId = -1; } $_SESSION['tournamentState'] = 'duels.php'; $_SESSION['tournamentDuel'] = $roundId; $gameId = intval($_GET['game']); $userId = isAdmin() && isset($_GET['uid']) ? intval($_GET['id']) : getActiveUserID(); $page = isset($_GET['page']) ? intval($_GET['page']) : 0; $visual = getVisualizerByGame($gameId); $tournamentId = intval($_GET['tournament']); $duels = getDuels($roundId, $gameId, $userId, $tournamentId, $page * 10, 10); ?> <h3><?php echo getDuelHeader($roundId, $gameId); ?> </h3> Страница: <br /> <div class="btn-group"> <?php $limit = getDuelsCount($roundId, $gameId, $userId, $tournamentId); $skipped = false; for ($i = 0; $i < $limit; $i += 10) { $p = intval($i / 10); if (abs($p - $page) <= 2 || $i == 0 || $i + 10 >= $limit) {
$tournamentId = -1; if (isset($_GET['tournament'])) { $tournamentId = intval($_GET['tournament']); } $_SESSION['adminTournamentId'] = $tournamentId; $roundId = -1; if (isset($_GET['round'])) { $roundId = intval($_GET['round']); } $_SESSION['adminRoundId'] = $roundId; $tournamentList = getTournamentList(); if ($tournamentId != -1) { $roundList = getRoundList($tournamentId); } $gameId = getGameByTournament($tournamentId); $duels = getDuels($roundId, $gameId, getActiveUserID(), $tournamentId); $visual = @getVisualizerByGame($gameId); ?> <script> changeActiveAdminButton('duelsButton'); </script> <script> function loadRoundData(tournamentId, roundId) { $('#dataContainer').load('APduels.php?tournament=' + tournamentId + '&round=' + roundId); } function getSelectorValue(selector) {