public function index() { if ($this->session->userdata('USER_TYPE') == '1') { $settings_service = new Settings_service(); $data['settings'] = $settings_service->get_all_settings(); $data['business_types'] = $this->config->item('BUSINESS_TYPES'); $partials = array('content' => 'settings/settings'); //load the view $this->template->load('template/main_template', $partials, $data); //load teh template } else { $this->template->load('template/denied'); } }