. //////////////////////////////////////////////////////////////////////////////// // Last modified 05/aug/2012 by cassio@ime.usp.br ob_start(); header ("Expires: " . gmdate("D, d M Y H:i:s") . " GMT"); header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); header ("Content-Type: text/html; charset=utf-8"); session_start(); $_SESSION["loc"] = dirname($_SERVER['PHP_SELF']); if($_SESSION["loc"]=="/") $_SESSION["loc"] = ""; $_SESSION["locr"] = dirname(__FILE__); if($_SESSION["locr"]=="/") $_SESSION["locr"] = ""; require_once("globals.php"); require_once("db.php"); if (!isset($_GET["name"])) { if (ValidSession()) DBLogOut($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"], $_SESSION["usertable"]["username"]=='admin'); session_unset(); session_destroy(); session_start(); $_SESSION["loc"] = dirname($_SERVER['PHP_SELF']); if($_SESSION["loc"]=="/") $_SESSION["loc"] = ""; $_SESSION["locr"] = dirname(__FILE__); if($_SESSION["locr"]=="/") $_SESSION["locr"] = ""; } ob_end_flush(); require_once('version.php'); if(isset($_GET["getsessionid"])) { echo session_id(); exit; } ?>