From f19434ec0cd2d704aac87864a377d426341c2737 Mon Sep 17 00:00:00 2001 From: Josh North Date: Fri, 11 Jun 2021 22:51:00 -0400 Subject: [PATCH] Cleanup and consolidation, signin process updates --- css/styles.css | 10 +- inc/header.inc.php | 14 +- signin.php | 430 ++++++++++++++++++++++++++++++++++++++++++++- signin_0.php | 94 ---------- signin_1.php | 231 ------------------------ signin_2.php | 129 -------------- signin_3.php | 179 ------------------- signin_4.php | 172 ------------------ signin_display.php | 59 +++++-- 9 files changed, 480 insertions(+), 838 deletions(-) delete mode 100644 signin_0.php delete mode 100644 signin_1.php delete mode 100644 signin_2.php delete mode 100644 signin_3.php delete mode 100644 signin_4.php diff --git a/css/styles.css b/css/styles.css index 7da6158..3f089eb 100755 --- a/css/styles.css +++ b/css/styles.css @@ -65,9 +65,11 @@ } #vsignature { +background-color: rgb(220, 220, 220); } #esignature { +background-color: rgb(220, 220, 220); } #esignature-parent { @@ -78,11 +80,11 @@ } canvas.jSignature { max-height: 200px !important; +width: 100%; height: 200px; - padding: 0 0 0 0; - margin: 0 0 0 0; - border: 2px dotted #000; - background-color:lightgrey; +padding: 0 0 0 0; +margin: 0 0 0 0; +background-color: rgb(220, 220, 220); } diff --git a/inc/header.inc.php b/inc/header.inc.php index 935377a..c01ef48 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -101,13 +101,13 @@ - - - - - - - + + + + + + + diff --git a/signin.php b/signin.php index 4c50e21..6441b5b 100644 --- a/signin.php +++ b/signin.php @@ -62,14 +62,47 @@ } ?> - + + + (string)FILTER_SANITIZE_STRING, + 'form_data_siteid' => (int)FILTER_VALIDATE_INT, + 'form_data_isvendor' => (int)FILTER_VALIDATE_INT, + 'form_data_firstname' => (string)FILTER_SANITIZE_STRING, + 'form_data_lastname' => (string)FILTER_SANITIZE_STRING, + 'form_data_carnum' => (string)FILTER_SANITIZE_STRING, + 'form_data_ssanum' => (string)FILTER_SANITIZE_STRING, + 'form_data_company' => (string)FILTER_SANITIZE_STRING, + 'form_data_contact1' => (string)FILTER_SANITIZE_STRING, + 'form_data_contact2' => (string)FILTER_SANITIZE_STRING, + 'form_data_workstart' => (string)FILTER_SANITIZE_STRING, + 'form_data_workend' => (string)FILTER_SANITIZE_STRING, + 'form_data_visittype' => (int)FILTER_VALIDATE_INT, + '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 +]); +// SET INITIAL STAGE +if(empty($form_data['form_data_stage'])){ + $form_data['form_data_stage'] = 'covidack'; +} +?> + + + + + +

-
+
@@ -114,10 +147,11 @@
 
-
+
- - + + +
@@ -142,6 +176,390 @@ }, false); })(); - + + + + + +
+
+
+

+
+
+ +
+ + + + + +
+
+
+

+
+
+ +
+ + + + + +
+
+
+

+
+
+ +
+ + + + + +
+
+
+

+
+
+ +
+ + + + + +
+
+
+

+
+
+ +
+ + + + + +
+
+
+

