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