public function show($id) { $this->breadcrumb->append_crumb('Home', base_url()); $this->breadcrumb->append_crumb('Staff Detail', base_url() . ''); $staff = new Staff(); $data['staff'] = $staff->where('staff_id', $id)->get(); $family = new Family(); $data['families'] = $family->where('staff_fam_staff_id', $data['staff']->staff_id)->get(); $work = new Work(); $data['works'] = $work->where('staff_id', $data['staff']->staff_id)->get(); $education = new Education(); $data['educations'] = $education->where('staff_id', $data['staff']->staff_id)->get(); $medical = new Medical(); $data['medicals'] = $medical->where('staff_id', $data['staff']->staff_id)->get(); $asset_detail = new Asset_Detail(); $data['asset_details'] = $asset_detail->where('staff_id', $data['staff']->staff_id)->get(); $data['btn_back'] = anchor('staffs/', 'Back'); $data['btn_edit'] = anchor('staffs/edit/' . $data['staff']->staff_id, 'Edit'); $this->load->view('staffs/show', $data); }
function update() { $asset_detail = new Asset_Detail(); $asset_detail->where('assetd_id', $this->input->post('id'))->update(array('date' => $this->input->post('date'), 'staff_id' => $this->input->post('staff_id'), 'descriptions' => $this->input->post('descriptions'), 'assetd_status' => $this->input->post('assetd_status'))); $this->session->set_flashdata('message', 'Asset detail Update successfuly.'); redirect('assets/' . $this->asset_id . '/details/index'); }