+
+
+ +
+ + + + + diff --git a/signin_0.php b/signin_0.php deleted file mode 100644 index 4cb4261..0000000 --- a/signin_0.php +++ /dev/null @@ -1,94 +0,0 @@ -. - */ - - ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION - ini_set('session.gc_probability', 1); // GC RATES - ini_set('session.gc_divisor', 100); // TIMES - ini_set('session.use_cookies', '1'); - ini_set('session.use_only_cookies', '1'); - ini_set('session.cookie_secure', '0'); - ini_set('session.cookie_httponly', '0'); - ini_set('session.cookie_samesite', 'Lax'); - session_save_path('.tmp'); // TEMP - session_start(); // START - require_once __DIR__ . '/autoload.php'; // AUTOLOAD - use App\LobbySIO\Misc\Csrf; // ANTICSRF - $StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES - $SiteInfo = new \App\LobbySIO\Database\SiteInfo(); - $Users = new \App\LobbySIO\Database\Users(); - if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT - $session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); } - if (isset($session_user)) { // GET UID OR SET TO KIOSK - $uid = $session_user["0"]["users_id"];} else { $uid = "2"; } - $app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE - if(!isset($app_disp_lang)) { - $app_disp_lang=$StaticFunctions->getDefaultLanguage(); } - $siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE - foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) { - $lookup_array[$arr['sites_id']]=1; } - if(isset($lookup_array[$siteidcookie])) { - $siteid = $siteidcookie; } else { $siteid = "1"; } - if(!isset($siteid)) { $siteid="1"; } - $Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR - $transLang = $Translate->userLanguage(); - $VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo(); - $app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP - $app_current_pageicon = ' '; - require_once("inc/header.inc.php"); - if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS - header('Location: index.php'); // ELSE HOME - } else { - header("X-Frame-Options: SAMEORIGIN"); - header("X-Content-Type-Options: nosniff"); - //header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false); - if (!empty($_GET['a'])) { - echo '
' . print_r($_POST, true) . '
'; - echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful'); - } - ?> - - - - -
-
-
-

-
-
- -
- - - diff --git a/signin_1.php b/signin_1.php deleted file mode 100644 index 310acba..0000000 --- a/signin_1.php +++ /dev/null @@ -1,231 +0,0 @@ -. - */ - - ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION - ini_set('session.gc_probability', 1); // GC RATES - ini_set('session.gc_divisor', 100); // TIMES - ini_set('session.use_cookies', '1'); - ini_set('session.use_only_cookies', '1'); - ini_set('session.cookie_secure', '0'); - ini_set('session.cookie_httponly', '0'); - ini_set('session.cookie_samesite', 'Lax'); - session_save_path('.tmp'); // TEMP - session_start(); // START - require_once __DIR__ . '/autoload.php'; // AUTOLOAD - use App\LobbySIO\Misc\Csrf; // ANTICSRF - $StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES - $SiteInfo = new \App\LobbySIO\Database\SiteInfo(); - $Users = new \App\LobbySIO\Database\Users(); - if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT - $session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); } - if (isset($session_user)) { // GET UID OR SET TO KIOSK - $uid = $session_user["0"]["users_id"];} else { $uid = "2"; } - $app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE - if(!isset($app_disp_lang)) { - $app_disp_lang=$StaticFunctions->getDefaultLanguage(); } - $siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE - foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) { - $lookup_array[$arr['sites_id']]=1; } - if(isset($lookup_array[$siteidcookie])) { - $siteid = $siteidcookie; } else { $siteid = "1"; } - if(!isset($siteid)) { $siteid="1"; } - $Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR - $transLang = $Translate->userLanguage(); - $VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo(); - $app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP - $app_current_pageicon = ' '; - require_once("inc/header.inc.php"); - if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS - header('Location: index.php'); // ELSE HOME - } else { - header("X-Frame-Options: SAMEORIGIN"); - header("X-Content-Type-Options: nosniff"); - //header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false); - if (!empty($_GET['a'])) { - echo '
' . print_r($_POST, true) . '
'; - echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful'); - } - ?> - - - - - - -
-
-
-

-
-
- -
- - - -
-
-
-

-
-
- -
- - - - -
-
-
-

-
-
-
- - - - diff --git a/signin_2.php b/signin_2.php deleted file mode 100644 index bdab5be..0000000 --- a/signin_2.php +++ /dev/null @@ -1,129 +0,0 @@ -. - */ - - ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION - ini_set('session.gc_probability', 1); // GC RATES - ini_set('session.gc_divisor', 100); // TIMES - ini_set('session.use_cookies', '1'); - ini_set('session.use_only_cookies', '1'); - ini_set('session.cookie_secure', '0'); - ini_set('session.cookie_httponly', '0'); - ini_set('session.cookie_samesite', 'Lax'); - session_save_path('.tmp'); // TEMP - session_start(); // START - require_once __DIR__ . '/autoload.php'; // AUTOLOAD - use App\LobbySIO\Misc\Csrf; // ANTICSRF - $StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES - $SiteInfo = new \App\LobbySIO\Database\SiteInfo(); - $Users = new \App\LobbySIO\Database\Users(); - if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT - $session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); } - if (isset($session_user)) { // GET UID OR SET TO KIOSK - $uid = $session_user["0"]["users_id"];} else { $uid = "2"; } - $app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE - if(!isset($app_disp_lang)) { - $app_disp_lang=$StaticFunctions->getDefaultLanguage(); } - $siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE - foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) { - $lookup_array[$arr['sites_id']]=1; } - if(isset($lookup_array[$siteidcookie])) { - $siteid = $siteidcookie; } else { $siteid = "1"; } - if(!isset($siteid)) { $siteid="1"; } - $Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR - $transLang = $Translate->userLanguage(); - $VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo(); - $app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP - $app_current_pageicon = ' '; - require_once("inc/header.inc.php"); - if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS - header('Location: index.php'); // ELSE HOME - } else { - header("X-Frame-Options: SAMEORIGIN"); - header("X-Content-Type-Options: nosniff"); - //header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false); - if (!empty($_GET['a'])) { - echo '
' . print_r($_POST, true) . '
'; - echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful'); - } - ?> - - - - - -
-
-
-

