diff options
| -rw-r--r-- | src/admin/contest.php | 4 | ||||
| -rw-r--r-- | src/fcontest.php | 2 | ||||
| -rw-r--r-- | src/fextdata.php | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/admin/contest.php b/src/admin/contest.php index 7785b50..f238212 100644 --- a/src/admin/contest.php +++ b/src/admin/contest.php @@ -222,7 +222,7 @@ echo $contest; <?php if(strlen($ct["contestunlockkey"]) > 1) echo "<b><= has been set</b>"; ?> </td> </tr> - <?php //if($main) { + <?php if($main) { ?> <tr> <td width="35%" align=right>Keys (only use it within a <b>secure network</b>):</td> @@ -231,7 +231,7 @@ echo $contest; <?php if(strlen($ct["contestkeys"]) > 32) echo "<b><= has been set</b>"; ?> </td> </tr> - <?php //} + <?php } ?> <tr> <td width="35%" align=right>Contest main site number:</td> diff --git a/src/fcontest.php b/src/fcontest.php index e980bef..d286763 100644 --- a/src/fcontest.php +++ b/src/fcontest.php @@ -733,7 +733,7 @@ function DBUpdateContest ($param, $c=null) { if(isset($param['contestlastmilescore']) && !isset($param['lastmilescore'])) $param['lastmilescore']=$param['contestlastmilescore']; if(isset($param['contestpenalty']) && !isset($param['penalty'])) $param['penalty']=$param['contestpenalty']; if(isset($param['contestmaxfilesize']) && !isset($param['maxfilesize'])) $param['maxfilesize']=$param['contestmaxfilesize']; - if(isset($param['contestactive']) && !isset($param['active'])) $param['active']=$param['contestactive']; + // if(isset($param['contestactive']) && !isset($param['active'])) $param['active']=$param['contestactive']; if(isset($param['contestmainsite']) && !isset($param['mainsite'])) $param['mainsite']=$param['contestmainsite']; if(isset($param['contestkeys']) && !isset($param['keys'])) $param['keys']=$param['contestkeys']; diff --git a/src/fextdata.php b/src/fextdata.php index 76de55e..200d11f 100644 --- a/src/fextdata.php +++ b/src/fextdata.php @@ -216,7 +216,6 @@ function getMainXML() { $updatetime=0; } else $updatetime=trim($sitedata[3]); - $ti = mytime(); $siteurl = $sitedata[0]; LOGError("getMainXML: site $siteurl"); @@ -244,6 +243,7 @@ function getMainXML() { $context = stream_context_create($opts); $ok = @file_get_contents($siteurl . $urldiv . "index.php?name=${user}&password=${res}&action=transfer", 0, $context); + $ti = mytime(); // LOGError("ok=" . $ok); if(substr($ok,strlen($ok)-strlen('TRANSFER OK'),strlen('TRANSFER OK')) == 'TRANSFER OK') { @@ -280,8 +280,7 @@ function getMainXML() { } if(importFromXML($s, $contest, $localsite)) { $str = $sitedata[0] . ' ' . $sitedata[1] . ' ' . $sitedata[2] . ' ' . $ti; - $ti = 1+$ct['updatetime']; - $param = array('contestnumber' => $contest, 'mainsiteurl' => $str, 'updatetime' => $ti); + $param = array('contestnumber' => $contest, 'mainsiteurl' => $str); DBUpdateContest ($param, null); return true; } else { @@ -488,7 +487,7 @@ function importFromXML($ar,$contest,$site,$tomain=false) { function genSQLs($contest, $site, $updatetime) { $sql = array(); $sql['contesttable']="select contestnumber, contestname, conteststartdate, contestduration, contestlastmileanswer," . - "contestlastmilescore, contestpenalty, contestmaxfilesize, contestactive, contestmainsite, contestkeys " . + "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['answertable']="select * from answertable where contestnumber=$contest and fake='f' and updatetime >= $updatetime"; |