public function certificate_issuance_edit($ref_id) { $monitoring_model = new Monitoring_model(); $certification_model = new Certification_Model(); $visit_model = new Visit_Model(); $validity_model = new Validity_Model(); $this->validateAddCertficate(); if (!$this->form_validation->run()) { $this->load->view('header'); $this->load->view('nav'); $this->load->view('sidebar'); $this->load->view('certificate_issuance_edit', array('monitoring_model' => $monitoring_model, 'certification_model' => $certification_model, 'visit_model' => $visit_model, 'validity_model' => $validity_model, 'getValidity' => $validity_model->getValidity(), 'certListByID' => $certification_model->getCertListByID($ref_id))); $this->load->view('footer'); } else { //$profile_id = 9; //$ref_id = $this->input->post('ref_cert_id'); $certificate_no = $this->input->post('certificate_no'); $current_certificate = '0'; //date $strIssuedDate = $this->input->post('date_issued'); $issuedDateToDate = date_create($strIssuedDate); $date_issued = date_format($issuedDateToDate, "Y-m-d"); //date $validity = $this->input->post('validity'); $month_valid = $this->input->post('month_valid'); $day_valid = $this->input->post('day_valid'); $year_valid = $this->input->post('year_valid'); $DELETED = '0'; $modified_by = 104; $profile_id = '9'; $updateResult = $certification_model->updateLswdoCertificate($ref_id, $profile_id, $certificate_no, $current_certificate, $date_issued, $validity, $month_valid, $day_valid, $year_valid, $modified_by, $DELETED); if ($updateResult) { $monitoring_model = new Monitoring_Model(); $certification_model = new Certification_Model(); $validity_model = new Validity_model(); $visit_model = new Visit_model(); $this->load->view('header'); $this->load->view('nav'); $this->load->view('sidebar'); $this->load->view('certificate_issuance_list', array('getVisitCount' => $visit_model->getVisitCount(), 'getValidity' => $validity_model->getValidity(), 'monitoring_model' => $monitoring_model, 'certification_model' => $certification_model, 'visit_model' => $visit_model, 'validity_model' => $validity_model)); $this->load->view('footer'); } } }
public function monitoring_edit() { $monitoring_model = new Monitoring_model(); $certification_model = new Certification_Model(); $validity_model = new Validity_model(); $visit_model = new Visit_model(); $this->validateAddPSBRiderQs(); if (!$this->form_validation->run()) { $this->load->view('header'); $this->load->view('nav'); $this->load->view('sidebar'); $this->load->view('monitoring_edit', array('monitoring_model' => $monitoring_model, 'certification_model' => $certification_model, 'validity_model' => $validity_model, 'visit_model' => $visit_model)); $this->load->view('footer'); } else { $profile_id = 9; $visit_count = $this->input->post('visit_count'); //date $strVisitDate = $this->input->post('visit_date'); $visitDateToDate = date_create($strVisitDate); $visit_date = date_format($visitDateToDate, "Y-m-d"); //date $remarks = $this->input->post('remarks'); $modified_by = 104; $date_modified = 'NOW()'; $deleted = '0'; //$certification_model $ref_id = $this->input->post('ref_cert_id'); $certificate_no = $this->input->post('txtCertNo'); $current_certificate = '0'; //date $strIssuedDate = $this->input->post('date_issued'); $issuedDateToDate = date_create($strIssuedDate); $date_issued = date_format($issuedDateToDate, "Y-m-d"); //date $validity = $this->input->post('validity'); $month_valid = $this->input->post('month_valid'); $day_valid = $this->input->post('day_valid'); $year_valid = $this->input->post('year_valid'); $DELETED = '0'; $updateResult = $monitoring_model->updateLswdoMonitoring($ref_id, $profile_id, $visit_count, $visit_date, $remarks, $modified_by, $deleted); if ($updateResult) { $monitoring_model = new Monitoring_Model(); $certification_model = new Certification_Model(); $visit_model = new Visit_model(); $validity_model = new Validity_model(); $this->load->view('header'); $this->load->view('nav'); $this->load->view('sidebar'); $this->load->view('monitoring_edit', array('getDataByProfileID' => $monitoring_model->getDataByProfileID(), 'getVisitCount' => $visit_model->getVisitCount(), 'getValidity' => $validity_model->getValidity(), 'monitoring_model' => $monitoring_model, 'certification_model' => $certification_model, 'validity_model' => $validity_model, 'visit_model' => $visit_model)); $this->load->view('footer'); } } }