Skip to content

Commit

Permalink
Update Inspection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Mar 11, 2024
1 parent 9882df1 commit d73f0c1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions application/controllers/Inspection.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,20 @@ public function inspection_save()
$user = $this->ion_auth->user()->row();
$data['userid'] = $user->id;
$data['username'] = $user->first_name." ".$user->last_name;
if (isset($_POST['rmrk_inspection']) && $_POST['rmrk_inspection'] <> "") {
$insupd['rmrk_inspection'] = $this->input->post('rmrk_inspection');
} else {
$insupd['rmrk_inspection'] = "n/a";
}
if (isset($_POST['en_rmrk_inspection']) && $_POST['en_rmrk_inspection'] <> "") {
$insupd['en_rmrk_inspection'] = $this->input->post('en_rmrk_inspection');
} else {
$insupd['en_rmrk_inspection'] = "n/a";
}
$this->itindata_model->upd_inspection($this->input->post('inspectionid_insres'), array("en_rmrk_inspection" => $insupd['en_rmrk_inspection'], "rmrk_inspection" => $insupd['rmrk_inspection']));



$points = $_POST['checkpoint'];
if (isset($_POST['remark'])) {
$remarks = $_POST['remark'];
Expand All @@ -425,6 +439,8 @@ public function inspection_save()
if (isset($_POST['inspimg'])) {
$photos = $_POST['inspimg'];
}


foreach ($points as $key => $value):

$insdata[] = array('inspectionid_insres' => $this->input->post('inspectionid_insres'), 'chkpointsect_insres' => $sectors[$key], 'chkpointid_insres' => $key, 'chpointscore_insres' => $value);
Expand Down

0 comments on commit d73f0c1

Please sign in to comment.