@@ -3,9 +3,9 @@ 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; ?>/ident/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/ident/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <li class="dropdown"> |
8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "ident-statistics-aircraft" || strtolower($current_page) == "ident-statistics-registration" || strtolower($current_page) == "ident-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "ident-statistics-aircraft" || strtolower($current_page) == "ident-statistics-registration" || strtolower($current_page) == "ident-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 10 | </a> |
11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </ul> |
16 | 16 | </li> |
17 | 17 | <li class="dropdown"> |
18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "ident-statistics-departure-airport" || strtolower($current_page) == "ident-statistics-departure-airport-country" || strtolower($current_page) == "ident-statistics-arrival-airport" || strtolower($current_page) == "ident-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "ident-statistics-departure-airport" || strtolower($current_page) == "ident-statistics-departure-airport-country" || strtolower($current_page) == "ident-statistics-arrival-airport" || strtolower($current_page) == "ident-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
19 | 19 | <?php echo _("Airport"); ?> <span class="caret"></span> |
20 | 20 | </a> |
21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <li><a href="<?php print $globalURL; ?>/ident/statistics/arrival-airport-country/<?php print $ident; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
26 | 26 | </ul> |
27 | 27 | </li> |
28 | - <li><a href="<?php print $globalURL; ?>/ident/statistics/route/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
29 | - <li><a href="<?php print $globalURL; ?>/ident/statistics/time/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
28 | + <li><a href="<?php print $globalURL; ?>/ident/statistics/route/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
29 | + <li><a href="<?php print $globalURL; ?>/ident/statistics/time/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
30 | 30 | </ul> |
31 | 31 | </div> |
32 | 32 | \ No newline at end of file |
@@ -8,16 +8,16 @@ discard block |
||
8 | 8 | require_once('require/class.Spotter.php'); |
9 | 9 | require_once('require/class.Language.php'); |
10 | 10 | $Spotter = new Spotter(); |
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | -$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING); |
|
13 | -$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | +$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING); |
|
13 | +$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING); |
|
14 | 14 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
15 | 15 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
16 | 16 | } else $spotter_array = array(); |
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Airlines between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
20 | + $title = sprintf(_("Most Common Airlines between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="info column">'; |
23 | 23 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | include('route-sub-menu.php'); |
29 | 29 | print '<div class="column">'; |
30 | 30 | print '<h2>'._("Most Common Airlines").'</h2>'; |
31 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
31 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
32 | 32 | $airline_array = $Spotter->countAllAirlinesByRoute($departure_airport, $arrival_airport); |
33 | 33 | if (!empty($airline_array)) |
34 | 34 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | print '</thead>'; |
45 | 45 | print '<tbody>'; |
46 | 46 | $i = 1; |
47 | - foreach($airline_array as $airline_item) |
|
47 | + foreach ($airline_array as $airline_item) |
|
48 | 48 | { |
49 | 49 | print '<tr>'; |
50 | 50 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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,9 +3,9 @@ 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; ?>/date/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/date/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <li class="dropdown"> |
8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-aircraft" || strtolower($current_page) == "date-statistics-registration" || strtolower($current_page) == "date-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-aircraft" || strtolower($current_page) == "date-statistics-registration" || strtolower($current_page) == "date-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 10 | </a> |
11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </ul> |
16 | 16 | </li> |
17 | 17 | <li class="dropdown"> |
18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-airline" || strtolower($current_page) == "date-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-airline" || strtolower($current_page) == "date-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
19 | 19 | <?php echo _("Airline"); ?> <span class="caret"></span> |
20 | 20 | </a> |
21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | </ul> |
25 | 25 | </li> |
26 | 26 | <li class="dropdown"> |
27 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-departure-airport" || strtolower($current_page) == "date-statistics-departure-airport-country" || strtolower($current_page) == "date-statistics-arrival-airport" || strtolower($current_page) == "date-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
27 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-departure-airport" || strtolower($current_page) == "date-statistics-departure-airport-country" || strtolower($current_page) == "date-statistics-arrival-airport" || strtolower($current_page) == "date-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
28 | 28 | <?php echo _("Airport"); ?> <span class="caret"></span> |
29 | 29 | </a> |
30 | 30 | <ul class="dropdown-menu" role="menu"> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | <li><a href="<?php print $globalURL; ?>/date/statistics/arrival-airport-country/<?php print $date; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
35 | 35 | </ul> |
36 | 36 | </li> |
37 | - <li><a href="<?php print $globalURL; ?>/date/statistics/route/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
38 | - <li><a href="<?php print $globalURL; ?>/date/statistics/time/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
37 | + <li><a href="<?php print $globalURL; ?>/date/statistics/route/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
38 | + <li><a href="<?php print $globalURL; ?>/date/statistics/time/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
39 | 39 | </ul> |
40 | 40 | </div> |
41 | 41 | \ 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 | { |
@@ -9,16 +9,16 @@ discard block |
||
9 | 9 | require_once('require/class.Language.php'); |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING); |
|
14 | -$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING); |
|
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 | 17 | } else $spotter_array = array(); |
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Time of Day between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
21 | + $title = sprintf(_("Most Common Time of Day between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="info column">'; |
24 | 24 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | include('route-sub-menu.php'); |
30 | 30 | print '<div class="column">'; |
31 | 31 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
32 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
32 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
33 | 33 | |
34 | 34 | $hour_array = $Spotter->countAllHoursByRoute($departure_airport, $arrival_airport); |
35 | 35 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $hour_data = ''; |
40 | 40 | $hour_cnt = ''; |
41 | 41 | $last = 0; |
42 | - foreach($hour_array as $hour_item) |
|
42 | + foreach ($hour_array as $hour_item) |
|
43 | 43 | { |
44 | - while($last != $hour_item['hour_name']) { |
|
44 | + while ($last != $hour_item['hour_name']) { |
|
45 | 45 | $hour_data .= '"'.$last.':00",'; |
46 | 46 | $hour_cnt .= '0,'; |
47 | 47 | $last++; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $hour_cnt .= $hour_item['hour_count'].','; |
52 | 52 | } |
53 | 53 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
54 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
54 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
55 | 55 | print 'c3.generate({ |
56 | 56 | bindto: "#chartHour", |
57 | 57 | data: { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | print '</thead>'; |
77 | 77 | print '<tbody>'; |
78 | 78 | $i = 1; |
79 | - foreach($hour_array as $hour_item) |
|
79 | + foreach ($hour_array as $hour_item) |
|
80 | 80 | { |
81 | 81 | print '<tr>'; |
82 | 82 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -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 { |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | print '<div class="details">'; |
79 | 79 | print '<div><span>'._("Altitude").'</span>'; |
80 | 80 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
81 | - try { |
|
81 | + try { |
|
82 | 82 | $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
83 | - } catch(Exception $e) { |
|
84 | - } |
|
83 | + } catch(Exception $e) { |
|
84 | + } |
|
85 | 85 | } |
86 | 86 | print '<span class="altitude">'; |
87 | 87 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
@@ -91,17 +91,17 @@ discard block |
||
91 | 91 | } |
92 | 92 | print '</span>'; |
93 | 93 | if (isset($groundAltitude) && $groundAltitude < $spotter_item['altitude']*0.3048) { |
94 | - print '<br>'; |
|
95 | - print '<span>'._("Ground Altitude").'</span>'; |
|
96 | - print '<i>'; |
|
97 | - print '<span class="groundaltitude">'; |
|
98 | - if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
94 | + print '<br>'; |
|
95 | + print '<span>'._("Ground Altitude").'</span>'; |
|
96 | + print '<i>'; |
|
97 | + print '<span class="groundaltitude">'; |
|
98 | + if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
99 | 99 | print round($groundAltitude*3.28084).' feet'; |
100 | - } else { |
|
100 | + } else { |
|
101 | 101 | print round($groundAltitude).' m'; |
102 | - } |
|
103 | - print '</span>'; |
|
104 | - print '</i>'; |
|
102 | + } |
|
103 | + print '</span>'; |
|
104 | + print '</i>'; |
|
105 | 105 | } |
106 | 106 | print '</div>'; |
107 | 107 | print '<div><span>'._("Speed").'</span>'; |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | |
14 | 14 | $from_archive = false; |
15 | 15 | if (isset($_GET['ident'])) { |
16 | - $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
|
16 | + $ident = urldecode(filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING)); |
|
17 | 17 | if (isset($_GET['currenttime'])) { |
18 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
18 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
19 | 19 | $currenttime = round($currenttime/1000); |
20 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident,$currenttime); |
|
20 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident, $currenttime); |
|
21 | 21 | if (empty($spotter_array)) { |
22 | 22 | $from_archive = true; |
23 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident,$currenttime); |
|
23 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident, $currenttime); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } else { |
@@ -32,16 +32,16 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | if (isset($_GET['famtrackid'])) { |
35 | - $famtrackid = urldecode(filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING)); |
|
35 | + $famtrackid = urldecode(filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING)); |
|
36 | 36 | if (isset($_GET['currenttime'])) { |
37 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
37 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
38 | 38 | $currenttime = round($currenttime/1000); |
39 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid,$currenttime); |
|
39 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid, $currenttime); |
|
40 | 40 | |
41 | 41 | if (empty($spotter_array)) { |
42 | 42 | $from_archive = true; |
43 | 43 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
44 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid,$currenttime); |
|
44 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid, $currenttime); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | } else { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
62 | 62 | { |
63 | 63 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
64 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
64 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
65 | 65 | } else $image = $spotter_item['image_thumbnail']; |
66 | 66 | |
67 | 67 | } |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | print '<div><span>'._("Altitude").'</span>'; |
82 | 82 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
83 | 83 | try { |
84 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
85 | - } catch(Exception $e) { |
|
84 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
85 | + } catch (Exception $e) { |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | print '<span class="altitude">'; |
@@ -117,15 +117,15 @@ discard block |
||
117 | 117 | print '</div>'; |
118 | 118 | print '<div><span>'._("Coordinates").'</span>'; |
119 | 119 | if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) { |
120 | - $latitude = $Common->convertDMS($spotter_item['latitude'],'latitude'); |
|
120 | + $latitude = $Common->convertDMS($spotter_item['latitude'], 'latitude'); |
|
121 | 121 | print '<span class="latitude">'.$latitude['deg'].'° '.$latitude['min']."′ ".$latitude['sec'].'" '.$latitude['NSEW'].'</span>, '; |
122 | - $longitude = $Common->convertDMS($spotter_item['longitude'],'longitude'); |
|
122 | + $longitude = $Common->convertDMS($spotter_item['longitude'], 'longitude'); |
|
123 | 123 | print '<span class="longitude">'.$longitude['deg'].'° '.$longitude['min']."′ ".$longitude['sec'].'" '.$longitude['NSEW'].'</span>'; |
124 | 124 | } elseif ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) { |
125 | - $latitude = $Common->convertDM($spotter_item['latitude'],'latitude'); |
|
126 | - print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'],3)."′ ".$latitude['NSEW'].'</span>, '; |
|
127 | - $longitude = $Common->convertDM($spotter_item['longitude'],'longitude'); |
|
128 | - print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'],3)."′ ".$longitude['NSEW'].'</span>'; |
|
125 | + $latitude = $Common->convertDM($spotter_item['latitude'], 'latitude'); |
|
126 | + print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'], 3)."′ ".$latitude['NSEW'].'</span>, '; |
|
127 | + $longitude = $Common->convertDM($spotter_item['longitude'], 'longitude'); |
|
128 | + print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'], 3)."′ ".$longitude['NSEW'].'</span>'; |
|
129 | 129 | } else { |
130 | 130 | print '<span class="latitude">'.$spotter_item['latitude'].'</span>, '; |
131 | 131 | print '<span class="longitude">'.$spotter_item['longitude'].'</span>'; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | -$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
|
3 | +$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING); |
|
4 | 4 | if ($date == '') $date = date('Y-m-d'); |
5 | 5 | header('Location: '.$globalURL.'/accident/'.$date); |
6 | 6 | ?> |
7 | 7 | \ No newline at end of file |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | 3 | $date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
4 | -if ($date == '') $date = date('Y-m-d'); |
|
4 | +if ($date == '') { |
|
5 | + $date = date('Y-m-d'); |
|
6 | +} |
|
5 | 7 | header('Location: '.$globalURL.'/accident/'.$date); |
6 | 8 | ?> |
7 | 9 | \ No newline at end of file |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
20 | 20 | $year_data = ''; |
21 | 21 | $year_cnt = ''; |
22 | -foreach($date_array as $year_item) |
|
22 | +foreach ($date_array as $year_item) |
|
23 | 23 | { |
24 | 24 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
25 | 25 | $year_cnt .= $year_item['count'].','; |
26 | 26 | } |
27 | 27 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
28 | -$year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
28 | +$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
29 | 29 | print 'c3.generate({ |
30 | 30 | bindto: "#chart", |
31 | 31 | data: { x: "x", |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | |
36 | 36 | if (!empty($date_array)) |
37 | 37 | { |
38 | - foreach($date_array as $key => $row) { |
|
38 | + foreach ($date_array as $key => $row) { |
|
39 | 39 | $years[$key] = $row['year']; |
40 | 40 | $counts[$key] = $row['count']; |
41 | 41 | } |
42 | 42 | //array_multisort($years,SORT_DESC,$date_array); |
43 | - array_multisort($counts,SORT_DESC,$date_array); |
|
43 | + array_multisort($counts, SORT_DESC, $date_array); |
|
44 | 44 | print '<div class="table-responsive">'; |
45 | 45 | print '<table class="common-date table-striped">'; |
46 | 46 | print '<thead>'; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | print '</thead>'; |
51 | 51 | print '<tbody>'; |
52 | 52 | $i = 1; |
53 | - foreach($date_array as $date_item) |
|
53 | + foreach ($date_array as $date_item) |
|
54 | 54 | { |
55 | 55 | print '<tr>'; |
56 | 56 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $route_array = $Spotter->countAllRoutes(); |
19 | 19 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
20 | 20 | $route_data = ''; |
21 | -foreach($route_array as $route_item) |
|
21 | +foreach ($route_array as $route_item) |
|
22 | 22 | { |
23 | 23 | $route_data .= '[ "'.$route_item['airport_departure_icao'].' - '.$route_item['airport_arrival_icao'].'",'.$route_item['route_count'].'],'; |
24 | 24 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | print '</thead>'; |
47 | 47 | print '<tbody>'; |
48 | 48 | $i = 1; |
49 | - foreach($route_array as $route_item) |
|
49 | + foreach ($route_array as $route_item) |
|
50 | 50 | { |
51 | 51 | print '<tr>'; |
52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,7 +5,9 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Route by Airport"); |
7 | 7 | require_once('header.php'); |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | include('statistics-sub-menu.php'); |
10 | 12 | |
11 | 13 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | -$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
|
3 | +$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING); |
|
4 | 4 | if ($date == '') $date = date('Y-m-d'); |
5 | 5 | header('Location: '.$globalURL.'/incident/'.$date); |
6 | 6 | ?> |
7 | 7 | \ No newline at end of file |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | 3 | $date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
4 | -if ($date == '') $date = date('Y-m-d'); |
|
4 | +if ($date == '') { |
|
5 | + $date = date('Y-m-d'); |
|
6 | +} |
|
5 | 7 | header('Location: '.$globalURL.'/incident/'.$date); |
6 | 8 | ?> |
7 | 9 | \ No newline at end of file |