This repository has been archived by the owner on Jan 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
documentation.php
385 lines (372 loc) · 26.1 KB
/
documentation.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<?php
/**
* kort - List of all proposed solutions with their specific information
*/
/** Load the ClassLoader */
require_once('./php/ClassLoader.php');
Kort\ClassLoader::registerAutoLoader();
use Helper\HttpHelper;
$statisticsUrl = 'https://prod.kort.dev.ifs.hsr.ch/v1.0/statistics';
$http = new HttpHelper();
$result = $http->get($statisticsUrl);
$statistics = json_decode($result, true);
?>
<!DOCTYPE html>
<html lang="de">
<head>
<title>Kort - Dokumentation</title>
<meta charset="utf-8">
<!-- Facebook -->
<meta property="og:title" content="Kort" />
<meta property="og:type" content="summary_large_image" />
<meta property="og:description" content="Kort - An OpenStreetMap Game" />
<meta property="og:image" content="http://www.kort.ch/resources/images/twitterCard.png" />
<!-- Twitter -->
<meta name="twitter:title" content="Kort"/>
<meta name="twitter:creator" content="@KortGame"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:description" content="Kort - An OpenStreetMap Game"/>
<meta name="twitter:image" content="http://www.kort.ch/resources/images/twitterCard.png"/>
<link rel="icon" href="./resources/images/kort-favicon.ico" type="image/png" />
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" type="text/css" href="resources/styles/styles.scss">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="index.html">Kort</a>
<ul class="nav">
<li><a href="index.html"><i class="nav-icon icon-home"></i> Home</a></li>
<li class="active"><a href="documentation.php"><i class="nav-icon icon-tasks icon-white"></i> Dokumentation</a></li>
<li><a href="about.html"><i class="nav-icon icon-user"></i> Über uns</a></li>
<li><a href="documentation_en.php"><i class="nav-icon icon-home icon-white"></i> Englisch</a></li>
</ul>
</div>
</div>
</div>
<header class="jumbotron subhead">
<div class="container">
<h1>Dokumentation</h1>
<p>Fakten über Kort</p>
</div>
</header>
<div class="content statistics">
<div class="container">
<div class="row">
<div class="span12">
<?php
if (!empty($statistics)) {
$values = $statistics['return'][0];
?>
<h3>Benutzer</h3>
<div class="row">
<div class="span3">
<img class="statistics-image" src="resources/images/statistics/user.png" />
</div>
<div class="span5">
<?php
echo "<table class='table table-striped stats'>\n";
echo "<tr>\n";
echo "<th>OpenStreetMap</th>\n";
echo "<td>" . $statistics['osm_user_count'] . "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<th>Google</th>\n";
echo "<td>" . $statistics['google_user_count'] . "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<th class='important'>Total</th>\n";
echo "<td>" . $statistics['user_count'] . "</td>\n";
echo "</tr>\n";
echo "</table>\n";
?>
</div>
</div>
<h3>Missionen</h3>
<div class="row">
<div class="span3">
<img class="statistics-image" src="resources/images/statistics/fixes.png" />
</div>
<div class="span5">
<?php
echo "<table class='table table-striped stats'>\n";
echo "<tr>\n";
echo "<th class='important'>Erledigte Missionen (inklusive nicht gelöste)</th>\n";
echo "<td>" . $statistics['fix_count'] . "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<th>Erledigte Missionen</th>\n";
echo "<td>" . $statistics['validated_fix_count'] . "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<th>Davon noch nicht überprüft</th>\n";
echo "<td>" . $statistics['incomplete_fix_count'] . "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<th>Davon vollständig überprüft und bereit für Übertragung nach OSM</th>\n";
echo "<td>" . $statistics['complete_fix_count'] . "</td>\n";
echo "</tr>\n";
echo "</table>\n";
?>
</div>
</div>
<h3>Gelöste Missionen</h3>
<div class="row">
<div class="span12">
<?php
$badgesUrl = './resources/images/missions/';
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_language.png' />\n";
echo "<p>Sprache des Namens unbekannt: <span class='value'>" . $statistics['solved_language_unknown_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_cuisine.png' />\n";
echo "<p>Art des Restaurants: <span class='value'>" . $statistics['solved_missing_cuisine_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_floors.png' />\n";
echo "<p>Fehlende Stockwerkzahl: <span class='value'>" . $statistics['solved_missing_level_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_speed.png' />\n";
echo "<p>Fehlendes Tempolimit: <span class='value'>" . $statistics['solved_missing_maxspeed_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_road.png' />\n";
echo "<p>Typ des Wegs unbekannt: <span class='value'>" . $statistics['solved_missing_track_type_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_motorway.png' />\n";
echo "<p>Autobahn ohne Bezeichner: <span class='value'>" . $statistics['solved_motorway_ref_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_opening_hours.png' />\n";
echo "<p>Fehelnde Öffnungszeiten: <span class='value'>" . $statistics['solved_opening_hours_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_poi.png' />\n";
echo "<p>Objekt ohne Namen: <span class='value'>" . $statistics['solved_poi_name_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_religion.png' />\n";
echo "<p>Kultstätte/Kirche ohne Religion: <span class='value'>" . $statistics['solved_religion_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "mission_missing_street_name.png' />\n";
echo "<p>Strasse ohne Namen: <span class='value'>" . $statistics['solved_way_wo_tags_count'] . "</span></p>\n";
echo "</div>\n";
?>
</div>
</div>
<h3>Gewonnene Auszeichnungen</h3>
<div class="row">
<div class="span12">
<?php
$badgesUrl = './resources/images/badges/';
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "highscore_place_3.png' />\n";
echo "<p>3. Platz: <span class='value'>" . $statistics['highscore_place_3_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "highscore_place_2.png' />\n";
echo "<p>2. Platz: <span class='value'>" . $statistics['highscore_place_2_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "highscore_place_1.png' />\n";
echo "<p>1. Platz: <span class='value'>" . $statistics['highscore_place_1_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "total_fix_count_1.png' />\n";
echo "<p>1. Mission: <span class='value'>" . $statistics['total_fix_count_1_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "total_fix_count_10.png' />\n";
echo "<p>10 Missionen: <span class='value'>" . $statistics['total_fix_count_10_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "total_fix_count_50.png' />\n";
echo "<p>50 Missionen: <span class='value'>" . $statistics['total_fix_count_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "total_fix_count_100.png' />\n";
echo "<p>100 Missionen: <span class='value'>" . $statistics['total_fix_count_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "six_per_day.png' />\n";
echo "<p>6 Missionen an einem Tag: <span class='value'>" . $statistics['six_per_day_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_language_unknown_5.png' />\n";
echo "<p>5 Sprache-Missionen: <span class='value'>" . $statistics['fix_count_language_unknown_5'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_language_unknown_50.png' />\n";
echo "<p>50 Sprache-Missionen: <span class='value'>" . $statistics['fix_count_language_unknown_50'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_language_unknown_100.png' />\n";
echo "<p>100 Sprache-Missionen: <span class='value'>" . $statistics['fix_count_language_unknown_100'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_cuisine_5.png' />\n";
echo "<p>Küchnaushilfe: <span class='value'>" . $statistics['fix_count_missing_cuisine_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_cuisine_50.png' />\n";
echo "<p>Gourmet: <span class='value'>" . $statistics['fix_count_missing_cuisine_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_cuisine_100.png' />\n";
echo "<p>Küchenchef: <span class='value'>" . $statistics['fix_count_missing_cuisine_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_level_5.png' />\n";
echo "<p>5 Stockwerk Missionen: <span class='value'>" . $statistics['fix_count_missing_level_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_level_50.png' />\n";
echo "<p>50 Stockwerk Missionen: <span class='value'>" . $statistics['fix_count_missing_level_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_level_100.png' />\n";
echo "<p>100 Stockwerk Missionen: <span class='value'>" . $statistics['fix_count_missing_level_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_maxspeed_5.png' />\n";
echo "<p>5 Tempolimit-Missionen: <span class='value'>" . $statistics['fix_count_missing_maxspeed_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_maxspeed_50.png' />\n";
echo "<p>50 Tempolimit-Missionen: <span class='value'>" . $statistics['fix_count_missing_maxspeed_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_maxspeed_100.png' />\n";
echo "<p>100 Tempolimit-Missionen: <span class='value'>" . $statistics['fix_count_missing_maxspeed_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_track_type_5.png' />\n";
echo "<p>5 Wegtyp-Missionen: <span class='value'>" . $statistics['fix_count_missing_track_type_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_track_type_50.png' />\n";
echo "<p>50 Wegtyp-Missionen: <span class='value'>" . $statistics['fix_count_missing_track_type_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_missing_track_type_100.png' />\n";
echo "<p>100 Wegtyp-Missionen: <span class='value'>" . $statistics['fix_count_missing_track_type_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_motorway_ref_5.png' />\n";
echo "<p>5 Autobahn-Missionen: <span class='value'>" . $statistics['fix_count_motorway_ref_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_motorway_ref_50.png' />\n";
echo "<p>50 Autobahn-Missionen: <span class='value'>" . $statistics['fix_count_motorway_ref_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_motorway_ref_100.png' />\n";
echo "<p>100 Autobahn-Missionen: <span class='value'>" . $statistics['fix_count_motorway_ref_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_opening_hours_5.png' />\n";
echo "<p>5 Öffnungszeiten Missionen: <span class='value'>" . $statistics['fix_count_opening_hours_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_opening_hours_50.png' />\n";
echo "<p>50 Öffnungszeiten Missionen: <span class='value'>" . $statistics['fix_count_opening_hours_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_opening_hours_100.png' />\n";
echo "<p>100 Öffnungszeiten Missionen: <span class='value'>" . $statistics['fix_count_opening_hours_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_poi_name_5.png' />\n";
echo "<p>5 Namen-Missionen: <span class='value'>" . $statistics['fix_count_poi_name_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_poi_name_50.png' />\n";
echo "<p>50 Namen-Missionen: <span class='value'>" . $statistics['fix_count_poi_name_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_poi_name_100.png' />\n";
echo "<p>100 Namen-Missionen: <span class='value'>" . $statistics['fix_count_poi_name_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_religion_5.png' />\n";
echo "<p>5 Religion-Missionen: <span class='value'>" . $statistics['fix_count_religion_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_religion_50.png' />\n";
echo "<p>50 Religion-Missionen: <span class='value'>" . $statistics['fix_count_religion_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_religion_100.png' />\n";
echo "<p>100 Religion-Missionen: <span class='value'>" . $statistics['fix_count_religion_100_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_way_wo_tags_5.png' />\n";
echo "<p>5 Strassenname Missionen: <span class='value'>" . $statistics['fix_count_way_wo_tags_5_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_way_wo_tags_50.png' />\n";
echo "<p>50 Strassenname Missionen: <span class='value'>" . $statistics['fix_count_way_wo_tags_50_count'] . "</span></p>\n";
echo "</div>\n";
echo "<div class='kort-badge'>\n";
echo "<img src='" . $badgesUrl . "fix_count_way_wo_tags_100.png' />\n";
echo "<p>100 Strassenname Missionen: <span class='value'>" . $statistics['fix_count_way_wo_tags_100_count'] . "</span></p>\n";
echo "</div>\n";
?>
</div>
</div>
<?php
} else {
echo "<div class=\"alert alert-error\">Fehler beim Laden der Statistik.</div>\n";
}
?>
</div>
</div>
</div>
</div>
<footer>
<div class="container">
<p class="pull-left">© <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="blank">CC BY-NC</a> - <a href="http://www.hsr.ch/geometalab" target="blank">Geometa Lab HSR</a> - HSR Hochschule für Technik Rapperswil</p>
</div>
</footer>
<a href="https://github.com/kort/kort" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 1500;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<!-- UserVoice widget -->
<script type="text/javascript">
var uvOptions = {};
(function() {
var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/ciFv45SRa04ZQzkujVJKw.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
})();
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37644286-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//log.hsr.ch/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '90']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
</body>
</html>