. */ 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(); $app_current_pagename = $transLang['ADMINISTRATION']; // PAGE SETUP $app_current_pageicon = ' '; require_once("inc/header.inc.php"); if ($StaticFunctions->getSessionStatus() == false) { // CHECK STATUS echo $StaticFunctions->killSession(); // ELSE DIE } else { ?>

getUserInfo($_POST['deleteid'], "0", "0") //$SiteInfo->addSite($_POST['sitename'], $_POST['timezone'], $_POST['region']); //header('Location: ' . $_SERVER['PHP_SELF']); ?>

" required />
" required />
" required />
" />
getMinPass(); ?> addSite($_POST['sitename'], $_POST['timezone'], $_POST['region']); header('Location: ' . $_SERVER['PHP_SELF']); endif; if (!empty($_POST['newuser'])): // NEW USER require_once("src/Misc/PasswordHash.php"); if (empty($_POST['username'])): $errors['username'] = $transLang['USERNAME_NOTEMPTY']; endif; if (preg_match('/[^a-zA-Z0-9 .-_]/', $_POST['username'])): $errors['username'] = $transLang['ILLEGAL_CHARACTERS']; endif; if (empty($_POST['password'])): $errors['password'] = $transLang['PASSWORD_NOTEMPTY']; endif; if (strlen($_POST['password']) < $minpasslength): $errors['password'] = $transLang['MIN_PASSWORD_LENGTH'] . $minpasslength; endif; if (empty($_POST['password_confirm'])): $errors['password_confirm'] = $transLang['PASSWORD_NOTCONFIRMED']; endif; if ($_POST['password'] != $_POST['password_confirm']): $errors['password_confirm'] = $transLang['PASSWORD_NOTMATCH']; endif; $email = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL); if (!$email): $errors['email'] = $transLang['EMAIL_NOTVALID']; endif; $existing = $Users->checkUser($_POST['username'], $email); if ($existing): if ($existing[0]["users_username"] == $_POST['username']): $errors['username'] = $transLang['USERNAME_USED']; endif; if ($existing[0]["users_email"] == $email): $errors['email'] = $transLang['PASSWORD_USED']; endif; endif; endif; if (!empty($_POST['newuser']) && empty($errors)): $hasher = new PasswordHash(8, FALSE); $password = $hasher->HashPassword($_POST['password']); $Users->addUser($_POST['firstname'], $_POST['lastname'], $_POST['username'], $timezone, $password, $_POST['email'], $_POST['usertype']); header('Location: ' . $_SERVER['PHP_SELF']); endif; if (!empty($_POST['deluser'])) { if ($_SERVER['REQUEST_METHOD'] == 'DELETE' || ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['_METHOD'] == 'DELETE')) { $deleteid = (int) $_POST['deleteid']; echo $Users->deleteUser($deleteid); echo "user deleted!"; header('Location: ' . $_SERVER['PHP_SELF']); } } // 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($Users->getUserInfo("%", "%", "%")); $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; ?>

  • ' . $transLang['PAGE'] . '
  • '; for ($i = 1; $i <= $page_count; $i++): echo '
  • ' . $i . '
  • '; endfor; echo ''; ?> getUserInfo("%", $StaticFunctions->getPageRows(), $offset) as $row): ?>
    getMinPass(); ?> deleteSite($deleteid); echo "site deleted!"; header('Location: ' . $_SERVER['PHP_SELF']); } } // Set up pagination $page_num1 = 1; if(!empty($_GET['pnum1'])): $page_num1 = filter_input(INPUT_GET, 'pnum1', FILTER_VALIDATE_INT); if(false === $page_num1): $page_num1 = 1; endif; endif; $offset1 = ($page_num1 - 1) * $StaticFunctions->getPageRows(); $row_count1 = count($SiteInfo->getSite("0", "0", "0", "0")); $page_count1 = 0; if (0 === $row_count1): else: $page_count1 = (int)ceil($row_count1 / $StaticFunctions->getPageRows()); if($page_num1 > $page_count1): $page_num1 = 1; endif; endif; ?>

  • ' . $transLang['PAGE'] . '
  • '; for ($i1 = 1; $i1 <= $page_count1; $i1++): echo '
  • ' . $i1 . '
  • '; endfor; echo ''; ?> getSite("0", "0", $StaticFunctions->getPageRows(), $offset1) as $row1): ?>
    getMinPass(); ?>