@@ -8,7 +8,9 @@ |
||
8 | 8 | $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array = array(); |
|
11 | +} else { |
|
12 | + $spotter_array = array(); |
|
13 | +} |
|
12 | 14 | |
13 | 15 | if (!empty($spotter_array)) |
14 | 16 | { |
@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | 7 | if (isset($_GET['registration'])) { |
8 | - $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
8 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | 11 | } else $spotter_array = array(); |
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"), $registration); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="info column">'; |
18 | 18 | print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('registration-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
28 | 28 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByRegistration($registration); |
29 | 29 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
33 | 33 | print 'var series = ['; |
34 | 34 | $country_data = ''; |
35 | - foreach($airport_country_array as $airport_item) |
|
35 | + foreach ($airport_country_array as $airport_item) |
|
36 | 36 | { |
37 | 37 | $country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
38 | 38 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '</thead>'; |
81 | 81 | print '<tbody>'; |
82 | 82 | $i = 1; |
83 | - foreach($airport_country_array as $airport_item) |
|
83 | + foreach ($airport_country_array as $airport_item) |
|
84 | 84 | { |
85 | 85 | print '<tr>'; |
86 | 86 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -11,12 +11,12 @@ |
||
11 | 11 | //checks to see if FlightAware import is set |
12 | 12 | if ($globalFlightAware == TRUE) |
13 | 13 | { |
14 | - $SpotterLive = new SpotterLive(); |
|
15 | - $Spotter = new Spotter(); |
|
16 | - //deletes the spotter LIVE data |
|
17 | - $SpotterLive->deleteLiveSpotterData(); |
|
14 | + $SpotterLive = new SpotterLive(); |
|
15 | + $Spotter = new Spotter(); |
|
16 | + //deletes the spotter LIVE data |
|
17 | + $SpotterLive->deleteLiveSpotterData(); |
|
18 | 18 | |
19 | - //imports the new data from FlightAware |
|
20 | - $Spotter->importFromFlightAware(); |
|
19 | + //imports the new data from FlightAware |
|
20 | + $Spotter->importFromFlightAware(); |
|
21 | 21 | } |
22 | 22 | ?> |
23 | 23 | \ No newline at end of file |
@@ -5,8 +5,8 @@ |
||
5 | 5 | */ |
6 | 6 | require_once(dirname(__FILE__).'/../require/settings.php'); |
7 | 7 | if ($globalInstalled) { |
8 | - echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
9 | - exit; |
|
8 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
9 | + exit; |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | require_once('../require/class.Connection.php'); |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
12 | 12 | $schema = new Connection(); |
13 | 13 | if ($schema->latest() === false) { |
14 | - echo "You MUST update to latest schema. Run install/index.php"; |
|
15 | - exit(); |
|
14 | + echo "You MUST update to latest schema. Run install/index.php"; |
|
15 | + exit(); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $debug = true; |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | date_default_timezone_set('UTC'); |
22 | 22 | // signal handler - playing nice with sockets and dump1090 |
23 | 23 | pcntl_signal(SIGINT, function($signo) { |
24 | - global $sock; |
|
25 | - echo "\n\nctrl-c or kill signal received. Tidying up ... "; |
|
26 | - socket_shutdown($sock, 0); |
|
27 | - socket_close($sock); |
|
28 | - die("Bye!\n"); |
|
24 | + global $sock; |
|
25 | + echo "\n\nctrl-c or kill signal received. Tidying up ... "; |
|
26 | + socket_shutdown($sock, 0); |
|
27 | + socket_close($sock); |
|
28 | + die("Bye!\n"); |
|
29 | 29 | }); |
30 | 30 | pcntl_signal_dispatch(); |
31 | 31 | |
@@ -38,24 +38,24 @@ discard block |
||
38 | 38 | // Bind the source address |
39 | 39 | if( !socket_bind($sock, $globalACARSHost , $globalACARSPort) ) |
40 | 40 | { |
41 | - $errorcode = socket_last_error(); |
|
42 | - $errormsg = socket_strerror($errorcode); |
|
41 | + $errorcode = socket_last_error(); |
|
42 | + $errormsg = socket_strerror($errorcode); |
|
43 | 43 | |
44 | - die("Could not bind socket : [$errorcode] $errormsg \n"); |
|
44 | + die("Could not bind socket : [$errorcode] $errormsg \n"); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | echo "LISTEN UDP MODE \n\n"; |
48 | 48 | while(1) { |
49 | - $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port); |
|
50 | - |
|
51 | - // lets play nice and handle signals such as ctrl-c/kill properly |
|
52 | - pcntl_signal_dispatch(); |
|
53 | - $dataFound = false; |
|
54 | - // (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1 |
|
55 | - echo $buffer."\n"; |
|
56 | - $ACARS->add(trim($buffer)); |
|
57 | - socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port); |
|
58 | - $ACARS->deleteLiveAcarsData(); |
|
49 | + $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port); |
|
50 | + |
|
51 | + // lets play nice and handle signals such as ctrl-c/kill properly |
|
52 | + pcntl_signal_dispatch(); |
|
53 | + $dataFound = false; |
|
54 | + // (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1 |
|
55 | + echo $buffer."\n"; |
|
56 | + $ACARS->add(trim($buffer)); |
|
57 | + socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port); |
|
58 | + $ACARS->deleteLiveAcarsData(); |
|
59 | 59 | } |
60 | 60 | pcntl_exec($_,$argv); |
61 | 61 | ?> |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | |
18 | 18 | $debug = true; |
19 | 19 | |
20 | -$ACARS=new ACARS(null,true); |
|
20 | +$ACARS = new ACARS(null, true); |
|
21 | 21 | date_default_timezone_set('UTC'); |
22 | 22 | // signal handler - playing nice with sockets and dump1090 |
23 | -pcntl_signal(SIGINT, function($signo) { |
|
23 | +pcntl_signal(SIGINT, function($signo) { |
|
24 | 24 | global $sock; |
25 | 25 | echo "\n\nctrl-c or kill signal received. Tidying up ... "; |
26 | 26 | socket_shutdown($sock, 0); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $sock = socket_create(AF_INET, SOCK_DGRAM, 0) or die("Unable to create socket\n"); |
37 | 37 | |
38 | 38 | // Bind the source address |
39 | -if( !socket_bind($sock, $globalACARSHost , $globalACARSPort) ) |
|
39 | +if (!socket_bind($sock, $globalACARSHost, $globalACARSPort)) |
|
40 | 40 | { |
41 | 41 | $errorcode = socket_last_error(); |
42 | 42 | $errormsg = socket_strerror($errorcode); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | echo "LISTEN UDP MODE \n\n"; |
48 | -while(1) { |
|
48 | +while (1) { |
|
49 | 49 | $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port); |
50 | 50 | |
51 | 51 | // lets play nice and handle signals such as ctrl-c/kill properly |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | // (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1 |
55 | 55 | echo $buffer."\n"; |
56 | 56 | $ACARS->add(trim($buffer)); |
57 | - socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port); |
|
57 | + socket_sendto($sock, "OK ".$buffer, 100, 0, $remote_ip, $remote_port); |
|
58 | 58 | $ACARS->deleteLiveAcarsData(); |
59 | 59 | } |
60 | -pcntl_exec($_,$argv); |
|
60 | +pcntl_exec($_, $argv); |
|
61 | 61 | ?> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | $page_url = $globalURL.'/acars-archive'; |
10 | 10 | |
11 | -if(!isset($_GET['limit'])) |
|
11 | +if (!isset($_GET['limit'])) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
@@ -36,8 +36,12 @@ |
||
36 | 36 | if (!empty($spotter_array)) { |
37 | 37 | include('table-output.php'); |
38 | 38 | print '<div class="pagination">'; |
39 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
40 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
39 | + if ($limit_previous_1 >= 0) { |
|
40 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
41 | + } |
|
42 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
43 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
44 | + } |
|
41 | 45 | print '</div>'; |
42 | 46 | } |
43 | 47 | print '</div>'; |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$country = filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING); |
|
8 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$country = filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING); |
|
8 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
11 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
12 | 12 | else $spotter_array = array(); |
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
16 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -24,13 +24,13 @@ discard block |
||
24 | 24 | print '</div>'; |
25 | 25 | |
26 | 26 | print '<div class="info column">'; |
27 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
27 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
28 | 28 | print '</div>'; |
29 | 29 | |
30 | 30 | include('date-sub-menu.php'); |
31 | 31 | print '<div class="column">'; |
32 | 32 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
33 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
33 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
34 | 34 | |
35 | 35 | $airline_array = $Spotter->countAllAirlineCountriesByDate($date); |
36 | 36 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | var data = google.visualization.arrayToDataTable([ |
43 | 43 | ["'._("Country").'", "'._("# of times").'"], '; |
44 | 44 | $country_data = ''; |
45 | - foreach($airline_array as $airline_item) |
|
45 | + foreach ($airline_array as $airline_item) |
|
46 | 46 | { |
47 | 47 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
48 | 48 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | print '</thead>'; |
77 | 77 | print '<tbody>'; |
78 | 78 | $i = 1; |
79 | - foreach($airline_array as $airline_item) |
|
79 | + foreach ($airline_array as $airline_item) |
|
80 | 80 | { |
81 | 81 | print '<tr>'; |
82 | 82 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,8 +8,11 @@ |
||
8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
12 | -else $spotter_array = array(); |
|
11 | +if (isset($_GET['date'])) { |
|
12 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
13 | +} else { |
|
14 | + $spotter_array = array(); |
|
15 | +} |
|
13 | 16 | |
14 | 17 | if (!empty($spotter_array)) |
15 | 18 | { |
@@ -5,8 +5,11 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
7 | 7 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
8 | -if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
|
9 | -else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
|
8 | +if (isset($_GET['sort'])) { |
|
9 | + $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
|
10 | +} else { |
|
11 | + $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
|
12 | +} |
|
10 | 13 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | 14 | |
12 | 15 |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
6 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
8 | 8 | if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
9 | 9 | else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"), $registration); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | |
18 | 18 | print '<div class="info column">'; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | print '<div class="column">'; |
27 | 27 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
28 | 28 | |
29 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
29 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
30 | 30 | $airport_airport_array = $Spotter->countAllDepartureAirportsByRegistration($registration); |
31 | 31 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
32 | 32 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | print '<script>'; |
36 | 36 | print 'var series = ['; |
37 | 37 | $airport_data = ''; |
38 | - foreach($airport_airport_array as $airport_item) |
|
38 | + foreach ($airport_airport_array as $airport_item) |
|
39 | 39 | { |
40 | 40 | if (isset($airport_item['airport_arrival_latitude']) && isset($airport_item['airport_arrival_longitude'])) { |
41 | 41 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | print '</thead>'; |
92 | 92 | print '<tbody>'; |
93 | 93 | $i = 1; |
94 | - foreach($airport_airport_array as $airport_item) |
|
94 | + foreach ($airport_airport_array as $airport_item) |
|
95 | 95 | { |
96 | 96 | print '<tr>'; |
97 | 97 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | print '</thead>'; |
28 | 28 | print '<tbody>'; |
29 | 29 | $i = 1; |
30 | - foreach($route_array as $route_item) |
|
30 | + foreach ($route_array as $route_item) |
|
31 | 31 | { |
32 | 32 | print '<tr>'; |
33 | 33 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,7 +5,9 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Route by Waypoint"); |
7 | 7 | require_once('header.php'); |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | include('statistics-sub-menu.php'); |
10 | 12 | |
11 | 13 | print '<div class="info"> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | $page_url = $globalURL.'/tools-metar'; |
12 | 12 | |
13 | -$message = filter_input(INPUT_POST,'metar_message',FILTER_SANITIZE_STRING); |
|
13 | +$message = filter_input(INPUT_POST, 'metar_message', FILTER_SANITIZE_STRING); |
|
14 | 14 | |
15 | 15 | print '<div class="info column">'; |
16 | 16 | print '<h1>'._("Parse METAR messages").'</h1>'; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | print '<b>'._("Dew point:").'</b> '.$metar_parse['dew'].' °C'." "; |
72 | 72 | } |
73 | 73 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
74 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
74 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
75 | 75 | print '<b>'._("Humidity:").'</b> '.$humidity.'%'." "; |
76 | 76 | } |
77 | 77 | if (isset($metar_parse['QNH'])) { |
@@ -23,7 +23,9 @@ discard block |
||
23 | 23 | print '<fieldset class="form-group">'; |
24 | 24 | print '<label for="metar_message">'._("METAR Message").'</label>'; |
25 | 25 | print '<textarea class="form-control" name="metar_message" id="metar_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>'; |
@@ -59,7 +61,9 @@ discard block |
||
59 | 61 | if (isset($metar_parse['cloud'])) { |
60 | 62 | print '<b>'._("Cloud:").'</b> '; |
61 | 63 | foreach ($metar_parse['cloud'] as $key => $cloud) { |
62 | - if ($key > 0) print ' / '; |
|
64 | + if ($key > 0) { |
|
65 | + print ' / '; |
|
66 | + } |
|
63 | 67 | print $cloud['type'].' at '.$cloud['level'].' m'; |
64 | 68 | } |
65 | 69 | print " "; |