Completed
Push — master ( c6a0c8...02f1f2 )
by Yannick
32:23
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
<?php
580
	if (isset($globalVM) && $globalVM) {
581
?>
582
		    <li><a href="<?php print $globalURL; ?>/marine/captain"><?php echo _("Captains"); ?></a></li>
583
		    <li><a href="<?php print $globalURL; ?>/marine/race"><?php echo _("Races"); ?></a></li>
584
		    <li><hr /></li>
585
<?php
586
	}
587
?>
588
		    <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li>
589
		    <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li>
590
		    <li><a href="<?php print $globalURL; ?>/marine/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
591
		</ul>
592
		<li><a href="<?php print $globalURL; ?>/marine/search"><?php echo _("Search"); ?></a></li>
593
		<li><a href="<?php print $globalURL; ?>/marine/statistics"><?php echo _("Statistics"); ?></a></li>
594
	    </li>
595
<?php
596
	if ($sub) {
597
?>
598
	</ul>
599
    </li>
600
<?php
601
	}
602
?>
603
<?php
604
    }
605
?>
606
<?php
607
    if (isset($globalTracker) && $globalTracker) {
608
?>
609
    <li class="dropdown">
610
<?php
611
        if ($sub) {
612
?>
613
    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a>
614
	<ul class="dropdown-menu multi-level">
615
	    <li class="dropdown-submenu">
616
<?php
617
	}
618
?>
619
<?php
620
	if (isset($globalNewsFeeds['tracker']) && !empty($globalNewsFeeds['tracker'])) {
621
?>
622
    <a href="<?php print $globalURL; ?>/tracker/news"><?php echo _("Trackers News"); ?></a></li>
623
    <li>
624
<?php
625
	}
626
?>
627
		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
628
		<ul class="dropdown-menu">
629
		    <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li>
630
		    <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li>
631
		    <li><a href="<?php print $globalURL; ?>/tracker/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
632
		</ul>
633
	    </li>
634
	    <li><a href="<?php print $globalURL; ?>/tracker/search"><?php echo _("Search"); ?></a></li>
635
	    <li><a href="<?php print $globalURL; ?>/tracker/statistics"><?php echo _("Statistics"); ?></a></li>
636
<?php
637
	if ($sub) {
638
?>
639
	</ul>
640
    </li>
641
<?php
642
	}
643
?>
644
<?php
645
    }
646
?>
647
<?php
648
    if (isset($globalSatellite) && $globalSatellite) {
649
?>
650
    <li class="dropdown">
651
<?php
652
        if ($sub) {
653
?>
654
    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellites"); ?> <b class="caret"></b></a>
655
	<ul class="dropdown-menu multi-level">
656
	    <li class="dropdown-submenu">
657
<?php
658
	}
659
?>
660
<?php
661
	if (isset($globalNewsFeeds['satellite']) && !empty($globalNewsFeeds['satellite'])) {
662
?>
663
    <a href="<?php print $globalURL; ?>/marine/news"><?php echo _("Satellites News"); ?></a></li>
664
    <li>
665
<?php
666
	}
667
?>
668
669
<!--
670
		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
671
		<ul class="dropdown-menu">
672
		    <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li>
673
		    <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li>
674
		    <li><a href="<?php print $globalURL; ?>/satellite/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
675
		</ul>
676
	    </li>
677
-->
678
	    <li><a href="<?php print $globalURL; ?>/satellite/statistics"><?php echo _("Statistics"); ?></a></li>
679
<?php
680
	if ($sub) {
681
?>
682
	</ul>
683
    </li>
684
<?php
685
	}
686
?>
687
<?php
688
    }
689
?>
690
691
        <li class="dropdown">
692
          <a href="<?php print $globalURL; ?>/about" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("About"); ?> <b class="caret"></b></a>
693
          <ul class="dropdown-menu">
694
          	<li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li>
695
          	<li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li>
696
<?php
697
    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
698
?>
699
		<li><hr /></li>
700
		<li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li>
701
<?php
702
    }
703
?>
704
	    <?php if (isset($globalContribute) && $globalContribute) { ?>
705
                <li><hr /></li>
706
                <li><a href="<?php print $globalURL; ?>/contribute"><?php echo _("Contribute"); ?></a></li>
707
                <li><hr /></li>
708
	    <?php } ?>
709
            <?php if ($globalName == 'FlightAirMap') { ?>
710
                <li><hr /></li>
711
        	<li><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank"><?php echo _("Report any Issues"); ?></a></li>
712
            <?php } ?>
713
          </ul>
714
        </li>
715
      </ul>
716
<?php
717
	if (isset($globalTranslate) && $globalTranslate) {
718
		$Language = new Language();
719
  		$alllang = $Language->getLanguages();
720
		if (count($alllang) > 1) {
721
?>
722
  	<div class="language">
723
  	    <form>
724
  		<select class="selectpicker" data-width="120px" onchange="language(this);">
725
  		    <?php
726
  		        foreach ($alllang as $key => $lang) {
727
  		            print '<option value="'.$key.'"';
728
  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
729
  		            if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (&beta;eta)</option>';
730
  		            else print '>'.$lang[0].'</option>';
731
  		        }
732
  		    ?>
733
  		</select>
734
  	    </form>
735
  	</div>
736
<?php
737
		}
738
	}
