@@ -13,20 +13,20 @@ discard block |
||
13 | 13 | { |
14 | 14 | $coords = explode(',',$_GET['coord']); |
15 | 15 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
16 | - || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
|
16 | + || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
|
17 | 17 | //$spotter_array = $Source->getAllLocationInfo(); |
18 | 18 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs',$coords)); |
19 | 19 | } |
20 | 20 | if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') |
21 | - || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
21 | + || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
22 | 22 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx',$coords)); |
23 | 23 | } |
24 | 24 | if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') |
25 | - || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
25 | + || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
26 | 26 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning',$coords)); |
27 | 27 | } |
28 | 28 | if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') |
29 | - || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
29 | + || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
30 | 30 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',$coords,true)); |
31 | 31 | } |
32 | 32 | if (!isset($globalDemo)) { |
@@ -34,20 +34,20 @@ discard block |
||
34 | 34 | } |
35 | 35 | } else { |
36 | 36 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
37 | - || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
|
37 | + || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
|
38 | 38 | //$spotter_array = $Source->getAllLocationInfo(); |
39 | 39 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs')); |
40 | 40 | } |
41 | 41 | if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') |
42 | - || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
42 | + || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
43 | 43 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx')); |
44 | 44 | } |
45 | 45 | if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') |
46 | - || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
46 | + || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
47 | 47 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning')); |
48 | 48 | } |
49 | 49 | if ((isset($_COOKIE['show_Fire']) && $_COOKIE['show_Fire'] == 'true') |
50 | - || (!isset($_COOKIE['show_Fire']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
50 | + || (!isset($_COOKIE['show_Fire']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
51 | 51 | $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',array(),true)); |
52 | 52 | } |
53 | 53 | if (!isset($globalDemo)) { |
@@ -11,47 +11,47 @@ discard block |
||
11 | 11 | $spotter_array = array(); |
12 | 12 | if (isset($_GET['coord'])) |
13 | 13 | { |
14 | - $coords = explode(',',$_GET['coord']); |
|
14 | + $coords = explode(',', $_GET['coord']); |
|
15 | 15 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
16 | 16 | || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
17 | 17 | //$spotter_array = $Source->getAllLocationInfo(); |
18 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs',$coords)); |
|
18 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs', $coords)); |
|
19 | 19 | } |
20 | 20 | if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') |
21 | 21 | || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
22 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx',$coords)); |
|
22 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx', $coords)); |
|
23 | 23 | } |
24 | 24 | if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') |
25 | 25 | || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
26 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning',$coords)); |
|
26 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning', $coords)); |
|
27 | 27 | } |
28 | 28 | if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') |
29 | 29 | || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
30 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',$coords,true)); |
|
30 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('fires', $coords, true)); |
|
31 | 31 | } |
32 | 32 | if (!isset($globalDemo)) { |
33 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('')); |
|
33 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('')); |
|
34 | 34 | } |
35 | 35 | } else { |
36 | 36 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
37 | 37 | || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
38 | 38 | //$spotter_array = $Source->getAllLocationInfo(); |
39 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs')); |
|
39 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs')); |
|
40 | 40 | } |
41 | 41 | if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') |
42 | 42 | || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
43 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx')); |
|
43 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx')); |
|
44 | 44 | } |
45 | 45 | if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') |
46 | 46 | || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
47 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning')); |
|
47 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning')); |
|
48 | 48 | } |
49 | 49 | if ((isset($_COOKIE['show_Fire']) && $_COOKIE['show_Fire'] == 'true') |
50 | 50 | || (!isset($_COOKIE['show_Fire']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
51 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',array(),true)); |
|
51 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('fires', array(), true)); |
|
52 | 52 | } |
53 | 53 | if (!isset($globalDemo)) { |
54 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('')); |
|
54 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('')); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $output = '{"type": "FeatureCollection","features": ['; |
60 | 60 | if (!empty($spotter_array) && count($spotter_array) > 0) |
61 | 61 | { |
62 | - foreach($spotter_array as $spotter_item) |
|
62 | + foreach ($spotter_array as $spotter_item) |
|
63 | 63 | { |
64 | 64 | date_default_timezone_set('UTC'); |
65 | 65 | $output .= '{"type": "Feature",'; |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | $output .= '"icon": "'.$globalURL.'/images/'.$spotter_item['logo'].'",'; |
79 | 79 | $output .= '"type": "'.$spotter_item['type'].'",'; |
80 | 80 | if ($spotter_item['type'] == 'wx') { |
81 | - $weather = json_decode($spotter_item['description'],true); |
|
82 | - if (isset($weather['temp'])) $output.= '"temp": "'.$weather['temp'].'",'; |
|
81 | + $weather = json_decode($spotter_item['description'], true); |
|
82 | + if (isset($weather['temp'])) $output .= '"temp": "'.$weather['temp'].'",'; |
|
83 | 83 | } |
84 | 84 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
85 | 85 | $output .= '},'; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $output .= '}'; |
90 | 90 | $output .= '},'; |
91 | 91 | } |
92 | - $output = substr($output, 0, -1); |
|
92 | + $output = substr($output, 0, -1); |
|
93 | 93 | } |
94 | 94 | $output .= ']}'; |
95 | 95 | print $output; |