diff --git a/profile.php b/profile.php index 4822c61..da95fc0 100644 --- a/profile.php +++ b/profile.php @@ -82,35 +82,34 @@ } else { ?> - - (string)FILTER_SANITIZE_STRING, - 'form_data_passwordinitial' => (string)FILTER_SANITIZE_STRING, - 'form_data_passwordconfirm' => (string)FILTER_SANITIZE_STRING, - 'form_data_firstname' => (string)FILTER_SANITIZE_STRING, - 'form_data_lastname' => (string)FILTER_SANITIZE_STRING, - 'form_data_email' => (string)FILTER_SANITIZE_STRING + 'fd_saveProfile' => (string)FILTER_SANITIZE_STRING, + 'fd_initialPassword' => (string)FILTER_SANITIZE_STRING, + 'fd_confirmPassword' => (string)FILTER_SANITIZE_STRING, + 'fd_firstName' => (string)FILTER_SANITIZE_STRING, + 'fd_lastName' => (string)FILTER_SANITIZE_STRING, + 'fd_userEmail' => (string)FILTER_SANITIZE_STRING ]); $minpasslength = $StaticFunctions->getMinPass(); - if (isset($form_data['form_data_saveprofile'])): - if (empty($form_data['form_data_passwordinitial']) && empty($form_data['form_data_passwordconfirm'])): - $Users->setUserInfo($session_user["0"]["users_id"], $form_data['form_data_firstname'], $form_data['form_data_lastname'], $form_data['form_data_email'], $session_user["0"]["users_usertypeid"], $session_user["0"]["users_password"]); + if (isset($form_data['fd_saveProfile'])): + if (empty($form_data['fd_initialPassword']) && empty($form_data['fd_confirmPassword'])): + $Users->setUserInfo($session_user["0"]["users_id"], $form_data['fd_firstName'], $form_data['fd_lastName'], $form_data['fd_userEmail'], $session_user["0"]["users_usertypeid"], $session_user["0"]["users_password"]); header('Location: profile.php'); - elseif (strlen($form_data['form_data_passwordinitial']) < $minpasslength): + elseif (strlen($form_data['fd_initialPassword']) < $minpasslength): echo "Password must be at least $minpasslength characters."; - elseif (!empty($form_data['form_data_passwordinitial']) && empty($form_data['form_data_passwordconfirm'])): + elseif (!empty($form_data['fd_initialPassword']) && empty($form_data['fd_confirmPassword'])): echo "Please confirm password if you wish to change it"; - elseif ($form_data['form_data_passwordinitial'] != $form_data['form_data_passwordconfirm']): + elseif ($form_data['fd_initialPassword'] != $form_data['fd_confirmPassword']): echo "New passwords do not match"; - elseif (!empty($form_data['form_data_passwordinitial']) && ($form_data['form_data_passwordinitial'] = $form_data['form_data_passwordconfirm'])): + elseif (!empty($form_data['fd_initialPassword']) && ($form_data['fd_initialPassword'] = $form_data['fd_confirmPassword'])): // change pass require_once("src/Misc/PasswordHash.php"); $hasher = new PasswordHash(8, FALSE); - $password = $hasher->HashPassword($form_data['form_data_passwordinitial']); - $Users->setUserInfo($session_user["0"]["users_id"], $form_data['form_data_firstname'], $form_data['form_data_lastname'], $form_data['form_data_email'], $session_user["0"]["users_usertypeid"], $password); + $password = $hasher->HashPassword($form_data['fd_initialPassword']); + $Users->setUserInfo($session_user["0"]["users_id"], $form_data['fd_firstName'], $form_data['fd_lastName'], $form_data['fd_userEmail'], $session_user["0"]["users_usertypeid"], $password); header('Location: profile.php'); endif; endif; @@ -118,24 +117,24 @@ $form_data = filter_input_array(INPUT_POST, [
-

+

- +
-

+

-

+

@@ -144,13 +143,13 @@ $form_data = filter_input_array(INPUT_POST, [
- + " readonly />
- + " readonly />
@@ -158,28 +157,28 @@ $form_data = filter_input_array(INPUT_POST, [
- + " readonly />
- - " /> + + " />
- - " /> + + " />
- - " /> + + " />
@@ -187,19 +186,19 @@ $form_data = filter_input_array(INPUT_POST, [
- - + +
- - + +
- +
diff --git a/signin.php b/signin.php index cc503df..385af46 100644 --- a/signin.php +++ b/signin.php @@ -64,43 +64,42 @@ - (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_customerimpacted' => (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 + 'fd_formAction' => (string)FILTER_SANITIZE_STRING, + 'fd_siteId' => (int)FILTER_VALIDATE_INT, + 'fd_isVendor' => (int)FILTER_VALIDATE_INT, + 'fd_firstName' => (string)FILTER_SANITIZE_STRING, + 'fd_lastName' => (string)FILTER_SANITIZE_STRING, + 'fd_carNum' => (string)FILTER_SANITIZE_STRING, + 'fd_ssaNum' => (string)FILTER_SANITIZE_STRING, + 'fd_visitorCompany' => (string)FILTER_SANITIZE_STRING, + 'fd_vendorContact1' => (string)FILTER_SANITIZE_STRING, + 'fd_vendorContact2' => (string)FILTER_SANITIZE_STRING, + 'fd_workStartTime' => (string)FILTER_SANITIZE_STRING, + 'fd_workEndTime' => (string)FILTER_SANITIZE_STRING, + 'fd_clientImpacted' => (string)FILTER_SANITIZE_STRING, + 'fd_visitType' => (int)FILTER_VALIDATE_INT, + 'fd_escortRequired' => (int)FILTER_VALIDATE_INT, + 'fd_visitorSignature' => (string)FILTER_SANITIZE_STRING, + 'fd_escortSignature' => (string)FILTER_SANITIZE_STRING, + 'fd_escortName' => (string)FILTER_SANITIZE_STRING ]); -// SET INITIAL STAGE -if(empty($form_data['form_data_stage'])){ - $form_data['form_data_stage'] = 'covidack'; +if(empty($form_data['fd_formAction'])){ // SET INITIAL STAGE + $form_data['fd_formAction'] = 'covidack'; } ?> - +
-

+

@@ -108,51 +107,51 @@ if(empty($form_data['form_data_stage'])){
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
 
- - - + + +
@@ -179,43 +178,43 @@ if(empty($form_data['form_data_stage'])){ - +
-

+

- +
-

+