diff --git a/public/elotracker/index.php b/public/elotracker/index.php index 5058e1b..3723f3b 100644 --- a/public/elotracker/index.php +++ b/public/elotracker/index.php @@ -26,12 +26,14 @@ foreach ($tracker->getProgressions() as $puuid => $progress){ $entries = $tracker->entries[$puuid]; $account = $tracker->accounts[$puuid]; $start_elo = reset($entries); - if ($start_elo->tier == "MASTER" || $start_elo->tier == "GRANDMASTER" || $start_elo->tier == "CHALLENGER") $start_elo->rank = ""; + $start_tier = ($start_elo) ? $start_elo->tier : "UNRANKED"; + if ($start_tier == "MASTER" || $start_tier == "GRANDMASTER" || $start_tier == "CHALLENGER") $start_elo->rank = ""; $current_elo = end($entries); - if ($current_elo->tier == "MASTER" || $current_elo->tier == "GRANDMASTER" || $current_elo->tier == "CHALLENGER") $current_elo->rank = ""; + $current_tier = ($current_elo) ? $current_elo->tier : "UNRANKED"; + if ($current_tier == "MASTER" || $current_tier == "GRANDMASTER" || $current_tier == "CHALLENGER") $current_elo->rank = ""; $progress = ($progress>=0) ? "+$progress" : $progress; - $tier_lowercase = strtolower($current_elo->tier); - $start_tier_lowercase = strtolower($start_elo->tier); + $tier_lowercase = strtolower($current_tier); + $start_tier_lowercase = strtolower($start_tier); $tier_ucfirst = ucfirst($tier_lowercase); $start_tier_ucfirst = ucfirst($start_tier_lowercase); $gained_lp_sign = ($progress > 0) ? " plus-lp" : (($progress < 0) ? " minus-lp" : "no-lp"); @@ -46,7 +48,8 @@ foreach ($tracker->getProgressions() as $puuid => $progress){ echo "
"; - echo "
+ if ($start_elo) { + echo "
{$start_tier_ucfirst} {$start_elo->rank}
{$start_elo->points} LP
@@ -57,8 +60,9 @@ foreach ($tracker->getProgressions() as $puuid => $progress){ {$tier_ucfirst} {$current_elo->rank}
{$current_elo->points} LP
"; + echo ""; + } echo "
"; - echo ""; $placement_counter++; } echo "";