This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
217 lines (198 loc) · 7.88 KB
/
index.php
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
/**
* @author Francis Amankrah <frank@frnk.ca>
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/
define('GTFSYAW', 1);
// Some definitions
require 'definitions.php';
// Handle XHR requests
require 'xhr.php';
x::spit();
// Headers
header('Link: <http://frnk.ca/app/transit>; rel="shortlink"');
?>
<!DOCTYPE html>
<?php //<html lang="en" manifest="manifest.php"> ?>
<html lang="en">
<head>
<title>Open Transit</title>
<meta charset="utf-8">
<meta name="author" content="Frank" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="Open Transit" />
<meta name="keywords" content="" />
<meta name="robots" content="index, follow" />
<meta property="og:title" content="Open Transit" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://frnk.ca/app/transit" />
<meta property="og:desc" content="Open Transit" />
<?php //<meta property="og:image" content="i/riu.144x144.png" /> ?>
<link rel="canonical" href="http://frnk.ca/app/transit" />
<link rel="shortlink" type="text/html" href="http://frnk.ca/app/transit" />
<?php //<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> ?>
<?php //<link rel="apple-touch-icon" href="riu.144x144.png" /> ?>
<?php //<link rel="apple-touch-icon" sizes="72x72" href="riu.72x72.png" /> ?>
<?php //<link rel="apple-touch-icon" sizes="112x112" href="riu.112x112.png" /> ?>
<?php //<link rel="apple-touch-icon" sizes="144x144" href="riu.144x144.png" /> ?>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato:300" />
<link rel="stylesheet" type="text/css" href="assets/scripts/style.css?<?php echo INC; ?>" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="assets/scripts/class.agency.js?<?php echo INC; ?>"></script>
<script src="assets/scripts/var.data.js?<?php echo INC; ?>"></script>
<script src="assets/scripts/geo.js?<?php echo INC; ?>"></script>
<script src="assets/scripts/var.remote.js?<?php echo INC; ?>"></script>
<script src="assets/scripts/var.debug.js?<?php echo INC; ?>"></script>
<script src="assets/scripts/app.js?<?php echo INC; ?>"></script>
<script src="assets/scripts/var.l10n.js?<?php echo INC; ?>"></script>
</head>
<body>
<section id="main">
<form onsubmit="App.go(); return false;">
<div id="status">Welcome.</div>
<input name="q" type="text" value="<?php echo @$_GET['q']; ?>" autocomplete="off" />
<a href="#" class="find" onclick="App.go()"></a>
<div class="clr"></div>
</form>
<div><ul id="results" class="center"></ul></div>
</section>
<nav>
<a href="#" class="jump icon-agency" onclick=""><span class="h"></span></a>
<a href="#" class="jump icon-bookmarks" onclick=""><span class="h"></span></a>
<a href="#" class="jump icon-locate" onclick=""><span class="h"></span></a>
<a href="#" class="jump icon-share" onclick=""><span class="h"></span></a>
<a href="#" class="jump icon-settings" onclick=""><span class="h"></span></a>
<a href="#" class="jump icon-info" onclick=""><span class="h"></span></a>
<a href="#" class="jump icon-debug" onclick=""><span class="h"></span></a>
</nav>
<section style="text-align: center;width:100%;font-weight: bold;">
Testing:
<a href="#" onclick="App.setMode(2)">"Agency" mode</a> |
<a href="#" onclick="App.openDialog('bookmarks')">Bookmarks</a> |
<a href="#" onclick="Geo.openDialog()">Geo-location</a> |
<a href="#" onclick="App.openDialog('share')">Sharing</a> |
<a href="#" onclick="App.openDialog('settings')">Settings</a> |
<a href="#" onclick="App.openDialog('info')">Info</a> |
<a href="#" onclick="App.openDialog('debug')">Debug</a>
</section>
<section id="landing-dialog" class="dialog">
<div>
<h1 class="center">Hello :)</h1>
<div class="center">Welcome to the <em>Open Transit</em> app.</div>
<div>Make sure you're connected to a Wifi network before continuing. We'll be downloading some transit data to get you started.</div>
<div class="center"><a href="#" onclick="App.getAgenciesList();">ok</a></div>
</div>
</section>
<section id="notice-dialog" class="dialog">
<div>
<div id="notice-msg"></div><br />
<div class="center"><a href="#" onclick="App.close();">ok</a></div>
</div>
</section>
<section id="confirm-dialog" class="dialog">
<div>
<br />
<div id="confirm-msg"></div>
<div class="center">
<a href="#" id="confirm-ok">ok</a>
<a href="#" id="confirm-cancel">cancel</a></a>
</div>
</div>
</section>
<section id="loading-dialog" class="dialog">
<div>
<br />
<div id="loading-msg" class="center">Working...</div><br />
<div class="loading center"></div><br />
<div class="center"><a href="#" onclick="Ajax.xhr.abort();App.close()">Cancel</a></div>
</div>
</section>
<section id="bookmarks-dialog" class="dialog">
<div>
<span class="close"></span>
<h1>Your bookmarks</h1>
<div>You don't have any bookmarks yet.</div>
</div>
</section>
<section id="info-dialog" class="dialog">
<div>
<span class="close"></span>
<h1>Open Transit <span>(v. <?php echo VER; ?>)</span></h1>
<div>Short description Aenean rhoncus bibendum nisl, in convallis nulla dictum in. Morbi vel orci id metus ultrices consectetur vitae eget dui. Sed sodales augue enim, non sodales augue porta nec. Fusce cursus, massa in ultrices convallis, enim.</div>
<div class="center">Francis Amankrah © <?php echo date('Y'); ?></div>
<div class="center">
<a href="mailto:frank@frnk.ca">frank@frnk.ca</a>
</div>
<div class="center">
<a href="http://www.gnu.org/licenses/gpl.html" target="_blank">GNU General Public License</a>
</div>
</div>
</section>
<section id="locate-dialog" class="dialog">
<div>
<span class="close"></span>
<h1>Your location</h1>
<div id="loc-name">Loading...</div>
</div>
</section>
<section id="settings-dialog" class="dialog">
<div>
<span class="close"></span>
<h1>Settings</h1>
<div>Set your language:</div>
<select id="param-lang">
<option value="en">English</option>
<option value="fr">Français (bientôt)</option>
</select>
<div>Select your current transit agency:</div>
<select id="param-agency" onchange="App.setActiveAgency()"></select>
<div>Erase all offline data:</div>
<div class="center"><a href="#" onclick="App.clearData();">Clear everything</a></div>
<div>Various parameters:</div>
<div class="row">
<div class="col2 right">Parameter 1:</div>
<div class="col2">...</div>
</div>
<div class="row">
<div class="col2 right">Parameter 2:</div>
<div class="col2">...</div>
</div>
</div>
</section>
<section id="share-dialog" class="dialog">
<div>
<span class="close"></span>
<h1>Share this app</h1>
<div>Link: ...</div>
<div>...</div>
</div>
</section>
<section id="debug-dialog" class="dialog">
<div>
<span class="close"></span>
<h1>Debug</h1>
<div>
Offline storage: <span id="debug-storage"></span><br />
Internet connection: <span id="debug-online"></span><br />
Error messages: <ol id="debug-stack"></ol>
</div>
</div>
</section>
<script type="text/javascript">
// Check offline storage
App.debug('#debug-storage', Data.isStorageEnabled());
// Check internet connection
App.debug('#debug-online', navigator.onLine);
</script>
<?php if (!IS_LOCAL): ?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44084003-2', 'auto');
ga('send', 'pageview');
</script>
<?php endif; ?>
</body>
</html>