From 6b8c58ac2d4de502421acef48f4434bee605633f Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 8 Jan 2013 01:53:05 -0800 Subject: 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. --- pages/challenge.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'pages/challenge.php') diff --git a/pages/challenge.php b/pages/challenge.php index 2ab279d..8d312d1 100644 --- a/pages/challenge.php +++ b/pages/challenge.php @@ -1,5 +1,4 @@ -
- Copyright © 2011-2012 pathery.com -
@@ -135,13 +134,15 @@ function displayChallenges($challengeResultset) echo '
    '; while($challenge = mysql_fetch_array($challengeResultset)) { + $mapID = $_GET["mapID"]; $challengeId = $challenge["challengeID"]; echo "
  1. "; if($challenge["dateSolved"] !== NULL) $cssClass = "challenge_complete"; else $cssClass = "challenge_incomplete"; - echo "" . getChallengeDisplayString($challenge) . ""; + $loadSolutionString = " Load this solution"; + echo "" . getChallengeDisplayString($challenge) . " $loadSolutionString "; echo "
  2. "; } echo "
"; @@ -157,7 +158,7 @@ function getChallengeDisplayString($challenge) if($challenge["goal"] == 0) $returnMe .= "Complete the maze"; else if ($challenge['inequality'] == "greater than") - $returnMe .= "Get " . $challenge['goal']; + $returnMe .= "Get " . $challenge['goal'] . ' or more'; else if ($challenge['inequality'] == "less than") $returnMe .= "Get LESS THAN " . $challenge['goal']; else //inequality == "equal" @@ -169,7 +170,7 @@ function getChallengeDisplayString($challenge) //Wall-count restriction if($challenge['restrictWallCount'] !== NULL) { - $restrictions[] = "at most " . $challenge['restrictWallCount'] . " wall" . ($challenge['restrictWallCount'] == 1 ? "" : "s"); + $restrictions[] = "only " . $challenge['restrictWallCount'] . " wall" . ($challenge['restrictWallCount'] == 1 ? "" : "s"); $addUsingToText = true; } -- cgit v1.2.3