From 8cca6464769d0b04940eda519594ecbd4804c878 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 4 Jul 2012 18:42:21 -0700 Subject: Error when MapID's weren't in order. --- pages/home.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pages/home.php b/pages/home.php index 45911c5..9311b62 100644 --- a/pages/home.php +++ b/pages/home.php @@ -109,15 +109,19 @@ if ($_SESSION['accepted'] == 1) { } $motd = MapOfTheDay(1); +$jmid[1] = $motd['id']; $mapContent .= displayMaze($motd, 1); $motd = MapOfTheDay(2); +$jmid[2] = $motd['id']; $mapContent .= displayMaze($motd, 2); $motd = MapOfTheDay(3); +$jmid[3] = $motd['id']; $mapContent .= displayMaze($motd, 3); $motd = MapOfTheDay(4); +$jmid[4] = $motd['id']; $mapContent .= displayMaze($motd, 4); $special = $motd['map'][0][6]; @@ -246,7 +250,7 @@ $timerem = strtotime("tomorrow") - strtotime("now");
- Copyright © 2011 pathery.com + Copyright © 2011-2012 pathery.com
@@ -265,12 +269,18 @@ function showStats(type) { if (elem.className.indexOf('selected') < 0) elem.className += 'selected'; - var x = 0; - for(var mapid in jsonmapdata) { - x++; - if (x == type) - updateScoresReq(mapid, type); - } + + var jmid=new Array(); + + updateScoresReq(jmid[type], type); } showStats(1); -- cgit v1.2.3