Beispiel #1
0
function getTournamentByRound($roundId)
{
    $roundData = getRoundData($roundId);
    return $roundData['tournament'];
}
Beispiel #2
0
function printPageTitle()
{
    $page = $_GET["page"] or "";
    if ($page == "") {
        printTitleItem("Главная", "");
    } else {
        printTitleItem("Главная", "?page=");
        if ($page == "tournament") {
            $id = intval($_GET["id"]);
            printTournamentTitle($id, false);
            echo '<li><a href="?page=tournament&id=' . $id . '&action=edit" role=button class="btn btn-default">Редактировать турнир</a></li>';
        } else {
            if ($page == "round") {
                printTournamentTitle(intval($_GET["tournament"]), true);
                $id = intval($_GET["id"]);
                if ($id == -1) {
                    printTitleItem("Новый раунд", "");
                } else {
                    $round = getRoundData($id);
                    printTitleItem($round['name'], "");
                }
            } else {
                if ($page == "games") {
                    printTitleItem(getRusTitle("games"), "");
                } else {
                    if ($page == "game") {
                        printTitleItem(getRusTitle("games"), "?page=games");
                        printTitleItem(getGameName($_GET["id"]), "");
                    } else {
                        printTitleItem(getRusTitle($page), "");
                    }
                }
            }
        }
    }
}
Beispiel #3
0
<?php

include_once 'procedures.php';
$roundId = intval($_GET['round']);
$_SESSION['tournamentState'] = 'roundResults.php';
$_SESSION['roundResultsRoundId'] = $roundId;
$data = getRoundData($roundId);
$gameId = $data['game'];
?>

<script>
    function loadRoundTable(roundId)
    {
        $('#dataContainer').load('roundTable.php?round=' + roundId);
    }
    
    function loadPlayersDuel(roundId, gameId, tournamentId)
    {
        $('#dataContainer').load('duels.php?game=' + gameId + '&round=' + roundId + '&tournament=' + tournamentId);
    }
</script>

    <div class = "centeredText">
    <h2>Раунд "<?php 
echo $data['name'];
?>
" игры "<?php 
echo $data['gameName'];
?>
" от <?php 
echo $data['date'];