Esempio n. 1
0
 public function __construct($url)
 {
     parent::__construct($url);
     if (isset($url[2]) && is_numeric($url[2]) && Database::get_count('game', $url[2])) {
         $this->game = $url[2];
     }
 }
Esempio n. 2
0
 public function __construct($url)
 {
     parent::__construct($url);
     if (empty($_GET['id']) || !is_numeric($_GET['id'])) {
         $this->redirect_location = '/admin/';
         $this->create_redirect();
     } else {
         $this->id = (int) $_GET['id'];
     }
 }
Esempio n. 3
0
 public function __construct($url)
 {
     parent::__construct($url);
     if (!is_numeric($url[2])) {
         $this->create_redirect();
     }
     $game = Database::join('user', 'u.id = g.id_user')->get_row('game', array('g.*', 'u.login'), 'g.id = ?', $url[2]);
     if (empty($game)) {
         $this->create_redirect();
     }
     $this->game = $game;
 }