diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/about.php | 41 | ||||
-rw-r--r-- | pages/admin.php | 8 | ||||
-rw-r--r-- | pages/faq.php | 31 | ||||
-rw-r--r-- | pages/home.php | 179 | ||||
-rw-r--r-- | pages/howtoplay.php | 165 | ||||
-rw-r--r-- | pages/leaderboard.php | 39 |
6 files changed, 208 insertions, 255 deletions
diff --git a/pages/about.php b/pages/about.php index eb1ada8..4328014 100644 --- a/pages/about.php +++ b/pages/about.php @@ -5,28 +5,25 @@ htmlHeader(); <body>
<?php
topbar($Links);
-
-echo "<br />";
-echo "<br />";
-
?>
-<center>
-<br />Email us: <a href='mailto:snapems@gmail.com'>snapems@gmail.com</a>
-<br />
-<h3>Created by:</h3> <span title='AKA Snap'>Patrick Davison</span> and <span title='Goes by "Rex"'>Rex Ounekeo</span>
-<br />
-<h3>Special thanks:</h3>
-<h4>Programmers:</h4>
-raylu
-<h4>Testers:</h4>
-Steven Gosling
-<br />Patrick's Family
-<br />Josh
-<br />Rory Matthias Quentin Maison
-<br />Matt
-<br />
-</center>
+<div class="wrapper">
+ Email us: <a href='mailto:snapems@gmail.com'>snapems@gmail.com</a>
+ <br />
+ <h3>Created by:</h3>
+ Patrick Davison (Snap) and Rex Ounekeo
+
+ <h3>Special thanks:</h3>
+ <h4>Programmers:</h4>
+ raylu
+ <h4>Testers:</h4>
+ Steven Gosling
+ <br />Patrick's Family
+ <br />Josh
+ <br />Rory Matthias Quentin Maison
+ <br />Matt
+</div>
-</body>
-</html>
+<?php
+htmlFooter();
+?>
diff --git a/pages/admin.php b/pages/admin.php index b4e53be..d825ebc 100644 --- a/pages/admin.php +++ b/pages/admin.php @@ -1,4 +1,4 @@ -<?PHP
+<?php
htmlHeader();
?>
@@ -225,9 +225,5 @@ function createThumbnail($mapMatrix, $idprefix, $width, $height) { return $output;
}
-
-
-
+htmlFooter();
?>
-</body>
-</html>
diff --git a/pages/faq.php b/pages/faq.php index 9bac845..302a7f8 100644 --- a/pages/faq.php +++ b/pages/faq.php @@ -1,43 +1,32 @@ -<?PHP
+<?php
htmlHeader();
?>
<body>
<?php
topbar($Links);
-
?>
+<div class="wrapper">
<h2>Questions and Answers</h2>
</br >
<h3>Can you explain how the pathing works?</h3>
-The pathing trys to find the best route possible.
+The pathing tries to find the best route possible.
In open areas there's lots of identical paths for it to take;
To choose which path it will go it follows these priorities:
<b> UP, RIGHT, DOWN, LEFT.</b>
-This means that the path will go UP as far as it can first- then, right, down, left.
+This means that the path will go UP as far as it can first – then right, down, left.
<br />If the path is going to the TOP RIGHT from the BOTTOM LEFT, the path will go UP all the way to the top, then RIGHT.
<br />If the path is going to the BOTTOM LEFT, from the TOP RIGHT, the path will go all the way DOWN and then LEFT.
<br />TOP LEFT, from BOTTOM RIGHT, UP, then LEFT.
<br />So, BOTTOM LEFT, from TOP RIGHT? If you answer "DOWN then LEFT" you are correct!
-<br />If you answered "uhhmm.. What's up with the directions in caps." then you get a bonus point!
-<br />Remember, teleports are Traps, and does not effect the path choice.
-<br />
-<br />
-<h3>Why use Google to sign in?</h3>
-'OpenID' allows websites to use 3rd party servers to identify you.
-<br />We ask Google for your E-mail address, which you have to approve.
-<br />Basically, we send you to Google, and ask who you are, (You're not a robot, right?)
-<br />Google responds saying they know you, and gives me a code to identify you with, if you login again.
-<br />Many sites have started adopting this method of registration/login due to the safety it provides,
-not just for me, but for YOU.
-<br />There's no chance I can leak a password, because I never recieve one. - Plus you don't have to make up/remember another password.
-
-
+<br />If you answered "uhhmm.. what's up with the directions in caps?" then you get a bonus point!
+<br />Remember, teleports are traps and do not effect the path choice.
+</div>
-
-</body>
-</html>
\ No newline at end of file +<?php
+htmlFooter();
+?>
diff --git a/pages/home.php b/pages/home.php index 8bd7d11..044fc5f 100644 --- a/pages/home.php +++ b/pages/home.php @@ -1,10 +1,8 @@ <?PHP
-htmlHeader();
+htmlHeader(array('stats'));
?>
<body>
-<script type="text/javascript" src="sounds/script/soundmanager.js"></script>
-
<?php
include('./includes/maps.php');
include('./includes/mapoftheday.php');
@@ -16,63 +14,57 @@ $numday = date('w'); $numday = intval($numday);
switch ($numday) {
case 0:
- $mapstyle = 'Thirty';
- break;
+ $mapstyle = 'Thirty';
+ break;
case 1:
- $mapstyle = 'Simple';
- break;
+ $mapstyle = 'Simple';
+ break;
case 2:
- $mapstyle = "ABC's";
- break;
+ $mapstyle = "ABC's";
+ break;
case 3:
- $mapstyle = 'Teleport Madness';
- break;
+ $mapstyle = 'Teleport Madness';
+ break;
case 4:
- $mapstyle = 'Rocky Maze';
- break;
+ $mapstyle = 'Rocky Maze';
+ break;
case 5: //Friday
- $mapstyle = 'Side to Side';
- break;
+ $mapstyle = 'Side to Side';
+ break;
case 6: //Saturday
- $mapstyle = "Seeing Double";
- break;
+ $mapstyle = "Seeing Double";
+ break;
}
-$normal = 'Normal';
-$easy = 'Simple';
-$hard = 'Complex';
+$easy = '<a href="?page=home&maptype=easy">Simple</a>';
+$normal = '<a href="?page=home&maptype=normal">Normal</a>';
+$hard = '<a href="?page=home&maptype=hard">Complex</a>';
-$today = date('l');
-//if ($today == 'Sunday' OR $today == 'Saturday')
- //$today = 'Weekend Map';
-//else
- $today .= "'s";
-$special = "$today $mapstyle";
+$today = date('l') . "'s";
+$special = "<a href=\"?page=home&maptype=day\">$today $mapstyle</a>";
switch ($_GET['maptype']) {
+ case "easy":
+ case "1":
+ default:
+ $maptype = 1;
+ $easy = '<a href="?page=home&maptype=easy" class="selected">Simple</a>';
+ break;
case "normal":
case "2":
- $maptype = 2;
- $normal = '<b>Normal</b>';
- break;
-
+ $maptype = 2;
+ $normal = '<a href="?page=home&maptype=normal" class="selected">Normal</a>';
+ break;
case "hard":
case "3":
- $maptype = 3;
- $hard = '<b>Complex</b>';
- break;
-
+ $maptype = 3;
+ $hard = '<a href="?page=home&maptype=hard" class="selected">Complex</a>';
+ break;
case "day":
case "4":
- $maptype = 4;
- $special = "<b>$special</b>";
- break;
-
- case "easy":
- case "1":
- default:
- $maptype = 1;
- $easy = '<b>Simple</b>';
+ $maptype = 4;
+ $special = "<a href=\"?page=home&maptype=day\" class=\"selected\">$today $mapstyle</a>";
+ break;
}
//$motd = getMapOfTheDay();
@@ -83,7 +75,6 @@ topbar($Links); $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>";
@@ -91,89 +82,39 @@ $mergesolution = $map; ?>
-<br>
-<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com/pages/Pathery/176985129018434&layout=button_count&show_faces=false&width=90&action=like&font&colorscheme=dark&height=21" style="border:none; overflow:hidden; width:95px; height:21px; float:right"></iframe>
-
-<div class="col1">
- <p>
- <strong>News:</strong><br>
- <strong>We've moved to pathery.com</strong> (look up, you're already there)! You'll need to re-login with Google.
- <br />Don't worry – we've saved all your solutions and history (soon you'll even be able to see them! hehe).
- </p>
- <p>Maps for <?php echo "$date" ?>:
- <br><a href='?page=home&maptype=easy'><? echo $easy; ?></a>
- <br><a href='?page=home&maptype=normal'><? echo $normal; ?></a>
- <br><a href='?page=home&maptype=hard'><? echo $hard; ?></a>
- <br><a href='?page=home&maptype=day'><? echo $special; ?></a>
- </p>
- <p>
- New maps are generated daily at 9:00 PM Pacific Time.
- <br>
- </p>
-
- <? echo $topscorediv; ?>
-</div>
-
-<div class="col2" style="text-align: center">
-<?
-if ($_SESSION['accepted'] != 1) {
- ?>
- New? Check out <a href='?page=howtoplay'>How to Play</a>
- <br /><span style="background-color: #444; font-weight: bold">
- The object of the game is to make the longest maze.</span>
- <br /><a href='?page=login'>Sign in using Google</a> to have your best solution saved.
+<div class="wrapper">
<?
-} else
- echo "<br />";
-
+ echo "<div id='difficulties'>";
+ echo "$easy";
+ echo "$normal";
+ echo "$hard";
+ echo "$special";
+ echo "</div>";
-
-echo "<br />$date<br /><a href='?page=home&maptype=easy'>$easy</a> | ";
-echo "<a href='?page=home&maptype=normal'>$normal</a> | ";
-echo "<a href='?page=home&maptype=hard'>$hard</a> | ";
-echo "<a href='?page=home&maptype=day'>$special</a>";
+ echo DisplayMap($mergesolution, $mapID);
+ $mysolution = getSolution($userID, $mapID);
+ $solutiondiv .= "<div id='mapsol' style='visibility:hidden;display:none'>";
+ $solutiondiv .= $mapID.":".$mysolution;
+ $solutiondiv .= '</div>';
-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;
-
-//Start tests
-
-// echo "<br /><br />map $map mapid $mapID userID $userID";
-// $mysolution = getSolution($userID, $mapID);
-// $mysolution = formSolution($mysolution);
-// echo " last-best solution $mysolution";
-// $mergesolution = mergeMapSolution($map, $mysolution);
-// echo " merge sol1: $mergesolution <br />";
-// $mergesolution = seperateMapSolution($mergesolution);
-// $mergesolution = formSolution($mergesolution);
-// echo " merge sol2: $mergesolution <br />";
-
-//echo "<br /><div id='debug'>tmp debug data</div><br />";
-
-//End tests
-//
-//
-// <meta property="og:title" content="Pathery - The Game"/>
-// <meta property="og:site_name" content="Pathery.com"/>
-// <meta property="og:image" content="http://www.pathery.com/ some sort of logo.... "/>
+ echo $solutiondiv;
+ echo $topscorediv;
?>
- <br />
- <br />Copyright © 2011 pathery.com
-
+ <div id="fb">
+ </div>
</div>
-<script type="text/javascript">soundManagerInit();</script>
+<div id="copy">
+ <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com/pages/Pathery/176985129018434&layout=button_count&show_faces=false&width=90&action=like&font&colorscheme=dark&height=21"></iframe>
+ Copyright © 2011 pathery.com
+</div>
+<script src="sounds/script/soundmanager.js" async="async"></script>
+<script type="text/javascript">soundManagerInit();</script>
-</body>
-</html>
+<?php
+htmlFooter();
+?>
diff --git a/pages/howtoplay.php b/pages/howtoplay.php index 294e89f..bfad879 100644 --- a/pages/howtoplay.php +++ b/pages/howtoplay.php @@ -1,5 +1,5 @@ -<?PHP -htmlHeader(); +<?php +htmlHeader(array('tutorial')); ?> <body> @@ -29,74 +29,99 @@ $tpmap = displaymap(GenerateMapByCode($tpcode), 3, 'example'); ?> -<h1>Tutorial</h2> -<p> -<br />The object of the game is to make the longest maze. -<br />The "Snake" (name pending) must go to all the checkpoints. -<br />It starts from the red arrows: -<table><tr><td class='grid_td_start'></td></tr></table> -and goes to the blue arrows: -<table><tr><td class='grid_td_finish'></td></tr></table> -<br />Build a maze by clicking to place blocks. You can remove a block by clicking it again. -<br />It must be able to make it through your maze, so no walling completely! -<br />Try it: -<div style='width:200px;'> -<? echo $basicmap; ?> +<div class="wrapper"> + +<div id="tut-0" class="hidden"> + <h1 style="margin-bottom: 0">Tutorial</h1> + <p> + <br />The object of the game is to make the longest maze. + <br />The "Snake" (name pending) must go to all the checkpoints. + <br />It starts from the start squares: + <table><tr><td class='grid_td_start'></td></tr></table> + and goes to the end squares: + <table><tr><td class='grid_td_finish'></td></tr></table> + <br />Build a maze by clicking to place blocks. You can remove a block by clicking it again. + <br />It must be able to make it through your maze, so no walling completely! + </p> + <p>Try it: + <? echo $basicmap; ?> + </p> + <br /> + <a href="javascript:showTutorial(1)" class="next">Next</a> </div> -</p> -<br /><h2>Checkpoints:</h2> -<table> - <tr> - <td class='grid_td_cpa'></td> - <td class='grid_td_cpb'></td> - <td class='grid_td_cpc'></td> - <td class='grid_td_cpd'></td> - <td class='grid_td_cpe'></td> - </tr> -</table> -<p> -The path must reach all these (if they exist) before going to finish. Try it: - -<div style='width:200px;'> -<? echo $cpmap; ?> + +<div id="tut-1" class="hidden"> + <h2>Checkpoints:</h2> + <table> + <tr> + <td class='grid_td_cpa'></td> + <td class='grid_td_cpb'></td> + <td class='grid_td_cpc'></td> + <td class='grid_td_cpd'></td> + <td class='grid_td_cpe'></td> + </tr> + </table> + <p> + The path must reach all these (if they exist) before going to finish. Try it: + <? echo $cpmap; ?> + </p> + <br /><br /> + <p> + Tip: - Try to combine odd-letters with each other; + <br />I.E. If A, B, C exist, try to make a box around A and C, then maze the entrance to the box. + <br />This way, the path enters the box for A, leaves for B, returns for C, and leaves for the exit. + This would make the path go through your maze 4 times! + </p> + <a href="javascript:showTutorial(2)" class="next">Next</a> + <a href="javascript:showTutorial(0)" class="next">Back</a> </div> -<br /> -<br /> -<br />Tip: - Try to combine odd-letters with each other; -<br />I.E. If A, B, C exist, try to make a box around A and C, then maze the entrance to the box. -<br />This way, the path enters the box for A, leaves for B, returns for C, and leaves for the exit. -This would make the path go through your maze 4 times! -</p> -<h2>Teleports:</h2> -<table> - <tr> - <td><b>Teleport 1:</b></td> - <td class='grid_td_tp1_in' ></td> - <td class='grid_td_tp1_out' ></td> - </tr> - <tr> - <td><b>Teleport 2:</b></td> - <td class='grid_td_tp2_in' ></td> - <td class='grid_td_tp2_out' ></td> - </tr> -</table> -<p> -<br />Teleport tiles are traps. When the path goes across the "IN" tile, it gets thrown to the "OUT" tile. -<br />The path will not avoid teleports. Check this example out: -<div style='width:200px;'> -<? echo $tpmap; ?> + +<div id="tut-2" class="hidden"> + <h2>Teleports:</h2> + <table class="padded"> + <tr> + <td>Teleport 1:</td> + <td class='grid_td_tp1_in' ></td> + <td class='grid_td_tp1_out' ></td> + </tr> + <tr> + <td>Teleport 2:</td> + <td class='grid_td_tp2_in' ></td> + <td class='grid_td_tp2_out' ></td> + </tr> + </table> + <p> + <br />Teleport tiles are traps. When the path goes across the "IN" tile, it gets thrown to the "OUT" tile. + <br />The path will not avoid teleports. Check this example out: + <div style='width:200px;'> + <? echo $tpmap; ?> + </div> + <br /> + <br /> + Implementing a teleport into your maze can have a big impact. + </p> + + <br /><p>That should be enough information to get you started. + <br />Now <a href='?page=home'>go try it out!</a> + </p> + <a href="javascript:showTutorial(1)" class="next">Back</a> </div> -<br /> -<br /> -Implementing a teleport into your maze can have a big impact. -</p> - -<br /><p>That should be enough information to get you started. -<br />Now <a href='?page=home'>go try it out!</a> -<br /></p> -<br /> -<br /> -<br /> - -</body> -</html> + +</div> + +<script> +function showTutorial(type) { + for (var i = 0; i < 3; i++) { + var elem = document.getElementById("tut-" + i); + if (elem.className.indexOf('hidden') < 0) + elem.className += 'hidden'; + } + var elem = document.getElementById("tut-" + type); + elem.className = elem.className.replace('hidden', ''); +} +showTutorial(0); +</script> + +<?php +htmlFooter(); +?> diff --git a/pages/leaderboard.php b/pages/leaderboard.php index c8f03b8..290f23b 100644 --- a/pages/leaderboard.php +++ b/pages/leaderboard.php @@ -1,11 +1,10 @@ -<?PHP
-htmlHeader();
+<?php
+htmlHeader(array('stats'));
?>
<body>
<?php
-
topbar($Links);
include('./includes/maps.php');
@@ -14,9 +13,6 @@ include('./includes/datas.php'); include_once ('./includes/db.inc.php');
-echo '<br /><br />';
-
-
$tStats = getStat(1);
$yStats = getStat(2);
@@ -78,18 +74,18 @@ function getStat ($type) { return displayStats($result, $statname);
}
+?>
+<div class="wrapper">
-?>
-<div style="padding-left: 400px">
-<a href="javascript:showStats(0)">Overall</a> |
-<a href="javascript:showStats(1)">Simple</a> |
-<a href="javascript:showStats(2)">Normal</a> |
-<a href="javascript:showStats(3)">Complex</a> |
-<a href="javascript:showStats(4)">Special</a> |
-<a href="javascript:showStats(5)">Week/Month</a>
+<div id="difficulties">
+<a href="javascript:showStats(0)" id="dl-0">Overall</a>
+<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">Special</a>
+<a href="javascript:showStats(5)" id="dl-5">Week/Month</a>
</div>
-<br />
<div id="yms-0">
<div class="col1">
@@ -100,7 +96,6 @@ function getStat ($type) { </div>
</div>
-
<?
function yesterdayMaze($mapType, $name) {
$sql = "SELECT
@@ -204,7 +199,7 @@ function mysql_field_array( $query ) { // $data[1]['columnname'] == 'my data';
-yesterdayMaze(1, 'Easy');
+yesterdayMaze(1, 'Simple');
yesterdayMaze(2, 'Normal');
yesterdayMaze(3, 'Complex');
yesterdayMaze(4, 'Special');
@@ -221,6 +216,7 @@ yesterdayMaze(4, 'Special'); </div>
</div>
+</div>
<script>
function showStats(type) {
@@ -228,9 +224,18 @@ function showStats(type) { var elem = document.getElementById("yms-" + i);
if (elem.className.indexOf('hidden-stats') < 0)
elem.className += 'hidden-stats';
+ elem = document.getElementById("dl-" + i);
+ elem.className = elem.className.replace('selected', '');
}
var elem = document.getElementById("yms-" + type);
elem.className = elem.className.replace('hidden-stats', '');
+ elem = document.getElementById("dl-" + type);
+ if (elem.className.indexOf('selected') < 0)
+ elem.className += 'selected';
}
showStats(0);
</script>
+
+<?php
+htmlFooter();
+?>
|