wip
This commit is contained in:
1 parent
e94802334d
commit
6aefe4f0c2
2 files changed
+12
-10
No files matched your search
@@ -40,21 +40,24 @@ class LoadPlayer
|
||||
if (! $counting) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
$colorlevel = round(max($counting)/3);
|
||||
|
||||
$arr = [];
|
||||
foreach ($res_details as $val) {
|
||||
|
||||
$tm_player_id = $val->tm_player_id;
|
||||
$position = strtoupper($val->position);
|
||||
|
||||
$matches_played = isset($counting[$tm_player_id]) ? $counting[$tm_player_id] : 0;
|
||||
if($matches_played < $colorlevel){
|
||||
$arr[$val->position][$val->tm_player_id] = '<span class="text-red-600">'.$val->name.' ('.$matches_played.')</span>';
|
||||
$arr[$position][$val->tm_player_id] = '<span class="text-red-600">'.$val->name.' ('.$matches_played.')</span>';
|
||||
}
|
||||
else if($matches_played < $colorlevel*2){
|
||||
$arr[$val->position][$val->tm_player_id] = '<span class="text-blue-500">'.$val->name.' ('.$matches_played.')</span>';
|
||||
$arr[$position][$val->tm_player_id] = '<span class="text-blue-500">'.$val->name.' ('.$matches_played.')</span>';
|
||||
}
|
||||
else {
|
||||
$arr[$val->position][$val->tm_player_id] = '<span class="text-green-500">'.$val->name.' ('.$matches_played.')</span>';
|
||||
$arr[$position][$val->tm_player_id] = '<span class="text-green-500">'.$val->name.' ('.$matches_played.')</span>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user