. */ 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(); // CLASSES $Users = new \App\LobbySIO\Database\Users(); $SiteInfo = new \App\LobbySIO\Database\SiteInfo(); $VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo(); $IDTypeInfo = new \App\LobbySIO\Database\IDTypeInfo(); $VisitInfo = new \App\LobbySIO\Database\VisitInfo(); $VisitActions = new \App\LobbySIO\Database\VisitActions(); if(!isset($_COOKIE['app_disp_lang'])) { $app_disp_lang = $StaticFunctions->getDefaultLanguage(); } else { $app_disp_lang = $_COOKIE['app_disp_lang']; }; $Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); $transLang = $Translate->userLanguage(); // SETUP TRANSLATOR $app_current_pagename = $transLang['HOME']; // PAGE FUNCTION $app_current_pageicon = ' '; // PAGE ICON require_once("inc/header.inc.php"); // SHOW HEADER if ($StaticFunctions->getSessionStatus() == false) { // CHECK STATUS ?>
setTimeZone(new DateTimeZone('UTC')); $postdate=$newdate->format('Y-m-d H:i:s'); echo $VisitActions->endVisit($_POST['endvisit'], $postdate); } else { echo $VisitActions->endVisit($_POST['endvisit'], $StaticFunctions->getUTC()); } } if (!empty($_POST['voidvisit'])) { echo $VisitActions->voidVisit($_POST['voidvisit'], "0"); } // If post is approved, save after error checking. if (!empty($_POST['approvevisit'])) { 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 (isset($_POST['id_checked']) && $_POST['id_checked'] == '1') { $id_checked="1"; } else { $id_checked="0"; } if (isset($_POST['citizen']) && $_POST['citizen'] == '1') { $citizen="1"; } else { $citizen="0"; } $approved="2"; echo $VisitActions->approveVisit($_POST['approvevisit'], $_POST['id_type'], $id_checked, $citizen, $_POST['badge'], $_POST['initials'], $approved); } } } } // check all unapproved or approved $approval = "1"; // Set up pagination $page_num = 1; if(!empty($_GET['pnum'])): $page_num = filter_input(INPUT_GET, 'pnum', FILTER_VALIDATE_INT); if(false === $page_num): $page_num = 1; endif; endif; $offset = ($page_num - 1) * $StaticFunctions->getPageRows(); $row_count = count($VisitInfo->getVisitInfo($siteid, $approval, "empty", "%", "%", "%", "%", "%", "%")); $page_count = 0; if (0 === $row_count): else: $page_count = (int)ceil($row_count / $StaticFunctions->getPageRows()); if($page_num > $page_count): $page_num = 1; endif; endif; ?>  | ||||||
---|---|---|---|---|---|---|