Fixed League Auf + Abstieg

This commit is contained in:
Torsten 2017-11-07 16:59:58 +01:00
parent 3f5db4d78c
commit 02329d5c21
3 changed files with 93 additions and 17 deletions

View file

@ -113,15 +113,22 @@ class LeaguesController extends Controller
$totalRanking = League::getTotalRankingOverall(); // Nur für Auf/Abstiegsinfo benötigt.
$rankInfo=array();
foreach($totalRanking as $index => $entry) {
$userId=$entry[0];
$rank=3;
if ($index<44) { $rank=2; }
if ($index<22) { $rank=1; }
$rankInfo[$userId]=$rank;
$rankInfo[$userId]=$totalRanking[$index][4];
}
return view ('leagues.chart',compact('season','leagues', 'leagueNames', 'userNames','leagueScores','rankInfo'));
$cols=array();
$cols[1]="greenyellow";
$cols[2]="orange";
$cols[3]="lightgrey";
$cols[4]="";
return view ('leagues.chart',compact('season','leagues', 'leagueNames', 'userNames','leagueScores','rankInfo','rank','cols'));
}
public static function showSingleUserMatches($userId) {