Completed
Push — master ( 0485dc...b2f8f6 )
by Yannick
33:38
created

header.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
if (isset($globalProtect) && $globalProtect) {
3
	@session_start();
0 ignored issues
show
Security Best Practice introduced by
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.

If you suppress an error, we recommend checking for the error condition explicitly:

// For example instead of
@mkdir($dir);

// Better use
if (@mkdir($dir) === false) {
    throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
Loading history...
4
	$_SESSION['protect'] = 'protect';
5
}
6
//gets the page file and stores it in a variable
7
$file_path = pathinfo($_SERVER['SCRIPT_NAME']);
8
$current_page = $file_path['filename'];
9
if ($globalTimezone == '') $globalTimezone = 'UTC';
10
date_default_timezone_set($globalTimezone);
11
if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType'];
12
else $MapType = $globalMapProvider;
13
14
if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline';
15
16
if (isset($_GET['3d'])) {
17
	setcookie('MapFormat','3d');
18
} else if (isset($_GET['2d'])) {
19
	setcookie('MapFormat','2d');
20
}
21
22
if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
23
	$tsk = filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL);
24
}
25
26
if (isset($_POST['archive'])) {
27
	setcookie('archive','true');
28
	setcookie('archive_begin',strtotime($_POST['start_date']));
29
	setcookie('archive_end',strtotime($_POST['end_date']));
30
	setcookie('archive_speed',$_POST['archivespeed']);
31
}
32
if (isset($_POST['noarchive'])) {
33
	setcookie('archive','false',-1);
34
	setcookie('archive_begin','',-1);
35
	setcookie('archive_end','',-1);
36
	setcookie('archive_speed','',-1);
37
}
38
// When button "Remove all filters" is clicked
39
if (isset($_POST['removefilters'])) {
40
	$allfilters = array_filter(array_keys($_COOKIE),function($key) {
41
	    return strpos($key,'filter_') === 0;
42
	});
43
	foreach ($allfilters as $filt) {
44
		unset($_COOKIE[$filt]);
45
		setcookie($filt,null,-1);
46
	}
47
}
48
?>
49
<!DOCTYPE html>
50
<html>
51
<head>
52
<meta charset="UTF-8">
53
<meta http-equiv="X-UA-Compatible" content="IE=10" />
54
<title><?php print $title; ?> | <?php print $globalName; ?></title>
55
<meta name="keywords" content="<?php print $title; ?> spotter live flight tracking tracker map aircraft airline airport history database ads-b acars" />
56
<meta name="description" content="<?php print $title; ?> | <?php print $globalName; ?> use FlightAirMap to track flight" />
57
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
58
<link rel="shortcut icon" type="image/x-icon" href="<?php print $globalURL; ?>/favicon.ico">
59
<link rel="apple-touch-icon" href="<?php print $globalURL; ?>/images/touch-icon.png">
60
<!--[if lt IE 9]>
61
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
62
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
63
<![endif]-->
64
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/js/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
65
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/jquery-ui.min.css" />
66
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/bootstrap-datetimepicker.min.css" />  
67
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/font-awesome-4.7.0/css/font-awesome.min.css" />
68
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/bootstrap-select.min.css" />
69
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style.css" />
70
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/print.css" />
71
72
<script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery-3.2.1.min.js"></script>
73
<script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery-ui.min.js"></script>
74
75
<script type="text/javascript" src="<?php print $globalURL; ?>/js/moment.min.js"></script>
76
<script type="text/javascript" src="<?php print $globalURL; ?>/js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
77
<script type="text/javascript" src="<?php print $globalURL; ?>/js/bootstrap-datetimepicker.min.js"></script>
78
<script type="text/javascript" src="<?php print $globalURL; ?>/js/bootstrap-select.min.js"></script>
79
<script type="text/javascript" src="<?php print $globalURL; ?>/js/script.js"></script>
80
81
<?php
82
if (strtolower($current_page) == "about")
83
{
84
?>
85
<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
86
<script src="<?php print $globalURL; ?>/js/leaflet.js"></script>
87
<?php
88
}
89
?>
90
<?php
91
if (strtolower($current_page) == "search")
92
{
93
?>
94
<script src="<?php print $globalURL; ?>/js/search.js"></script>
95
<?php
96
}
97
?>
98
<?php
99
if (strtolower($current_page) == "index")
100
{
101
?>
102
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-map.css?<?php print date("H"); ?>" />
103
<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
104
<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet-sidebar.css" />
105
<script src="<?php print $globalURL; ?>/js/leaflet.js"></script>
106
<script src="<?php print $globalURL; ?>/js/leaflet.textpath.js"></script>
107
<script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script>
108
<script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
109
<script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
110
<script src="<?php print $globalURL; ?>/js/jquery-sidebar.js"></script>
111
<script src="<?php print $globalURL; ?>/js/map.common.js"></script>
112
<?php 
113
	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
114
?>
115
<?php 
116
		if (file_exists(dirname(__FILE__).'/js/Cesium/Cesium.js')) {
117
		// || isset($globalOffline) && $globalOffline) {
118
?>
119
<link rel="stylesheet" href="<?php print $globalURL; ?>/js/Cesium/Widgets/widgets.css" />
120
<script src="<?php print $globalURL; ?>/js/Cesium/Cesium.js"></script>
121
<?php
122
		} else {
123
?>
124
<link rel="stylesheet" href="https://cesiumjs.org/releases/1.38/Build/Cesium/Widgets/widgets.css" />
125
<script src="https://cesiumjs.org/releases/1.38/Build/Cesium/Cesium.js"></script>
126
<?php
127
		}
128
?>
129
<link rel="stylesheet" href="<?php print $globalURL; ?>/css/cesium-minimap.css" />
130
<script src="<?php print $globalURL; ?>/js/cesium-minimap.js"></script>
131
<?php
132
	} else {
133
?>
134
<?php
135
		if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
136
?>
137
<script src="<?php print $globalURL; ?>/js/OSMBuildings-Leaflet.js"></script>
138
<?php
139
		}
