summaryrefslogtreecommitdiffstats
path: root/includes/datas.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/datas.php')
-rw-r--r--includes/datas.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/includes/datas.php b/includes/datas.php
index 6bf04d6..2985853 100644
--- a/includes/datas.php
+++ b/includes/datas.php
@@ -509,8 +509,7 @@ function applyAchievements($userID, $aType) {
//Is there a next level for this?
$aNextLevel = $aLevel + 1;
- if (!isset($aArray[$aNextLevel]))
- return false;
+ if (!isset($aArray[$aNextLevel])) return false;
list($required, $unlockType, $unlockValue, $unlockName, $unlockSubtype) = $aArray[$aNextLevel];
if ($amount < $required) return false;
@@ -800,8 +799,8 @@ function getMembers($pageNumber = 1, $pageDivide = 50, $order = 'DESC', $orderBy
$row['dateJoined'] = Date("Y-m-d", strtotime($row['dateJoined']));
$row['dateLogin'] = Date("Y-m-d", strtotime($row['dateLogin']));
- $scoredDate = strtotime($row['cdate']);
- $secondsSinceScored = strtotime("now") - $scoredDate ;
+ //$scoredDate = strtotime($row['cdate']);
+ //$secondsSinceScored = strtotime("now") - $scoredDate ;
//Alternate background colors
$background = '#262631';
@@ -814,7 +813,7 @@ function getMembers($pageNumber = 1, $pageDivide = 50, $order = 'DESC', $orderBy
}
$output['users'][$i] = $row;
- $output['users'][$i]['secondsSinceScored'] = $secondsSinceScored;
+ //$output['users'][$i]['secondsSinceScored'] = $secondsSinceScored;
$output['users'][$i]['background'] = $background;
$output['users'][$i]['isUser'] = $userPosition == $i;
} // END WHILE
@@ -846,7 +845,9 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) {
$pageReqEnd = $tmp[1];
}
- $userID = $_SESSION['userID'];
+ $userID = 0;
+ if (isset($_SESSION['userID'])) $userID = $_SESSION['userID'];
+
$myBestMoves = 0;
if ($isBlindMap) {
$sql = "SELECT `moves` FROM `solutions` WHERE `mapID` = '$mapID' AND `userID` = '$userID'";
@@ -904,7 +905,7 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) {
$output['bestBy'] = $row['display'];
}
- if ($_SESSION['userID'] == $requestedUserID) {
+ if (isset($_SESSION['userID']) AND $_SESSION['userID'] == $requestedUserID) {
$userPosition = $i;
//$myBestMoves = $moves;
} else {