main
hecht 10 years ago
parent 83e48ec4fa
commit 66a2222dc3

@ -7,7 +7,7 @@ include_once(ROOT_PATH.'/include/elo.inc.php');
include_once(ROOT_PATH.'/include/semaphore.inc.php'); include_once(ROOT_PATH.'/include/semaphore.inc.php');
function getClanRanking() { function getClanRanking() {
$qry = mysql_query('SELECT id from clan ORDER by elo desc LIMIT 10'); $qry = mysql_query('SELECT id, elo from clan ORDER by elo desc LIMIT 10');
$clan_ids = array(); $clan_ids = array();
while($res = mysql_fetch_row($qry)) while($res = mysql_fetch_row($qry))
$clan_ids[] = $res; $clan_ids[] = $res;
@ -17,7 +17,8 @@ function getClanRanking() {
function distributeClanPrices(array $prices, array $results) { function distributeClanPrices(array $prices, array $results) {
$n = min(count($prices), count($results)); $n = min(count($prices), count($results));
echo "Resultate";
print_r($results);
for($i = 0; $i<$n; $i++) { for($i = 0; $i<$n; $i++) {
$points = $prices[$i]; $points = $prices[$i];
foreach($results[$i] as $winner) { foreach($results[$i] as $winner) {
@ -116,4 +117,4 @@ if(!semaphoreUP($ressource)) {
} }
?> ?>

@ -180,7 +180,7 @@ $row = mysql_fetch_assoc($qry);
if($row['anzahl'] < $anzahl){ if($row['anzahl'] < $anzahl){
echo $name.' konnte nicht mit '.$anzahl.' Chars gestartet werden, da es nur '.$row['anzahl'].' von '.$anzahl.' nötigen Chars gibt!<br>'; echo $name.' konnte nicht mit '.$anzahl.' Chars gestartet werden, da es nur '.$row['anzahl'].' von '.$anzahl.' nötigen Chars gibt!<br>';
$anzahl = pow(2, round(log($row['anzahl'], 2),0)); $anzahl = pow(2, floor(log($row['anzahl'], 2)));
echo $name.' wird nun mit '.$anzahl.' Chars gestartet!<br>'; echo $name.' wird nun mit '.$anzahl.' Chars gestartet!<br>';
} }

Loading…
Cancel
Save