@@ -12,8 +12,12 @@ |
||
12 | 12 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
13 | 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 != '') { |
|
16 | + $filter = array_merge($filter,array('year' => $year)); |
|
17 | +} |
|
18 | +if ($month != '') { |
|
19 | + $filter = array_merge($filter,array('month' => $month)); |
|
20 | +} |
|
17 | 21 | $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
18 | 22 | |
19 | 23 | if (!empty($spotter_array)) |
@@ -12,8 +12,12 @@ |
||
12 | 12 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
13 | 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 != '') { |
|
16 | + $filter = array_merge($filter,array('year' => $year)); |
|
17 | +} |
|
18 | +if ($month != '') { |
|
19 | + $filter = array_merge($filter,array('month' => $month)); |
|
20 | +} |
|
17 | 21 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
18 | 22 | |
19 | 23 | if (!empty($spotter_array)) |
@@ -40,8 +40,12 @@ discard block |
||
40 | 40 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
41 | 41 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
42 | 42 | $filter = array(); |
43 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
44 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
43 | + if ($year != '') { |
|
44 | + $filter = array_merge($filter,array('year' => $year)); |
|
45 | + } |
|
46 | + if ($month != '') { |
|
47 | + $filter = array_merge($filter,array('month' => $month)); |
|
48 | + } |
|
45 | 49 | if ($sort != '') |
46 | 50 | { |
47 | 51 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
@@ -59,8 +63,12 @@ discard block |
||
59 | 63 | { |
60 | 64 | $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']); |
61 | 65 | //$ident = $spotter_array[0]['ident']; |
62 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
|
63 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
|
66 | + if (isset($spotter_array[0]['latitude'])) { |
|
67 | + $latitude = $spotter_array[0]['latitude']; |
|
68 | + } |
|
69 | + if (isset($spotter_array[0]['longitude'])) { |
|
70 | + $longitude = $spotter_array[0]['longitude']; |
|
71 | + } |
|
64 | 72 | require_once('header.php'); |
65 | 73 | /* |
66 | 74 | if (isset($globalArchive) && $globalArchive) { |
@@ -115,9 +123,14 @@ discard block |
||
115 | 123 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
116 | 124 | //print '<div><span class="label">'._("Owner").'</span>'.$spotter_array[0]['aircraft_owner'].'</div>'; |
117 | 125 | $Stats = new Stats(); |
118 | - if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner); |
|
119 | - else $flights = 0; |
|
120 | - if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
126 | + if ($year == '' && $month == '') { |
|
127 | + $flights = $Stats->getStatsOwner($owner); |
|
128 | + } else { |
|
129 | + $flights = 0; |
|
130 | + } |
|
131 | + if ($flights == 0) { |
|
132 | + $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
133 | + } |
|
121 | 134 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
122 | 135 | $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter)); |
123 | 136 | print '<div><span class="label">'._("Aircrafts type").'</span>'.$aircraft_type.'</div>'; |
@@ -128,7 +141,9 @@ discard block |
||
128 | 141 | $airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter)); |
129 | 142 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
130 | 143 | $duration = $Spotter->getFlightDurationByOwner($owner,$filter); |
131 | - if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
144 | + if ($duration != '0') { |
|
145 | + print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
146 | + } |
|
132 | 147 | print '</div>'; |
133 | 148 | |
134 | 149 | include('owner-sub-menu.php'); |
@@ -14,7 +14,9 @@ |
||
14 | 14 | $arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
15 | 15 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
16 | 16 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
17 | -} else $spotter_array = array(); |
|
17 | +} else { |
|
18 | + $spotter_array = array(); |
|
19 | +} |
|
18 | 20 | |
19 | 21 | if (!empty($spotter_array)) |
20 | 22 | { |
@@ -3,15 +3,39 @@ discard block |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/pilot/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "pilot-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/pilot/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
7 | + echo '/'.$year; |
|
8 | +} |
|
9 | +?><?php if (isset($month) && $month != '') { |
|
10 | + echo '/'.$month; |
|
11 | +} |
|
12 | +?>" <?php if (strtolower($current_page) == "pilot-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 13 | <li class="dropdown"> |
8 | 14 | <a class="dropdown-toggle <?php if(strtolower($current_page) == "pilot-statistics-aircraft" || strtolower($current_page) == "pilot-statistics-registration" || strtolower($current_page) == "pilot-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
9 | 15 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 16 | </a> |
11 | 17 | <ul class="dropdown-menu" role="menu"> |
12 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/aircraft/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Aircraft Type"); ?></a></li> |
|
13 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/registration/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Registration"); ?></a></li> |
|
14 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/manufacturer/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Manufacturer"); ?></a></li> |
|
18 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/aircraft/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
19 | + echo '/'.$year; |
|
20 | +} |
|
21 | +?><?php if (isset($month) && $month != '') { |
|
22 | + echo '/'.$month; |
|
23 | +} |
|
24 | +?>"><?php echo _("Aircraft Type"); ?></a></li> |
|
25 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/registration/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
26 | + echo '/'.$year; |
|
27 | +} |
|
28 | +?><?php if (isset($month) && $month != '') { |
|
29 | + echo '/'.$month; |
|
30 | +} |
|
31 | +?>"><?php echo _("Registration"); ?></a></li> |
|
32 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/manufacturer/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
33 | + echo '/'.$year; |
|
34 | +} |
|
35 | +?><?php if (isset($month) && $month != '') { |
|
36 | + echo '/'.$month; |
|
37 | +} |
|
38 | +?>"><?php echo _("Manufacturer"); ?></a></li> |
|
15 | 39 | </ul> |
16 | 40 | </li> |
17 | 41 | <li class="dropdown"> |
@@ -19,13 +43,49 @@ discard block |
||
19 | 43 | <?php echo _("Airport"); ?> <span class="caret"></span> |
20 | 44 | </a> |
21 | 45 | <ul class="dropdown-menu" role="menu"> |
22 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/departure-airport/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Departure Airport"); ?></a></li> |
|
23 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/departure-airport-country/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Departure Airport by Country"); ?></a></li> |
|
24 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/arrival-airport/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Arrival Airport"); ?></a></li> |
|
25 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/arrival-airport-country/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
|
46 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/departure-airport/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
47 | + echo '/'.$year; |
|
48 | +} |
|
49 | +?><?php if (isset($month) && $month != '') { |
|
50 | + echo '/'.$month; |
|
51 | +} |
|
52 | +?>"><?php echo _("Departure Airport"); ?></a></li> |
|
53 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/departure-airport-country/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
54 | + echo '/'.$year; |
|
55 | +} |
|
56 | +?><?php if (isset($month) && $month != '') { |
|
57 | + echo '/'.$month; |
|
58 | +} |
|
59 | +?>"><?php echo _("Departure Airport by Country"); ?></a></li> |
|
60 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/arrival-airport/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
61 | + echo '/'.$year; |
|
62 | +} |
|
63 | +?><?php if (isset($month) && $month != '') { |
|
64 | + echo '/'.$month; |
|
65 | +} |
|
66 | +?>"><?php echo _("Arrival Airport"); ?></a></li> |
|
67 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/arrival-airport-country/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
68 | + echo '/'.$year; |
|
69 | +} |
|
70 | +?><?php if (isset($month) && $month != '') { |
|
71 | + echo '/'.$month; |
|
72 | +} |
|
73 | +?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
|
26 | 74 | </ul> |
27 | 75 | </li> |
28 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/route/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "pilot-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
29 | - <li><a href="<?php print $globalURL; ?>/pilot/statistics/time/<?php print $pilot; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "pilot-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
76 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/route/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
77 | + echo '/'.$year; |
|
78 | +} |
|
79 | +?><?php if (isset($month) && $month != '') { |
|
80 | + echo '/'.$month; |
|
81 | +} |
|
82 | +?>" <?php if (strtolower($current_page) == "pilot-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
83 | + <li><a href="<?php print $globalURL; ?>/pilot/statistics/time/<?php print $pilot; ?><?php if (isset($year) && $year != '') { |
|
84 | + echo '/'.$year; |
|
85 | +} |
|
86 | +?><?php if (isset($month) && $month != '') { |
|
87 | + echo '/'.$month; |
|
88 | +} |
|
89 | +?>" <?php if (strtolower($current_page) == "pilot-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
30 | 90 | </ul> |
31 | 91 | </div> |
32 | 92 | \ No newline at end of file |
@@ -14,7 +14,9 @@ |
||
14 | 14 | $arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
15 | 15 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
16 | 16 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
17 | -} else $spotter_array = array(); |
|
17 | +} else { |
|
18 | + $spotter_array = array(); |
|
19 | +} |
|
18 | 20 | |
19 | 21 | if (!empty($spotter_array)) |
20 | 22 | { |
@@ -14,7 +14,9 @@ |
||
14 | 14 | $arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
15 | 15 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
16 | 16 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
17 | -} else $spotter_array = array(); |
|
17 | +} else { |
|
18 | + $spotter_array = array(); |
|
19 | +} |
|
18 | 20 | |
19 | 21 | if (!empty($spotter_array)) |
20 | 22 | { |
@@ -14,7 +14,9 @@ |
||
14 | 14 | $arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
15 | 15 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
16 | 16 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
17 | -} else $spotter_array = array(); |
|
17 | +} else { |
|
18 | + $spotter_array = array(); |
|
19 | +} |
|
18 | 20 | |
19 | 21 | if (!empty($spotter_array)) |
20 | 22 | { |
@@ -63,7 +63,9 @@ |
||
63 | 63 | { |
64 | 64 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
65 | 65 | $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
66 | - } else $image = $spotter_item['image_thumbnail']; |
|
66 | + } else { |
|
67 | + $image = $spotter_item['image_thumbnail']; |
|
68 | + } |
|
67 | 69 | |
68 | 70 | } |
69 | 71 | /* else { |