diff --git a/inc/header.inc.php b/inc/header.inc.php index 28fd42f..568bdbf 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -162,7 +162,7 @@
diff --git a/index.php b/index.php index 0cb4699..2cb18bb 100644 --- a/index.php +++ b/index.php @@ -164,11 +164,6 @@ if (Registry::AUTHMETHOD == 'SAML') { echo $VisitActions->voidVisit($_POST['voidvisit'], "0", $_POST['voidnotes']); } -// UPDATE VENDOR RECORD IF POSTED - if (!empty($_POST['updateinitialvendorvisit'])) { - echo $VisitActions->setInfoVendorVisitInitial($_POST['db_vendorinfo_id'], $_POST['db_vendorinfo_checklistrequired'], $_POST['db_vendorinfo_routinework'], $_POST['db_vendorinfo_nonroutinework'], $_POST['db_vendorinfo_coi'], $_POST['db_vendorinfo_worksummary'], $_POST['db_vendorinfo_equipmentsummary'] ); - } - // FINALIZE VENDOR RECORD IF POSTED if (!empty($_POST['updatefinalvendorvisit'])) { echo $VisitActions->setInfoVendorVisitFinal($_POST['db_vendorinfo_id'], $_POST['db_vendorinfo_checklistcompleted'], $_POST['db_vendorinfo_workcompleted'], $_POST['db_vendorinfo_sitecleanup'], $uid, $_POST['db_vendorinfo_doccompleted'] ); @@ -193,8 +188,37 @@ $form_data = filter_input_array(INPUT_POST, [ 'form_data_escortrequired' => (int)FILTER_VALIDATE_INT, 'form_data_v_signature' => (string)FILTER_SANITIZE_STRING, 'form_data_e_signature' => (string)FILTER_SANITIZE_STRING, - 'form_data_escortname' => (string)FILTER_SANITIZE_STRING + 'form_data_escortname' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_id' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_checklistrequired' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_routinework' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_nonroutinework' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_coi' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_worksummary' => (string)FILTER_SANITIZE_STRING, + 'db_vendorinfo_equipmentsummary' => (string)FILTER_SANITIZE_STRING + + + + ]); + +// UPDATE VENDOR RECORD IF POSTED +if(!empty($form_data['form_data_stage'])){ + if($form_data['form_data_stage']==='updateinitialvendorvisit'){ + ob_start(); + $VisitActions->setInfoVendorVisitInitial( + $form_data['db_vendorinfo_id'], + $form_data['db_vendorinfo_checklistrequired'], + $form_data['db_vendorinfo_routinework'], + $form_data['db_vendorinfo_nonroutinework'], + $form_data['db_vendorinfo_coi'], + $form_data['db_vendorinfo_worksummary'], + $form_data['db_vendorinfo_equipmentsummary'] ); + ob_end_clean(); + unset($form_data); + } +} + // SET MANUALSIGNIN STAGE if(!empty($form_data['form_data_stage'])){ if($form_data['form_data_stage']==='manualsignin'){ @@ -382,6 +406,15 @@ if($form_data['form_data_isvendor'] === (int)"1") { +