@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | { |
42 | 42 | if (isset($globalTimezone)) { |
43 | 43 | date_default_timezone_set($globalTimezone); |
44 | - } else date_default_timezone_set('UTC'); |
|
44 | + } else { |
|
45 | + date_default_timezone_set('UTC'); |
|
46 | + } |
|
45 | 47 | print '<tr>'; |
46 | 48 | if (isset($_GET['image']) && $_GET['image'] == "true") |
47 | 49 | { |
@@ -98,10 +100,14 @@ discard block |
||
98 | 100 | print '</div>'; |
99 | 101 | print '<div class="other2">'; |
100 | 102 | print '<span><i class="fa fa-arrow-up"></i> '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country']; |
101 | - if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') print ' ('.$spotter_item['departure_airport_time'].')'; |
|
103 | + if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') { |
|
104 | + print ' ('.$spotter_item['departure_airport_time'].')'; |
|
105 | + } |
|
102 | 106 | print '</span>'; |
103 | 107 | print '<span><i class="fa fa-arrow-down"></i> '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country']; |
104 | - if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
108 | + if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') { |
|
109 | + print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
110 | + } |
|
105 | 111 | print '</span>'; |
106 | 112 | print '</div>'; |
107 | 113 | print '<div class="other3">'; |
@@ -51,7 +51,9 @@ discard block |
||
51 | 51 | |
52 | 52 | if (isset($globalTimezone)) { |
53 | 53 | date_default_timezone_set($globalTimezone); |
54 | - } else date_default_timezone_set('UTC'); |
|
54 | + } else { |
|
55 | + date_default_timezone_set('UTC'); |
|
56 | + } |
|
55 | 57 | |
56 | 58 | //date_default_timezone_set('UTC'); |
57 | 59 | if (is_array($all_data) && count($all_data) > 0) { |
@@ -300,9 +302,13 @@ discard block |
||
300 | 302 | print '<div>'; |
301 | 303 | if (isset($spotter_item['pilot_id']) && $spotter_item['pilot_id'] != "") |
302 | 304 | { |
303 | - if ($spotter_item['format_source'] == 'whazzup') print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
304 | - elseif ($spotter_item['format_source'] == 'vatsimtxt') print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
305 | - else print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
305 | + if ($spotter_item['format_source'] == 'whazzup') { |
|
306 | + print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
307 | + } elseif ($spotter_item['format_source'] == 'vatsimtxt') { |
|
308 | + print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
309 | + } else { |
|
310 | + print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
311 | + } |
|
306 | 312 | } else { |
307 | 313 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != "") |
308 | 314 | { |
@@ -71,8 +71,12 @@ discard block |
||
71 | 71 | { |
72 | 72 | $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['ident']); |
73 | 73 | $ident = $spotter_array[0]['ident']; |
74 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
|
75 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
|
74 | + if (isset($spotter_array[0]['latitude'])) { |
|
75 | + $latitude = $spotter_array[0]['latitude']; |
|
76 | + } |
|
77 | + if (isset($spotter_array[0]['longitude'])) { |
|
78 | + $longitude = $spotter_array[0]['longitude']; |
|
79 | + } |
|
76 | 80 | require_once('header.php'); |
77 | 81 | if (isset($globalArchive) && $globalArchive) { |
78 | 82 | // Requirement for altitude graph |
@@ -80,7 +84,9 @@ discard block |
||
80 | 84 | $all_data = $SpotterArchive->getAltitudeSpeedArchiveSpotterDataById($spotter_array[0]['flightaware_id']); |
81 | 85 | if (isset($globalTimezone)) { |
82 | 86 | date_default_timezone_set($globalTimezone); |
83 | - } else date_default_timezone_set('UTC'); |
|
87 | + } else { |
|
88 | + date_default_timezone_set('UTC'); |
|
89 | + } |
|
84 | 90 | if (count($all_data) > 0) { |
85 | 91 | print '<div id="chart6" class="chart" width="100%"></div> |
86 | 92 | <script> |
@@ -11,10 +11,21 @@ |
||
11 | 11 | <p>You can contribute to <?php print $globalName; ?> if you have an ADS-B receiver.</p> |
12 | 12 | <h3>You need to : </h3> |
13 | 13 | <ul> |
14 | - <li>Create an account on <a href="<?php if (isset($globalContributeLogin)) print $globalContributeLogin.'">'.$globalContributeLogin; else print 'https://login.flightairmap.fr">login.flightairmap.fr'; ?></a></li> |
|
14 | + <li>Create an account on <a href="<?php if (isset($globalContributeLogin)) { |
|
15 | + print $globalContributeLogin.'">'.$globalContributeLogin; |
|
16 | +} else { |
|
17 | + print 'https://login.flightairmap.fr">login.flightairmap.fr'; |
|
18 | +} |
|
19 | +?></a></li> |
|
15 | 20 | <li>Download dump1090 fork from <a href="https://github.com/Ysurac/dump1090">https://github.com/Ysurac/dump1090</a></li> |
16 | 21 | <li>Compile zfamup1090 with <em>make zfamup1090</em> (you need to have libcurl installed)</li> |
17 | - <li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) print ' --net-zfam-addr '.$globalContributeURL; if (isset($globalContributePort)) print ' --net-zfam-port '.$globalContributePort; ?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li> |
|
22 | + <li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) { |
|
23 | + print ' --net-zfam-addr '.$globalContributeURL; |
|
24 | +} |
|
25 | +if (isset($globalContributePort)) { |
|
26 | + print ' --net-zfam-port '.$globalContributePort; |
|
27 | +} |
|
28 | +?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li> |
|
18 | 29 | </ul> |
19 | 30 | </div> |
20 | 31 | <?php |
@@ -215,14 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | $r = null; |
217 | 217 | |
218 | - if( $code == "select" ) { $r = $this->test_select(); } |
|
219 | - elseif( $code == "constant_as" ) { $r = $this->test_constant_as(); } |
|
220 | - elseif( $code == "math_as" ) { $r = $this->test_math_as(); } |
|
221 | - elseif( $code == "count" ) { $r = $this->test_count(); } |
|
222 | - elseif( $code == "max" ) { $r = $this->test_max(); } |
|
223 | - elseif( $code == "load" ) { $r = $this->test_load(); } |
|
224 | - elseif( $code == "sample" ) { $r = $this->test_sample(); } |
|
225 | - else { print "<p>Unknown capability code: '$code'</p>"; return false; } |
|
218 | + if( $code == "select" ) { $r = $this->test_select(); } elseif( $code == "constant_as" ) { $r = $this->test_constant_as(); } elseif( $code == "math_as" ) { $r = $this->test_math_as(); } elseif( $code == "count" ) { $r = $this->test_count(); } elseif( $code == "max" ) { $r = $this->test_max(); } elseif( $code == "load" ) { $r = $this->test_load(); } elseif( $code == "sample" ) { $r = $this->test_sample(); } else { print "<p>Unknown capability code: '$code'</p>"; return false; } |
|
226 | 219 | $this->caps[$code] = $r; |
227 | 220 | if( isset( $this->caps_cache ) ) |
228 | 221 | { |
@@ -231,8 +224,7 @@ discard block |
||
231 | 224 | if( $was_cached ) |
232 | 225 | { |
233 | 226 | dba_replace( $db_key, $db_val, $this->caps_cache ); |
234 | - } |
|
235 | - else |
|
227 | + } else |
|
236 | 228 | { |
237 | 229 | dba_insert( $db_key, $db_val, $this->caps_cache ); |
238 | 230 | } |
@@ -164,15 +164,21 @@ discard block |
||
164 | 164 | |
165 | 165 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
166 | 166 | $_SESSION['install'] = 'vatsim'; |
167 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
168 | - else $_SESSION['next'] = 'Insert VATSIM data'; |
|
167 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
168 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
169 | + } else { |
|
170 | + $_SESSION['next'] = 'Insert VATSIM data'; |
|
171 | + } |
|
169 | 172 | } elseif (isset($globalVATSIM) && $globalVATSIM) { |
170 | 173 | $_SESSION['install'] = 'vatsim'; |
171 | 174 | $_SESSION['next'] = 'Insert VATSIM data'; |
172 | 175 | } elseif (isset($globalIVAO) && $globalIVAO) { |
173 | 176 | $_SESSION['install'] = 'vatsim'; |
174 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
175 | - else $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
177 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
178 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
179 | + } else { |
|
180 | + $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
181 | + } |
|
176 | 182 | } elseif (isset($globalphpVMS) && $globalphpVMS) { |
177 | 183 | $_SESSION['install'] = 'vatsim'; |
178 | 184 | $_SESSION['next'] = 'Insert phpVMS data'; |
@@ -303,7 +309,9 @@ discard block |
||
303 | 309 | $Source = new Source(); |
304 | 310 | $Source->deleteAllLocation(); |
305 | 311 | foreach ($sources as $src) { |
306 | - if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
|
312 | + if (isset($src['latitude']) && $src['latitude'] != '') { |
|
313 | + $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
|
314 | + } |
|
307 | 315 | } |
308 | 316 | $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table')); |
309 | 317 | unset($_SESSION['sources']); |
@@ -314,15 +322,21 @@ discard block |
||
314 | 322 | */ |
315 | 323 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
316 | 324 | $_SESSION['install'] = 'vatsim'; |
317 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
318 | - else $_SESSION['next'] = 'Insert VATSIM data'; |
|
325 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
326 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
327 | + } else { |
|
328 | + $_SESSION['next'] = 'Insert VATSIM data'; |
|
329 | + } |
|
319 | 330 | } elseif (isset($globalVATSIM) && $globalVATSIM) { |
320 | 331 | $_SESSION['install'] = 'vatsim'; |
321 | 332 | $_SESSION['next'] = 'Insert VATSIM data'; |
322 | 333 | } elseif (isset($globalIVAO) && $globalIVAO) { |
323 | 334 | $_SESSION['install'] = 'vatsim'; |
324 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
325 | - else $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
335 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
336 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
337 | + } else { |
|
338 | + $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
339 | + } |
|
326 | 340 | } elseif (isset($globalphpVMS) && $globalphpVMS) { |
327 | 341 | $_SESSION['install'] = 'vatsim'; |
328 | 342 | $_SESSION['next'] = 'Insert phpVMS data'; |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<fieldset class="form-group">'; |
24 | 24 | print '<label for="notam_message">'._("NOTAM Message").'</label>'; |
25 | 25 | print '<textarea class="form-control" name="notam_message" id="notam_message" rows="5">'; |
26 | -if ($message != '') print $message; |
|
26 | +if ($message != '') { |
|
27 | + print $message; |
|
28 | +} |
|
27 | 29 | print '</textarea>'; |
28 | 30 | print '</fieldset>'; |
29 | 31 | print '<button type="submit" class="btn btn-primary">Submit</button>'; |
@@ -63,7 +63,10 @@ |
||
63 | 63 | imagedestroy($image); |
64 | 64 | } else { |
65 | 65 | header('Content-type: image/png'); |
66 | - if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
67 | - else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
|
68 | -} |
|
66 | + if ($color == 'FF0000') { |
|
67 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
68 | + } else { |
|
69 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
|
70 | + } |
|
71 | + } |
|
69 | 72 | ?> |
70 | 73 | \ No newline at end of file |
@@ -28,16 +28,25 @@ discard block |
||
28 | 28 | } elseif (is_numeric(substr(substr($ident, 0, 4), -1, 1))) { |
29 | 29 | //$airline_icao = substr($ident, 0, 3); |
30 | 30 | return $ident; |
31 | - } else return $ident; |
|
32 | - } else return $ident; |
|
31 | + } else { |
|
32 | + return $ident; |
|
33 | + } |
|
34 | + } else { |
|
35 | + return $ident; |
|
36 | + } |
|
33 | 37 | if ($airline_icao == 'AF') { |
34 | - if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
|
35 | - else $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
38 | + if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) { |
|
39 | + $icao = $ident; |
|
40 | + } else { |
|
41 | + $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
42 | + } |
|
36 | 43 | } else { |
37 | 44 | $identicao = $Spotter->getAllAirlineInfo($airline_icao); |
38 | 45 | if (isset($identicao[0])) { |
39 | 46 | $icao = $identicao[0]['icao'].ltrim(substr($ident,2),'0'); |
40 | - } else $icao = $ident; |
|
47 | + } else { |
|
48 | + $icao = $ident; |
|
49 | + } |
|
41 | 50 | } |
42 | 51 | return $icao; |
43 | 52 | } |
@@ -55,7 +64,9 @@ discard block |
||
55 | 64 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
56 | 65 | if (count($row) > 0) { |
57 | 66 | return $row['operator_correct']; |
58 | - } else return $ident; |
|
67 | + } else { |
|
68 | + return $ident; |
|
69 | + } |
|
59 | 70 | } |
60 | 71 | |
61 | 72 | public function addOperator($ident,$correct_ident,$source) { |
@@ -84,7 +95,9 @@ discard block |
||
84 | 95 | global $globalTranslationSources, $globalTranslationFetch; |
85 | 96 | //if (!isset($globalTranslationSources)) $globalTranslationSources = array('planefinder'); |
86 | 97 | $globalTranslationSources = array(); |
87 | - if (!isset($globalTranslationFetch)) $globalTranslationFetch = TRUE; |
|
98 | + if (!isset($globalTranslationFetch)) { |
|
99 | + $globalTranslationFetch = TRUE; |
|
100 | + } |
|
88 | 101 | //echo "Check Translation for ".$ident."..."; |
89 | 102 | $correct = $this->getOperator($ident); |
90 | 103 | if ($correct != '' && $correct != $ident) { |