-
-
- -
- - - -
-
-
-

-
-
-
- - - - diff --git a/signin_3.php b/signin_3.php deleted file mode 100644 index 4fe1318..0000000 --- a/signin_3.php +++ /dev/null @@ -1,179 +0,0 @@ -. - */ - - ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION - ini_set('session.gc_probability', 1); // GC RATES - ini_set('session.gc_divisor', 100); // TIMES - ini_set('session.use_cookies', '1'); - ini_set('session.use_only_cookies', '1'); - ini_set('session.cookie_secure', '0'); - ini_set('session.cookie_httponly', '0'); - ini_set('session.cookie_samesite', 'Lax'); - session_save_path('.tmp'); // TEMP - session_start(); // START - require_once __DIR__ . '/autoload.php'; // AUTOLOAD - use App\LobbySIO\Misc\Csrf; // ANTICSRF - $StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES - $SiteInfo = new \App\LobbySIO\Database\SiteInfo(); - $Users = new \App\LobbySIO\Database\Users(); - if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT - $session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); } - if (isset($session_user)) { // GET UID OR SET TO KIOSK - $uid = $session_user["0"]["users_id"];} else { $uid = "2"; } - $app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE - if(!isset($app_disp_lang)) { - $app_disp_lang=$StaticFunctions->getDefaultLanguage(); } - $siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE - foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) { - $lookup_array[$arr['sites_id']]=1; } - if(isset($lookup_array[$siteidcookie])) { - $siteid = $siteidcookie; } else { $siteid = "1"; } - if(!isset($siteid)) { $siteid="1"; } - $Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR - $transLang = $Translate->userLanguage(); - $VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo(); - $app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP - $app_current_pageicon = ' '; - require_once("inc/header.inc.php"); - if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS - header('Location: index.php'); // ELSE HOME - } else { - header("X-Frame-Options: SAMEORIGIN"); - header("X-Content-Type-Options: nosniff"); - //header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false); - if (!empty($_GET['a'])) { - echo '
' . print_r($_POST, true) . '
'; - echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful'); - } - ?> - - - - - -
-
-
-

-
-
- -
- - - - -
-
-
-

-
-
-
- - - - diff --git a/signin_4.php b/signin_4.php deleted file mode 100644 index 8e67220..0000000 --- a/signin_4.php +++ /dev/null @@ -1,172 +0,0 @@ -. - */ - - ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION - ini_set('session.gc_probability', 1); // GC RATES - ini_set('session.gc_divisor', 100); // TIMES - ini_set('session.use_cookies', '1'); - ini_set('session.use_only_cookies', '1'); - ini_set('session.cookie_secure', '0'); - ini_set('session.cookie_httponly', '0'); - ini_set('session.cookie_samesite', 'Lax'); - session_save_path('.tmp'); // TEMP - session_start(); // START - require_once __DIR__ . '/autoload.php'; // AUTOLOAD - use App\LobbySIO\Misc\Csrf; // ANTICSRF - $StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES - $SiteInfo = new \App\LobbySIO\Database\SiteInfo(); - $Users = new \App\LobbySIO\Database\Users(); - if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT - $session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); } - if (isset($session_user)) { // GET UID OR SET TO KIOSK - $uid = $session_user["0"]["users_id"];} else { $uid = "2"; } - $app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE - if(!isset($app_disp_lang)) { - $app_disp_lang=$StaticFunctions->getDefaultLanguage(); } - $siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE - foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) { - $lookup_array[$arr['sites_id']]=1; } - if(isset($lookup_array[$siteidcookie])) { - $siteid = $siteidcookie; } else { $siteid = "1"; } - if(!isset($siteid)) { $siteid="1"; } - $Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR - $transLang = $Translate->userLanguage(); - $VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo(); - $app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP - $app_current_pageicon = ' '; - require_once("inc/header.inc.php"); - if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS - header('Location: index.php'); // ELSE HOME - } else { - header("X-Frame-Options: SAMEORIGIN"); - header("X-Content-Type-Options: nosniff"); - //header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false); - if (!empty($_GET['a'])) { - echo '
' . print_r($_POST, true) . '
'; - echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful'); - } - ?> - - - - - -
-
-
-

