|
@@ -17,12 +17,19 @@ discard block |
|
|
block discarded – undo |
|
17
|
17
|
date_default_timezone_set('UTC'); |
|
18
|
18
|
|
|
19
|
19
|
print '<div class="top">'; |
|
20
|
|
-if ($spotter_item['name'] != '') print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['name'].'</div>'; |
|
21
|
|
-elseif ($spotter_item['location_id'] != 0) print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['location_id'].'</div>'; |
|
22
|
|
-elseif ($spotter_item['type'] == 'lightning') print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Lightning").'</div>'; |
|
23
|
|
-elseif ($spotter_item['type'] == 'wx') print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Weather Station").'</div>'; |
|
24
|
|
-elseif ($spotter_item['type'] == 'fires') print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Fire").'</div>'; |
|
25
|
|
-else print '<div class="right"><div class="callsign-details"><div class="callsign"></div>'; |
|
|
20
|
+if ($spotter_item['name'] != '') { |
|
|
21
|
+ print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['name'].'</div>'; |
|
|
22
|
+} elseif ($spotter_item['location_id'] != 0) { |
|
|
23
|
+ print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['location_id'].'</div>'; |
|
|
24
|
+} elseif ($spotter_item['type'] == 'lightning') { |
|
|
25
|
+ print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Lightning").'</div>'; |
|
|
26
|
+} elseif ($spotter_item['type'] == 'wx') { |
|
|
27
|
+ print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Weather Station").'</div>'; |
|
|
28
|
+} elseif ($spotter_item['type'] == 'fires') { |
|
|
29
|
+ print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Fire").'</div>'; |
|
|
30
|
+} else { |
|
|
31
|
+ print '<div class="right"><div class="callsign-details"><div class="callsign"></div>'; |
|
|
32
|
+} |
|
26
|
33
|
print '</div>'; |
|
27
|
34
|
|
|
28
|
35
|
print '</div></div>'; |
|
@@ -40,8 +47,12 @@ discard block |
|
|
block discarded – undo |
|
40
|
47
|
print $spotter_item['last_seen'].' UTC'; |
|
41
|
48
|
print '</div>'; |
|
42
|
49
|
|
|
43
|
|
-if ($spotter_item['city'] != '') print '<div><span>'._("City").'</span>'.$spotter_item['city'].'</div>'; |
|
44
|
|
-if ($spotter_item['country'] !='') print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
|
|
50
|
+if ($spotter_item['city'] != '') { |
|
|
51
|
+ print '<div><span>'._("City").'</span>'.$spotter_item['city'].'</div>'; |
|
|
52
|
+} |
|
|
53
|
+if ($spotter_item['country'] !='') { |
|
|
54
|
+ print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
|
|
55
|
+} |
|
45
|
56
|
print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],4).', '.round($spotter_item['longitude'],4).'</div>'; |
|
46
|
57
|
/* |
|
47
|
58
|
if ($spotter_item['atc_range'] > 0) { |
|
@@ -53,13 +64,27 @@ discard block |
|
|
block discarded – undo |
|
53
|
64
|
if ($spotter_item['type'] == 'wx') { |
|
54
|
65
|
$weather = json_decode($spotter_item['description'],true); |
|
55
|
66
|
//print_r($weather); |
|
56
|
|
- if (isset($weather['temp'])) print '<div><span>'._("Temperature").'</span>'.$weather['temp'].'°C</div>'; |
|
57
|
|
- if (isset($weather['pressure'])) print '<div><span>'._("Pressure").'</span>'.$weather['pressure'].'hPa</div>'; |
|
58
|
|
- if (isset($weather['wind_gust'])) print '<div><span>'._("Wind Gust").'</span>'.$weather['wind_gust'].' km/h</div>'; |
|
59
|
|
- if (isset($weather['humidity'])) print '<div><span>'._("Humidity").'</span>'.$weather['humidity'].'%</div>'; |
|
60
|
|
- if (isset($weather['rain'])) print '<div><span>'._("Rain").'</span>'.$weather['rain'].' mm</div>'; |
|
61
|
|
- if (isset($weather['precipitation'])) print '<div><span>'._("Precipitation 24H").'</span>'.$weather['precipitation'].' mm</div>'; |
|
62
|
|
- if (isset($weather['precipitation24h'])) print '<div><span>'._("Precipitation Today").'</span>'.$weather['precipitation24h'].' mm</div>'; |
|
|
67
|
+ if (isset($weather['temp'])) { |
|
|
68
|
+ print '<div><span>'._("Temperature").'</span>'.$weather['temp'].'°C</div>'; |
|
|
69
|
+ } |
|
|
70
|
+ if (isset($weather['pressure'])) { |
|
|
71
|
+ print '<div><span>'._("Pressure").'</span>'.$weather['pressure'].'hPa</div>'; |
|
|
72
|
+ } |
|
|
73
|
+ if (isset($weather['wind_gust'])) { |
|
|
74
|
+ print '<div><span>'._("Wind Gust").'</span>'.$weather['wind_gust'].' km/h</div>'; |
|
|
75
|
+ } |
|
|
76
|
+ if (isset($weather['humidity'])) { |
|
|
77
|
+ print '<div><span>'._("Humidity").'</span>'.$weather['humidity'].'%</div>'; |
|
|
78
|
+ } |
|
|
79
|
+ if (isset($weather['rain'])) { |
|
|
80
|
+ print '<div><span>'._("Rain").'</span>'.$weather['rain'].' mm</div>'; |
|
|
81
|
+ } |
|
|
82
|
+ if (isset($weather['precipitation'])) { |
|
|
83
|
+ print '<div><span>'._("Precipitation 24H").'</span>'.$weather['precipitation'].' mm</div>'; |
|
|
84
|
+ } |
|
|
85
|
+ if (isset($weather['precipitation24h'])) { |
|
|
86
|
+ print '<div><span>'._("Precipitation Today").'</span>'.$weather['precipitation24h'].' mm</div>'; |
|
|
87
|
+ } |
|
63
|
88
|
$spotter_item['description'] = $weather['comment']; |
|
64
|
89
|
} elseif ($spotter_item['type'] == 'fires') { |
|
65
|
90
|
print_r(json_decode($spotter_item['description'],true)); |