From 79d928cd42c32122edd47d1a450fb0c4ced3de2f Mon Sep 17 00:00:00 2001 From: raylu Date: Wed, 18 Jul 2012 01:45:55 -0700 Subject: fix lots of warnings, whitespace --- includes/maps.php | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'includes/maps.php') diff --git a/includes/maps.php b/includes/maps.php index 4618ff8..16aa35c 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -109,7 +109,7 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $jsonmap = str_replace("'", "\'", json_encode($mapdata)); //This works in chrome, not sure about others. - $preloaddiv .= " + $preloaddiv = "
@@ -134,16 +134,20 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $maptable
"; - - - $prefSpeed = $_COOKIE['pref_speed']; - $speedOption['Slow'] = 1; - $speedOption['Med'] = 2; - $speedOption['Fast'] = 3; - $speedOption['Ultra'] = 4; - if (!in_array($prefSpeed, $speedOption)) + + + if (isset($_COOKIE['pref_speed'])) { + $prefSpeed = $_COOKIE['pref_speed']; + $speedOption['Slow'] = 1; + $speedOption['Med'] = 2; + $speedOption['Fast'] = 3; + $speedOption['Ultra'] = 4; + if (!in_array($prefSpeed, $speedOption)) + $prefSpeed = '2'; + } else $prefSpeed = '2'; + $rOption = ''; foreach ($speedOption as $key => $value) { $rOption .= "