140
?>
141
<?php
142
		if ($globalMapProvider == 'MapboxGL' || (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] == 'MapboxGL')) {
143
?>
144
<link href="https://cdn.osmbuildings.org/mapbox-gl/0.40.0/mapbox-gl.css" rel='stylesheet' />
145
<script src="https://cdn.osmbuildings.org/mapbox-gl/0.40.0/mapbox-gl.js"></script>
146
<script src="<?php print $globalURL; ?>/js/leaflet-mapbox-gl.js"></script>
147
<?php
148
		}
149
?>
150
151
<?php
152
		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
153
?>
154
<script src="https://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script>
155
<script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script>
156
<?php
157
		}
158
?>
159
<?php
160
		if (isset($globalBingMapKey) && $globalBingMapKey != '') {
161
?>
162
<!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>-->
163
<script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script>
164
<?php
165
		}
166
?>
167
<?php
168
		if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Hybrid' || $MapType == 'MapQuest-Aerial')) {
169
?>
170
<!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>-->
171
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>
172
<?php
173
		}
174
?>
175
<?php
176
		if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
177
?>
178
<script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script>
179
<?php
180
		}
181
?>
182
<?php
183
		if ($MapType == 'Yandex') {
184
?>
185
<script src="https://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script>
186
<script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script>
187
<?php
188
		}
189
	}
190
?>
191
<?php 
192
	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
193
?>
194
<script src="<?php print $globalURL; ?>/js/leaflet-playback.js"></script>
195
<?php 
196
		if (isset($_POST['archive'])) {
197
?>
198
<!--
199
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.timedimension.control.min.css" />
200
<script src="<?php print $globalURL; ?>/js/iso8601.min.js"></script>
201
<script src="<?php print $globalURL; ?>/js/leaflet.timedimension.src.js"></script>
202
-->
203
<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script>
204
<?php
205
		} else {
206
?>
207
<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) print '&tsk='.$tsk; ?>"></script>
208
<?php
209
		}
