@@ -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,29 +40,29 @@ 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)); |
|
48 | + if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
49 | + if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
50 | 50 | if ($sort != '') |
51 | 51 | { |
52 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
|
52 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, $sort, $filter); |
|
53 | 53 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
54 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
|
54 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, $sort, $filter); |
|
55 | 55 | } |
56 | 56 | } else { |
57 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference,'',$filter); |
|
57 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, '', $filter); |
|
58 | 58 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
59 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference,'',$filter); |
|
59 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, '', $filter); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | 63 | if (!empty($spotter_array)) |
64 | 64 | { |
65 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']); |
|
65 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['aircraft_owner']); |
|
66 | 66 | //$ident = $spotter_array[0]['ident']; |
67 | 67 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
68 | 68 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -122,23 +122,23 @@ discard block |
||
122 | 122 | $Stats = new Stats(); |
123 | 123 | if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner); |
124 | 124 | else $flights = 0; |
125 | - if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
125 | + if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner, $filter); |
|
126 | 126 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
127 | - $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter)); |
|
127 | + $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner, $filter)); |
|
128 | 128 | print '<div><span class="label">'._("Aircrafts type").'</span>'.$aircraft_type.'</div>'; |
129 | - $aircraft_registration = count($Spotter->countAllAircraftRegistrationByOwner($owner,$filter)); |
|
129 | + $aircraft_registration = count($Spotter->countAllAircraftRegistrationByOwner($owner, $filter)); |
|
130 | 130 | print '<div><span class="label">'._("Aircrafts").'</span>'.$aircraft_registration.'</div>'; |
131 | - $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByOwner($owner,$filter)); |
|
131 | + $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByOwner($owner, $filter)); |
|
132 | 132 | print '<div><span class="label">'._("Manufacturers").'</span>'.$aircraft_manufacturer.'</div>'; |
133 | - $airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter)); |
|
133 | + $airlines = count($Spotter->countAllAirlinesByOwner($owner, $filter)); |
|
134 | 134 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
135 | - $duration = $Spotter->getFlightDurationByOwner($owner,$filter); |
|
135 | + $duration = $Spotter->getFlightDurationByOwner($owner, $filter); |
|
136 | 136 | if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
137 | 137 | print '</div>'; |
138 | 138 | |
139 | 139 | include('owner-sub-menu.php'); |
140 | 140 | print '<div class="table column">'; |
141 | - 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>'; |
|
141 | + 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>'; |
|
142 | 142 | |
143 | 143 | include('table-output.php'); |
144 | 144 | print '<div class="pagination">'; |