diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2012-04-17 16:17:30 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2012-04-17 16:17:30 -0700 |
commit | d61d75979ee9b98cd35fdc89b01ce9e9ae0ee3f3 (patch) | |
tree | 52f4ace98bb0ce14022eb49b8c499a31912d3692 /pages/achievements.php | |
parent | 6d7ea09fc40b66904a8ac06b50a22a1861e26ff9 (diff) | |
download | pathery-d61d75979ee9b98cd35fdc89b01ce9e9ae0ee3f3.tar.xz |
Achievement page fixes
Diffstat (limited to 'pages/achievements.php')
-rw-r--r-- | pages/achievements.php | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/pages/achievements.php b/pages/achievements.php index 38f9bdf..ab17521 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -212,7 +212,7 @@ FROM `unlocks` LEFT JOIN `achievements`
ON achievements.ID = unlocks.id
WHERE unlocks.userID = '$userID'
-ORDER BY `value` DESC";
+ORDER BY `dateUnlocked` ASC";
$result = mysql_query($sql);
if ($result) {
while ($row = mysql_fetch_assoc($result))
@@ -359,18 +359,23 @@ function displayUnlockItem($uType, $item) { if ($item['aType'] == -1)
$unlockTitle = "$item[name]";
+ $border = 'border: 1px solid #000; border-width: 2px 0px 2px 0px;';
switch ($uType) {
case 1:
- if ($wallColor == $item[value])
- $r .= '<td>s</td>';
- $r .= "<td id='color_$item[id]' title='$unlockTitle' onClick='colorclick(this,\"$item[value]\", \"$item[id]\")' style='background-color:$item[value];' class='grid_td_walls'></td>";
+ if ($GLOBALS['wallColor'] == $item[value])
+ $border = 'border: 2px solid #26b;';
+ $r .= "<td id='color_$item[id]' title='$unlockTitle' onClick='colorclick(this,\"$item[value]\", \"$item[id]\")' style='padding: 0px;background-color:$item[value];$border' class='grid_td_walls'></td>";
break;
case 2:
- $r .= "<td class='grid_td_walls' title='$unlockTitle' id='' onClick='emblemclick(this,\"$item[value]\", \"$item[id]\")' style='background: #999 url(../images/marks/$item[value]);' >
+ if ($GLOBALS['wallEmblem'] == $item[value])
+ $border = 'border: 2px solid #26b;';
+ $r .= "<td class='grid_td_walls' title='$unlockTitle' id='' onClick='emblemclick(this,\"$item[value]\", \"$item[id]\")' style='background: #999 url(../images/marks/$item[value]);$border' >
<div class='grid_inner grid_td_walls'></div></td>";
break;
case 3:
- $r .= "<td class='name_color_select'><span title='$unlockTitle' onClick='namecolorclick(this,\"$item[value]\", \"$item[id]\")' style='color:$item[value]; margin-right:15px;'>";
+ if ($GLOBALS['nameColor'] == $item[value])
+ $border = 'border: 2px solid #26b;';
+ $r .= "<td class='name_color_select'><span title='$unlockTitle' onClick='namecolorclick(this,\"$item[value]\", \"$item[id]\")' style='color:$item[value]; margin-right:15px;$border'>";
$r .= " $item[name] ";
$r .= "</span></td>";
break;
@@ -402,12 +407,14 @@ if (isset($unlocks)) { }
$uSubtypeNames[$uType][0];
+ echo "<table>";
foreach($subtype as $key => $content) {
$tmpName = $uSubtypeNames[$uType][$key];
if (count($subtype) > 1)
- echo "<strong>$tmpName</strong>";
- echo "<table><tr>$content</tr></table>";
+ echo "</table><strong>$tmpName</strong><table>";
+ echo "<tr>$content</tr>";
}
+ echo "</table>";
}
}
@@ -503,6 +510,8 @@ foreach($achievements as $aType => $a) { if (!isset($uStats[$aType]))
$uStats[$aType] = getAchievementCurrency($userID, $aType);
+ $uStats[$aType] = str_replace(",", "", $uStats[$aType]);
+
$uCurrent = $uStats[$aType];
$nUCurrent = number_format($uCurrent);
|