function manage_animal() { $animal_service = new Animal_service(); $animal_category_service = new Animal_category_service(); $data['heading'] = "Manage Animals"; $data['results'] = $animal_service->get_all_animals(); $data['cats'] = $animal_category_service->get_all_animals_category(); $parials = array('content' => 'animal/manage_animal_view'); $this->template->load('template/main_template', $parials, $data); }
function edit_animal_cat() { $animal_category_model = new Animal_category_model(); $animal_category_service = new Animal_category_service(); $animal_category_model->set_ac_id($this->input->post('animal_cat_id', TRUE)); $animal_category_model->set_ac_name($this->input->post('name', TRUE)); $animal_category_model->set_ac_description($this->input->post('desc', TRUE)); $animal_category_model->set_ac_latitude($this->input->post('latitude', TRUE)); $animal_category_model->set_ac_longitude($this->input->post('longitude', TRUE)); echo $animal_category_service->update_animals_category($animal_category_model); }