diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2012-07-04 18:42:21 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2012-07-04 18:42:21 -0700 |
commit | 8cca6464769d0b04940eda519594ecbd4804c878 (patch) | |
tree | c52e3ed9f9e432de73e4fc82f7ffa03c08bb5717 /pages/home.php | |
parent | edb1f4588d22d9648d8585511cb759cab6f88c20 (diff) | |
download | pathery-8cca6464769d0b04940eda519594ecbd4804c878.tar.xz |
Error when MapID's weren't in order.
Diffstat (limited to 'pages/home.php')
-rw-r--r-- | pages/home.php | 24 |
1 files 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"); <div id="copy" style='width:100%;clear: both'>
- Copyright © 2011 pathery.com
+ Copyright © 2011-2012 pathery.com
</div>
@@ -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();
+ <?
+ echo "
+ jmid[0] = '1';
+ jmid[1] = '$jmid[1]';
+ jmid[2] = '$jmid[2]';
+ jmid[3] = '$jmid[3]';
+ jmid[4] = '$jmid[4]';
+ ";
+ ?>
+ updateScoresReq(jmid[type], type);
}
showStats(1);
</script>
|