diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/embed.php | 113 | ||||
-rw-r--r-- | pages/gallery.php | 47 | ||||
-rw-r--r-- | pages/tutorial.php | 116 |
3 files changed, 276 insertions, 0 deletions
diff --git a/pages/embed.php b/pages/embed.php new file mode 100644 index 0000000..4c1ca68 --- /dev/null +++ b/pages/embed.php @@ -0,0 +1,113 @@ +<?PHP
+htmlHeader();
+?>
+
+<body>
+<script type="text/javascript" src="sounds/script/soundmanager.js"></script>
+
+<?php
+include('./includes/maps.php');
+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 = '<b>Normal</b>';
+ break;
+
+ case "hard":
+ case "3":
+ $maptype = 3;
+ $hard = '<b>Complex</b>';
+ break;
+
+ case "day":
+ case "4":
+ $maptype = 4;
+ $special = "<b>$special</b>";
+ break;
+
+ case "easy":
+ case "1":
+ default:
+ $maptype = 1;
+ $easy = '<b>Simple</b>';
+}
+
+$motd = MapOfTheDay($maptype);
+$mapID = $motd['id'];
+$map = $motd['map'];
+$userID = $_SESSION['userID'];
+$date = date("m-d-y");
+//$mergesolution = mergeMapSolution($map, $mysolution);
+$topscores = topScores($motd['id'], 30);
+$topscorediv = "<div id='$mapID,dspScore'>\n$topscores\n</div>";
+$mergesolution = $map;
+
+?>
+<div class="col2" style="text-align: center">
+<?
+echo "$date: <a href='?page=embed&maptype=easy'>Easy</a> | ";
+echo "<a href='?page=embed&maptype=normal'>Normal</a> | ";
+echo "<a href='?page=embed&maptype=hard'>Hard</a> | ";
+echo "<a href='?page=embed&maptype=day'>Special</a>";
+
+echo DisplayMap($mergesolution, $mapID);
+
+$mysolution = getSolution($userID, $mapID);
+$solutiondiv .= "<div id='mapsol' style='visibility:hidden;display:none'>";
+//$solutiondiv .= "<div id='mapsol'>";
+$solutiondiv .= $mapID.":".$mysolution;
+$solutiondiv .= '</div>';
+
+echo $solutiondiv;
+?>
+<a href="http://www.pathery.com">www.pathery.com</a>
+</div>
+<script type="text/javascript">soundManagerInit();</script>
+
+</body>
+</html>
diff --git a/pages/gallery.php b/pages/gallery.php index 68c17ae..259ac2a 100644 --- a/pages/gallery.php +++ b/pages/gallery.php @@ -79,7 +79,54 @@ $map = GenerateMap( weight(3,3,3,4) //Teleports ); +//ABC's +$map = GenerateMap( + 19, 11, 12 , //width, height, rocks + weight(20,21,22,22,23) , //Walls + weight(3) , //Checkpoints + weight(0) //Teleports +); + +//Ultra Complex +$map = GenerateMap( + 18, 16, 12 , //width, height, rocks + weight(16,17,18,18) , //Walls + weight(5) , //Checkpoints + weight(5) //Teleports +); +//Tall tall map +$map = GenerateMap( + 18, 14, 20 , //width, height, rocks + weight(30) , //Walls + weight(1) , //Checkpoints + weight(1) //Teleports +); +//Thirty +$map = GenerateMap( + 18, 14, 20 , //width, height, rocks + weight(30) , //Walls + weight(1) , //Checkpoints + weight(1) //Teleports +); +//Simple +$map = GenerateMap( + 18, 9, 7 , //width, height, rocks + weight(15,16,17) , //Walls + weight(0) , //Checkpoints + weight(0) //Teleports +); +//huge +$map = GenerateMap( + 75, 20, 7 , //width, height, rocks + weight(100) , //Walls + weight(5) , //Checkpoints + weight(4) //Teleports +); +$a[0] = 't'; +$a[1] = 't'; +$a['1'] = 'hi'; +echo $a[1]; $mapdisplay = DisplayMap($map); $code = GenerateMapCode($map); diff --git a/pages/tutorial.php b/pages/tutorial.php new file mode 100644 index 0000000..3ce0d06 --- /dev/null +++ b/pages/tutorial.php @@ -0,0 +1,116 @@ +<?PHP
+htmlHeader();
+?>
+<body>
+<?php
+topbar($Links);
+?>
+
+<script type="text/javascript" src="sounds/script/soundmanager.js"></script>
+
+<?
+$requiredmoves = '18';
+?>
+
+<script type="text/javascript">
+ischallenge = true;
+
+function challengecomplete(mapid) {
+ var moves = mapjson[mapid].moves;
+
+ if (moves == <? echo $requiredmoves; ?>) {
+ flashelement('nextbtn', 15, null, 400);
+ updateDsp(1, 'instructions', 'Great Job!<br />Lets move on to the next shall we?')
+ } else {
+ //challengehint();
+ updateDsp(1, 'instructions', 'Place some walls<br />What would make it travel the longest?')
+ flashelement('1,instructions', 2, '#cce', 700);
+ setTimeout("flashelement('1,3,5', 10, '#cce', 760);", 1500);
+ setTimeout("flashelement('1,4,6', 10, '#cce', 760);", 1500);
+ }
+}
+
+function challengehint() {
+ //setTimeout("flashelement('1,3,5', 10, '#cce', 620);", 100);
+ //setTimeout("flashelement('1,4,6', 10, '#cce', 620);", 100);
+ setTimeout("flashelement('1,btn', 6, '#ee4', 620);", 1500);
+ setTimeout("flashelement('1,instructions', 3, '#cce', 620);", 700);
+ //updateDsp(mapid, element, data) {
+}
+
+
+</script>
+
+<?php
+include('./includes/maps.php');
+
+include('./includes/datas.php');
+
+
+?>
+<div class="col2" style="text-align: center">
+<br /> <br />
+<strong><p id='1,instructions'>
+Press GO!
+<br />
+</p>
+</strong>
+<br />
+<?
+echo "<a href='#'>Previous</a> | <a href='#' id='nextbtn'>Next</a> ";
+
+$challenge1[] = "sooraooof";
+$challenge1[] = "sooorooof";
+$challenge1[] = "sooooooof";
+$challenge1[] = "sooooooof";
+$challenge1[] = "sooooooof";
+
+$myparams['checkpoints'] = 1;
+$myparams['teleports'] = 0;
+$myparams['walls'] = 2;
+
+$map1 = GenerateShapedMap($challenge1, $myparams);
+
+$challenge2[] = "soooraoof";
+$challenge2[] = "sooooroof";
+$challenge2[] = "sooooooof";
+$challenge2[] = "sooroooof";
+$challenge2[] = "soobrooof";
+
+$myparams['checkpoints'] = 2;
+$myparams['teleports'] = 0;
+$myparams['walls'] = 4;
+
+$map2 = GenerateShapedMap($challenge2, $myparams);
+
+$challenge3[] = "soooraoof";
+$challenge3[] = "sooooroof";
+$challenge3[] = "sooooooof";
+$challenge3[] = "sooroooof";
+$challenge3[] = "soobrooof";
+
+$myparams['checkpoints'] = 1;
+$myparams['teleports'] = 0;
+$myparams['walls'] = 4;
+
+$map3 = GenerateShapedMap($challenge3, $myparams);
+
+echo DisplayMap($map1, 1);
+echo "<br />";
+echo "<br /><center>map2</center>";
+echo "<br />";
+//echo DisplayMap($map2, 2);
+
+//$mysolution = getSolution($userID, $mapID);
+//$solutiondiv .= "<div id='mapsol' style='visibility:hidden;display:none'>";
+//$solutiondiv .= "<div id='mapsol'>";
+//$solutiondiv .= $mapID.":".$mysolution;
+//$solutiondiv .= '</div>';
+
+//echo $solutiondiv;
+?>
+</div>
+<script type="text/javascript">soundManagerInit();</script>
+
+</body>
+</html>
|