public function __construct() { // Build the Core Controller parent::__construct(); // Make the user info a little easier to get $this->user = $this->User->data; }
public function __construct() { // Build the Core Controller parent::__construct(); // Load user data $this->user = $this->User->data; // Make sure the user has admin access' if (!$this->User->has_permission('admin_access')) { redirect(SITE_URL); die; } }
public function __construct() { // Build the Core Controller parent::__construct(true, false); // Get our user data into an array $this->user = $this->User->data; // Make sure the request is an ajax request, and came from this website! if (!$this->Input->is_ajax()) { die('No direct linking allowed'); } elseif (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) === false) { $this->output(false, 'Unauthorized'); die; } }
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); // Load the News Model $this->load->model('News_Model', 'news'); }
public function __construct() { parent::__construct(); // Load the Forum Model, instance as $this->forum $this->load->model('Forum_Model', 'forum'); }