210
		if (!isset($globalAircraft) || $globalAircraft) {
211
?>
212
<script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?<?php print time(); ?>"></script>
213
<?php
214
		}
215
		if (isset($globalTracker) && $globalTracker) {
216
?>
217
<script src="<?php print $globalURL; ?>/js/map-tracker.2d.js.php?<?php print time(); ?>"></script>
218
<?php
219
		}
220
		if (isset($globalMarine) && $globalMarine) {
221
?>
222
<script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>"></script>
223
<?php
224
		}
225
		if (isset($globalSatellite) && $globalSatellite) {
226
?>
227
<script src="<?php print $globalURL; ?>/js/map-satellite.2d.js.php?<?php print time(); ?>"></script>
228
<?php
229
		}
230
	}
231
}
232
?>
233
<?php
234
//if ((strtolower($current_page) == "ident-detailed" && isset($ident)) || strtolower($current_page) == "flightid-overview")
235
//if ((strtolower($current_page) == "ident-detailed" && isset($ident) && isset($globalArchive) && $globalArchive))
236
if ((strtolower($current_page) == "ident-detailed" && isset($ident) && isset($globalArchive) && $globalArchive))
237
{
238
?>
239
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-map.css?<?php print date("H"); ?>" />
240
<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
241
<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet-sidebar.css" />
242
<script src="<?php print $globalURL; ?>/js/leaflet.js"></script>
243
<script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script>
244
<script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
245
<script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
246
<script src="<?php print $globalURL; ?>/js/map.common.js"></script>
247
<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
248
<?php
249
		if (!isset($type) || $type == 'aircraft') {
250
?>
251
<script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script>
252
<?php
253
		} elseif (isset($type) && $type == 'marine') {
254
?>
255
<script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script>
256
<?php
257
		} elseif (isset($type) && $type == 'tracker') {
258
?>
259
<script src="<?php print $globalURL; ?>/js/map-tracker.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script>
260
<?php
261
		} elseif (isset($type) && $type == 'satellite') {
262
?>
263
<script src="<?php print $globalURL; ?>/js/map-satellite.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script>
264
<?php
265
		}
266
?>
267
<?php
268
		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
269
?>
270
<script src="https://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script>
271
<script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script>
272
<?php
273
		}
274
?>
275
<?php
276
		if (isset($globalBingMapKey) && $globalBingMapKey != '') {
277
?>
278
<!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>-->
279
<script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script>
280
<?php
281
		}
282
?>
283
<?php
284
		if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Hybrid' || $MapType == 'MapQuest-Aerial')) {
285
?>
286
<!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>-->
287
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>
288
<?php
289
		}
290
?>
291
<?php
292
		if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
293
?>
294
<script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script>
295
<?php
296
		}
297
?>
298
<?php
299
		if ($MapType == 'Yandex') {
300
?>
301
<script src="http://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script>
302
<script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script>
303
<?php
304
		}
305
?>
306
<?php
307
}
308
309
if (strtolower($current_page) == "flightid-overview" && isset($globalArchive) && $globalArchive && isset($flightaware_id))
310
{
311
?>
312
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-map.css?<?php print date("H"); ?>" />
313
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
314
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet-sidebar.css" />
315
<script src="<?php print $globalURL; ?>/js/leaflet.js"></script>
316
<script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script>
317
<script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
318
<script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
319
<script src="<?php print $globalURL; ?>/js/map.common.js"></script>
320
<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
321
<script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script>
322
<?php
323
		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
324
?>
325
<script src="https://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script>
326
<script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script>
327
<?php
328
		}
329
?>
330
<?php
331
		if (isset($globalBingMapKey) && $globalBingMapKey != '') {
332
?>
333
<!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>-->
334
<script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script>
335
<?php
336
		}
337
?>
338
<?php
339
		if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Hybrid' || $MapType == 'MapQuest-Aerial')) {
340
?>
341
<!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>-->
342
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>
343
<?php
344
		}
345
?>
346
<?php
347
		if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
348
?>
349
<script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script>
350
<?php
351
		}
