/** * Edit location pop up content set up and then send . */ function load_edit_location_content() { $locations_service = new Locations_service(); $data['business_types'] = $this->config->item('BUSINESS_TYPES'); $data['location'] = $locations_service->get_location_by_id(trim($this->input->post('loc_id', TRUE))); echo $this->load->view('locations/edit_location', $data, TRUE); }
public function report_dashboard() { $locations_service = new Locations_service(); $location_id = $this->session->userdata('USER_LOCATION'); $location = $locations_service->get_location_by_id($location_id); $partials = array(); if (!empty($location)) { if ($location->type == 'hospital') { $partials = array('content' => 'reports/hospital_report_dashboard'); //load the view } else { $partials = array('content' => 'reports_other/report_dashboard'); //load the view } } $this->template->load('template/main_template', $partials); //load teh template }