<h3>You are in <?php echo getSuffix($place); ?> place with <?php echo $totalPoints; ?> points.</h3> <h4>Current Roster</h4> <?php $totalPointsEarned = getTotalPointsForUserByPlayer($userID, $leagueID, 0); $pointsEarned30d = getTotalPointsForUserByPlayer($userID, $leagueID, 30); $lastGameHash = getLastGameHash(); $playerDisplayNames = getPlayerDisplayNames(); $gamesPlayed = getGamesPlayedByPlayer(); $positions = getPositionHash(); $currentRoster = getCurrentRoster($userID, $leagueID); $nextGame = getNextGame(); $totalPoints = selectSumWithGroupBy("fch_consolidated_results", "totalPoints", " WHERE season = \"{$season}\"", "playerID"); if ($currentRoster == -1) { echo "<h3>You do not have any players on your roster yet.</h3>"; return; } ?> <STYLE> @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px) { .summaryTableF td:nth-of-type(1):before { content: "Player"; } .summaryTableF td:nth-of-type(2):before { content: "A/R*"; } .summaryTableF td:nth-of-type(3):before { content: "Pos"; }
function renderCurrentRoster($userID, $leagueID) { $roster = getCurrentRoster($userID, $leagueID); if ($roster == -1) { return "No players on roster."; } $positions = getPositionHash(); $season = getSeason(); $displayNames = getPlayerDisplayNames(); $out .= "<table class = \"rosterAll\" width = 100%>"; $out .= "<THEAD><TH>Active Roster</TH><TH>Reserve</TH></THEAD>\n"; foreach ($roster as $key => $value) { debug("Processing {$key} {$value}"); if ($value == "act") { $act .= $positions[$key] . " " . $displayNames[$key] . "<br/>"; } else { if ($value == "ben") { $ben .= $positions[$key] . " " . $displayNames[$key] . "<br/>"; } } } $out .= "<TR><TD>{$act}</td><td>{$ben}</td></tr></table>"; return $out; }