. */ require_once(__DIR__ . "/helpers/auth.php"); require_once(ROOT_DIR . "/helpers/config.php"); require_once(ROOT_DIR . "/helpers/position.php"); require_once(ROOT_DIR . "/helpers/track.php"); require_once(ROOT_DIR . "/helpers/utils.php"); require_once(ROOT_DIR . "/helpers/lang.php"); $login = uUtils::postString('user'); $pass = uUtils::postPass('pass'); $action = uUtils::postString('action'); $lang = (new uLang(uConfig::$lang))->getStrings(); $langsArr = uLang::getLanguages(); asort($langsArr); $auth = new uAuth(); if ($action == "auth") { $auth->checkLogin($login, $pass); } if (!$auth->isAuthenticated() && $action == "auth") { $auth->exitWithRedirect("login.php?auth_error=1"); } if (!$auth->isAuthenticated() && uConfig::$require_authentication) { $auth->exitWithRedirect("login.php"); } $displayUserId = NULL; $usersArr = []; if ($auth->isAdmin() || uConfig::$public_tracks) { // public access or admin user // get last position user $lastPosition = uPosition::getLast(); if ($lastPosition->isValid) { // display track of last position user $displayUserId = $lastPosition->userId; } // populate users array (for

( s)

kml gpx
isAuthenticated()): ?>
gpx
isAdmin()): ?>