echo "nok"; //Login failed, so check remote site. $rpc = new RPC; $Frontend = new FrontEnd; $loginOK = $rpc->CheckLogin($login,$Frontend->encryptPassword($password)); if($loginOK) { //Oops we must be out of date, update the users table! $rpc->GetUsers(); $loginOK = checkLogin($login,$password); startSession($loginOK->id,$loginOK->username); //header( 'Location: intranet.php' ) ; } else { echo "nok"; }**/ } if ($displayError) { global $master; $master->AddWarning("Incorrect username or password."); } } } //Logout if (isset($_GET["user-session-logout"])) { $lanid = getCurrentLID(); session_unset(); setCurrentLID($lanid); setCurrentUser(0); }
require_once 'libs/smarty/Smarty.class.php'; //Load Data objects LoadDataObjects(); //Load Master $master = new Master(); // Check LAN ID if (getCurrentLID() == "0" || isset($_GET["lanid"])) { if (isset($_GET["lanid"])) { $lan = new Lan_events(); $lan->id = $lan->escape($_GET["lanid"]); $lan->find(); if (!$lan->fetch()) { die("Unknown LAN :-O"); } $_SESSION["lanmode"] = $lan->mode_id; setCurrentLID($_GET["lanid"]); $master->Smarty->assign("lan", $lan); } else { die("Unknown LAN :-("); } } if (!isset($_SESSION["UID"])) { $_SESSION["UID"] = '0'; } /* * ====================================================================================================== * * Other stuff * * ====================================================================================================== */