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/team/task.php | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 src/team/task.php (limited to 'src/team/task.php') diff --git a/src/team/task.php b/src/team/task.php new file mode 100644 index 0000000..b23605c --- /dev/null +++ b/src/team/task.php @@ -0,0 +1,121 @@ +. +//////////////////////////////////////////////////////////////////////////////// +// Last modified 05/aug/2012 by cassio@ime.usp.br +require('header.php'); + +if(($ct = DBContestInfo($_SESSION["usertable"]["contestnumber"])) == null) + ForceLoad("../index.php"); +if(($st = DBSiteInfo($_SESSION["usertable"]["contestnumber"],$_SESSION["usertable"]["usersitenumber"])) == null) + ForceLoad("../index.php"); + +if (isset($_POST["Submit"]) && $_POST["Submit"]=="S.O.S.") { + if ($_POST["confirmation"] == "confirm") { + $param['contest']=$_SESSION["usertable"]["contestnumber"]; + $param['site']=$_SESSION["usertable"]["usersitenumber"]; + $param['user']=$_SESSION["usertable"]["usernumber"]; + $param['desc']= "Staff assistance"; + DBNewTask ($param); + } + ForceLoad("task.php"); +} +if (isset($_FILES["filename"]) && isset($_POST["Submit"]) && $_FILES["filename"]["name"]!="") { + if ($_POST["confirmation"] == "confirm") { + $type=myhtmlspecialchars($_FILES["filename"]["type"]); + $size=myhtmlspecialchars($_FILES["filename"]["size"]); + $name=myhtmlspecialchars($_FILES["filename"]["name"]); + $temp=myhtmlspecialchars($_FILES["filename"]["tmp_name"]); + + if ($size > $ct["contestmaxfilesize"]) { + LOGLevel("User {$_SESSION["usertable"]["username"]} tried to print file " . + "$name with $size bytes ({$ct["contestmaxfilesize"]} max allowed).", 1); + MSGError("File size exceeds the limit allowed."); + ForceLoad("task.php"); + } + if (!is_uploaded_file($temp)) { + IntrusionNotify("Printing file upload problem"); + ForceLoad("../index.php"); + } + $param['contest']=$_SESSION["usertable"]["contestnumber"]; + $param['site']=$_SESSION["usertable"]["usersitenumber"]; + $param['user']=$_SESSION["usertable"]["usernumber"]; + $param['desc']= "File to print"; + $param['filename']=$name; + $param['filepath']=$temp; + DBNewTask ($param); + } + ForceLoad("task.php"); +} +?> +
+ + + + + + + + +\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; +} +echo "
Task #TimeDescriptionFileStatus
" . $task[$i]["number"] . "" . dateconvminutes($task[$i]["timestamp"]) . "" . $task[$i]["description"] . "" . $task[$i]["filename"] . " " . $task[$i]["status"] . "
"; +if (count($task) == 0) echo "
NO TASKS FOUND
"; +?> + +

To submit a file for printing, just fill in the following field:
+
+ + +
+ + + + + +
File name: + +
+
+ +
+ + +
+

If you needed staff assistance, please click +on the button above and wait.
+ +
+
+ + + -- cgit v1.2.3