示例#1
0
            $NextRoundCustomPointsArray = array();
            if (count($NextRoundCustomPoints) > 0) {
                foreach ($NextRoundCustomPoints as $point) {
                    $NextRoundCustomPointsArray[] = intval(trim($point));
                }
            }
            if (!$client->query('SetRoundCustomPoints', $NextRoundCustomPointsArray)) {
                AdminServ::error();
            }
        }
        // MatchSettings
        if (SERVER_MATCHSET) {
            $mapsDirectory = AdminServ::getMapsDirectoryPath();
            if (array_key_exists('SaveCurrentMatchSettings', $_POST)) {
                if (!$client->query('SaveMatchSettings', $mapsDirectory . SERVER_MATCHSET)) {
                    AdminServ::error();
                }
            }
        }
        AdminServLogs::add('action', 'Save game infos');
        Utils::redirection(false, '?p=' . USER_PAGE);
    }
}
// LECTURE
$gameInfos = AdminServ::getGameInfos();
$data['gameInfos'] = array('curr' => $gameInfos['curr'], 'next' => $gameInfos['next']);
$data['teamInfo'] = array('team1' => array('name' => Utils::t('Blue'), 'color' => '0.667', 'colorhex' => '#0000ff', 'country' => 'World|France'), 'team2' => array('name' => Utils::t('Red'), 'color' => '0', 'colorhex' => '#ff0000', 'country' => 'World|France'));
if (isset($_SESSION['adminserv']['teaminfo']) && count($_SESSION['adminserv']['teaminfo']) > 0) {
    $data['teamInfo'] = array('team1' => $_SESSION['adminserv']['teaminfo']['team1'], 'team2' => $_SESSION['adminserv']['teaminfo']['team2']);
}
unset($gameInfos);