diff options
Diffstat (limited to 'pages/leaderboard.php')
-rw-r--r-- | pages/leaderboard.php | 15 |
1 files changed, 12 insertions, 3 deletions
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 .= "</tr>";
$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 = "<table style='border:1px solid #FFF'>";
+ $r = '';
+ if($championPoints != null)
+ {
+ $r .= "<div id='myPoints'>Points earned: <span id='myPointsValue'>$championPoints</span></div>";
+ }
+ $r .= "<table style='border:1px solid #FFF'>";
$r .= "<caption>$caption</caption>";
$r .= $headers;
$r .= $promotedContent;
|