forked from DOMjudge/domjudge
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Keith Johnson
committed
Nov 6, 2015
1 parent
4622405
commit 054c8c0
Showing
3 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* View/download a specific problem text. This page could later be | ||
* extended to provide more details, like sample test cases. | ||
* | ||
* Part of the DOMjudge Programming Contest Jury System and licenced | ||
* under the GNU GPL. See README and COPYING for details. | ||
*/ | ||
|
||
require('init.php'); | ||
|
||
$show_sample = dbconfig_get('show_sample_output', 0); | ||
if (!$show_sample) { | ||
error("Sample testcases disabled by admin"); | ||
} | ||
|
||
$id = getRequestID(); | ||
if ( empty($id) ) error("Missing testcase id"); | ||
|
||
$FILES = array('input','output'); | ||
if ( isset($_GET['fetch']) && in_array($_GET['fetch'], $FILES) ) { | ||
putSampleData($id, $_GET['fetch']); | ||
} else { | ||
error("Missing or invalid value for 'fetch'"); | ||
} |