diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-01-08 01:53:05 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-01-08 01:53:05 -0800 |
commit | 6b8c58ac2d4de502421acef48f4434bee605633f (patch) | |
tree | b6ed4553388d0058952a987734a317ecfaea13f9 /includes/maps.php | |
parent | a431308aa3c6c698d23b45bf5e1f905123e0cba5 (diff) | |
download | pathery-6b8c58ac2d4de502421acef48f4434bee605633f.tar.xz |
Challenges Implementation. LOTS of stuff
Fixed an issue with loading best solution from logged out to logged in state.
Commented out a lot of firephp stuff; feel free to uncomment.
Diffstat (limited to 'includes/maps.php')
-rw-r--r-- | includes/maps.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/maps.php b/includes/maps.php index 431f006..1df258d 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -726,6 +726,19 @@ function getSolution($userID, $mapID) { }
}
+function getChallengeSolution($userID, $challengeID) {
+ include_once('db.inc.php');
+ $sql = "SELECT `solution`, `moves`
+ FROM `challengeSolutions`
+ WHERE `userID` = '$userID' AND
+ `challengeID` = '$challengeID'
+ ";
+ $result = mysql_query($sql);
+ if (mysql_num_rows($result) > 0) {
+ return mysql_fetch_assoc($result);
+ }
+}
+
function getMapCode($mapID) {
include_once('db.inc.php');
$sql = "SELECT `code`
|