352
?>
353
<?php
354
		if ($MapType == 'Yandex') {
355
?>
356
<script src="http://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script>
357
<script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script>
358
<?php
359
		}
360
?>
361
<?php
362
}
363
?>
364
<?php
365
/*
366
if ($facebook_meta_image != "")
367
{
368
?>
369
<meta property="og:image" content="<?php print $facebook_meta_image; ?>"/>
370
<?php
371
} else {
372
?>
373
<meta property="og:image" content="<?php print $globalURL; ?>/images/touch-icon.png"/>
374
<?php
375
}
376
*/
377
?>
378
<?php
379
if (isset($globalCustomCSS) && $globalCustomCSS != '') {
380
?>
381
<link type="text/css" rel="stylesheet" href="<?php print $globalCustomCSS; ?>" />
382
<?php
383
}
384
?>
385
386
<meta property="og:title" content="<?php print $title; ?> | <?php print $globalName; ?>"/>
387
<meta property="og:url" content="<?php print $globalURL.$_SERVER['REQUEST_URI']; ?>"/>
388
<meta property="og:site_name" content="<?php print $globalName; ?>"/>
389
</head>
390
<body class="page-<?php print strtolower($current_page); ?>">
391
<div class="navbar navbar-fixed-top" role="navigation">
392
  <div class="container">
393
    <div class="navbar-header">
394
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
395
        <span class="sr-only">Toggle navigation</span>
396
        <span class="icon-bar"></span>
397
        <span class="icon-bar"></span>
398
        <span class="icon-bar"></span>
399
      </button>
400
      <a href="<?php print $globalURL; ?>/search" class="navbar-toggle search"><i class="fa fa-search"></i></a>
401
      <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
402
    </div>
403
    <div class="collapse navbar-collapse">
404
405
      <ul class="nav navbar-nav">
406
<?php
407
    if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) {
408
?>
409
    <li><a href="<?php print $globalURL; ?>/news"><?php echo _("News"); ?></a></li>
410
<?php
411
    }
412
?>
413
414
<?php 
415
    $sub = false;
416
    if (
417
	(
418
	    (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
419
	) || 
420
	(
421
	    isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
422
	) || 
423
	(
424
	    isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
425
	) || 
426
	(
427
	    isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))
428
	)
429
    ) {
430
	$sub = true;
431
    }
432
?>
433
<?php
434
    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
435
?>
436
    <li class="dropdown">
437
<?php
438
	if ($sub) {
439
?>
440
      	<li class="dropdown">
441
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Aircraft"); ?> <b class="caret"></b></a>
442
	<ul class="dropdown-menu multi-level">
443
      	<li class="dropdown-submenu">
444
<?php
445
        }
446
?>
447
<?php
448
	if (isset($globalNewsFeeds['aircraft']) && !empty($globalNewsFeeds['aircraft'])) {
449
?>
450
    <a href="<?php print $globalURL; ?>/news-aircraft"><?php echo _("Aircraft News"); ?></a></li>
451
    <li>
452
<?php
453
	}
454
?>
455
456
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
457
          <ul class="dropdown-menu">
458
          	<li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li>
459
<?php
460
    if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) {
461
?>
462
			<li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li>
463
<?php
464
    }
465
?>
466
			<li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li>
467
<?php
468
    if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
469
?>
470
			<li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li>
471
<?php
472
    } 
473
    if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
474
475
?>
476
			<li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li>
477
<?php
478
    }
479
?>
480
			<li><hr /></li>
481
            <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li>
482
            <li><a href="<?php print $globalURL; ?>/latest"><?php echo _("Latest Activity"); ?></a></li>
483
            <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
484
            <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li>
485
            <?php
486
        	if ($globalACARS) {
487
        	    if (isset($globalDemo) && $globalDemo) {
488
    	    ?>
489
            <li><hr /></li>
490
            <li><i><?php echo _('ACARS data not available publicly'); ?></i></li>
491
            <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li>
492
            <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li>
493
            <?php
494
        	    } else {
495
    	    ?>
496
            <li><hr /></li>
497
            <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li>
498
            <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li>
499
            <?php
500
        	    }
501
        	}
