From 16567167343024754247818e92115ed83255ed0d Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 8 Jan 2013 22:47:13 -0800 Subject: Map class and Challenges The mapclass should eventually replace the current mapmatrix array w/ headers. Work on challenges progresses nicely --- pages/challengelist.php | 29 ++++++++++++++++++++++++----- pages/gallery.php | 26 ++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 5 deletions(-) (limited to 'pages') diff --git a/pages/challengelist.php b/pages/challengelist.php index 03dfdb3..eb9993d 100644 --- a/pages/challengelist.php +++ b/pages/challengelist.php @@ -8,17 +8,20 @@ include_once ('./includes/maps.php'); include_once ('./includes/mapoftheday.php'); include_once ('./includes/db.inc.php'); include_once ('./includes/datas.php'); +include_once ('./includes/mapclass.php'); topbar($Links); ?> +
Please login to do the challenges!
"; + echo "
Please login to do the challenges!
"; + echo "

"; htmlFooter(); return; } @@ -42,6 +45,7 @@ $challengeListResultset = loadChallengeListing($userID); displayChallengeList($challengeListResultset); ?> + '; $currentTier = -1; $currentMap = -1; + while($challenge = mysql_fetch_array($challengeListResultset)) { //Each challenge gets its own header/table + // echo "
L: $currentTier
N: "; + // echo $challenge["challengeTier"]; + // echo "
"; if($challenge["challengeTier"] != $currentTier) { if($currentTier >= 0) { - echo ''; + echo 'EndTier'; } $currentTier = $challenge["challengeTier"]; echo "
Tier $currentTier
"; - echo ""; + echo "
\n"; } //Each map gets it own row @@ -79,10 +87,20 @@ function displayChallengeList($challengeListResultset) echo ''; } $currentMap = $challenge["mapID"]; - $mapName = $challenge["name"]; + + $mapCode = getMapCode($currentMap); + $map = new map($mapCode); + $thumbnail = DisplayMapThumbnail($map); + + $mapName = $map->name; if($mapName == NULL || $mapName == "") $mapName = "(unknown)"; - echo ""; + + echo " + "; echo "
"; } @@ -94,5 +112,6 @@ function displayChallengeList($challengeListResultset) echo "
"; } echo "
"; + echo ""; } ?> \ No newline at end of file diff --git a/pages/gallery.php b/pages/gallery.php index 9df059a..f8e1b9d 100644 --- a/pages/gallery.php +++ b/pages/gallery.php @@ -54,6 +54,32 @@ $myparams['name'] = 'Round and Round'; $map = GenerateShapedMap($spin, $myparams); +include('./includes/mapclass.php'); + +$mapCode = GenerateMapCode($map); +echo $mapCode; +echo "
"; +echo "
"; + +$mapClass = new map($mapCode); +echo DisplayMapThumbnail($mapClass); + +echo "
"; +echo "
"; +echo $mapClass->width; +echo "
"; +echo $mapClass; +echo "
"; +echo "
"; +var_dump($mapClass); +echo "
"; +echo TileStart; +echo TileFinish; +echo "
"; + +exit; + + echo DisplayMap($map, 2); //addNewChallengeMap($map, 0, 0, 'Round and Round'); -- cgit v1.2.3