Skip to content

Commit

Permalink
Merge pull request #314 from ryanlee2014/master
Browse files Browse the repository at this point in the history
Avoid rejudge test run
  • Loading branch information
zhblue committed Sep 24, 2018
2 parents 8a98dea + 8cd4fe3 commit 50833da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trunk/web/admin/rejudge.php
Expand Up @@ -8,6 +8,10 @@
require_once("../include/check_post_key.php");
if (isset($_POST['rjpid'])){
$rjpid=intval($_POST['rjpid']);
if($rjpid == 0) {
echo "Rejudge Problem ID should not equal to 0";
exit(1);
}
$sql="UPDATE `solution` SET `result`=1 WHERE `problem_id`=? and problem_id>0";
pdo_query($sql,$rjpid) ;
$sql="delete from `sim` WHERE `s_id` in (select solution_id from solution where `problem_id`=?)";
Expand Down

0 comments on commit 50833da

Please sign in to comment.