Pushing to 19. Covid ack-wall. Fr lang fix. Function repair. More work on users/sites mgmt.

This commit is contained in:
Josh North 2021-04-16 11:10:38 -04:00
parent ca66049813
commit c86fe5a314
7 changed files with 176 additions and 42 deletions

View File

@ -56,46 +56,47 @@
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
</div>
</div>
<form name="form-signin" class="form-signin" action="signin_2.php" method="post">
<div class="row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['NAME']; ?>:</span>
</div>
<input type="text" id="firstname" name="firstname" class="form-control" placeholder="<?php echo $transLang['FIRST']; ?>" required autofocus>
<input type="text" id="lastname" name="lastname" class="form-control" placeholder="<?php echo $transLang['LAST']; ?>" required autofocus>
</div>
<form name="form-signin" class="needs-validation" action="signin_1.php" method="post" novalidate>
<div class="form-group form-row">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="q1" required>
<label class="form-check-label" for="q1"><b>I have NOT experienced any of the following symptoms in the past 48 hours.</b><br>Fever, chills, cough, shortness of breath, fatigue, muscle or body aches, headache, new loss of taste or smell, sore throat, congestion or runny nose, nausea or vomiting, diarrhea.</label>
<div class="invalid-feedback">You must answer to proceed.</div>
</div>
</div>
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
<div class="row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['CARNUM']; ?></span>
</div>
<input type="text" id="company" name="carnum" class="form-control" placeholder="<?php echo $transLang['CARNUM']; ?>" required autofocus>
</div>
</div>
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['SSANUM']; ?></span>
</div>
<input type="text" id="company" name="ssanum" class="form-control" placeholder="<?php echo $transLang['SSANUM']; ?>" required autofocus>
</div>
<div class="form-group form-row">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="q2" required>
<label class="form-check-label" for="q2"><b>I am NOT isolating or quarantining due to a positive test for COVID-19 nor do I believe that I may be sick with COVID-19.</b></label>
<div class="invalid-feedback">You must answer to proceed.</div>
</div>
</div>
<?php }; ?>
<div class="row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['COMPANY']; ?></span>
</div>
<input type="text" id="company" name="company" class="form-control" placeholder="<?php echo $transLang['COMPANY']; ?>" required autofocus>
</div>
<div class="form-group form-row">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="q3" required>
<label class="form-check-label" for="q3"><b>I have NOT been in close physical contact in the last 14 days with:</b><br>Anyone who is known to have laboratory-confirmed COVID-19? OR Anyone who has any symptoms consistent with COVID-19?</label>
<div class="invalid-feedback">You must answer to proceed.</div>
</div>
</div>
<div class="form-group form-row">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="q4" required>
<label class="form-check-label" for="q4"><b>I am NOT currently waiting on the results of a COVID-19 test.</b><br>IMPORTANT: ANSWER "NO" IF YOU ARE WAITING ON THE RESULTS OF A PRE-TRAVEL OR POST-TRAVEL COVID-19 TEST</label>
<div class="invalid-feedback">You must answer to proceed.</div>
</div>
</div>
<div class="form-group form-row">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="q5" required>
<label class="form-check-label" for="q5"><b>I have NOT traveled in the past 10 days.</b><br>Travel is defined as any trip that is overnight AND on public transportation (plane, train, bus, Uber, Lyft, cab, etc.) OR any trip that is overnight AND with people who are not in your household.</label>
<div class="invalid-feedback">You must answer to proceed.</div>
</div>
</div>
<div class="form-group form-row">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="q6" required>
<label class="form-check-label" for="q6"><b>I certify that my responses are true and correct.</b><br>All visitors must answer the above questions and then certify their answers are true and correct.</label>
<div class="invalid-feedback">You must answer to proceed.</div>
</div>
</div>
<div class="row">
@ -107,5 +108,27 @@
</form>
</div>
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function() {
'use strict';
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
<!-- CONTENT END -->
<?php }; require_once("inc/footer.inc.php");

111
signin_1.php Normal file
View File

