From 7d2ce170b02d3fa0f7006084c92f6ec56dfbf9f1 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 15 May 2012 11:20:40 -0700 Subject: Pronoun adjustment, and other minor fixes. --- pages/achievements.php | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'pages/achievements.php') diff --git a/pages/achievements.php b/pages/achievements.php index 881e798..191473e 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -268,9 +268,10 @@ if (isset($_POST['doupdate']) AND !$viewer) { } + $achievements = array(); -//Depreciated !! +//Depreciated $sql = " SELECT type, @@ -280,6 +281,9 @@ FROM `achievements` WHERE userID = '$userID' GROUP BY `type`"; + +//Fetch data + //Thank you ranhothchord@gmail.com $sql = "select maxLevel.type, maxLevel.level, achievements.dateCompleted from achievements @@ -299,6 +303,9 @@ if ($result) { $achievements[$row['type']] = $row; } + +//Get user information to display. + $sql = " SELECT users.displayName, @@ -317,8 +324,8 @@ WHERE users.ID = '$userID' GROUP BY solutions.userID "; $result = mysql_query($sql); +//No user found? if (!$result OR mysql_num_rows($result) <= 0) { - echo "

Achievements Page

No selection.
"; @@ -424,6 +431,7 @@ if (isset($unlocks)) { echo "

"; +//!! Depreciated //Type 1; wall unlocks: if (isset($unlocks[1]) AND 1 == 2) { @@ -481,6 +489,7 @@ if (isset($unlocks[3]) AND 1 == 2) { echo "
"; } + if (!$viewer) { echo "
@@ -560,9 +569,13 @@ foreach($achievements as $aType => $a) { $percent = round($uCurrent / $required * 100, 1); //$percentLeft = 100 - $percent; + + $pronoun = "you have"; + if ($viewer) + $pronoun = "$UDisplay has"; echo "Last level earned $aCompleted"; - echo "
Currently you have $nUCurrent $currency"; + echo "
Currently $pronoun $nUCurrent $currency"; echo "
@@ -573,19 +586,6 @@ foreach($achievements as $aType => $a) { echo displayUnlock($unlockType, $unlockValue, $unlockName); } -if (false) { -echo "

Mazes Career: $UTotalSolutions

-You have played $UTotalSolutions mazes. - -Wall embelms unlocked: - - - -"; -} - function displayUnlock($uType, $uValue, $uName) { switch ($uType) { @@ -606,11 +606,6 @@ function displayUnlock($uType, $uValue, $uName) { } - - - - - ?> -- cgit v1.2.3
-
-