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