diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-11-01 15:22:43 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-11-01 15:22:43 +0000 |
| commit | bdcc78997500afd66d78a5308a0bf2ce591c2030 (patch) | |
| tree | bd03a4783a4df92b0f8f274063e7f061ffc4c443 | |
| parent | 9583d6ea7bb503fb0094751c5a871b3fb65de84a (diff) | |
| download | boca-bdcc78997500afd66d78a5308a0bf2ce591c2030.tar.gz boca-bdcc78997500afd66d78a5308a0bf2ce591c2030.zip | |
no viewing of prob before main
| -rw-r--r-- | src/fextdata.php | 25 | ||||
| -rw-r--r-- | src/fproblem.php | 2 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/fextdata.php b/src/fextdata.php index 1046f29..d04f9cc 100644 --- a/src/fextdata.php +++ b/src/fextdata.php @@ -246,7 +246,7 @@ function scoretransfer($putname, $localsite, $timeo=20) { } -function getMainXML($contest,$timeo=20,$upd=false) { +function getMainXML($contest,$timeo=30,$upd=false) { $ds = DIRECTORY_SEPARATOR; if($ds=="") $ds = "/"; $logstr = ''; @@ -663,7 +663,28 @@ function genSQLs($contest, $site, $updatetime, $mainsite=1) { $sql['contesttable']="select contestnumber, contestname, conteststartdate, contestduration, contestlastmileanswer," . "contestlastmilescore, contestpenalty, contestmaxfilesize, contestmainsite, contestkeys " . "from contesttable where contestnumber=$contest"; // and updatetime >= $updatetime"; - $sql['sitetable']="select * from sitetable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime"; + $sql['sitetable']="select " . + "contestnumber, " . + "sitenumber, " . + "siteip, " . + "sitename, " . + "siteactive, " . + "sitepermitlogins, " . + "sitelastmileanswer, " . + "sitelastmilescore, " . + "siteduration, " . + "siteautoend, " . + "sitejudging, " . + "sitetasking, " . + "siteglobalscore, " . + "sitescorelevel, " . + "sitemaxtask, " . + "sitechiefname, " . + "siteautojudge, " . + "sitemaxruntime, " . + "sitemaxjudgewaittime, " . + "updatetime " . + " from sitetable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime"; $sql['answertable']="select * from answertable where contestnumber=$contest and fake='f' and updatetime >= $updatetime"; $sql['langtable']="select * from langtable where contestnumber=$contest and updatetime >= $updatetime"; $sql['problemtable']="select " . diff --git a/src/fproblem.php b/src/fproblem.php index a66f62c..c14a61b 100644 --- a/src/fproblem.php +++ b/src/fproblem.php @@ -457,6 +457,8 @@ function DBGetProblems($contest,$showanyway=false) { if ($b["currenttime"] < 0 && !$showanyway) return array(); + if(($c = DBContestInfo($contest)) == null) return array(); + if (time() < $c['conteststartdate'] && !$showanyway) return array(); $c = DBConnect(); $sql = "select distinct p.problemnumber as number, p.problemname as problem, " . |