示例#1
0
 function index()
 {
     $animal_treatment_service = new Animal_treatment_service();
     $animal_service = new Animal_service();
     $treatment_service = new Treatment_service();
     $data['heading'] = "Animal Treatment";
     $data['treatment_detils'] = $treatment_service->get_all_treatments();
     $data['animal_details'] = $animal_service->get_all_animals();
     $data['results'] = $animal_treatment_service->get_all_animal_treatments();
     $parials = array('content' => 'treatment/animal_treatment_view');
     $this->template->load('template/main_template', $parials, $data);
 }
示例#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);
 }
示例#3
-51
 function print_animal_report()
 {
     $animal_service = new Animal_service();
     $data['heading'] = "Manage Animals";
     $data['results'] = $animal_service->get_animals();
     $print_out = $this->load->view('animal/animal_rep_print', $data, TRUE);
     $footer = $this->load->view('template/custom/pdf_footer', $data, TRUE);
     $this->load->library('MPDF56/mpdf');
     $mpdf = new Mpdf('utf-8', 'A4');
     $mpdf->SetDisplayMode('fullpage');
     $mpdf->SetFooter($footer);
     $mpdf->WriteHTML($print_out);
     $mpdf->Output();
 }