From 159992a5fa3456e036888c9e9d8a06409f272db6 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sun, 13 Jan 2013 02:46:45 -0600 Subject: Added champion points to leaderboard page --- pages/leaderboard.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'pages') diff --git a/pages/leaderboard.php b/pages/leaderboard.php index 292de60..a256f1c 100644 --- a/pages/leaderboard.php +++ b/pages/leaderboard.php @@ -109,7 +109,8 @@ function getStat ($type, $daysAgo = 1) { userData.wallColor, userData.wallEmblem, userData.displayColor, - users.ID as userID + users.ID as userID, + solutions.championPointsWorth FROM `maps` JOIN `solutions` ON maps.ID = solutions.mapID @@ -198,7 +199,8 @@ function displayPastMaze($mapType, $name, $daysAgo = 1) { userData.wallColor, userData.wallEmblem, userData.displayColor, - users.ID as userID + users.ID as userID, + solutions.championPointsWorth FROM `maps` JOIN `solutions` ON maps.ID = solutions.mapID @@ -269,6 +271,7 @@ function displaystats($result, $caption = NULL) { //$r .= ""; $i = 1; + $championPoints = null; while ($row = mysql_fetch_assoc($result)) { $rowcontent = ''; $mapid = $row['mapID']; @@ -293,6 +296,7 @@ function displaystats($result, $caption = NULL) { if ($userID == $_SESSION['userID']) { $promotedContent .= $x; + $championPoints = $row['championPointsWorth']; } else { $content .= $x; } @@ -300,7 +304,12 @@ function displaystats($result, $caption = NULL) { $i++; } - $r = ""; + $r = ''; + if($championPoints != null) + { + $r .= "
Points earned: $championPoints
"; + } + $r .= "
"; $r .= ""; $r .= $headers; $r .= $promotedContent; -- cgit v1.2.3
$caption