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"; } .summaryTableF td:nth-of-type(4):before { content: "Last Game"; } .summaryTableF td:nth-of-type(5):before { content: "Next Game"; } .summaryTableF td:nth-of-type(6):before { content: "Earned For You"; }
function getTotalPointsOverall($userID, $leagueID, $timeWindow) { // Returns total sum of points earned this season by a player global $g_totalPointsOverall; global $g_totalPointsOverallTimeWindow; global $g_totalPointsOverallUserID; if ($timeWindow = $g_totalPointsOverallTimeWindow && ($g_totalPointsOverall != null && $g_totalPointsOverallUserID == $userID)) { return $g_totalPointsOverall; } $season = getSeason(); if (intVal($timeWindow) == 0) { $timeWindow = 99999; } $sum = selectSumWithGroupBy("fch_consolidated_results r", "r.totalPoints", " WHERE r.dateStamp > DATE_ADD(NOW(), INTERVAL -{$timeWindow} DAY) AND r.season = \"{$season}\" ", "r.playerID"); //debug("SUM: " . $sum); $g_totalPointsOverall = $sum; $g_totalPointsOverallTimeWindow = $timeWindow; $g_totalPointsOverallUserID = $userID; return $sum; }