예제 #1
0
function getSubpageTitle($p, $subp, $subp2)
{
    $games = getGameList($subp);
    if ($p == "games") {
        if ($subp == -1) {
            return "Создание игры";
        }
        $game = $games[0];
        return $game['name'];
    }
    if ($p == "news") {
        if ($subp == -1) {
            return "Новая новость";
        }
        $news = getNewsData($subp);
        return $news['header'];
    }
    if ($p == "checkers") {
        $game = $games[0];
        if ($subp == -1) {
            return "Новый чекер для '" . $game['name'] . "'";
        }
        if ($subp == 0) {
            return "Чекеры для '" . $game['name'] . "'";
        }
        $checkers = getCheckerList($subp);
        $checker = $checkers[0];
        return $checker['name'] . " для '" . $game['name'] . "'";
    }
    return "";
}
예제 #2
0
<?php

include_once 'procedures.php';
$_SESSION['adminPanelState'] = 'APcheckers.php';
if (isAdmin()) {
    $checkerId = -1;
    if (isset($_GET['checker'])) {
        $checkerId = intval($_GET['checker']);
    }
    $_SESSION['adminCheckerId'] = $checkerId;
    $checkerList = getCheckerList();
    $currentChecker = getCheckerList($checkerId);
    $gameList = getGameList();
    ?>

    <script>
        changeActiveAdminButton('checkersButton');
    </script>

    <script>
        function loadCheckerData(checkerId)
        {
            $('#dataContainer').load('APcheckers.php?checker=' + checkerId);
        }

        function getSelectedChecker()
        {
            var selector = document.getElementById('checkerSelector');
            return selector.options[selector.selectedIndex].value;
        }
        
예제 #3
0
<script>
    changeActiveAdminButton('tournamentsButton');
</script>

<table class="table table-hover">
<thead>
<tr>
<td>Название</td>
<td>Игра</td>
<td>Тестировщик</td>
<td>Статус</td>
</tr>
</thead>
<tbody>
<?php 
$tours = getTournamentList();
foreach ($tours as $tour) {
    $checker = getCheckerList($tour['defaultChecker']);
    echo '<tr>';
    echo '<td><a href="?page=tournament&id=' . $tour['id'] . '"</a>' . $tour['name'] . '</td>';
    echo '<td><a href="?page=games&id=' . $tour['game'] . '">' . getGameName($tour['game']) . '</a></td>';
    echo '<td>' . $checker[0]['name'] . '</td>';
    echo '<td>' . $tour['state'] . '</td>';
    echo '</tr>';
}
?>
</tbody>
</table>