@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -9,22 +9,22 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $archive = true; |
23 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
23 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
24 | 24 | } |
25 | 25 | if (!empty($spotter_array)) |
26 | 26 | { |
27 | - $title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['aircraft_owner']); |
|
27 | + $title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['aircraft_owner']); |
|
28 | 28 | require_once('header.php'); |
29 | 29 | print '<div class="info column">'; |
30 | 30 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | include('owner-sub-menu.php'); |
36 | 36 | print '<div class="column">'; |
37 | 37 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
38 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
39 | 39 | |
40 | 40 | if ($archive === false) { |
41 | - $hour_array = $Spotter->countAllHoursByOwner($owner,$filter); |
|
41 | + $hour_array = $Spotter->countAllHoursByOwner($owner, $filter); |
|
42 | 42 | } else { |
43 | - $hour_array = $SpotterArchive->countAllHoursByOwner($owner,$filter); |
|
43 | + $hour_array = $SpotterArchive->countAllHoursByOwner($owner, $filter); |
|
44 | 44 | } |
45 | 45 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
46 | 46 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | $hour_data = ''; |
50 | 50 | $hour_cnt = ''; |
51 | 51 | $last = 0; |
52 | - foreach($hour_array as $hour_item) |
|
52 | + foreach ($hour_array as $hour_item) |
|
53 | 53 | { |
54 | - while($last != $hour_item['hour_name']) { |
|
54 | + while ($last != $hour_item['hour_name']) { |
|
55 | 55 | $hour_data .= '"'.$last.':00",'; |
56 | 56 | $hour_cnt .= '0,'; |
57 | 57 | $last++; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $hour_cnt .= $hour_item['hour_count'].','; |
62 | 62 | } |
63 | 63 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
64 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
64 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
65 | 65 | print 'c3.generate({ |
66 | 66 | bindto: "#chartHour", |
67 | 67 | data: { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | print '</thead>'; |
87 | 87 | print '<tbody>'; |
88 | 88 | $i = 1; |
89 | - foreach($hour_array as $hour_item) |
|
89 | + foreach ($hour_array as $hour_item) |
|
90 | 90 | { |
91 | 91 | print '<tr>'; |
92 | 92 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
13 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
13 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
22 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
23 | 23 | } |
24 | 24 | if (!empty($spotter_array)) |
25 | 25 | { |
26 | - $title = sprintf(_("Most Common Aircraft by Registration of %s"),$spotter_array[0]['aircraft_owner']); |
|
26 | + $title = sprintf(_("Most Common Aircraft by Registration of %s"), $spotter_array[0]['aircraft_owner']); |
|
27 | 27 | require_once('header.php'); |
28 | 28 | print '<div class="info column">'; |
29 | 29 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | include('owner-sub-menu.php'); |
35 | 35 | print '<div class="column">'; |
36 | 36 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
37 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
37 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | 38 | if ($archive === false) { |
39 | - $aircraft_array = $Spotter->countAllAircraftRegistrationByOwner($owner,$filter); |
|
39 | + $aircraft_array = $Spotter->countAllAircraftRegistrationByOwner($owner, $filter); |
|
40 | 40 | } else { |
41 | - $aircraft_array = $SpotterArchive->countAllAircraftRegistrationByOwner($owner,$filter); |
|
41 | + $aircraft_array = $SpotterArchive->countAllAircraftRegistrationByOwner($owner, $filter); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | if (!empty($aircraft_array)) |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | print '</thead>'; |
56 | 56 | print '<tbody>'; |
57 | 57 | $i = 1; |
58 | - foreach($aircraft_array as $aircraft_item) |
|
58 | + foreach ($aircraft_array as $aircraft_item) |
|
59 | 59 | { |
60 | 60 | print '<tr>'; |
61 | 61 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -9,22 +9,22 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $archive = true; |
23 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
23 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
24 | 24 | } |
25 | 25 | if (!empty($spotter_array)) |
26 | 26 | { |
27 | - $title = sprintf(_("Most Common Departure Airports of %s"),$spotter_array[0]['aircraft_owner']); |
|
27 | + $title = sprintf(_("Most Common Departure Airports of %s"), $spotter_array[0]['aircraft_owner']); |
|
28 | 28 | require_once('header.php'); |
29 | 29 | print '<div class="info column">'; |
30 | 30 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | include('owner-sub-menu.php'); |
36 | 36 | print '<div class="column">'; |
37 | 37 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
38 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
39 | 39 | if ($archive === false) { |
40 | - $airport_airport_array = $Spotter->countAllDepartureAirportsByOwner($owner,$filter); |
|
40 | + $airport_airport_array = $Spotter->countAllDepartureAirportsByOwner($owner, $filter); |
|
41 | 41 | } else { |
42 | - $airport_airport_array = $SpotterArchive->countAllDepartureAirportsByOwner($owner,$filter); |
|
42 | + $airport_airport_array = $SpotterArchive->countAllDepartureAirportsByOwner($owner, $filter); |
|
43 | 43 | } |
44 | 44 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
45 | 45 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | print '<script>'; |
49 | 49 | print 'var series = ['; |
50 | 50 | $airport_data = ''; |
51 | - foreach($airport_airport_array as $airport_item) |
|
51 | + foreach ($airport_airport_array as $airport_item) |
|
52 | 52 | { |
53 | 53 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
54 | 54 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | print '</thead>'; |
104 | 104 | print '<tbody>'; |
105 | 105 | $i = 1; |
106 | - foreach($airport_airport_array as $airport_item) |
|
106 | + foreach ($airport_airport_array as $airport_item) |
|
107 | 107 | { |
108 | 108 | print '<tr>'; |
109 | 109 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -9,22 +9,22 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort, $filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $archive = true; |
23 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort, $filter); |
|
23 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
24 | 24 | } |
25 | 25 | if (!empty($spotter_array)) |
26 | 26 | { |
27 | - $title = sprintf(_("Most Common Arrival Airports by Country of %s"),$spotter_array[0]['aircraft_owner']); |
|
27 | + $title = sprintf(_("Most Common Arrival Airports by Country of %s"), $spotter_array[0]['aircraft_owner']); |
|
28 | 28 | require_once('header.php'); |
29 | 29 | print '<div class="info column">'; |
30 | 30 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | include('owner-sub-menu.php'); |
36 | 36 | print '<div class="column">'; |
37 | 37 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
38 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
39 | 39 | if ($archive === false) { |
40 | - $airport_country_array = $Spotter->countAllArrivalAirportCountriesByOwner($owner,$filter); |
|
40 | + $airport_country_array = $Spotter->countAllArrivalAirportCountriesByOwner($owner, $filter); |
|
41 | 41 | } else { |
42 | - $airport_country_array = $SpotterArchive->countAllArrivalAirportCountriesByOwner($owner,$filter); |
|
42 | + $airport_country_array = $SpotterArchive->countAllArrivalAirportCountriesByOwner($owner, $filter); |
|
43 | 43 | } |
44 | 44 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
45 | 45 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
48 | 48 | print 'var series = ['; |
49 | 49 | $country_data = ''; |
50 | - foreach($airport_country_array as $airport_item) |
|
50 | + foreach ($airport_country_array as $airport_item) |
|
51 | 51 | { |
52 | 52 | $country_data .= '[ "'.$airport_item['airport_arrival_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
53 | 53 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | print '</thead>'; |
95 | 95 | print '<tbody>'; |
96 | 96 | $i = 1; |
97 | - foreach($airport_country_array as $airport_item) |
|
97 | + foreach ($airport_country_array as $airport_item) |
|
98 | 98 | { |
99 | 99 | print '<tr>'; |
100 | 100 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort, $filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -9,23 +9,23 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $archive = true; |
23 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
23 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | if (!empty($spotter_array)) |
27 | 27 | { |
28 | - $title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['aircraft_owner']); |
|
28 | + $title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['aircraft_owner']); |
|
29 | 29 | require_once('header.php'); |
30 | 30 | print '<div class="info column">'; |
31 | 31 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -36,12 +36,12 @@ discard block |
||
36 | 36 | include('owner-sub-menu.php'); |
37 | 37 | print '<div class="column">'; |
38 | 38 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
39 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
39 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
40 | 40 | |
41 | 41 | if ($archive === false) { |
42 | - $aircraft_array = $Spotter->countAllAircraftTypesByOwner($owner,$filter); |
|
42 | + $aircraft_array = $Spotter->countAllAircraftTypesByOwner($owner, $filter); |
|
43 | 43 | } else { |
44 | - $aircraft_array = $SpotterArchive->countAllAircraftTypesByOwner($owner,$filter); |
|
44 | + $aircraft_array = $SpotterArchive->countAllAircraftTypesByOwner($owner, $filter); |
|
45 | 45 | } |
46 | 46 | if (!empty($aircraft_array)) |
47 | 47 | { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | print '</thead>'; |
55 | 55 | print '<tbody>'; |
56 | 56 | $i = 1; |
57 | - foreach($aircraft_array as $aircraft_item) |
|
57 | + foreach ($aircraft_array as $aircraft_item) |
|
58 | 58 | { |
59 | 59 | print '<tr>'; |
60 | 60 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | //require_once('require/class.SpotterLive.php'); |
8 | 8 | require_once('require/class.SpotterArchive.php'); |
9 | 9 | |
10 | -if (!isset($_GET['owner'])){ |
|
10 | +if (!isset($_GET['owner'])) { |
|
11 | 11 | header('Location: '.$globalURL.''); |
12 | 12 | } else { |
13 | 13 | $Spotter = new Spotter(); |
14 | 14 | $SpotterArchive = new SpotterArchive(); |
15 | 15 | //$Translation = new Translation(); |
16 | 16 | //calculuation for the pagination |
17 | - if(!isset($_GET['limit'])) |
|
17 | + if (!isset($_GET['limit'])) |
|
18 | 18 | { |
19 | 19 | $limit_start = 0; |
20 | 20 | $limit_end = 25; |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | } else { |
23 | 23 | $limit_explode = explode(",", $_GET['limit']); |
24 | 24 | if (isset($limit_explode[1])) { |
25 | - $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
|
26 | - $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
|
25 | + $limit_start = filter_var($limit_explode[0], FILTER_SANITIZE_NUMBER_INT); |
|
26 | + $limit_end = filter_var($limit_explode[1], FILTER_SANITIZE_NUMBER_INT); |
|
27 | 27 | } else { |
28 | 28 | $limit_start = 0; |
29 | 29 | $limit_end = 25; |
@@ -40,21 +40,21 @@ discard block |
||
40 | 40 | |
41 | 41 | $page_url = $globalURL.'/owner/'.$_GET['owner']; |
42 | 42 | |
43 | - $owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
44 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
45 | - $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
46 | - $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
43 | + $owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
44 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
45 | + $year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
46 | + $month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
47 | 47 | $filter = array(); |
48 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
49 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
50 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
|
48 | + if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
49 | + if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
50 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, $sort, $filter); |
|
51 | 51 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
52 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
|
52 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, $sort, $filter); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | if (!empty($spotter_array)) |
56 | 56 | { |
57 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']); |
|
57 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['aircraft_owner']); |
|
58 | 58 | //$ident = $spotter_array[0]['ident']; |
59 | 59 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
60 | 60 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -65,23 +65,23 @@ discard block |
||
65 | 65 | $Stats = new Stats(); |
66 | 66 | if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner); |
67 | 67 | else $flights = 0; |
68 | - if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
68 | + if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner, $filter); |
|
69 | 69 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
70 | - $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter)); |
|
70 | + $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner, $filter)); |
|
71 | 71 | print '<div><span class="label">'._("Aircraft type").'</span>'.$aircraft_type.'</div>'; |
72 | - $aircraft_registration = count($Spotter->countAllAircraftRegistrationByOwner($owner,$filter)); |
|
72 | + $aircraft_registration = count($Spotter->countAllAircraftRegistrationByOwner($owner, $filter)); |
|
73 | 73 | print '<div><span class="label">'._("Aircraft").'</span>'.$aircraft_registration.'</div>'; |
74 | - $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByOwner($owner,$filter)); |
|
74 | + $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByOwner($owner, $filter)); |
|
75 | 75 | print '<div><span class="label">'._("Manufacturers").'</span>'.$aircraft_manufacturer.'</div>'; |
76 | - $airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter)); |
|
76 | + $airlines = count($Spotter->countAllAirlinesByOwner($owner, $filter)); |
|
77 | 77 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
78 | - $duration = $Spotter->getFlightDurationByOwner($owner,$filter); |
|
78 | + $duration = $Spotter->getFlightDurationByOwner($owner, $filter); |
|
79 | 79 | if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
80 | 80 | print '</div>'; |
81 | 81 | |
82 | 82 | include('owner-sub-menu.php'); |
83 | 83 | print '<div class="table column">'; |
84 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the owner <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
84 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the owner <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
85 | 85 | |
86 | 86 | include('table-output.php'); |
87 | 87 | print '<div class="pagination">'; |
@@ -45,8 +45,12 @@ discard block |
||
45 | 45 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
46 | 46 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
47 | 47 | $filter = array(); |
48 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
49 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
48 | + if ($year != '') { |
|
49 | + $filter = array_merge($filter,array('year' => $year)); |
|
50 | + } |
|
51 | + if ($month != '') { |
|
52 | + $filter = array_merge($filter,array('month' => $month)); |
|
53 | + } |
|
50 | 54 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
51 | 55 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
52 | 56 | $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
@@ -56,16 +60,25 @@ discard block |
||
56 | 60 | { |
57 | 61 | $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']); |
58 | 62 | //$ident = $spotter_array[0]['ident']; |
59 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
|
60 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
|
63 | + if (isset($spotter_array[0]['latitude'])) { |
|
64 | + $latitude = $spotter_array[0]['latitude']; |
|
65 | + } |
|
66 | + if (isset($spotter_array[0]['longitude'])) { |
|
67 | + $longitude = $spotter_array[0]['longitude']; |
|
68 | + } |
|
61 | 69 | require_once('header.php'); |
62 | 70 | print '<div class="info column">'; |
63 | 71 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
64 | 72 | //print '<div><span class="label">'._("Owner").'</span>'.$spotter_array[0]['aircraft_owner'].'</div>'; |
65 | 73 | $Stats = new Stats(); |
66 | - if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner); |
|
67 | - else $flights = 0; |
|
68 | - if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
74 | + if ($year == '' && $month == '') { |
|
75 | + $flights = $Stats->getStatsOwner($owner); |
|
76 | + } else { |
|
77 | + $flights = 0; |
|
78 | + } |
|
79 | + if ($flights == 0) { |
|
80 | + $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
81 | + } |
|
69 | 82 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
70 | 83 | $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter)); |
71 | 84 | print '<div><span class="label">'._("Aircraft type").'</span>'.$aircraft_type.'</div>'; |
@@ -76,7 +89,9 @@ discard block |
||
76 | 89 | $airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter)); |
77 | 90 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
78 | 91 | $duration = $Spotter->getFlightDurationByOwner($owner,$filter); |
79 | - if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
92 | + if ($duration != '0') { |
|
93 | + print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
94 | + } |
|
80 | 95 | print '</div>'; |
81 | 96 | |
82 | 97 | include('owner-sub-menu.php'); |
@@ -9,22 +9,22 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $archive = true; |
23 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
23 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
24 | 24 | } |
25 | 25 | if (!empty($spotter_array)) |
26 | 26 | { |
27 | - $title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['aircraft_owner']); |
|
27 | + $title = sprintf(_("Most Common Arrival Airports of %s"), $spotter_array[0]['aircraft_owner']); |
|
28 | 28 | require_once('header.php'); |
29 | 29 | print '<div class="info column">'; |
30 | 30 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | include('owner-sub-menu.php'); |
36 | 36 | print '<div class="column">'; |
37 | 37 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
38 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
39 | 39 | if ($archive === false) { |
40 | - $airport_airport_array = $Spotter->countAllArrivalAirportsByOwner($owner,$filter); |
|
40 | + $airport_airport_array = $Spotter->countAllArrivalAirportsByOwner($owner, $filter); |
|
41 | 41 | } else { |
42 | - $airport_airport_array = $SpotterArchive->countAllArrivalAirportsByOwner($owner,$filter); |
|
42 | + $airport_airport_array = $SpotterArchive->countAllArrivalAirportsByOwner($owner, $filter); |
|
43 | 43 | } |
44 | 44 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
45 | 45 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | print '<script>'; |
49 | 49 | print 'var series = ['; |
50 | 50 | $airport_data = ''; |
51 | - foreach($airport_airport_array as $airport_item) |
|
51 | + foreach ($airport_airport_array as $airport_item) |
|
52 | 52 | { |
53 | 53 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
54 | 54 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | print '</thead>'; |
104 | 104 | print '<tbody>'; |
105 | 105 | $i = 1; |
106 | - foreach($airport_airport_array as $airport_item) |
|
106 | + foreach ($airport_airport_array as $airport_item) |
|
107 | 107 | { |
108 | 108 | print '<tr>'; |
109 | 109 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -9,22 +9,22 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $archive = true; |
23 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
23 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
24 | 24 | } |
25 | 25 | if (!empty($spotter_array)) |
26 | 26 | { |
27 | - $title = sprintf(_("Most Common Routes of %s"),$spotter_array[0]['aircraft_owner']); |
|
27 | + $title = sprintf(_("Most Common Routes of %s"), $spotter_array[0]['aircraft_owner']); |
|
28 | 28 | require_once('header.php'); |
29 | 29 | print '<div class="info column">'; |
30 | 30 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | include('owner-sub-menu.php'); |
36 | 36 | print '<div class="column">'; |
37 | 37 | print '<h2>'._("Most Common Routes").'</h2>'; |
38 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from flights owner by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from flights owner by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
39 | 39 | if ($archive === false) { |
40 | - $route_array = $Spotter->countAllRoutesByOwner($owner,$filter); |
|
40 | + $route_array = $Spotter->countAllRoutesByOwner($owner, $filter); |
|
41 | 41 | } else { |
42 | - $route_array = $SpotterArchive->countAllRoutesByOwner($owner,$filter); |
|
42 | + $route_array = $SpotterArchive->countAllRoutesByOwner($owner, $filter); |
|
43 | 43 | } |
44 | 44 | if (!empty($route_array)) |
45 | 45 | { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | print '</thead>'; |
56 | 56 | print '<tbody>'; |
57 | 57 | $i = 1; |
58 | - foreach($route_array as $route_item) |
|
58 | + foreach ($route_array as $route_item) |
|
59 | 59 | { |
60 | 60 | print '<tr>'; |
61 | 61 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING)); |
|
14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING)); |
|
14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
18 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
19 | 19 | $archive = false; |
20 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
20 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
22 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
23 | 23 | } |
24 | 24 | if (!empty($spotter_array)) |
25 | 25 | { |
26 | - $title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['aircraft_owner']); |
|
26 | + $title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['aircraft_owner']); |
|
27 | 27 | require_once('header.php'); |
28 | 28 | print '<div class="info column">'; |
29 | 29 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -34,12 +34,12 @@ discard block |
||
34 | 34 | include('owner-sub-menu.php'); |
35 | 35 | print '<div class="column">'; |
36 | 36 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
37 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
37 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
38 | 38 | |
39 | 39 | if ($archive === false) { |
40 | - $manufacturers_array = $Spotter->countAllAircraftManufacturerByOwner($owner,$filter); |
|
40 | + $manufacturers_array = $Spotter->countAllAircraftManufacturerByOwner($owner, $filter); |
|
41 | 41 | } else { |
42 | - $manufacturers_array = $SpotterArchive->countAllAircraftManufacturerByOwner($owner,$filter); |
|
42 | + $manufacturers_array = $SpotterArchive->countAllAircraftManufacturerByOwner($owner, $filter); |
|
43 | 43 | } |
44 | 44 | if (!empty($manufacturers_array)) |
45 | 45 | { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | print '</thead>'; |
54 | 54 | print '<tbody>'; |
55 | 55 | $i = 1; |
56 | - foreach($manufacturers_array as $manufacturer_item) |
|
56 | + foreach ($manufacturers_array as $manufacturer_item) |
|
57 | 57 | { |
58 | 58 | print '<tr>'; |
59 | 59 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.SpotterArchive.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['owner'])) { |
7 | - header('Location: '.$globalURL.'/owner'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/owner'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $SpotterArchive = new SpotterArchive(); |
@@ -14,8 +14,12 @@ |
||
14 | 14 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
15 | 15 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
16 | 16 | $filter = array(); |
17 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
18 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
17 | +if ($year != '') { |
|
18 | + $filter = array_merge($filter,array('year' => $year)); |
|
19 | +} |
|
20 | +if ($month != '') { |
|
21 | + $filter = array_merge($filter,array('month' => $month)); |
|
22 | +} |
|
19 | 23 | $archive = false; |
20 | 24 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
21 | 25 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |