@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
27 | 27 | ksort($airport_names); |
28 | - foreach($airport_names as $airport_name) |
|
28 | + foreach ($airport_names as $airport_name) |
|
29 | 29 | { |
30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include('airport-sub-menu.php'); |
59 | 59 | print '<div class="column">'; |
60 | 60 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
62 | 62 | |
63 | 63 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
64 | 64 | if (!empty($aircraft_array)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | print '</thead>'; |
76 | 76 | print '<tbody>'; |
77 | 77 | $i = 1; |
78 | - foreach($aircraft_array as $aircraft_item) |
|
78 | + foreach ($aircraft_array as $aircraft_item) |
|
79 | 79 | { |
80 | 80 | print '<tr>'; |
81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
20 | 20 | $previous = null; |
21 | 21 | print '<div class="alphabet-legend">'; |
22 | - foreach($aircraft_types as $value) { |
|
22 | + foreach ($aircraft_types as $value) { |
|
23 | 23 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
24 | 24 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
25 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
25 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
26 | 26 | { |
27 | 27 | if ($previous !== null) print ' | '; |
28 | 28 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | } |
32 | 32 | print '</div>'; |
33 | 33 | $previous = null; |
34 | - foreach($aircraft_types as $value) { |
|
34 | + foreach ($aircraft_types as $value) { |
|
35 | 35 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
36 | 36 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
37 | 37 | if ($firstLetter != "") |
38 | 38 | { |
39 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
39 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
40 | 40 | { |
41 | 41 | if ($previous !== null) print '</div>'; |
42 | 42 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | 12 | if ($sort != '') { |
13 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
13 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
14 | 14 | } else { |
15 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", ''); |
|
15 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", ''); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['ident']); |
|
20 | + $title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['ident']); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="info column">'; |
23 | 23 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | include('ident-sub-menu.php'); |
29 | 29 | print '<div class="column">'; |
30 | 30 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
31 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
31 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
32 | 32 | |
33 | 33 | $aircraft_array = $Spotter->countAllAircraftTypesByIdent($ident); |
34 | 34 | if (!empty($aircraft_array)) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | print '</thead>'; |
44 | 44 | print '<tbody>'; |
45 | 45 | $i = 1; |
46 | - foreach($aircraft_array as $aircraft_item) |
|
46 | + foreach ($aircraft_array as $aircraft_item) |
|
47 | 47 | { |
48 | 48 | print '<tr>'; |
49 | 49 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft by Registration of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Aircraft by Registration of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $aircraft_array = $Spotter->countAllAircraftRegistrationByIdent($ident); |
30 | 30 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | print '</thead>'; |
43 | 43 | print '<tbody>'; |
44 | 44 | $i = 1; |
45 | - foreach($aircraft_array as $aircraft_item) |
|
45 | + foreach ($aircraft_array as $aircraft_item) |
|
46 | 46 | { |
47 | 47 | print '<tr>'; |
48 | 48 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | { |
11 | 11 | $date = date('Y-m-d'); |
12 | 12 | } else { |
13 | - $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
13 | + $date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
14 | 14 | } |
15 | 15 | |
16 | -if(!isset($_GET['limit'])) |
|
16 | +if (!isset($_GET['limit'])) |
|
17 | 17 | { |
18 | 18 | $limit_start = 0; |
19 | 19 | $limit_end = 25; |
@@ -48,25 +48,25 @@ discard block |
||
48 | 48 | print '<br />'; |
49 | 49 | |
50 | 50 | print '<div class="info column">'; |
51 | -if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) { |
|
52 | - print '<h1>'.sprintf(_("Accidents from %s"),date("l F j, Y",strtotime($date))).'</h1>'; |
|
53 | -} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) { |
|
54 | - print '<h1>'.sprintf(_("Accidents from %s"),date("F, Y",strtotime($date))).'</h1>'; |
|
55 | -} elseif (preg_match('/^[0-9]{4}$/',$date)) { |
|
56 | - print '<h1>'.sprintf(_("Accidents from %s"),$date).'</h1>'; |
|
51 | +if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) { |
|
52 | + print '<h1>'.sprintf(_("Accidents from %s"), date("l F j, Y", strtotime($date))).'</h1>'; |
|
53 | +} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) { |
|
54 | + print '<h1>'.sprintf(_("Accidents from %s"), date("F, Y", strtotime($date))).'</h1>'; |
|
55 | +} elseif (preg_match('/^[0-9]{4}$/', $date)) { |
|
56 | + print '<h1>'.sprintf(_("Accidents from %s"), $date).'</h1>'; |
|
57 | 57 | } |
58 | 58 | print '</div>'; |
59 | 59 | |
60 | 60 | print '<div class="table column">'; |
61 | 61 | |
62 | -if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) { |
|
63 | - print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>'; |
|
64 | -} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) { |
|
65 | - print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("M, Y",strtotime($date))).'</p>'; |
|
66 | -} elseif (preg_match('/^[0-9]{4}$/',$date)) { |
|
67 | - print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),$date).'</p>'; |
|
62 | +if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) { |
|
63 | + print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>'; |
|
64 | +} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) { |
|
65 | + print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("M, Y", strtotime($date))).'</p>'; |
|
66 | +} elseif (preg_match('/^[0-9]{4}$/', $date)) { |
|
67 | + print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), $date).'</p>'; |
|
68 | 68 | } |
69 | -$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'accident',$date); |
|
69 | +$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'accident', $date); |
|
70 | 70 | //print_r($spotter_array); |
71 | 71 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
72 | 72 | include('table-output.php'); |
@@ -7,18 +7,18 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
14 | 14 | $filter = array(); |
15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Airlines of %s"),$spotter_array[0]['pilot_name']); |
|
21 | + $title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['pilot_name']); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="info column">'; |
24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | include('pilot-sub-menu.php'); |
30 | 30 | print '<div class="column">'; |
31 | 31 | print '<h2>'._("Most Common Airlines").'</h2>'; |
32 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
32 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
33 | 33 | |
34 | - $airline_array = $Spotter->countAllAirlinesByPilot($pilot,$filter); |
|
34 | + $airline_array = $Spotter->countAllAirlinesByPilot($pilot, $filter); |
|
35 | 35 | if (!empty($airline_array)) |
36 | 36 | { |
37 | 37 | print '<div class="table-responsive">'; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | print '</thead>'; |
47 | 47 | print '<tbody>'; |
48 | 48 | $i = 1; |
49 | - foreach($airline_array as $airline_item) |
|
49 | + foreach ($airline_array as $airline_item) |
|
50 | 50 | { |
51 | 51 | print '<tr>'; |
52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
14 | 14 | $filter = array(); |
15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['pilot_name']); |
|
21 | + $title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['pilot_name']); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="info column">'; |
24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | include('pilot-sub-menu.php'); |
30 | 30 | print '<div class="column">'; |
31 | 31 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
32 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
32 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
33 | 33 | |
34 | - $manufacturers_array = $Spotter->countAllAircraftManufacturerByPilot($pilot,$filter); |
|
34 | + $manufacturers_array = $Spotter->countAllAircraftManufacturerByPilot($pilot, $filter); |
|
35 | 35 | if (!empty($manufacturers_array)) |
36 | 36 | { |
37 | 37 | print '<div class="table-responsive">'; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | print '</thead>'; |
45 | 45 | print '<tbody>'; |
46 | 46 | $i = 1; |
47 | - foreach($manufacturers_array as $manufacturer_item) |
|
47 | + foreach ($manufacturers_array as $manufacturer_item) |
|
48 | 48 | { |
49 | 49 | print '<tr>'; |
50 | 50 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
10 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
14 | 14 | $filter = array(); |
15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Aircraft by Registration of %s"),$spotter_array[0]['pilot_name']); |
|
21 | + $title = sprintf(_("Most Common Aircraft by Registration of %s"), $spotter_array[0]['pilot_name']); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="info column">'; |
24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | include('pilot-sub-menu.php'); |
30 | 30 | print '<div class="column">'; |
31 | 31 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
32 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
32 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
33 | 33 | |
34 | - $aircraft_array = $Spotter->countAllAircraftRegistrationByPilot($pilot,$filter); |
|
34 | + $aircraft_array = $Spotter->countAllAircraftRegistrationByPilot($pilot, $filter); |
|
35 | 35 | |
36 | 36 | if (!empty($aircraft_array)) |
37 | 37 | { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | print '</thead>'; |
48 | 48 | print '<tbody>'; |
49 | 49 | $i = 1; |
50 | - foreach($aircraft_array as $aircraft_item) |
|
50 | + foreach ($aircraft_array as $aircraft_item) |
|
51 | 51 | { |
52 | 52 | print '<tr>'; |
53 | 53 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,22 +7,22 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
14 | 14 | $filter = array(); |
15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
17 | 17 | if ($sort != '') { |
18 | - $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
18 | + $spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
19 | 19 | } else { |
20 | - $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", '',$filter); |
|
20 | + $spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", '', $filter); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | if (!empty($spotter_array)) |
24 | 24 | { |
25 | - $title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['pilot_name']); |
|
25 | + $title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['pilot_name']); |
|
26 | 26 | require_once('header.php'); |
27 | 27 | print '<div class="info column">'; |
28 | 28 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | include('pilot-sub-menu.php'); |
34 | 34 | print '<div class="column">'; |
35 | 35 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
36 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
36 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
37 | 37 | |
38 | - $aircraft_array = $Spotter->countAllAircraftTypesByPilot($pilot,$filter); |
|
38 | + $aircraft_array = $Spotter->countAllAircraftTypesByPilot($pilot, $filter); |
|
39 | 39 | if (!empty($aircraft_array)) |
40 | 40 | { |
41 | 41 | print '<div class="table-responsive">'; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | print '</thead>'; |
48 | 48 | print '<tbody>'; |
49 | 49 | $i = 1; |
50 | - foreach($aircraft_array as $aircraft_item) |
|
50 | + foreach ($aircraft_array as $aircraft_item) |
|
51 | 51 | { |
52 | 52 | print '<tr>'; |
53 | 53 | print '<td><strong>'.$i.'</strong></td>'; |