-
-
- -
- - - - - - - - - -
-
-
-

-
-
-
- - - - diff --git a/signin_display.php b/signin_display.php index 5573ee2..168612a 100644 --- a/signin_display.php +++ b/signin_display.php @@ -65,20 +65,47 @@ - -newVisit(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING), $StaticFunctions->getUTC(), filter_input(INPUT_POST, 'v_signature', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'siteid', FILTER_SANITIZE_STRING), "1", filter_input(INPUT_POST, 'e_signature', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'escort', FILTER_SANITIZE_STRING), $carnum, $ssanum, $isvendor); -if ($isvendor == "1") { + (string)FILTER_SANITIZE_STRING, + 'form_data_siteid' => (int)FILTER_VALIDATE_INT, + 'form_data_isvendor' => (int)FILTER_VALIDATE_INT, + 'form_data_firstname' => (string)FILTER_SANITIZE_STRING, + 'form_data_lastname' => (string)FILTER_SANITIZE_STRING, + 'form_data_carnum' => (string)FILTER_SANITIZE_STRING, + 'form_data_ssanum' => (string)FILTER_SANITIZE_STRING, + 'form_data_company' => (string)FILTER_SANITIZE_STRING, + 'form_data_contact1' => (string)FILTER_SANITIZE_STRING, + 'form_data_contact2' => (string)FILTER_SANITIZE_STRING, + 'form_data_workstart' => (string)FILTER_SANITIZE_STRING, + 'form_data_workend' => (string)FILTER_SANITIZE_STRING, + 'form_data_visittype' => (int)FILTER_VALIDATE_INT, + '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 +]); +if (empty($form_data['form_data_carnum'])) { $carnum="";} else {$carnum=$form_data['form_data_carnum'];} +if (empty($form_data['form_data_ssanum'])) { $ssanum="";} else {$ssanum=$form_data['form_data_ssanum'];} +if (empty($form_data['form_data_isvendor'])) { $isvendor="0";} else {$isvendor=$form_data['form_data_isvendor'];} +if (empty($form_data['form_data_contact1'])) { $db_vendorinfo_contact1="";} else {$db_vendorinfo_contact1=$form_data['form_data_contact1'];} +if (empty($form_data['form_data_contact2'])) { $db_vendorinfo_contact2="";} else {$db_vendorinfo_contact2=$form_data['form_data_contact2'];} +if (empty($form_data['form_data_workstart'])) { $db_vendorinfo_workstart="";} else {$db_vendorinfo_workstart=$form_data['form_data_workstart'];} +if (empty($form_data['form_data_workend'])) { $db_vendorinfo_workend="";} else {$db_vendorinfo_workend=$form_data['form_data_workend'];} +$visitid = $VisitActions->newVisit($form_data['form_data_firstname'], $form_data['form_data_lastname'], $form_data['form_data_company'], $form_data['form_data_visittype'], $StaticFunctions->getUTC(), $form_data['form_data_v_signature'], $form_data['form_data_siteid'], "1", $form_data['form_data_e_signature'], $form_data['form_data_escortname'], $carnum, $ssanum, $isvendor); +if($form_data['form_data_isvendor'] === (int)"1") { $vendorid = $VisitActions->setInfoVendorVisitNew($visitid, $db_vendorinfo_contact1, $db_vendorinfo_contact2, $db_vendorinfo_workstart, $db_vendorinfo_workend); -}; -?> +} +// SET INITIAL STAGE +if(!empty($form_data['form_data_stage'])){ + $form_data['form_data_stage'] = 'readytosubmit'; +}?> + + + + +
@@ -95,7 +122,7 @@ if ($isvendor == "1") { -
getInfoVisitType("%", filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING))[0]["visittypes_name"]]; ?>,

+
getInfoVisitType("%", $form_data['form_data_visittype'])[0]["visittypes_name"]]; ?>,

@@ -103,7 +130,7 @@ if ($isvendor == "1") {
-getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?> +getSite($form_data['form_data_siteid'], $uid, "0", "0")[0]["sites_region"] == "US") { ?>

@@ -115,7 +142,7 @@ if ($isvendor == "1") {

- +