From a9aa438ea0558eb0044cf1e54a9190ddb41b65e5 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 2 Jul 2013 09:44:46 +0400 Subject: restructuring of boca's git --- boca-1.5.0/src/system/contest.php | 214 -------------------------------------- 1 file changed, 214 deletions(-) delete mode 100644 boca-1.5.0/src/system/contest.php (limited to 'boca-1.5.0/src/system/contest.php') diff --git a/boca-1.5.0/src/system/contest.php b/boca-1.5.0/src/system/contest.php deleted file mode 100644 index 2d4d788..0000000 --- a/boca-1.5.0/src/system/contest.php +++ /dev/null @@ -1,214 +0,0 @@ -. -//////////////////////////////////////////////////////////////////////////////// -// Last modified 05/aug/2012 by cassio@ime.usp.br -//Change list: -// 02/jul/2006 by cassio@ime.usp.br -// 25/aug/2007 by cassio@ime.usp.br: php initial tag changed to complete form - -require 'header.php'; - -if (isset($_GET["new"]) && $_GET["new"]=="1") { - $n = DBNewContest(); - ForceLoad("contest.php?contest=$n"); -} - -if (isset($_GET["contest"]) && is_numeric($_GET["contest"])) - $contest=$_GET["contest"]; -else - $contest=$_SESSION["usertable"]["contestnumber"]; - -if(($ct = DBContestInfo($contest)) == null) - ForceLoad("../index.php"); -if ($ct["contestlocalsite"]==$ct["contestmainsite"]) $main=true; else $main=false; - -if (isset($_POST["Submit3"]) && isset($_POST["penalty"]) && is_numeric($_POST["penalty"]) && - isset($_POST["maxfilesize"]) && isset($_POST["mainsite"]) && isset($_POST['localsite']) && - isset($_POST["name"]) && $_POST["name"] != "" && isset($_POST["lastmileanswer"]) && - is_numeric($_POST["lastmileanswer"]) && is_numeric($_POST["mainsite"]) && is_numeric($_POST['localsite']) && - isset($_POST["lastmilescore"]) && is_numeric($_POST["lastmilescore"]) && isset($_POST["duration"]) && - is_numeric($_POST["duration"]) && - isset($_POST["startdateh"]) && $_POST["startdateh"] >= 0 && $_POST["startdateh"] <= 23 && - isset($_POST["contest"]) && is_numeric($_POST["contest"]) && - isset($_POST["startdatemin"]) && $_POST["startdatemin"] >= 0 && $_POST["startdatemin"] <= 59 && - isset($_POST["startdated"]) && isset($_POST["startdatem"]) && isset($_POST["startdatey"]) && - checkdate($_POST["startdatem"], $_POST["startdated"], $_POST["startdatey"])) { - if ($_POST["confirmation"] == "confirm") { - $t = mktime ($_POST["startdateh"], $_POST["startdatemin"], 0, $_POST["startdatem"], - $_POST["startdated"], $_POST["startdatey"]); - if ($_POST["Submit3"] == "Activate") $ac=1; - else $ac=0; - $param['number']=$_POST["contest"]; - $param['name']=$_POST["name"]; - $param['startdate']=$t; - $param['duration']=$_POST["duration"]*60; - $param['lastmileanswer']=$_POST["lastmileanswer"]*60; - $param['lastmilescore']= $_POST["lastmilescore"]*60; - $param['penalty']=$_POST["penalty"]*60; - $param['maxfilesize']=$_POST["maxfilesize"]*1000; - $param['active']=$ac; - $param['mainsite']=$_POST["mainsite"]; - $param['localsite']=$_POST["localsite"]; - $param['mainsiteurl']=$_POST["mainsiteurl"]; - - DBUpdateContest ($param); - if ($ac == 1 && $_POST["contest"] != $_SESSION["usertable"]["contestnumber"]) { - $cf = globalconf(); - if($cf["basepass"] == "") - MSGError("You must log in the new contest. The standard admin password is empty (if not changed yet)."); - else - MSGError("You must log in the new contest. The standard admin password is " . $cf["basepass"] . " (if not changed yet)."); - - ForceLoad("../index.php"); - } - } - ForceLoad("contest.php?contest=".$_POST["contest"]); -} -?> -
- -
- - -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Contest number: - -
Name: - name="name" value="" size="50" maxlength="50" /> -
Start date: hh:mm - name="startdateh" value="" size="2" maxlength="2" /> - : - name="startdatemin" value="" size="2" maxlength="2" /> -     dd/mm/yyyy - name="startdated" value="" size="2" maxlength="2" /> - / - name="startdatem" value="" size="2" maxlength="2" /> - / - name="startdatey" value="" size="4" maxlength="4" /> -
Duration (in minutes): - value="" size="20" maxlength="20" /> -
Stop answering (in minutes): - value="" size="20" maxlength="20" /> -
Stop scoreboard (in minutes): - value="" size="20" maxlength="20" /> -
Penalty (in minutes): - value="" size="20" maxlength="20" /> -
Max file size allowed for teams (in KB): - - value="" size="20" maxlength="20" /> -
- Your PHP config. allows at most: - -
Contest main site URL (IP/bocafolder): - " size="40" maxlength="200" /> -
Contest main site number: - " size="4" maxlength="4" /> -
Contest local site number: - " size="4" maxlength="4" /> -
-
-
- - - -
-
Select a contest or create a new one.


"; } ?> -
- - - -- cgit v1.2.3