@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -16,7 +16,9 @@ discard block |
||
16 | 16 | print '<h1>'._("Aircrafts Types").'</h1>'; |
17 | 17 | |
18 | 18 | $aircraft_types = $Stats->getAllAircraftTypes(); |
19 | - if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
19 | + if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') { |
|
20 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
21 | + } |
|
20 | 22 | $previous = null; |
21 | 23 | print '<div class="alphabet-legend">'; |
22 | 24 | foreach($aircraft_types as $value) { |
@@ -24,10 +26,14 @@ discard block |
||
24 | 26 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
25 | 27 | if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
26 | 28 | { |
27 | - if ($previous !== null) print ' | '; |
|
29 | + if ($previous !== null) { |
|
30 | + print ' | '; |
|
31 | + } |
|
28 | 32 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
29 | 33 | } |
30 | - if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter; |
|
34 | + if ($firstLetter != '(' && $firstLetter != ')') { |
|
35 | + $previous = $firstLetter; |
|
36 | + } |
|
31 | 37 | } |
32 | 38 | print '</div>'; |
33 | 39 | $previous = null; |
@@ -38,10 +44,14 @@ discard block |
||
38 | 44 | { |
39 | 45 | if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
40 | 46 | { |
41 | - if ($previous !== null) print '</div>'; |
|
47 | + if ($previous !== null) { |
|
48 | + print '</div>'; |
|
49 | + } |
|
42 | 50 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
43 | 51 | } |
44 | - if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter; |
|
52 | + if ($firstLetter != '(' && $firstLetter != ')') { |
|
53 | + $previous = $firstLetter; |
|
54 | + } |
|
45 | 55 | print '<div class="alphabet-item">'; |
46 | 56 | print '<a href="'.$globalURL.'/aircraft/'.$value['aircraft_icao'].'">'; |
47 | 57 | if ($value['aircraft_name'] == '') { |
@@ -58,8 +58,12 @@ |
||
58 | 58 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
59 | 59 | include('table-output.php'); |
60 | 60 | print '<div class="pagination">'; |
61 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
62 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
61 | + if ($limit_previous_1 >= 0) { |
|
62 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
63 | + } |
|
64 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
65 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
66 | + } |
|
63 | 67 | print '</div>'; |
64 | 68 | } |
65 | 69 | print '</div>'; |
@@ -4,7 +4,9 @@ |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Stats = new Stats(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Airline by Country"); |
7 | -if (!isset($filter_name)) $filter_name = ''; |
|
7 | +if (!isset($filter_name)) { |
|
8 | + $filter_name = ''; |
|
9 | +} |
|
8 | 10 | require_once('header.php'); |
9 | 11 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
10 | 12 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
@@ -5,7 +5,9 @@ |
||
5 | 5 | $Stats = new Stats(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Airline"); |
7 | 7 | require_once('header.php'); |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
10 | 12 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
11 | 13 | include('statistics-sub-menu.php'); |
@@ -31,7 +31,9 @@ discard block |
||
31 | 31 | } |
32 | 32 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
33 | 33 | } |
34 | - if ($firstLetter != "'") $previous = $firstLetter; |
|
34 | + if ($firstLetter != "'") { |
|
35 | + $previous = $firstLetter; |
|
36 | + } |
|
35 | 37 | } |
36 | 38 | print '</div>'; |
37 | 39 | $previous = null; |
@@ -46,10 +48,15 @@ discard block |
||
46 | 48 | } |
47 | 49 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
48 | 50 | } |
49 | - if ($firstLetter != "'") $previous = $firstLetter; |
|
51 | + if ($firstLetter != "'") { |
|
52 | + $previous = $firstLetter; |
|
53 | + } |
|
50 | 54 | print '<div class="alphabet-item">'; |
51 | - if (isset($value['pilot_id']) && $value['pilot_id'] != '') print '<a href="'.$globalURL.'/pilot/'.$value['pilot_id'].'">'.$value['pilot_name'].' ('.$value['pilot_id'].')'; |
|
52 | - else print '<a href="'.$globalURL.'/pilot/'.$value['pilot_name'].'">'.$value['pilot_name']; |
|
55 | + if (isset($value['pilot_id']) && $value['pilot_id'] != '') { |
|
56 | + print '<a href="'.$globalURL.'/pilot/'.$value['pilot_id'].'">'.$value['pilot_name'].' ('.$value['pilot_id'].')'; |
|
57 | + } else { |
|
58 | + print '<a href="'.$globalURL.'/pilot/'.$value['pilot_name'].'">'.$value['pilot_name']; |
|
59 | + } |
|
53 | 60 | print '</a>'; |
54 | 61 | print '</div>'; |
55 | 62 | } |
@@ -33,7 +33,9 @@ discard block |
||
33 | 33 | } |
34 | 34 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
35 | 35 | } |
36 | - if ($firstLetter != "'" && $firstLetter != '"') $previous = $firstLetter; |
|
36 | + if ($firstLetter != "'" && $firstLetter != '"') { |
|
37 | + $previous = $firstLetter; |
|
38 | + } |
|
37 | 39 | } |
38 | 40 | print '</div>'; |
39 | 41 | $previous = null; |
@@ -48,7 +50,9 @@ discard block |
||
48 | 50 | } |
49 | 51 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
50 | 52 | } |
51 | - if ($firstLetter != "'" && $firstLetter != '"') $previous = $firstLetter; |
|
53 | + if ($firstLetter != "'" && $firstLetter != '"') { |
|
54 | + $previous = $firstLetter; |
|
55 | + } |
|
52 | 56 | print '<div class="alphabet-item">'; |
53 | 57 | print '<a href="'.$globalURL.'/owner/'.$value['owner_name'].'">'; |
54 | 58 | print $value['owner_name']; |
@@ -71,8 +71,11 @@ |
||
71 | 71 | print '<tr>'; |
72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
73 | 73 | print '<td>'; |
74 | - if ($date_item['month'] < 10) $month = '0'.$date_item['month']; |
|
75 | - else $month = $date_item['month']; |
|
74 | + if ($date_item['month'] < 10) { |
|
75 | + $month = '0'.$date_item['month']; |
|
76 | + } else { |
|
77 | + $month = $date_item['month']; |
|
78 | + } |
|
76 | 79 | print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
77 | 80 | print '</td>'; |
78 | 81 | print '<td>'; |
@@ -5,11 +5,15 @@ |
||
5 | 5 | $Stats = new Stats(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Aircraft Registrations"); |
7 | 7 | |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 12 | if ($airline_icao == '' && isset($globalFilter)) { |
11 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
12 | -} |
|
13 | + if (isset($globalFilter['airline'])) { |
|
14 | + $airline_icao = $globalFilter['airline'][0]; |
|
15 | + } |
|
16 | + } |
|
13 | 17 | setcookie('stats_airline_icao',$airline_icao,time()+60*60*24,'/'); |
14 | 18 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 19 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |