diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2012-05-15 11:20:40 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2012-05-15 11:20:40 -0700 |
commit | 7d2ce170b02d3fa0f7006084c92f6ec56dfbf9f1 (patch) | |
tree | a708f686265774740f564400910a09cafb615a2c /pages/achievements.php | |
parent | f7d2bffb4f3600757e28494d0556d5162d9fe024 (diff) | |
download | pathery-7d2ce170b02d3fa0f7006084c92f6ec56dfbf9f1.tar.xz |
Pronoun adjustment, and other minor fixes.
Diffstat (limited to 'pages/achievements.php')
-rw-r--r-- | pages/achievements.php | 37 |
1 files changed, 16 insertions, 21 deletions
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 "<div class='wrapper'><h1>Achievements Page</h1>
No selection.
</div>";
@@ -424,6 +431,7 @@ if (isset($unlocks)) { echo "<br><br>";
+//!! Depreciated
//Type 1; wall unlocks:
if (isset($unlocks[1]) AND 1 == 2) {
@@ -481,6 +489,7 @@ if (isset($unlocks[3]) AND 1 == 2) { echo "<br />";
}
+
if (!$viewer) {
echo "
<form action='achievements' method='post' name='updateBadge'>
@@ -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 "<br />Currently you have $nUCurrent $currency";
+ echo "<br />Currently $pronoun $nUCurrent $currency";
echo "
<div title='$percent% to $nRequired' style='align:left;width:210px;height:16px;background-color:#222;border:1px solid #26b;'>
<div style='border-right:1px solid #37e;width:$percent%;height:16px;background-color:#26b;'>
@@ -573,19 +586,6 @@ foreach($achievements as $aType => $a) { echo displayUnlock($unlockType, $unlockValue, $unlockName);
}
-if (false) {
-echo "<h3>Mazes Career: $UTotalSolutions</h3>
-You have played $UTotalSolutions mazes.
-
-Wall embelms unlocked:
-<table><tr>
-<td style='background-color:#fff;' class='grid_td_rocks'>
- <div class='grid_td' style='background:url(../images/TeleportInW.png);'></div>
-</td>
-
-";
-}
-
function displayUnlock($uType, $uValue, $uName) {
switch ($uType) {
@@ -606,11 +606,6 @@ function displayUnlock($uType, $uValue, $uName) { }
-
-
-
-
-
?>
</div>
|