summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2011-12-13 15:09:31 -0800
committerPatrick Davison <snapwilliam@gmail.com>2011-12-13 15:09:31 -0800
commitc53c6eb6476ab7f9ef1f080eaa34ec0d076d5ea3 (patch)
treec4b4b75e9f4cdfacd8408ab4029af8a2bdb375e7
parentfbae790d584f2e37c001f793f9532387d601dbbe (diff)
downloadpathery-c53c6eb6476ab7f9ef1f080eaa34ec0d076d5ea3.tar.xz
Clean URL's
-rw-r--r--includes/header.php2
-rw-r--r--pages/cp.php2
-rw-r--r--pages/embed.php8
-rw-r--r--pages/home.php18
-rw-r--r--pages/howtoplay.php2
-rw-r--r--pages/leaderboard.php6
-rw-r--r--pages/tutorial.php2
7 files changed, 20 insertions, 20 deletions
diff --git a/includes/header.php b/includes/header.php
index d56e20d..4e50d77 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -88,7 +88,7 @@ function topbar($links) {
$selected = " selected";
else
$selected = "";
- echo "<a href='?page=$key' class='nav$selected'>$value</a>";
+ echo "<a href='$domain$key' class='nav$selected'>$value</a>";
}
echo "<div id='user'>";
diff --git a/pages/cp.php b/pages/cp.php
index 7658d13..f5fd566 100644
--- a/pages/cp.php
+++ b/pages/cp.php
@@ -48,7 +48,7 @@ $displayName = htmlspecialchars($_SESSION['displayName'], ENT_COMPAT | ENT_HTML5
<div class="wrapper">
<h2>Change your display name</h2>
-<form action="?page=cp" method="post" name="changename">
+<form action="cp" method="post" name="changename">
<input type="text" size="20" maxlength="16" value="<?php echo $displayName ?>" name="displayName" class="forminput" />
<input type="submit" value="Change name" class="forminput" />
</div>
diff --git a/pages/embed.php b/pages/embed.php
index 4c1ca68..7d7e615 100644
--- a/pages/embed.php
+++ b/pages/embed.php
@@ -90,10 +90,10 @@ $mergesolution = $map;
?>
<div class="col2" style="text-align: center">
<?
-echo "$date: <a href='?page=embed&amp;maptype=easy'>Easy</a> | ";
-echo "<a href='?page=embed&amp;maptype=normal'>Normal</a> | ";
-echo "<a href='?page=embed&amp;maptype=hard'>Hard</a> | ";
-echo "<a href='?page=embed&amp;maptype=day'>Special</a>";
+echo "$date: <a href='embed?maptype=easy'>Easy</a> | ";
+echo "<a href='embed?maptype=normal'>Normal</a> | ";
+echo "<a href='embed?maptype=hard'>Hard</a> | ";
+echo "<a href='embed?maptype=day'>Special</a>";
echo DisplayMap($mergesolution, $mapID);
diff --git a/pages/home.php b/pages/home.php
index 815f8fd..e347d54 100644
--- a/pages/home.php
+++ b/pages/home.php
@@ -36,34 +36,34 @@ switch ($numday) {
break;
}
-$easy = '<a href="?page=home&amp;maptype=easy">Simple</a>';
-$normal = '<a href="?page=home&amp;maptype=normal">Normal</a>';
-$hard = '<a href="?page=home&amp;maptype=hard">Complex</a>';
+$easy = '<a href="home?maptype=easy">Simple</a>';
+$normal = '<a href="home?maptype=normal">Normal</a>';
+$hard = '<a href="home?maptype=hard">Complex</a>';
$today = date('l') . "'s";
-$special = "<a href=\"?page=home&amp;maptype=day\">$today $mapstyle</a>";
+$special = "<a href=\"home?maptype=day\">$today $mapstyle</a>";
switch ($_GET['maptype']) {
case "easy":
case "1":
default:
$maptype = 1;
- $easy = '<a href="?page=home&amp;maptype=easy" class="selected">Simple</a>';
+ $easy = '<a href="home?maptype=easy" class="selected">Simple</a>';
break;
case "normal":
case "2":
$maptype = 2;
- $normal = '<a href="?page=home&amp;maptype=normal" class="selected">Normal</a>';
+ $normal = '<a href="home?maptype=normal" class="selected">Normal</a>';
break;
case "hard":
case "3":
$maptype = 3;
- $hard = '<a href="?page=home&amp;maptype=hard" class="selected">Complex</a>';
+ $hard = '<a href="home?maptype=hard" class="selected">Complex</a>';
break;
case "day":
case "4":
$maptype = 4;
- $special = "<a href=\"?page=home&amp;maptype=day\" class=\"selected\">$today $mapstyle</a>";
+ $special = "<a href=\"home?maptype=day\" class=\"selected\">$today $mapstyle</a>";
break;
}
@@ -106,7 +106,7 @@ $mergesolution = $map;
if ($_SESSION['accepted'] != 1) {
echo "
<div style='text-align: center; margin-top: 20px'>
- <a href='?page=login'>Sign in</a> to have your best solution saved.
+ <a href='login'>Sign in</a> to have your best solution saved.
</div>
";
}
diff --git a/pages/howtoplay.php b/pages/howtoplay.php
index a1e07c4..b600fd8 100644
--- a/pages/howtoplay.php
+++ b/pages/howtoplay.php
@@ -102,7 +102,7 @@ $tpmap = displaymap(GenerateMapByCode($tpcode), 3, 'example');
</p>
<br /><p>That should be enough information to get you started.
- <br />Now <a href='?page=home'>go try it out!</a>
+ <br />Now <a href='home'>go try it out!</a>
</p>
<a href="javascript:showTutorial(1)" class="next">Back</a>
</div>
diff --git a/pages/leaderboard.php b/pages/leaderboard.php
index 211422d..2c057a6 100644
--- a/pages/leaderboard.php
+++ b/pages/leaderboard.php
@@ -94,11 +94,11 @@ function getStat ($type, $daysago = 1) {
<?
if ($daysago > 1) {
$nextday = $daysago - 1;
- echo "<a href='?page=leaderboard&daysago=1' title='Now'>Current Day</a>";
- echo "<a href='?page=leaderboard&daysago=$nextday' title='Newer'>Next Day</a>";
+ echo "<a href='leaderboard?daysago=1' title='Now'>Current Day</a>";
+ echo "<a href='leaderboard?daysago=$nextday' title='Newer'>Next Day</a>";
}
$prevday = $daysago + 1;
- echo "<a href='?page=leaderboard&daysago=$prevday' title='Older'>Previous Day</a>";
+ echo "<a href='leaderboard?daysago=$prevday' title='Older'>Previous Day</a>";
?>
</div>
diff --git a/pages/tutorial.php b/pages/tutorial.php
index 9b472ff..782485f 100644
--- a/pages/tutorial.php
+++ b/pages/tutorial.php
@@ -41,7 +41,7 @@ challenge4.complete = "Well done!<br>Teleports add extra intrigue to the game.";
challenge4.help = "Let's use that teleport to block the way to the <i>A</i>!<br>We can make the path take longer to get to <i>A</i> in the process.";
challenge5.start = "Now for a difficult one. The goal for this one is 75 moves.<br>Press <b>Go!</b> to check your path.";
-challenge5.complete = "Look at you, so pro.<br><a href='?page=home'>Go play the game!</a>";
+challenge5.complete = "Look at you, so pro.<br><a href='home'>Go play the game!</a>";
challenge5.help = "Try placing the walls as highlighted.";
function challengeGo(mapid) {