From 2948fe8d6055f6dfe6289e64bce426b5e0bb552f Mon Sep 17 00:00:00 2001 From: cassiopc Date: Fri, 31 Aug 2012 11:02:27 +0200 Subject: inclusion of dir 1.5.1 for boca --- boca-1.5.1/src/index.php | 141 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 boca-1.5.1/src/index.php (limited to 'boca-1.5.1/src/index.php') diff --git a/boca-1.5.1/src/index.php b/boca-1.5.1/src/index.php new file mode 100644 index 0000000..db904c7 --- /dev/null +++ b/boca-1.5.1/src/index.php @@ -0,0 +1,141 @@ +. +//////////////////////////////////////////////////////////////////////////////// +// 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