502
    	    ?>
503
    	    <?php
504
    	        if (isset($globalAccidents) && $globalAccidents) {
505
    	    ?>
506
            <li><hr /></li>
507
            <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li>
508
            <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li>
509
            <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li>
510
            <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li>
511
            <?php
512
        	}
513
    	    ?>
514
            <li><hr /></li>
515
            <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li>
516
            <?php
517
		if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) {
518
	    ?>
519
            <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li>
520
	    <?php
521
		}
522
	    ?>
523
          </ul>
524
        </li>
525
      	<li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li>
526
      	<li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li>
527
        <li class="dropdown<?php if ($sub) echo '-submenu'; ?>">
528
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
529
          <ul class="dropdown-menu">
530
          	<li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li>
531
          	<li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li>
532
          	<li><a href="<?php print $globalURL; ?>/tools/notam"><?php echo _("NOTAM translator"); ?></a></li>
533
<?php
534
	if (isset($globalGeoid) && $globalGeoid) {
535
?>
536
          	<li><a href="<?php print $globalURL; ?>/tools/geoid"><?php echo _("Geoid Height Calculator"); ?></a></li>
537
<?php
538
	}
539
?>
540
          </ul>
541
        </li>
542
<?php 
543
	if ($sub) {
544
?>
545
    </li>
546
    </ul>
547
<?php
548
	}
549
    }
550
?>
551
<?php
552
    if (isset($globalMarine) && $globalMarine) {
553
?>
554
    <li class="dropdown">
555
<?php
556
        if ($sub) {
557
?>
558
    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Marines"); ?> <b class="caret"></b></a>
559
	<ul class="dropdown-menu multi-level">
560
	    <li class="dropdown-submenu">
561
<?php
562
	}
563
?>
564
<?php
565
	if (isset($globalNewsFeeds['marine']) && !empty($globalNewsFeeds['marine'])) {
566
?>
567
    <a href="<?php print $globalURL; ?>/marine/news"><?php echo _("Marines News"); ?></a></li>
568
    <li>
569
<?php
570
	}
571
?>
572
		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
573
		<ul class="dropdown-menu">
574
		    <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li>
575
		    <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li>
576
		    <li><a href="<?php print $globalURL; ?>/marine/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
577
		</ul>
578
		<li><a href="<?php print $globalURL; ?>/marine/search"><?php echo _("Search"); ?></a></li>
579
		<li><a href="<?php print $globalURL; ?>/marine/statistics"><?php echo _("Statistics"); ?></a></li>
580
	    </li>
581
<?php
582
	if ($sub) {
583
?>
584
	</ul>
585
    </li>
586
<?php
587
	}
588
?>
589
<?php
590
    }
591
?>
592
<?php
593
    if (isset($globalTracker) && $globalTracker) {
594
?>
595
    <li class="dropdown">
596
<?php
597
        if ($sub) {
598
?>
599
    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a>
600
	<ul class="dropdown-menu multi-level">
601
	    <li class="dropdown-submenu">
602
<?php
603
	}
604
?>
605
<?php
606
	if (isset($globalNewsFeeds['tracker']) && !empty($globalNewsFeeds['tracker'])) {
607
?>
608
    <a href="<?php print $globalURL; ?>/tracker/news"><?php echo _("Trackers News"); ?></a></li>
609
    <li>
610
<?php
611
	}
612
?>
613
		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
614
		<ul class="dropdown-menu">
615
		    <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li>
616
		    <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li>
617
		    <li><a href="<?php print $globalURL; ?>/tracker/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
618
		</ul>
619
	    </li>
620
	    <li><a href="<?php print $globalURL; ?>/tracker/search"><?php echo _("Search"); ?></a></li>
621
	    <li><a href="<?php print $globalURL; ?>/tracker/statistics"><?php echo _("Statistics"); ?></a></li>
622
<?php
623
	if ($sub) {
624
?>
625
	</ul>
626
    </li>
627
<?php
628
	}
629
?>
630
<?php
631
    }
