diff options
-rw-r--r-- | includes/datas.php | 29 | ||||
-rw-r--r-- | pages/achievements.php | 3 |
2 files changed, 14 insertions, 18 deletions
diff --git a/includes/datas.php b/includes/datas.php index d79e3ae..f599533 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -12,7 +12,6 @@ include_once('constants.php'); //Returns text refering to any notifications. function getNotified($userID) { - $r = ''; $sql = "SELECT `ID`, `type`, `level` @@ -22,25 +21,25 @@ function getNotified($userID) { LIMIT 5"; $resultA = mysql_query($sql); - if (mysql_num_rows($resultA) <= 0) - return false; + if (mysql_num_rows($resultA) <= 0) return false; // --------- We found an achievement they don't know they got! while (list($aID, $aType, $aLevel) = mysql_fetch_row($resultA)) { - if ($r != '') - $r .= '<br /><hr />'; + if ($r != '') $r .= '<br /><hr />'; - $aTypeNames[1] = "Path Career Level $aLevel!"; - $aTypeNames[2] = "Mazes Career Level $aLevel!"; - $aTypeNames[3] = "Maze Mastery Level $aLevel!"; - $aTypeNames[4] = "Champion Level $aLevel!"; - $aTypeNames[32] = 'Tutorial Complete!'; + $aTypeNames[ACHIEVEMENT_MOVES_CAREER] = "Path Career Level $aLevel!"; + $aTypeNames[ACHIEVEMENT_MAZE_CAREER] = "Mazes Career Level $aLevel!"; + $aTypeNames[ACHIEVEMENT_MAZE_MASTERY] = "Maze Mastery Level $aLevel!"; + $aTypeNames[ACHIEVEMENT_CHAMPION_POINTS] = "Champion Level $aLevel!"; + $aTypeNames[ACHIEVEMENT_PERFECT_DAY] = 'Perfect Day Level!'; + $aTypeNames[ACHIEVEMENT_TUTORIAL] = 'Tutorial Complete!'; - $aTypeCurrency[1] = "total moves mazed"; - $aTypeCurrency[2] = "mazes played"; - $aTypeCurrency[3] = "mazes with (tied) top score"; - $aTypeCurrency[4] = "champion points"; + $aTypeCurrency[ACHIEVEMENT_MOVES_CAREER] = "total moves mazed"; + $aTypeCurrency[ACHIEVEMENT_MAZE_CAREER] = "mazes played"; + $aTypeCurrency[ACHIEVEMENT_MAZE_MASTERY] = "mazes with (tied) top score"; + $aTypeCurrency[ACHIEVEMENT_CHAMPION_POINTS] = "champion points"; + $aTypeCurrency[ACHIEVEMENT_PERFECT_DAY] = "total times you've tied all 4 maps"; $aName = $aTypeNames[$aType]; $currency = $aTypeCurrency[$aType]; @@ -79,8 +78,6 @@ function getNotified($userID) { } - - // Item ID List $aIDList[] = "'$aID'"; } diff --git a/pages/achievements.php b/pages/achievements.php index a5e56ed..383de70 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -491,8 +491,7 @@ foreach($achievements as $aType => $a) { $aCompleted = $a['dateCompleted'];
$aCompleted = relative_date(strtotime($aCompleted));
- if (!isset($uStats[$aType]))
- $uStats[$aType] = getAchievementCurrency($userID, $aType);
+ if (!isset($uStats[$aType])) $uStats[$aType] = getAchievementCurrency($userID, $aType);
$uStats[$aType] = str_replace(",", "", $uStats[$aType]);
|