config/restricted_pages config/hooks.php 'Restricted_Access', 'function' => 'restrict', 'filename' => 'restricted_access.php', 'filepath' => 'hooks', 'params' => array() ); ?> hooks/restricted_access.php obj =& get_instance(); } public function restrict($pages) { $this->obj->load->config('restricted_pages'); $current = $this->obj->uri->slash_segment(1) . $this->obj->uri->segment(2); if(in_array($current, $this->obj->config->item('restricted_pages'))) { if($_SESSION['gebruiker']['beheer'] != '1') { show_error('Geen toegang'); } } return; } } ?>