diff --git a/index.php b/index.php index 0d34217..291bfb7 100644 --- a/index.php +++ b/index.php @@ -275,7 +275,12 @@ $form_data = filter_input_array(INPUT_POST, [ if (empty($_POST['id_type'])) { $id_type_error=1; } else {$id_type_error=0;}; if (empty($_POST['badge'])) { $badge_error=1; } else {$badge_error=0;}; if (empty($_POST['initials'])) { $initials_error=1; } else {$initials_error=0;}; - if (empty($_POST['citizen'])) { $citizen_error=(int)'1'; } elseif ($_POST['citizen']==='00') { $citizen_error=(int)'1'; } else { $citizen_error=(int)'0'; }; + if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US" || $SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "CAN") { + if (empty($_POST['citizen'])) { $citizen_error=(int)'1'; } elseif ($_POST['citizen']==='00') { $citizen_error=(int)'1'; } else { $citizen_error=(int)'0'; }; + }elseif($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA"){ + $_POST['citizen']=NULL; + $citizen_error=(int)'0'; + } if (isset($_POST['id_type']) && $_POST['id_type']===1 && isset($_POST['id_reference'])) { $id_reference_error=0; } elseif (isset($_POST['id_type']) && $_POST['id_type']===1 && empty($_POST['id_reference'])) { $id_reference_error=1; } else { $id_reference_error=0; }; if ($id_type_error+$badge_error+$initials_error+$citizen_error+$id_reference_error===0) { $approved=2; @@ -578,7 +583,7 @@ $form_data = filter_input_array(INPUT_POST, [ - getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?> + getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?> @@ -977,7 +982,7 @@ if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $f getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?> - + getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?> - +
/
@@ -1072,7 +1077,7 @@ if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $f
/
diff --git a/src/Language/de.lang.ini.example b/src/Language/de.lang.ini.example index ae34ad3..a94f82d 100644 --- a/src/Language/de.lang.ini.example +++ b/src/Language/de.lang.ini.example @@ -23,6 +23,7 @@ DECLINE = 'Ablehnen' DEFAULT = 'Default' DELETE = 'Löschen' DELETE_WARNING = '********* WARNUNG! ********** Sind Sie sicher, dass Sie diesen Benutzer und alle zugehörigen Punches LÖSCHEN möchten!?!? Es gibt KEINE UNDO!' +DETAILS = 'Einzelheiten' EMAIL = 'E-Mail-Addresse' EMAIL_NOTVALID = 'Email adresse nicht gültig' EMAIL_USED = 'E-Mail wird bereits verwendet' diff --git a/src/Language/en.lang.ini.example b/src/Language/en.lang.ini.example index 921404d..adc8975 100644 --- a/src/Language/en.lang.ini.example +++ b/src/Language/en.lang.ini.example @@ -23,6 +23,7 @@ DECLINE = 'Decline' DEFAULT = 'Default' DELETE = 'Delete' DELETE_WARNING = '********* WARNING! ********** Are you SURE you want to DELETE this user AND ALL ASSOCIATED RECORDS!?!? There is NO UNDO!' +DETAILS = 'Details' EMAIL = 'E-Mail Address' EMAIL_NOTVALID = 'Email address not valid' EMAIL_USED = 'Email already in use' diff --git a/src/Language/es.lang.ini.example b/src/Language/es.lang.ini.example index 4d60f00..23332b3 100644 --- a/src/Language/es.lang.ini.example +++ b/src/Language/es.lang.ini.example @@ -23,6 +23,7 @@ DECLINE = 'Disminución' DEFAULT = 'Defecto' DELETE = 'Borrar' DELETE_WARNING = '********* ¡ADVERTENCIA! ********** ¿Estás seguro de que quieres BORRAR este usuario? No hay UNDO!' +DETAILS = 'Detalles' EMAIL = 'Dirección de correo electrónico' EMAIL_NOTVALID = 'La dirección de correo electrónico no es válida' EMAIL_USED = 'Email ya en uso' diff --git a/src/Language/fr.lang.ini.example b/src/Language/fr.lang.ini.example index 7dc28a1..cea2943 100644 --- a/src/Language/fr.lang.ini.example +++ b/src/Language/fr.lang.ini.example @@ -23,6 +23,7 @@ DECLINE = 'Déclin' DEFAULT = 'Défaut' DELETE = 'Effacer' DELETE_WARNING = '********* ATTENTION! ********** Êtes-vous sûr de vouloir SUPPRIMER cet utilisateur ET TOUS LES POINÇONS ASSOCIÉS!?!? Il n'y a pas d'annulation!' +DETAILS = 'Des détails' EMAIL = 'Adresse électronique' EMAIL_NOTVALID = 'Adresse email non valide' EMAIL_USED = 'Email déjà utilisé' diff --git a/users.php b/users.php index fe495a8..0b0d731 100644 --- a/users.php +++ b/users.php @@ -86,18 +86,18 @@ (string)FILTER_SANITIZE_STRING, - 'fd_editUserId' => (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, - 'fd_actionNewSite' => (string)FILTER_SANITIZE_STRING, - 'fd_newSiteName' => (string)FILTER_SANITIZE_STRING, - 'fd_newSiteTimezone' => (string)FILTER_SANITIZE_STRING, - 'fd_newSiteRegion' => (string)FILTER_SANITIZE_STRING -]); + 'fd_formAction' => (string)FILTER_SANITIZE_STRING, + 'edituser' => (string)FILTER_SANITIZE_STRING, + 'fd_editUserId' => (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, + 'fd_newSiteName' => (string)FILTER_SANITIZE_STRING, + 'fd_newSiteTimezone' => (string)FILTER_SANITIZE_STRING, + 'fd_newSiteRegion' => (string)FILTER_SANITIZE_STRING + ]); ?> getMinPass(); // MINIMUM PASSWORD LENGTH ?> +addSite($form_data['fd_newSiteName'], $form_data['fd_newSiteTimezone'], $form_data['fd_newSiteRegion']); + $fd_newSiteId = $SiteInfo->getSiteByID($form_data['fd_newSiteName']); + $SiteInfo->grantSitePermissionBySiteAndUser($fd_newSiteId["0"]["id"], "1"); + $SiteInfo->grantSitePermissionBySiteAndUser($fd_newSiteId["0"]["id"], "2"); + header('Location: users.php'); + ob_end_clean(); unset($form_data); } } ?> + + + + getUserInfo($form_data['fd_editUserId'], "0", "0") ?> @@ -119,7 +132,7 @@ if (!empty($form_data['edituser'])) { $edituser = $Users->getUserInfo($form_data
- +
@@ -202,15 +215,6 @@ if (!empty($form_data['edituser'])) { $edituser = $Users->getUserInfo($form_data -addSite($form_data['fd_newSiteName'], $form_data['fd_newSiteTimezone'], $form_data['fd_newSiteRegion']); - $fd_newSiteId = $SiteInfo->getSiteByID($form_data['fd_newSiteName']); - $SiteInfo->grantSitePermissionBySiteAndUser($fd_newSiteId["0"]["id"], "1"); - $SiteInfo->grantSitePermissionBySiteAndUser($fd_newSiteId["0"]["id"], "2"); - header('Location: users.php'); - ob_end_clean(); unset($form_data); } } ?>
- +
@@ -553,61 +557,64 @@ if (0 === $row_count1): else: $page_count1 = (int)ceil($row_count1 / $StaticFunc -