From 198dcd42b9a44a838020c05999dfb263ae1628e8 Mon Sep 17 00:00:00 2001 From: cassio Date: Sun, 30 Aug 2015 16:17:40 +0100 Subject: small fixes --- src/team/run.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/team/run.php') diff --git a/src/team/run.php b/src/team/run.php index db142f4..9641386 100644 --- a/src/team/run.php +++ b/src/team/run.php @@ -33,6 +33,29 @@ if (isset($_FILES["sourcefile"]) && isset($_POST["problem"]) && isset($_POST["Su $prob = myhtmlspecialchars($_POST["problem"]); $lang = myhtmlspecialchars($_POST["language"]); + $probs = DBGetProblems($_SESSION["usertable"]["contestnumber"],$_SESSION["usertable"]["usertype"]=='judge'); + $i = 0; + $ss = ""; + for (;$i= count($probs)) { + echo "RESULT: INVALID PROBLEM (options are: " . $ss . ")"; + exit; + } + $langs = DBGetLanguages($_SESSION["usertable"]["contestnumber"]); + $i = 0; + $ss = ""; + for (;$i= count($langs)) { + echo "RESULT: INVALID LANGUAGE (options are: " . $ss . ")"; + exit; + } + $type=myhtmlspecialchars($_FILES["sourcefile"]["type"]); $size=myhtmlspecialchars($_FILES["sourcefile"]["size"]); $name=myhtmlspecialchars($_FILES["sourcefile"]["name"]); -- cgit v1.2.3