Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') or die('No direct script access.');
- class Controller_Admin extends Controller_Layout {
- public function action_home()
- {
- $this->template->title = __('Control Panel Home');
- $this->template->content = View::factory('admin/home' );
- $this->template->sidebar = View::factory('admin/sidebar');
- }
- public function action_addgame()
- {
- $genres=Model::factory('genre')->fetchgenres();
- $this->template->title = __('Add New Game');
- $this->template->content = View::factory('admin/addgame' )
- ->bind('genres',$genres);
- $this->template->sidebar = View::factory('admin/sidebar');
- }
- public function action_managegames($filter)
- {
- $gamelist=Model::factory('game')->listgames($filter);
- $genres=Model::factory('genre')->fetchgenres();
- $this->template->title = __('Game List');
- $this->template->content = View::factory('admin/gamelist')
- ->set('gamelist',$gamelist)
- ->set('genres',$genres);
- $this->template->sidebar = View::factory('admin/sidebar');
- }
- public function action_edit($gameid)
- {
- $genres=Model::factory('genre')->fetchgenres();
- $game=Model::factory('game')->fetchgame($gameid);
- $this->template->title = __('Edit Game');
- $this->template->content = View::factory('admin/addgame' )
- ->set('editgame',$game)
- ->set('genres',$genres);
- $this->template->sidebar = View::factory('admin/sidebar');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement