@@ -372,13 +372,16 @@ |
||
372 | 372 | ]; |
373 | 373 | $this->MODEL->updateSubmission($row['sid'], $sub); |
374 | 374 | } |
375 | - }else if($row['oid']==8) { |
|
375 | + } else if($row['oid']==8) { |
|
376 | 376 | try { |
377 | 377 | $sub = []; |
378 | 378 | $response = Requests::get("http://acm.hdu.edu.cn/status.php?first=".$row['remote_id']); |
379 | 379 | preg_match ('/<\/td><td>[\\s\\S]*?<\/td><td>[\\s\\S]*?<\/td><td>([\\s\\S]*?)<\/td><td>[\\s\\S]*?<\/td><td>(\\d*?)MS<\/td><td>(\\d*?)K<\/td>/', $response->body, $match); |
380 | - if(strpos('Runtime error',trim(strip_tags($match[1])))!==false) $sub['verdict'] = 'Runtime Error'; |
|
381 | - else $sub['verdict'] = $hdu_v[trim(strip_tags($match[1]))]; |
|
380 | + if(strpos('Runtime error',trim(strip_tags($match[1])))!==false) { |
|
381 | + $sub['verdict'] = 'Runtime Error'; |
|
382 | + } else { |
|
383 | + $sub['verdict'] = $hdu_v[trim(strip_tags($match[1]))]; |
|
384 | + } |
|
382 | 385 | preg_match ("/<td>(\\d*?)MS<\/td><td>(\\d*?)K<\/td>/", $response->body, $matches); |
383 | 386 | $sub['remote_id'] = $row['remote_id']; |
384 | 387 | $sub['time'] = intval($matches[1]); |