Esempio n. 1
0
 function edit_animal()
 {
     $animal_model = new Animal_model();
     $animal_service = new Animal_service();
     $animal_model->set_name($this->input->post('name', TRUE));
     $animal_model->set_category_id($this->input->post('category_id', TRUE));
     $animal_model->set_place_id($this->input->post('place_id', TRUE));
     echo $animal_service->update_animal($animal_model);
 }
Esempio n. 2
0
 function edit_animal()
 {
     $animal_model = new Animal_model();
     $animal_service = new Animal_service();
     $animal_model->set_id($this->input->post('animal_id', TRUE));
     $animal_model->set_name($this->input->post('name', TRUE));
     $animal_model->set_updated_by($this->session->userdata('USER_ID'));
     $animal_model->set_updated_date(date("Y-m-d H:i:s"));
     echo $animal_service->update_animal($animal_model);
 }