Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- */
- function admin_game($gameId)
- {
- $tpl = new Template('admin/game', 'admin/index');
- $game = Game::get2($gameId);
- $tpl->assign('game', $game);
- $players = Game::getPlayers($gameId);
- $tpl->assign('players', $players);
- $scores = Game::getScores($gameId);
- $tpl->assign('scores', $scores);
- $tracks = Place::getTracks();
- $tpl->assign('tracks', $tracks);
- $tpl->display();
- }
- /**
- *
- */
- function admin_game_do($gameId)
- {
- $game = Game::get($gameId);
- $game['player_count'] = (int)$_POST['player_max'];
- $game['valid_from'] = $_POST['valid_from'];
- $game['valid_to'] = $_POST['valid_to'];
- Game::save($game);
- $message = 'Spiel mit der Id ' . (int)$gameId . ' erfolgreich bearbeitet.';
- Redirect::to('admin/start', array('flash_notice' => $message));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement