. //////////////////////////////////////////////////////////////////////////////// // Last modified 21/jul/2012 by cassio@ime.usp.br require('header.php'); if(($ct = DBContestInfo($_SESSION["usertable"]["contestnumber"])) == null) ForceLoad("../index.php"); if (isset($_GET["delete"]) && is_numeric($_GET["delete"]) && isset($_GET["input"])) { $param = array(); $param['number']=$_GET["delete"]; $param['inputfilename']=$_GET["input"]; if(!DBDeleteProblem ($_SESSION["usertable"]["contestnumber"], $param)) { MSGError('Error deleting problem'); LogError('Error deleting problem'); } ForceLoad("problem.php"); } if (isset($_POST["Submit3"]) && isset($_POST["problemnumber"]) && is_numeric($_POST["problemnumber"]) && isset($_POST["problemname"]) && $_POST["problemname"] != "") { if ($_POST["confirmation"] == "confirm") { if ($_FILES["probleminput"]["name"] != "") { $type=myhtmlspecialchars($_FILES["probleminput"]["type"]); $size=myhtmlspecialchars($_FILES["probleminput"]["size"]); $name=myhtmlspecialchars($_FILES["probleminput"]["name"]); $temp=myhtmlspecialchars($_FILES["probleminput"]["tmp_name"]); if (!is_uploaded_file($temp)) { IntrusionNotify("file upload problem."); ForceLoad("../index.php"); } } else $name = ""; $param = array(); $param['number'] = $_POST["problemnumber"]; $param['name'] = $_POST["problemname"]; $param['inputfilename'] = $name; $param['inputfilepath'] = $temp; $param['fake'] = 'f'; $param['colorname'] = $_POST["colorname"]; $param['color'] = $_POST["color"]; if($param['color']=='') $param['color']=-1; DBNewProblem ($_SESSION["usertable"]["contestnumber"], $param); } ForceLoad("problem.php"); } ?>
\n"; if($prob[$i]["fake"]!='t') { echo " \n"; } else { echo " \n"; } echo " \n"; echo " \n"; echo " \n"; if (isset($prob[$i]["descoid"]) && $prob[$i]["descoid"] != null && isset($prob[$i]["descfilename"])) { echo " \n"; } else echo " \n"; if ($prob[$i]["inputoid"] != null) { $tx = $prob[$i]["inputhash"]; echo " \n"; } else echo " \n"; /* if ($prob[$i]["soloid"] != null) { $tx = $prob[$i]["solhash"]; echo " \n"; } else echo " \n"; if ($prob[$i]["timelimit"]!="") echo " \n"; else echo " \n"; */ if ($prob[$i]["color"]!="") { echo " \n"; } else echo " \n"; echo " \n"; } echo "
Problem # Short Name Fullname Basename Descfile Package file Color
" . $prob[$i]["number"] . "" . $prob[$i]["number"] . " (fake)" . $prob[$i]["name"] . "" . $prob[$i]["fullname"] . " " . $prob[$i]["basefilename"] . " " . basename($prob[$i]["descfilename"]) . " " . $prob[$i]["inputfilename"] . " " . "\"$tx\"" . " " . $prob[$i]["solfilename"] . " ". "\"$tx\"" . " " . $prob[$i]["timelimit"] . " " . $prob[$i]["colorname"] . "\"".$prob[$i]["colorname"]."\" 
"; if (count($prob) == 0) echo "
NO PROBLEMS DEFINED
"; ?>

Clicking on a problem number will delete it.
WARNING: deleting a problem will remove EVERYTHING related to it.
It is NOT recommended to change anything while the contest is running.
To import a problem, fill in the following fields.
To replace the data of a problem, proceed as if it did not exist (data will be replaced without removing it).
Number:
Short Name (usually a letter):
Problem package (ZIP):
Color name:
Color (RGB HTML format):