summaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2012-11-29 15:00:11 -0800
committerPatrick Davison <snapwilliam@gmail.com>2012-11-29 15:00:11 -0800
commit1399d45c68e7d14fc1f3e8f2b5451669cce4ffa4 (patch)
treeab28080501f9dc8e4ffdc29742f45e2acf3fdcbf /pages
parent23b7ddabd4c2c6286a9b3ef0791befbc6f4ef89f (diff)
downloadpathery-1399d45c68e7d14fc1f3e8f2b5451669cce4ffa4.tar.xz
Lots of fixes and changes.
nofollow on login links. tutorial fix changed how $accepted works changed how $wallColor/Emblem works fixed a bug when multiple players scored at the same momment.
Diffstat (limited to 'pages')
-rw-r--r--pages/home.php26
-rw-r--r--pages/share.php8
-rw-r--r--pages/tutorial.php2
3 files changed, 14 insertions, 22 deletions
diff --git a/pages/home.php b/pages/home.php
index ad9f74e..dbc1a01 100644
--- a/pages/home.php
+++ b/pages/home.php
@@ -1,33 +1,19 @@
<?php
ob_start("ob_gzhandler");
-htmlHeader(
- array('stats'), 'Pathery',
- 'Compete to create the longest maze possible. 4 New maps every day at 9 PM Pacific',
- array('scores', 'dateformat')
-);
include_once ('./includes/maps.php');
include_once ('./includes/mapoftheday.php');
include_once ('./includes/db.inc.php');
include_once ('./includes/datas.php');
+htmlHeader(
+ array('stats'), 'Pathery',
+ 'Compete to create the longest path possible. New maps every day!',
+ array('scores', 'dateformat')
+);
$noteScript = '';
if ($accepted) {
- $userID = $_SESSION['userID'];
-
- // $sql = "
- // SELECT
- // userData.wallColor,
- // userData.wallEmblem
- // FROM `userData`
- // WHERE userID = '$userID' ";
- // $result = mysql_query($sql);
- // if ($result)
- // list($wallColor, $wallEmblem) = mysql_fetch_row($result);
- //global $wallColor;
- //echo ": Wallcolor: $wallColor :" ;
-
//$note = getNotified($userID);
$note = false;
if ($note !== false) {
@@ -268,7 +254,7 @@ $timerem = strtotime("tomorrow") - strtotime("now");
var stamp = hours + ":" + minutes;
//if (hours < 1 && minutes < 5)
stamp = stamp + ":" + seconds
- stamp = 'New maps ' + formatedTomorrow + '<br />' + stamp + ' Remain';
+ stamp = 'New maps ' + formatedTomorrow + '<br />Time remaining: ' + stamp;
document.getElementById("countdown").innerHTML = stamp;
if (totalSeconds <= 1 && userConfirm == true) {
diff --git a/pages/share.php b/pages/share.php
index 1193bb6..098c281 100644
--- a/pages/share.php
+++ b/pages/share.php
@@ -17,11 +17,17 @@ if (is_int($_GET['mapid'] + 0))
$mapID = $_GET['mapid'] + 0;
$mapcode = getMapCode($mapID);
+//New code:
+if ($_GET['mapcode'])
+ $mapcode = $_GET['mapcode'];
+
+
$map = GenerateMapByCode($mapcode);
-echo DisplayMap($map, 1, 'example', 1);
+//echo DisplayMap($map, 1, 'example', 1);
+echo DisplayMap($map, 1);
?>
<script>
diff --git a/pages/tutorial.php b/pages/tutorial.php
index d09480c..5f82999 100644
--- a/pages/tutorial.php
+++ b/pages/tutorial.php
@@ -70,7 +70,7 @@ challenge5.complete = "Look at you, so pro.<br><a href='home'>Go play the game!<
challenge5.help = "Try placing the walls as highlighted.";
function challengeGo(mapid) {
- var moves = mapjson[mapid].moves;
+ var moves = mapjson[mapid].path[0].moves;
var tiles;
switch (mapid) {