From be2491b093b1f0ca430bede679ecbb670041e483 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 2 Jul 2013 09:46:45 +0400 Subject: restructuring of boca's git --- src/index.php | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 src/index.php (limited to 'src/index.php') diff --git a/src/index.php b/src/index.php new file mode 100644 index 0000000..af55fab --- /dev/null +++ b/src/index.php @@ -0,0 +1,143 @@ +. +//////////////////////////////////////////////////////////////////////////////// +// 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'); + +?> +BOCA Online Contest Administrator <?php echo $BOCAVERSION; ?> - Login + + + + + +\n"; + echo "document.location='" . $_SESSION["usertable"]["usertype"] . "/index.php';\n"; + echo "\n"; + } + exit; + } + } +} else { + echo "\n"; +} +?> + + + + + + +
+
+
+ + + + + + + +
+
+ BOCA Login
+
+ + + + + + + + + +
+ Name + + +
Password + +
+ +
+
+
+
+ -- cgit v1.2.3