632
?>
633
<?php
634
    if (isset($globalSatellite) && $globalSatellite) {
635
?>
636
    <li class="dropdown">
637
<?php
638
        if ($sub) {
639
?>
640
    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellites"); ?> <b class="caret"></b></a>
641
	<ul class="dropdown-menu multi-level">
642
	    <li class="dropdown-submenu">
643
<?php
644
	}
645
?>
646
<?php
647
	if (isset($globalNewsFeeds['satellite']) && !empty($globalNewsFeeds['satellite'])) {
648
?>
649
    <a href="<?php print $globalURL; ?>/marine/news"><?php echo _("Satellites News"); ?></a></li>
650
    <li>
651
<?php
652
	}
653
?>
654
655
<!--
656
		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
657
		<ul class="dropdown-menu">
658
		    <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li>
659
		    <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li>
660
		    <li><a href="<?php print $globalURL; ?>/satellite/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
661
		</ul>
662
	    </li>
663
-->
664
	    <li><a href="<?php print $globalURL; ?>/satellite/statistics"><?php echo _("Statistics"); ?></a></li>
665
<?php
666
	if ($sub) {
667
?>
668
	</ul>
669
    </li>
670
<?php
671
	}
672
?>
673
<?php
674
    }
675
?>
676
677
        <li class="dropdown">
678
          <a href="<?php print $globalURL; ?>/about" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("About"); ?> <b class="caret"></b></a>
679
          <ul class="dropdown-menu">
680
          	<li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li>
681
          	<li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li>
682
<?php
683
    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
684
?>
685
		<li><hr /></li>
686
		<li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li>
687
<?php
688
    }
689
?>
690
	    <?php if (isset($globalContribute) && $globalContribute) { ?>
691
                <li><hr /></li>
692
                <li><a href="<?php print $globalURL; ?>/contribute"><?php echo _("Contribute"); ?></a></li>
693
                <li><hr /></li>
694
	    <?php } ?>
695
            <?php if ($globalName == 'FlightAirMap') { ?>
696
                <li><hr /></li>
697
        	<li><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank"><?php echo _("Report any Issues"); ?></a></li>
698
            <?php } ?>
699
          </ul>
700
        </li>
701
      </ul>
702
<?php
703
	if (isset($globalTranslate) && $globalTranslate) {
704
		$Language = new Language();
705
  		$alllang = $Language->getLanguages();
706
		if (count($alllang) > 1) {
707
?>
708
  	<div class="language">
709
  	    <form>
710
  		<select class="selectpicker" data-width="120px" onchange="language(this);">
711
  		    <?php
712
  		        foreach ($alllang as $key => $lang) {
713
  		            print '<option value="'.$key.'"';
714
  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
715
  		            if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (&beta;eta)</option>';
716
  		            else print '>'.$lang[0].'</option>';
717
  		        }
718
  		    ?>
719
  		</select>
720
  	    </form>
721
  	</div>
722
<?php
723
		}
724
	}
725
?>
726
      <div class="search">
727
	<form action="<?php print $globalURL; ?>/search" method="get">
728
		<!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>-->
729
		<input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != ""){ print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>
730
	</form>
731
	</div>
732
  	<div class="social">
733
  		<!-- I'm not sociable -->
734
  	</div>
735
    </div><!--/.nav-collapse -->
736
  </div>
737
</div>
738
739
<?php
740
if (isset($top_header) && $top_header != "") 
741
{
742
	print '<div class="top-header container clear" role="main">';
743
		print '<img src="'.$globalURL.'/images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />';
744
	print '</div>';
745
}
746
747
if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') {
748
?>
749
    <div class="top-header clear" role="main">
750
<?php
751
    if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
752
?>
753
    <div id="archive-map"></div>
754
<?php
755
    }
756
?>
757
    </div>