@ -0,0 +1,111 @@
<?php
/*
* Copyright (C) 2018 josh.north
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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
session_save_path('.tmp'); // TEMP
session_start(); // START
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
$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 = '<i class="fas fa-sign-in-alt"></i> ';
require_once("inc/header.inc.php");
if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS
header('Location: index.php'); // ELSE HOME
} else { ?>
<!-- CONTENT START -->
<div class="container">
<div class="row">
<div class="col-sm">
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
</div>
</div>
<form name="form-signin" class="form-signin" action="signin_2.php" method="post">
<div class="row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['NAME']; ?>:</span>
</div>
<input type="text" id="firstname" name="firstname" class="form-control" placeholder="<?php echo $transLang['FIRST']; ?>" required autofocus>
<input type="text" id="lastname" name="lastname" class="form-control" placeholder="<?php echo $transLang['LAST']; ?>" required autofocus>
</div>
</div>
</div>
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
<div class="row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['CARNUM']; ?></span>
</div>
<input type="text" id="company" name="carnum" class="form-control" placeholder="<?php echo $transLang['CARNUM']; ?>" required autofocus>
</div>
</div>
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['SSANUM']; ?></span>
</div>
<input type="text" id="company" name="ssanum" class="form-control" placeholder="<?php echo $transLang['SSANUM']; ?>" required autofocus>
</div>
</div>
</div>
<?php }; ?>
<div class="row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['COMPANY']; ?></span>
</div>
<input type="text" id="company" name="company" class="form-control" placeholder="<?php echo $transLang['COMPANY']; ?>" required autofocus>
</div>
</div>
</div>
<div class="row">
<div class="col">
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
<button type="submit" id="saveBtn" class="btn btn-lg btn-success btn-block" name="signin"><?php echo $transLang['NEXT']; ?></button>
</div>
</div>
</form>
</div>
<!-- CONTENT END -->
<?php }; require_once("inc/footer.inc.php");

View File

@ -3,7 +3,7 @@ ACCOUNT = 'Konto'
ACCOUNT_INFO_DESC = 'Sie können Änderungen an Ihrem Benutzerprofil vornehmen. Um Ihr Passwort zu ändern, geben Sie ein neues Passwort zweimal ein und drücken Sie auf Speichern. Minimale Passwortlänge ist '
ACCOUNT_INFO_HEADER = 'Kontoinformationen'
ACKNOWLEDGEMENT = 'Mit der Anmeldung erkenne ich an, dass ich die Regeln gelesen und verstanden habe und bin einverstanden, die Regeln dieses Dokuments zu befolgen, während ich Arbeiten innerhalb der Einrichtung verrichtet. Wir verfügen über eine bestehende Sicherheitsrichtlinie für Anlagen, die die Staatsangehörigkeit und die Staatsangehörigkeit der Besucher des Rechenzentrums berücksichtigt, um die US-Gesetze wie Exportkontroll- und Wirtschaftssanktionsgesetze einzuhalten. Unser Ziel besteht lediglich darin, diese US-Gesetze einzuhalten und den Zugang zu Personal nicht willkürlich zu verweigern.'
COVID_ACKNOWLEDGEMENT = 'Das neuartige Coronavirus COVID-19 wurde von der Weltgesundheitsorganisation zur weltweiten Pandemie erklärt. Durch die Anmeldung erkenne ich an, dass soziale Distanzierung praktiziert und Gesichtsbedeckungen jederzeit getragen werden müssen. Dieses Unternehmen kann nicht garantieren, dass seine Mitarbeiter, Lieferanten, Kunden oder andere Teilnehmer nicht mit COVID-19 infiziert werden. Angesichts der anhaltenden Verbreitung von COVID-19 sollten Personen, die in eine der folgenden Kategorien fallen, die Räumlichkeiten nicht betreten. 1. Personen, bei denen derzeit oder in den letzten vierzehn (14) Tagen Symptome im Zusammenhang mit COVID-19 aufgetreten sind, darunter Fieber, Husten und Atemnot. 2. Personen, die in den letzten vierzehn (14) Tagen zu irgendeinem Zeitpunkt entweder international oder zu einer Gemeinde in den USA gereist sind, die eine anhaltende Verbreitung von COVID-19 in der Gemeinde erlebt hat oder erlebt. 3. Personen, die glauben, einem bestätigten oder vermuteten Fall von COVID-19 ausgesetzt gewesen zu sein oder bei denen COVID-19 diagnostiziert wurde und die von staatlichen oder lokalen Gesundheitsbehörden oder dem Gesundheitsteam noch nicht als nicht ansteckend eingestuft wurden verantwortlich für ihre Behandlung.'
COVID_ACKNOWLEDGEMENT = 'Das neuartige Coronavirus COVID-19 wurde von der Weltgesundheitsorganisation zur weltweiten Pandemie erklärt. Durch die Anmeldung erkenne ich an, dass soziale Distanzierung geübt und Gesichtsbedeckungen jederzeit getragen werden müssen. Dieses Unternehmen kann nicht garantieren, dass seine Mitarbeiter, Lieferanten, Kunden oder andere eintretende Personen nicht mit COVID-19 infiziert werden.'
ACKNOWLEDGEMENT_DOC_NAME = 'Unsere Regeln'
ACTIONS = 'Aktionen'
ACTIVEVISITS = 'Aktive Besuche'

View File

@ -3,7 +3,7 @@ ACCOUNT = 'Account'
ACCOUNT_INFO_DESC = 'You may make changes to your user profile below. To change your password, enter a new password twice below and press save. Minimum password length is '
ACCOUNT_INFO_HEADER = 'Account Information'
ACKNOWLEDGEMENT = 'By signing in, I acknowledge I have read and understand the Rules and agree to follow the rules of that document while performing work inside the facility. We have an existing facility security policy that takes into account the nationality and citizenship of visitors to the data center in order to comply with U.S. laws such as export control and economic sanction laws. Our objective is only to comply with such U.S. laws and not to deny entrance to personnel arbitrarily.'
COVID_ACKNOWLEDGEMENT = 'The novel coronavirus, COVID-19, has been declared a worldwide pandemic by the World Health Organization. By signing in, I acknowledge social distancing must be practiced and face coverings worn at all timesThis company cannot guarantee that its employees, vendors, customers, or others entering will not become infected with COVID-19. In light of the ongoing spread of COVID-19, individuals who fall within any of the categories below should not enter the premises. 1. Individuals who currently or within the past fourteen (14) days have experienced any symptoms associated with COVID-19, which include fever, cough, and shortness of breath among others. 2. Individuals who have traveled at any point in the past fourteen (14) days either internationally or to a community in the U.S. that has experienced or is experiencing sustained community spread of COVID-19. 3. Individuals who believe that they may have been exposed to a confirmed or suspected case of COVID-19 or have been diagnosed with COVID-19 and are not yet cleared as non-contagious by state or local public health authorities or the health care team responsible for their treatment.'
COVID_ACKNOWLEDGEMENT = 'The novel coronavirus, COVID-19, has been declared a worldwide pandemic by the World Health Organization. By signing in, I acknowledge social distancing must be practiced and face coverings worn at all times. This company cannot guarantee that its employees, vendors, customers, or others entering will not become infected with COVID-19.'
ACKNOWLEDGEMENT_DOC_NAME = 'Our Rules'
ACTIONS = 'Actions'
ACTIVEVISITS = 'Active Visits'

View File

@ -3,7 +3,7 @@ ACCOUNT = 'Cuenta'
ACCOUNT_INFO_DESC = 'Puede realizar cambios en su perfil de usuario a continuación. Para cambiar su contraseña, ingrese una nueva contraseña dos veces abajo y presione guardar. La longitud mínima de la contraseña es '
ACCOUNT_INFO_HEADER = 'Información de la cuenta'
ACKNOWLEDGEMENT = 'Al iniciar sesión, reconozco que he leído y entiendo las Reglas y acepto seguir las reglas de ese documento mientras realizo el trabajo dentro de la instalación. Tenemos una política de seguridad en las instalaciones que tiene en cuenta la nacionalidad y la ciudadanía de los visitantes del centro de datos para cumplir con las leyes de los EE. UU., Como las leyes de control de exportaciones y sanciones económicas. Nuestro objetivo es solo cumplir con las leyes de los EE. UU. Y no negar la entrada al personal de manera arbitraria.'
COVID_ACKNOWLEDGEMENT = 'El nuevo coronavirus, COVID-19, ha sido declarado pandemia mundial por la Organización Mundial de la Salud. Al iniciar sesión, reconozco que se debe practicar el distanciamiento social y que se deben usar cubiertas faciales en todo momento. Esta empresa no puede garantizar que sus empleados, proveedores, clientes u otras personas que ingresen no se infecten con COVID-19. A la luz de la propagación continua de COVID-19, las personas que se encuentren dentro de cualquiera de las categorías siguientes no deben ingresar a las instalaciones. 1. Personas que actualmente o en los últimos catorce (14) días han experimentado algún síntoma asociado con COVID-19, que incluye fiebre, tos y dificultad para respirar, entre otros. 2. Personas que hayan viajado en cualquier momento en los últimos catorce (14) días, ya sea internacionalmente o a una comunidad en los EE. UU. Que ha experimentado o está experimentando una propagación comunitaria sostenida de COVID-19. 3. Personas que creen que pueden haber estado expuestas a un caso confirmado o sospechoso de COVID-19 o que han sido diagnosticadas con COVID-19 y aún no han sido aprobadas como no contagiosas por las autoridades de salud pública estatales o locales o el equipo de atención médica. responsable de su tratamiento.'
COVID_ACKNOWLEDGEMENT = 'El nuevo coronavirus, COVID-19, ha sido declarado pandemia mundial por la Organización Mundial de la Salud. Al registrarme, reconozco que se debe practicar el distanciamiento social y que se debe usar protección para la cara en todo momento. Esta empresa no puede garantizar que sus empleados, proveedores, clientes u otras personas que ingresen no se infecten con COVID-19.'
ACKNOWLEDGEMENT_DOC_NAME = 'Nuestras reglas'
ACTIONS = 'Acciones por tomar'
ACTIVEVISITS = 'Visitas activas'

View File

@ -2,8 +2,8 @@ ACCESS_LEVEL = 'Niveau d&#39;accès'
ACCOUNT = 'Compte'
ACCOUNT_INFO_DESC = 'Vous pouvez modifier votre profil d&#39;utilisateur ci-dessous. Pour changer votre mot de passe, entrez un nouveau mot de passe deux fois ci-dessous et appuyez sur enregistrer. La longueur minimale du mot de passe est '
ACCOUNT_INFO_HEADER = 'Information sur le compte'
ACKNOWLEDGEMENT = 'En me connectant, je reconnais avoir lu et compris les Règles et accepté de suivre les règles de ce document lors de l'exécution de travaux à l'intérieur de l'établissement. Nous avons une politique de sécurité des installations existante qui prend en compte la nationalité et la citoyenneté des visiteurs du centre de données afin de respecter les lois américaines, telles que les lois sur le contrôle des exportations et les sanctions économiques. Notre objectif est uniquement de nous conformer à ces lois américaines et non de refuser l'entrée au personnel de manière arbitraire.'
COVID_ACKNOWLEDGEMENT = 'Le nouveau coronavirus, COVID-19, a été déclaré pandémie mondiale par l&#39;Organisation mondiale de la santé. En me connectant, je reconnais que la distanciation sociale doit être pratiquée et que les masques doivent être portés en tout temps Cette société ne peut garantir que ses employés, fournisseurs, clients ou autres personnes entrant ne seront pas infectés par le COVID-19. À la lumière de la propagation continue du COVID-19, les personnes appartenant à l&#39;une des catégories ci-dessous ne devraient pas entrer dans les locaux. 1. Les personnes qui, actuellement ou au cours des quatorze (14) derniers jours, ont présenté des symptômes associés au COVID-19, notamment de la fièvre, de la toux et un essoufflement. 2. Les personnes qui ont voyagé à tout moment au cours des quatorze (14) derniers jours, soit à l&#39;étranger, soit dans une communauté aux États-Unis qui a connu ou subit une propagation communautaire soutenue du COVID-19. 3. Les personnes qui pensent avoir été exposées à un cas confirmé ou suspecté de COVID-19 ou qui ont reçu un diagnostic de COVID-19 et qui ne sont pas encore déclarées non contagieuses par les autorités de santé publique de l&#39;État ou locales ou par l&#39;équipe de soins de santé responsable de leur traitement.'
ACKNOWLEDGEMENT = 'En me connectant, je reconnais avoir lu et compris les Règles et accepté de suivre les règles de ce document lors de l&#39;exécution de travaux à l&#39;intérieur de l&#39;établissement. Nous avons une politique de sécurité des installations existante qui prend en compte la nationalité et la citoyenneté des visiteurs du centre de données afin de respecter les lois américaines, telles que les lois sur le contrôle des exportations et les sanctions économiques. Notre objectif est uniquement de nous conformer à ces lois américaines et non de refuser l&#39;entrée au personnel de manière arbitraire.'
COVID_ACKNOWLEDGEMENT = 'Le nouveau coronavirus, COVID-19, a été déclaré pandémie mondiale par l&#39;Organisation mondiale de la santé. En m&#39;inscrivant, je reconnais que la distance sociale doit être pratiquée et que les masques doivent être portés en tout temps. Cette société ne peut garantir que ses employés, fournisseurs, clients ou autres personnes entrant ne seront pas infectés par le COVID-19.'
ACKNOWLEDGEMENT_DOC_NAME = 'Nos règles'
ACTIONS = 'Actions'
ACTIVEVISITS = 'Visites actives'

View File

@ -29,7 +29,7 @@ class StaticFunctions {
public function getVersion ($app_disp_lang) {
$Translate = new \App\LobbySIO\Language\Translate($app_disp_lang);
$transLang = $Translate->userLanguage();
echo $transLang['SOFTWARE_VERSION'] . ': lobbysio_v0.18-beta';
echo $transLang['SOFTWARE_VERSION'] . ': lobbysio_v0.19-beta';
}
public function getUTC () {