. */ 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(); 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['ACCOUNT']; // PAGE FUNCTION $app_current_pageicon = ' ';// PAGE ICON require_once("inc/header.inc.php"); // SHOW HEADER if ($StaticFunctions->getSessionStatus() == false) { // CHECK STATUS echo $StaticFunctions->killSession(); // ELSE DIE } else { ?> getMinPass(); if (isset($_POST['saveprofile'])): if (empty($_POST['password']) && empty($_POST['newpassword2'])): $Users->setUserInfo($session_user["0"]["users_id"], $_POST['firstname'], $_POST['lastname'], $_POST['email'], $session_user["0"]["users_usertypeid"], $session_user["0"]["users_password"]); header('Location: ' . $_SERVER['PHP_SELF']); elseif (strlen($_POST['password']) < $minpasslength): echo "Password must be at least $minpasslength characters."; elseif (!empty($_POST['password']) && empty($_POST['newpassword2'])): echo "Please confirm password if you wish to change it"; elseif ($_POST['password'] != $_POST['newpassword2']): echo "New passwords do not match"; elseif (!empty($_POST['password']) && ($_POST['password'] = $_POST['newpassword2'])): // change pass require_once("src/Misc/PasswordHash.php"); $hasher = new PasswordHash(8, FALSE); $password = $hasher->HashPassword($_POST['password']); $Users->setUserInfo($session_user["0"]["users_id"], $_POST['firstname'], $_POST['lastname'], $_POST['email'], $session_user["0"]["users_usertypeid"], $password); header('Location: ' . $_SERVER['PHP_SELF']); endif; endif; ?>