aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frun.php19
-rw-r--r--src/fscore.php52
-rw-r--r--src/php.php1
-rw-r--r--src/private/remotescores/otherservers1
4 files changed, 37 insertions, 36 deletions
diff --git a/src/frun.php b/src/frun.php
index 34bfd83..5576bcd 100644
--- a/src/frun.php
+++ b/src/frun.php
@@ -753,14 +753,17 @@ function DBNewRun($param,$c=null) {
return 0;
}
} else {
- $b = DBSiteInfo($contest, $site, $c);
- $dif = $rundatediff;
- if ($dif >= $b['siteduration']) {
- DBExec($c, "rollback work", "DBNewRun(rollback-over)");
- LOGError("Tried to submit a run but the contest is over. SQL=(" . $sql . ")");
- MSGError("The contest is over!");
- return 0;
- }
+ //cassiopc: so we let the run enter the system if it comes with a defined timestamp, but it is to decide later if it will be counted...
+ //$b = DBSiteInfo($contest, $site, $c);
+ $dif = $rundatediff;
+ /*
+ if ($dif >= $b['siteduration']) {
+ DBExec($c, "rollback work", "DBNewRun(rollback-over)");
+ LOGError("Tried to submit a run but the contest is over. SQL=(" . $sql . ")");
+ MSGError("The contest is over!");
+ return 0;
+ }
+ */
}
if($updatetime > $t || $insert) {
diff --git a/src/fscore.php b/src/fscore.php
index dbf55c4..2c57695 100644
--- a/src/fscore.php
+++ b/src/fscore.php
@@ -49,47 +49,47 @@ function ScoreCMP($a,$b) {
}
function ordena($a) {
/*
- $n = count($a);
- $r = array();
- for ($i=0; $i<$n; $i++) {
+ $n = count($a);
+ $r = array();
+ for ($i=0; $i<$n; $i++) {
$max=null;
foreach($a as $e => $c) {
- if ($c != null && ($max==null || ScoreCMP($c,$max) > 0)) {
- // $j=0;
- // for(;$j<$i;$j++)
- // if($r[$j]['user']==$a[$e]['user'] && $r[$j]['site']==$a[$e]['site']) break;
- // if($j>=$i) {
- $max = $c;
- $maxe = $e;
- // }
- }
+ if ($c != null && ($max==null || ScoreCMP($c,$max) > 0)) {
+ // $j=0;
+ // for(;$j<$i;$j++)
+ // if($r[$j]['user']==$a[$e]['user'] && $r[$j]['site']==$a[$e]['site']) break;
+ // if($j>=$i) {
+ $max = $c;
+ $maxe = $e;
+ // }
+ }
}
if ($max==null) break;
$r[$i] = $max;
$a[$maxe] = null;
- }
+ }
*/
uasort($a, "ScoreCMPinv");
return $a;
/*
- $r = array();
- $j = 0;
- foreach($a as $k => $v) {
+ $r = array();
+ $j = 0;
+ foreach($a as $k => $v) {
$r[$j] = $v;
$j++;
- }
- $j = 0;
- $r = array();
- foreach($a as $k) {
+ }
+ $j = 0;
+ $r = array();
+ foreach($a as $k) {
if($j == 0) $r[0] = $k;
else {
- if($k['user'] != $r[$j]['user'] || $k['site'] != $r[$j]['site']) {
- $j++;
- $r[$j] = $k;
- }
- }
+ if($k['user'] != $r[$j]['user'] || $k['site'] != $r[$j]['site']) {
+ $j++;
+ $r[$j] = $k;
+ }
}
- return $r;
+ }
+ return $r;
*/
}
function DBScore($contest, $verifylastmile, $hor=-1, $globalsite='0') {
diff --git a/src/php.php b/src/php.php
deleted file mode 100644
index 147cebc..0000000
--- a/src/php.php
+++ /dev/null
@@ -1 +0,0 @@
-<?php phpinfo(); ?>
diff --git a/src/private/remotescores/otherservers b/src/private/remotescores/otherservers
index 1fa415c..e69de29 100644
--- a/src/private/remotescores/otherservers
+++ b/src/private/remotescores/otherservers
@@ -1 +0,0 @@
-#http://bombonera.org/boca siteX password