From 866658cded5b92ddb2681dead1ebaf111d712fcc Mon Sep 17 00:00:00 2001 From: cassiopc Date: Mon, 6 Aug 2012 11:09:10 +0200 Subject: init --- boca-1.5.0/src/team/task.php | 121 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 boca-1.5.0/src/team/task.php (limited to 'boca-1.5.0/src/team/task.php') diff --git a/boca-1.5.0/src/team/task.php b/boca-1.5.0/src/team/task.php new file mode 100644 index 0000000..b23605c --- /dev/null +++ b/boca-1.5.0/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