. */ 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_lifetime', '0'); ini_set('session.cookie_secure', '1'); ini_set('session.cookie_httponly', '1'); ini_set('session.cookie_samesite', 'Strict'); session_save_path('.tmp'); // TEMP session_start(); // START require_once __DIR__ . '/autoload.php'; // AUTOLOAD require_once __DIR__ . '/src/Misc/defuse-crypto.phar'; use App\LobbySIO\Config\Registry; use Defuse\Crypto\Crypto; use App\LobbySIO\Misc\Csrf; // ANTICSRF $StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES $encKey = $StaticFunctions->loadEncryptionKeyFromConfig(); $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', FILTER_SANITIZE_FULL_SPECIAL_CHARS); // 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(); $VisitInfo = new \App\LobbySIO\Database\VisitInfo(); $VisitActions = new \App\LobbySIO\Database\VisitActions(); $app_current_pagename = $transLang['SIGNOUT']; // 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'); } ?> (string)FILTER_SANITIZE_STRING, 'fd_pageNumber' => (int)FILTER_VALIDATE_INT, 'fd_endVisitForId' => (int)FILTER_VALIDATE_INT ]); if(empty($form_data['fd_formAction'])){ // SET INITIAL STAGE $form_data['fd_formAction'] = 'fa_initial'; } ?> getPageRows(); $pgRowCount=(int)count($VisitInfo->getVisitInfo($siteid, $isApproved, "empty", "%", "%", "%", "%", "%", "%")); $pgCount=(int)0; if(0===$pgRowCount){}else{$pgCount=(int)ceil($pgRowCount/$StaticFunctions->getPageRows());if($pgNum>$pgCount){$pgNum=(int)1;}} ?>

getVisitInfo($siteid, $isApproved, "empty", "%", "%", "%", "%", $StaticFunctions->getPageRows(), $pgOffset) as $row) { $timein = new DateTime($row['visits_intime'], new DateTimeZone('UTC')); $timein->setTimezone(new DateTimeZone("$timezone")); $timein_disp = $timein->format('Y-m-d H:i:s'); $isvendor = $row['visits_isvendor']; ?>

'; } ?> getInfoVendorVisitFinal($row['visits_id']) as $rowvm) { $db_vendorinfo_workcompleted = $rowvm['db_vendorinfo_workcompleted']; $db_vendorinfo_sitecleanup = $rowvm['db_vendorinfo_sitecleanup']; if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $finalvendorformcomplete=1; } else { $finalvendorformcomplete=0; } if($finalvendorformcomplete===1){ ?>
endVisit($form_data['fd_endVisitForId'], $StaticFunctions->getUTC()); ?>

"; } // INVALID STAGE - GO HOME } require_once("inc/footer.inc.php"); // PRINT FOOTER