739
?>
740
      <div class="search">
741
	<form action="<?php print $globalURL; ?>/search" method="get">
742
		<!--<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>-->
743
		<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>
744
	</form>
745
	</div>
746
  	<div class="social">
747
  		<!-- I'm not sociable -->
748
  	</div>
749
    </div><!--/.nav-collapse -->
750
  </div>
751
</div>
752
753
<?php
754
if (isset($top_header) && $top_header != "") 
755
{
756
	print '<div class="top-header container clear" role="main">';
757
		print '<img src="'.$globalURL.'/images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />';
758
	print '</div>';
759
}
760
761
if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') {
762
?>
763
    <div class="top-header clear" role="main">
764
<?php
765
    if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
766
?>
767
    <div id="archive-map"></div>
768
<?php
769
    }
770
?>
771
    </div>
772
<?php
773
}
774
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))
775
{
776
    ?>
777
    <div class="top-header clear" role="main">
778
        <div id="map"></div>
779
	<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
780
	<script src="<?php print $globalURL; ?>/js/leaflet.js"></script>
781
782
        <script>
783
        var map;
784
        var zoom = 13;
785
//create the map
786
<?php
787
    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
788
?>
789
  map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
790
<?php
791
    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
792
?>
793
  map = L.map('map', { zoomControl:true });
794
<?php
795
    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
796
?>
797
  map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
798
    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);
799
    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']; ?>]]);
800
    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);
801
    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);
802
<?php
803
    } 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'])) {
804
?>
805
  map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
806
<?php
807
    } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
808
?>
809
  map = L.map('map', { zoomControl:true });
810
<?php
811
    }
812
?>
813
  //initialize the layer group for the aircrft markers
814
  var layer_data = L.layerGroup();
815
816
  //a few title layers
817
<?php
818
    if ($globalMapProvider == 'Mapbox') {
819
?>
820
  L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
821
    maxZoom: 18,
822
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
823
      '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
824
      'Imagery © <a href="http://mapbox.com">Mapbox</a>',
825
    id: '<?php print $globalMapboxId; ?>',
826
    token : '<?php print $globalMapboxToken; ?>'
827
  }).addTo(map);
828
<?php
829
    } elseif ($globalMapProvider == 'Mapbox-GL') {
830
?>
831
    L.mapboxGL({
832
	accessToken: '<?php print $globalMapboxToken; ?>',
833
	style: 'mapbox://styles/mapbox/bright-v8'
834
  }).addTo(map);
835
<?php
836
    } elseif ($globalMapProvider == 'MapQuest-OSM') {
837
?>
838
  L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{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>'
843
  }).addTo(map);
844
<?php
845
    } elseif ($globalMapProvider == 'MapQuest-Aerial') {
846
?>
847
  L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
848
    maxZoom: 18,
849
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
850
      '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>, ' +
851
      '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"'
852
  }).addTo(map);
853
<?php
854
    } elseif ($globalMapProvider == 'Google-Roadmap') {
855
?>
856
    var googleLayer = new L.Google('ROADMAP');
857
    map.addLayer(googleLayer);
858
<?php
859
    } elseif ($globalMapProvider == 'Google-Satellite') {
860
?>
861
    var googleLayer = new L.Google('SATELLITE');
862
    map.addLayer(googleLayer);
863
<?php
864
    } elseif ($globalMapProvider == 'Google-Hybrid') {
865
?>
866
    var googleLayer = new L.Google('HYBRID');
867
    map.addLayer(googleLayer);
868
<?php
869
    } elseif ($globalMapProvider == 'Google-Terrain') {
870
?>
871
    var googleLayer = new L.Google('Terrain');
872
    map.addLayer(googleLayer);
873
<?php
874
    } elseif (isset($globalMapCustomLayer[$globalMapProvider])) {
875
	$customid = $globalMapProvider;
876
?>
877
    L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
878
        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
879
        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
880
        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
881
        attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
882
    }).addTo(map);
883
<?php
884
    } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) {
885
?>
886
    var center = map.getCenter();
887
    map.options.crs = L.CRS.EPSG4326;
888
    map.setView(center);
889
    map._resetView(map.getCenter(), map.getZoom(), true);
890
    L.tileLayer('<?php print $globalURL; ?>/js/Cesium/Assets/Textures/NaturalEarthII/{z}/{x}/{y}.jpg', {
891
        minZoom: 0,
892
        maxZoom: 5,
893
        tms : true,
894
        zindex : 3,
895
        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
896
        attribution: 'Natural Earth'
897
    }).addTo(map);
898
<?php
899
    //} elseif ($globalMapProvider == 'OpenStreetMap') {
900
    } else {
901
?>
902
  L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
903
    maxZoom: 18,
904
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
905
      '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>'
906
  }).addTo(map);
907
908
<?php
909
    }
910
?>
911
        </script>
912
    </div>
913
    <?php
914
}
915
916
?>
917
918
<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear">
919