Fixed submission

This commit is contained in:
Li Chen 2013-11-08 18:20:14 +01:00
parent 166be860c8
commit 257803cb85
2 changed files with 4 additions and 11 deletions

View File

@ -11,6 +11,10 @@ if ($n == 5 && $p[4] == "submission")
if (!empty($_POST["solution"])) if (!empty($_POST["solution"]))
{ {
$file = ONYX . "../submission/".$p[1]."-".$p[2]."-".$p[3];
file_put_contents($file, $_POST['solution'], LOCK_EX);
header("Location: /".implode("/", $p)); header("Location: /".implode("/", $p));
exit; exit;
} }

View File

@ -1,11 +0,0 @@
<?php
if(!defined('ONYX')) exit;
$file = ONYX . "../submission/".$p[1]."-".$p[2]."-".$p[3];
file_put_contents($file, $_POST['solution'], LOCK_EX);
header('Location: /connected/'.$p[1].'/confirmation');
exit;