From f9333b70547ae514ecc848fb195011a11897ee68 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Mon, 2 May 2011 22:52:56 -0700 Subject: Improved map validation. --- pages/home.php | 94 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 41 deletions(-) (limited to 'pages/home.php') diff --git a/pages/home.php b/pages/home.php index a6d73d6..d905476 100644 --- a/pages/home.php +++ b/pages/home.php @@ -11,26 +11,70 @@ include('./includes/mapoftheday.php'); include('./includes/datas.php'); + + +//Get the current day as int. +$numday = date('w'); +$numday = intval($numday); +switch ($numday) { + case 0: + $mapstyle = 'Thirty'; + break; + case 1: + $mapstyle = 'Simple'; + break; + case 2: + $mapstyle = "ABC's"; + break; + case 3: + $mapstyle = 'Teleport Madness'; + break; + case 4: + $mapstyle = 'Rocky Maze'; + break; + case 5: //Friday + $mapstyle = 'Side to Side'; + break; + case 6: //Saturday + $mapstyle = "Seeing Double"; + break; +} + +$normal = 'Normal'; +$easy = 'Simple'; +$hard = 'Complex'; + +$today = date('l'); +//if ($today == 'Sunday' OR $today == 'Saturday') + //$today = 'Weekend Map'; +//else + $today .= "'s"; +$special = "$today $mapstyle"; + switch ($_GET['maptype']) { case "normal": case "2": $maptype = 2; + $normal = 'Normal'; break; case "hard": case "3": $maptype = 3; + $hard = 'Complex'; break; case "day": case "4": $maptype = 4; + $special = "$special"; break; case "easy": case "1": default: $maptype = 1; + $easy = 'Simple'; } //$motd = getMapOfTheDay(); @@ -58,15 +102,14 @@ $mergesolution = $map;
- I'm testing letting the path go over the START and FINISH tiles. -
Have an opinion about this? Let me know! + Some very exciting changes to be expected April 23rd!

New maps are generated daily at 9:00 PM Pacific Time.
Maps for : -
Simple -
Normal -
Complex -
Today's Special +
+
+
+

@@ -85,42 +128,11 @@ if ($_SESSION['accepted'] != 1) { echo "
"; -//Get the current day as int. -$numday = date('w'); -$numday = intval($numday); -switch ($numday) { - case 0: - $mapstyle = 'Thirty'; - break; - case 1: - $mapstyle = 'Simple'; - break; - case 2: - $mapstyle = "ABC's"; - break; - case 3: - $mapstyle = 'Teleport Madness'; - break; - case 4: - $mapstyle = 'Rocky Maze'; - break; - case 5: //Friday - $mapstyle = 'Side to Side'; - break; - case 6: //Saturday - $mapstyle = "Seeing Double"; - break; -} -echo "
$date
Simple | "; -echo "Normal | "; -echo "Complex | "; -$today = date('l'); -//if ($today == 'Sunday' OR $today == 'Saturday') - //$today = 'Weekend Map'; -//else - $today .= "'s"; -echo " NEW: $today $mapstyle"; +echo "
$date
$easy | "; +echo "$normal | "; +echo "$hard | "; +echo "$special"; echo DisplayMap($mergesolution, $mapID); -- cgit v1.2.3