session_write_close(); } if (isset($_POST["logorsign"]) && isset($_POST["usernametxt"]) && isset($_POST["userpasstxt"])) { $client = $_SESSION["client"]; if ($_POST["logorsign"] == 'log') { $res = $client->authenticate($_POST["usernametxt"], $_POST["userpasstxt"], $_POST["keeplogged"]); if ($res["code"] == Client::CODE_SUCCESS) { header("Location: panel.php"); } } elseif (isset($_POST["usercnfmtxt"]) && ($_POST["logorsign"] = 'sign')) { $res = $client->signup($_POST["usernametxt"], $_POST["userpasstxt"], $_POST["usercnfmtxt"]); } } elseif (isset($_REQUEST["signout"]) && $_REQUEST["signout"] == "true" && session_status() != PHP_SESSION_NONE) { $_SESSION = array(); $_COOKIE = array(); Client::removeLoggedinSettings(); session_destroy(); session_write_close(); header("Location: index.php"); } elseif (isset($_COOKIE['logged_in_flag'])) { if ($_SESSION["client"]->verifyKeepLogged($_COOKIE['logged_in_flag'])) { header("Location: panel.php"); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="scripts/jquery.js"></script> <link type="image/icon-x" href="favicon.png" rel="shortcut icon" />