blob: 8bd7d1129f896f9152d69f9f0b67242d3446e8cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
<?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 = getMapOfTheDay();
$motd = MapOfTheDay($maptype);
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>";
$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.
<?
} else
echo "<br />";
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 .= "<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.... "/>
?>
<br />
<br />Copyright © 2011 pathery.com
</div>
<script type="text/javascript">soundManagerInit();</script>
</body>
</html>
|