diff options
Diffstat (limited to 'pages/home.php')
-rw-r--r-- | pages/home.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/pages/home.php b/pages/home.php index 7a197aa..37a94c3 100644 --- a/pages/home.php +++ b/pages/home.php @@ -124,6 +124,7 @@ Schick mir einfach eine Zeile auf der <a href="feedback">Feedback-Seite</a>. <br />
+
<?
if ($accepted) {
if (!hasCompletedTutorial($userID)) {
@@ -164,15 +165,13 @@ 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);
+$mapNames[5] = $motd['map'][0][6];
+if ($mapNames[5] == '') {
+ $mapNames[5] = 'Special';
+}
echo ' <div id="difficulties">';
foreach ($mapNames as $key => $value) {
@@ -210,14 +209,14 @@ function displayMaze($motd, $mapType) { ";
$mysolution = '';
- $mymoves = '';
+ $mymoves = 0;
if ($accepted) {
$sol = getSolution($userID, $mapID);
$mysolution = $sol['solution'];
//TODO: implement mymoves
$mymoves = $sol['moves'];
}
- if (isset($_SESSION[$mapID.'sol']) && $mysolution == '') {
+ if (isset($_SESSION[$mapID.'sol']) && $_SESSION[$mapID.'moves'] > $mymoves) {
$mysolution = $_SESSION[$mapID.'sol'];
$mymoves = $_SESSION[$mapID.'moves'];
}
|