758
<?php
759
}
760
if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false))
761
{
762
    ?>
763
    <div class="top-header clear" role="main">
764
        <div id="map"></div>
765
	<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
766
	<script src="<?php print $globalURL; ?>/js/leaflet.js"></script>
767
768
        <script>
769
        var map;
770
        var zoom = 13;
771
//create the map
772
<?php
773
    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
774
?>
775
  map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
776
<?php
777
    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
778
?>
779
  map = L.map('map', { zoomControl:true });
780
<?php
781
    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
782
?>
783
  map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
784
    var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map);
785
    map.fitBounds([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]);
786
    var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
787
    var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
788
<?php
789
    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
790
?>
791
  map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
792
<?php
793
    } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
794
?>
795
  map = L.map('map', { zoomControl:true });
796
<?php
797
    }
798
?>
799
  //initialize the layer group for the aircrft markers
800
  var layer_data = L.layerGroup();
801
802
  //a few title layers
803
<?php
804
    if ($globalMapProvider == 'Mapbox') {
805
?>
806
  L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
807
    maxZoom: 18,
808
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
809
      '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
810
      'Imagery © <a href="http://mapbox.com">Mapbox</a>',
811
    id: '<?php print $globalMapboxId; ?>',
812
    token : '<?php print $globalMapboxToken; ?>'
813
  }).addTo(map);
814
<?php
815
    } elseif ($globalMapProvider == 'Mapbox-GL') {
816
?>
817
    L.mapboxGL({
818
	accessToken: '<?php print $globalMapboxToken; ?>',
819
	style: 'mapbox://styles/mapbox/bright-v8'
820
  }).addTo(map);
821
<?php
822
    } elseif ($globalMapProvider == 'MapQuest-OSM') {
823
?>
824
  L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
825
    maxZoom: 18,
826
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
827
      '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>, ' +
828
      'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>'
829
  }).addTo(map);
830
<?php
831
    } elseif ($globalMapProvider == 'MapQuest-Aerial') {
832
?>
833
  L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
834
    maxZoom: 18,
835
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
836
      '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>, ' +
837
      'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"'
838
  }).addTo(map);
839
<?php
840
    } elseif ($globalMapProvider == 'Google-Roadmap') {
841
?>
842
    var googleLayer = new L.Google('ROADMAP');
843
    map.addLayer(googleLayer);
844
<?php
845
    } elseif ($globalMapProvider == 'Google-Satellite') {
846
?>
847
    var googleLayer = new L.Google('SATELLITE');
848
    map.addLayer(googleLayer);
849
<?php
850
    } elseif ($globalMapProvider == 'Google-Hybrid') {
851
?>
852
    var googleLayer = new L.Google('HYBRID');
853
    map.addLayer(googleLayer);
854
<?php
855
    } elseif ($globalMapProvider == 'Google-Terrain') {
856
?>
857
    var googleLayer = new L.Google('Terrain');
858
    map.addLayer(googleLayer);
859
<?php
860
    } elseif (isset($globalMapCustomLayer[$globalMapProvider])) {
861
	$customid = $globalMapProvider;
862
?>
863
    L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
864
        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
865
        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
866
        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
867
        attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
868
    }).addTo(map);
869
<?php
870
    } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) {
871
?>
872
    var center = map.getCenter();
873
    map.options.crs = L.CRS.EPSG4326;
874
    map.setView(center);
875
    map._resetView(map.getCenter(), map.getZoom(), true);
876
    L.tileLayer('<?php print $globalURL; ?>/js/Cesium/Assets/Textures/NaturalEarthII/{z}/{x}/{y}.jpg', {
877
        minZoom: 0,
878
        maxZoom: 5,
879
        tms : true,
880
        zindex : 3,
881
        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
882
        attribution: 'Natural Earth'
883
    }).addTo(map);
884
<?php
885
    //} elseif ($globalMapProvider == 'OpenStreetMap') {
886
    } else {
887
?>
888
  L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
889
    maxZoom: 18,
890
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
891
      '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>'
892
  }).addTo(map);
893
894
<?php
895
    }
896
?>
897
        </script>
898
    </div>
899
    <?php
900
}
901
902
?>
903
904
<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear">
905