summaryrefslogtreecommitdiffstats
path: root/pages/home.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2012-11-26 22:01:24 -0800
committerPatrick Davison <snapwilliam@gmail.com>2012-11-26 22:01:24 -0800
commit83c2807460fb3972c64a0f8203d15645de595b87 (patch)
tree84d5059364385877469db41ea1679722dde2dcdc /pages/home.php
parent4b470911a5086ab9d2b648a134e447524b2f4747 (diff)
downloadpathery-83c2807460fb3972c64a0f8203d15645de595b87.tar.xz
Prep for push to the main server.
Some future proofing changes, and some changes for the sake of change.
Diffstat (limited to 'pages/home.php')
-rw-r--r--pages/home.php76
1 files changed, 39 insertions, 37 deletions
diff --git a/pages/home.php b/pages/home.php
index 50d3952..ad9f74e 100644
--- a/pages/home.php
+++ b/pages/home.php
@@ -108,9 +108,10 @@ topbar($Links);
<div class="wrapper">
-<center>Site update complete!
-<br />If you find any problems/bugs please report them using our <a href='feedback'>Feedback Page</a>
-<br />Thank you!!
+<center>DATE HERE. Update complete! This update made several changes to allow for some new upcoming features.
+<br />If you find any bugs please let us know using the <a href='feedback'>Feedback Page</a>!
+<br />Thank you so much!
+
<br /><br />
</center>
@@ -121,7 +122,8 @@ if ($accepted) {
echo "<table><tr><td style='background-color:#4444ff;' class='grid_td_rocks'></td></tr></table></center><br />";
}
}
-
+
+// 3 Main maps
$motd = MapOfTheDay(1);
$jmid[1] = $motd['id'];
$mapContent = displayMaze($motd, 1);
@@ -134,35 +136,39 @@ $motd = MapOfTheDay(3);
$jmid[3] = $motd['id'];
$mapContent .= displayMaze($motd, 3);
+$mapNames[1] = 'Simple';
+$mapNames[2] = 'Normal';
+$mapNames[3] = 'Complex';
+
+// Additional or special maps:
+
$motd = MapOfTheDay(4);
$jmid[4] = $motd['id'];
$mapContent .= displayMaze($motd, 4);
-$special = $motd['map'][0][6];
-if ($special == '') {
- $special = 'Special';
+$mapNames[4] = $motd['map'][0][6];
+if ($mapNames[4] == '') {
+ $mapNames[4] = 'Special';
}
-$motd = MapOfTheDay(5);
-$jmid[5] = $motd['id'];
-$mapContent .= displayMaze($motd, 5);
-
-$special2 = $motd['map'][0][6];
-if ($special2 == '') {
- $special2 = 'Special';
+// $motd = MapOfTheDay(5);
+// $jmid[5] = $motd['id'];
+// $mapContent .= displayMaze($motd, 5);
+// $special2 = $motd['map'][0][6];
+// if ($special2 == '') {
+ // $special2 = 'Special';
+// }
+
+echo ' <div id="difficulties">';
+foreach ($mapNames as $key => $value) {
+ echo " <a href='javascript:showStats($key)' id='dl-$key'>$value</a>\n";
}
+echo '
+ </div>
+ <div style="clear: both"></div>';
?>
- <div id="difficulties">
- <a href="javascript:showStats(1)" id="dl-1">Simple</a>
- <a href="javascript:showStats(2)" id="dl-2">Normal</a>
- <a href="javascript:showStats(3)" id="dl-3">Complex</a>
- <a href="javascript:showStats(4)" id="dl-4"><? echo $special; ?></a>
- <a href="javascript:showStats(5)" id="dl-5"><? echo $special2; ?></a>
- </div>
- <div style="clear: both"></div>
-
<noscript>Sorry, this game requires scripts to run. Please enable javascript and <a href='home'>Reload this site</a>
<br />This game is best viewed in <a href='http://www.google.com/chrome'>Google Chrome</a>
</noscript>
@@ -292,8 +298,17 @@ $timerem = strtotime("tomorrow") - strtotime("now");
<script>
+
+var jmid=new Array();
+<?
+ echo " jmid[0] = '1';\n";
+ foreach ($jmid as $key => $value) {
+ echo "jmid[$key] = '$value';\n";
+ }
+?>
+
function showStats(type) {
- for (var i = 1; i <= 5; i++) {
+ for (var i = 1; i < jmid.length; i++) {
var elem = document.getElementById("yms-" + i);
elem.className = elem.className.replace('shown-maps', 'hidden-maps');
elem = document.getElementById("dl-" + i);
@@ -305,24 +320,11 @@ function showStats(type) {
if (elem.className.indexOf('selected') < 0)
elem.className += 'selected';
-
- var jmid=new Array();
- <?
- echo "
- jmid[0] = '1';
- jmid[1] = '$jmid[1]';
- jmid[2] = '$jmid[2]';
- jmid[3] = '$jmid[3]';
- jmid[4] = '$jmid[4]';
- jmid[5] = '$jmid[5]';
- ";
- ?>
scoresRequestPage(jmid[type], currentPage[jmid[type]]);
}
showStats(1);
</script>
-
<?
//<script src="sounds/script/soundmanager.js"></script>
//<script type="text/javascript">soundManagerInit();</script>