@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | $Spotter = new Spotter(); |
| 24 | 24 | $alliances = $Spotter->getAllAllianceNames(); |
| 25 | 25 | if (!empty($alliances)) { |
| 26 | - foreach($alliances as $alliance) { |
|
| 27 | - if (isset($airline_icao) && str_replace('_',' ',str_replace('alliance_','',$airline_icao)) == $alliance['alliance']) { |
|
| 28 | - print '<option value="alliance_'.str_replace(' ','_',$alliance['alliance']).'" selected>'.$alliance['alliance'].'</option>'; |
|
| 26 | + foreach ($alliances as $alliance) { |
|
| 27 | + if (isset($airline_icao) && str_replace('_', ' ', str_replace('alliance_', '', $airline_icao)) == $alliance['alliance']) { |
|
| 28 | + print '<option value="alliance_'.str_replace(' ', '_', $alliance['alliance']).'" selected>'.$alliance['alliance'].'</option>'; |
|
| 29 | 29 | } else { |
| 30 | - print '<option value="alliance_'.str_replace(' ','_',$alliance['alliance']).'">'.$alliance['alliance'].'</option>'; |
|
| 30 | + print '<option value="alliance_'.str_replace(' ', '_', $alliance['alliance']).'">'.$alliance['alliance'].'</option>'; |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | print '<option disabled>──────────</option>'; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $Stats = new Stats(); |
| 36 | 36 | if (!isset($filter_name)) $filter_name = ''; |
| 37 | 37 | $airlines = $Stats->getAllAirlineNames($filter_name); |
| 38 | - foreach($airlines as $airline) { |
|
| 38 | + foreach ($airlines as $airline) { |
|
| 39 | 39 | if (isset($airline_icao) && $airline_icao == $airline['airline_icao']) { |
| 40 | 40 | print '<option value="'.$airline['airline_icao'].'" selected>'.$airline['airline_name'].'</option>'; |
| 41 | 41 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if (!isset($type) || $type == 'aircraft') { |
| 59 | 59 | ?> |
| 60 | 60 | <li class="dropdown"> |
| 61 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
| 61 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
| 62 | 62 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
| 63 | 63 | </a> |
| 64 | 64 | <ul class="dropdown-menu"> |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | </ul> |
| 70 | 70 | </li> |
| 71 | 71 | <li class="dropdown"> |
| 72 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 72 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 73 | 73 | <?php echo _("Airline"); ?> <span class="caret"></span> |
| 74 | 74 | </a> |
| 75 | 75 | <ul class="dropdown-menu" role="menu"> |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | </ul> |
| 86 | 86 | </li> |
| 87 | 87 | <li class="dropdown"> |
| 88 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 88 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 89 | 89 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 90 | 90 | </a> |
| 91 | 91 | <ul class="dropdown-menu" role="menu"> |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | </ul> |
| 97 | 97 | </li> |
| 98 | 98 | <li class="dropdown"> |
| 99 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 99 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 100 | 100 | <?php echo _("Route"); ?> <span class="caret"></span> |
| 101 | 101 | </a> |
| 102 | 102 | <ul class="dropdown-menu" role="menu"> |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | </ul> |
| 106 | 106 | </li> |
| 107 | 107 | <li class="dropdown"> |
| 108 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 108 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 109 | 109 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
| 110 | 110 | </a> |
| 111 | 111 | <ul class="dropdown-menu" role="menu"> |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if (isset($globalAccidents) && $globalAccidents && (!isset($airline_icao) || $airline_icao == '' || $airline_icao == 'all')) { |
| 118 | 118 | ?> |
| 119 | 119 | <li class="dropdown"> |
| 120 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 120 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 121 | 121 | <?php echo _("Fatalities"); ?> <span class="caret"></span> |
| 122 | 122 | </a> |
| 123 | 123 | <ul class="dropdown-menu" role="menu"> |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } elseif ($type == 'marine' || $type == 'tracker') { |
| 133 | 133 | ?> |
| 134 | 134 | <li class="dropdown"> |
| 135 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 135 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 136 | 136 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
| 137 | 137 | </a> |
| 138 | 138 | <ul class="dropdown-menu" role="menu"> |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if (!isset($type) || $type == 'aircraft') { |
| 155 | 155 | ?> |
| 156 | 156 | <li class="dropdown"> |
| 157 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
| 157 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
| 158 | 158 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
| 159 | 159 | </a> |
| 160 | 160 | <ul class="dropdown-menu"> |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | </ul> |
| 166 | 166 | </li> |
| 167 | 167 | <li class="dropdown"> |
| 168 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 168 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 169 | 169 | <?php echo _("Airline"); ?> <span class="caret"></span> |
| 170 | 170 | </a> |
| 171 | 171 | <ul class="dropdown-menu" role="menu"> |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | </ul> |
| 182 | 182 | </li> |
| 183 | 183 | <li class="dropdown"> |
| 184 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 184 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 185 | 185 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 186 | 186 | </a> |
| 187 | 187 | <ul class="dropdown-menu" role="menu"> |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | </li> |
| 194 | 194 | <!-- |
| 195 | 195 | <li class="dropdown"> |
| 196 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 196 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 197 | 197 | <?php echo _("Route"); ?> <span class="caret"></span> |
| 198 | 198 | </a> |
| 199 | 199 | <ul class="dropdown-menu" role="menu"> |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | --> |
| 205 | 205 | <!-- |
| 206 | 206 | <li class="dropdown"> |
| 207 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 207 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 208 | 208 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
| 209 | 209 | </a> |
| 210 | 210 | <ul class="dropdown-menu" role="menu"> |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | ?> |
| 219 | 219 | <!-- |
| 220 | 220 | <li class="dropdown"> |
| 221 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 221 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 222 | 222 | <?php echo _("Fatalities"); ?> <span class="caret"></span> |
| 223 | 223 | </a> |
| 224 | 224 | <ul class="dropdown-menu" role="menu"> |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | } elseif ($type == 'marine' || $type == 'tracker') { |
| 235 | 235 | ?> |
| 236 | 236 | <li class="dropdown"> |
| 237 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 237 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 238 | 238 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
| 239 | 239 | </a> |
| 240 | 240 | <ul class="dropdown-menu" role="menu"> |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | if (!isset($filter_name)) $filter_name = ''; |
| 22 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 22 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 23 | 23 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
| 24 | 24 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
| 25 | 25 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
| 29 | 29 | if (isset($airline_info[0]['name'])) { |
| 30 | 30 | $airline_name = $airline_info[0]['name']; |
| 31 | - } elseif (strpos($airline_icao,'alliance_') !== FALSE) { |
|
| 31 | + } elseif (strpos($airline_icao, 'alliance_') !== FALSE) { |
|
| 32 | 32 | $alliance_name = $airline_icao; |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | $title = _("Statistics"); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 42 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 41 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 42 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 43 | 43 | |
| 44 | 44 | require_once('header.php'); |
| 45 | 45 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | date_default_timezone_set('UTC'); |
| 67 | 67 | $lastupdate = strtotime($last_update[0]['value']); |
| 68 | 68 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
| 69 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
| 69 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | ?> |
@@ -78,31 +78,31 @@ discard block |
||
| 78 | 78 | <?php |
| 79 | 79 | if ($type == 'aircraft') { |
| 80 | 80 | ?> |
| 81 | - <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Flights"); ?></span> |
|
| 82 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 83 | - <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
| 84 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 81 | + <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Flights"); ?></span> |
|
| 82 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 83 | + <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
| 84 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 85 | 85 | <?php |
| 86 | 86 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
| 87 | 87 | ?> |
| 88 | - <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
| 89 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 88 | + <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
| 89 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 90 | 90 | <?php |
| 91 | 91 | } |
| 92 | 92 | if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
| 93 | 93 | ?> |
| 94 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
| 95 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 94 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
| 95 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 96 | 96 | <?php |
| 97 | 97 | } |
| 98 | 98 | ?> |
| 99 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
| 100 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 99 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
| 100 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 101 | 101 | <?php |
| 102 | 102 | if ($airline_icao == '') { |
| 103 | 103 | ?> |
| 104 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
| 105 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 104 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
| 105 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 106 | 106 | <?php |
| 107 | 107 | } |
| 108 | 108 | ?> |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | if (!(isset($globalVA) && $globalVA) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS) && !(isset($globalVAM) && $globalVAM)) { |
| 111 | 111 | if ($airline_icao == '' || $airline_icao == 'all') { |
| 112 | 112 | ?> |
| 113 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
| 114 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 113 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
| 114 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 115 | 115 | <?php |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -119,22 +119,22 @@ discard block |
||
| 119 | 119 | <?php |
| 120 | 120 | } elseif ($type == 'marine') { |
| 121 | 121 | ?> |
| 122 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(),$year,$month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
| 123 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 124 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 125 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 122 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(), $year, $month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
| 123 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 124 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 125 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 126 | 126 | <?php |
| 127 | 127 | } elseif ($type == 'tracker') { |
| 128 | 128 | ?> |
| 129 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(),$year,$month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
| 130 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 131 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 132 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 129 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(), $year, $month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
| 130 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 131 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 132 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 133 | 133 | <?php |
| 134 | 134 | } |
| 135 | 135 | ?> |
| 136 | 136 | </p> |
| 137 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 137 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 138 | 138 | <div class="specific-stats"> |
| 139 | 139 | <?php |
| 140 | 140 | if ($type == 'aircraft') { |
@@ -143,13 +143,13 @@ discard block |
||
| 143 | 143 | <div class="col-md-6"> |
| 144 | 144 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
| 145 | 145 | <?php |
| 146 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
| 146 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
| 147 | 147 | if (count($aircraft_array) == 0) { |
| 148 | 148 | print _("No data available"); |
| 149 | 149 | } else { |
| 150 | 150 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 151 | 151 | $aircraft_data = ''; |
| 152 | - foreach($aircraft_array as $aircraft_item) { |
|
| 152 | + foreach ($aircraft_array as $aircraft_item) { |
|
| 153 | 153 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
| 154 | 154 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
| 155 | 155 | } |
@@ -178,16 +178,16 @@ discard block |
||
| 178 | 178 | ?> |
| 179 | 179 | </div> |
| 180 | 180 | </div> |
| 181 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 181 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 182 | 182 | <?php |
| 183 | 183 | if ($airline_icao == '' || $airline_icao == 'all') { |
| 184 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
| 184 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
| 185 | 185 | if (count($airline_array) > 0) { |
| 186 | 186 | print '<div class="col-md-6">'; |
| 187 | 187 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
| 188 | 188 | print '<div id="chart2" class="chart" width="100%"></div><script>'; |
| 189 | 189 | $airline_data = ''; |
| 190 | - foreach($airline_array as $airline_item) { |
|
| 190 | + foreach ($airline_array as $airline_item) { |
|
| 191 | 191 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
| 192 | 192 | } |
| 193 | 193 | $airline_data = substr($airline_data, 0, -1); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | ?> |
| 214 | 214 | </div> |
| 215 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 215 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 216 | 216 | <?php |
| 217 | 217 | } |
| 218 | 218 | } |
@@ -224,12 +224,12 @@ discard block |
||
| 224 | 224 | <div class="col-md-6"> |
| 225 | 225 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
| 226 | 226 | <?php |
| 227 | - $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
| 227 | + $marine_array = $Marine->countAllMarineTypes(true, 0, '', array(), $year, $month); |
|
| 228 | 228 | if (count($marine_array) == 0) print _("No data available"); |
| 229 | 229 | else { |
| 230 | 230 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 231 | 231 | $marine_data = ''; |
| 232 | - foreach($marine_array as $marine_item) { |
|
| 232 | + foreach ($marine_array as $marine_item) { |
|
| 233 | 233 | $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
| 234 | 234 | } |
| 235 | 235 | $marine_data = substr($marine_data, 0, -1); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | ?> |
| 260 | 260 | </div> |
| 261 | 261 | </div> |
| 262 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 262 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 263 | 263 | <!-- </div>--> |
| 264 | 264 | <?php |
| 265 | 265 | } |
@@ -269,12 +269,12 @@ discard block |
||
| 269 | 269 | <div class="col-md-6"> |
| 270 | 270 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
| 271 | 271 | <?php |
| 272 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
| 272 | + $tracker_array = $Tracker->countAllTrackerTypes(true, 0, '', array(), $year, $month); |
|
| 273 | 273 | if (count($tracker_array) == 0) print _("No data available"); |
| 274 | 274 | else { |
| 275 | 275 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 276 | 276 | $tracker_data = ''; |
| 277 | - foreach($tracker_array as $tracker_item) { |
|
| 277 | + foreach ($tracker_array as $tracker_item) { |
|
| 278 | 278 | $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
| 279 | 279 | } |
| 280 | 280 | $tracker_data = substr($tracker_data, 0, -1); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | ?> |
| 305 | 305 | </div> |
| 306 | 306 | </div> |
| 307 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 307 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 308 | 308 | <!-- </div>--> |
| 309 | 309 | <?php |
| 310 | 310 | } |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | ?> |
| 313 | 313 | <div class="row column"> |
| 314 | 314 | <?php |
| 315 | - $flightover_array = $Stats->countAllFlightOverCountries(false,$airline_icao,$filter_name,$year,$month); |
|
| 315 | + $flightover_array = $Stats->countAllFlightOverCountries(false, $airline_icao, $filter_name, $year, $month); |
|
| 316 | 316 | //if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
| 317 | 317 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
| 318 | 318 | if (empty($flightover_array)) { |
@@ -323,12 +323,12 @@ discard block |
||
| 323 | 323 | ?> |
| 324 | 324 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
| 325 | 325 | <?php |
| 326 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
| 326 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
| 327 | 327 | if (count($pilot_array) == 0) print _("No data available"); |
| 328 | 328 | else { |
| 329 | 329 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 330 | 330 | $pilot_data = ''; |
| 331 | - foreach($pilot_array as $pilot_item) { |
|
| 331 | + foreach ($pilot_array as $pilot_item) { |
|
| 332 | 332 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
| 333 | 333 | } |
| 334 | 334 | $pilot_data = substr($pilot_data, 0, -1); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | ?> |
| 350 | 350 | </div> |
| 351 | 351 | |
| 352 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 352 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 353 | 353 | <?php |
| 354 | 354 | } |
| 355 | 355 | // else { |
@@ -358,12 +358,12 @@ discard block |
||
| 358 | 358 | <div class="col-md-6"> |
| 359 | 359 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
| 360 | 360 | <?php |
| 361 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
| 361 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
| 362 | 362 | if (count($owner_array) == 0) print _("No data available"); |
| 363 | 363 | else { |
| 364 | 364 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 365 | 365 | $owner_data = ''; |
| 366 | - foreach($owner_array as $owner_item) { |
|
| 366 | + foreach ($owner_array as $owner_item) { |
|
| 367 | 367 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
| 368 | 368 | } |
| 369 | 369 | $owner_data = substr($owner_data, 0, -1); |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | </div> |
| 383 | 383 | </div> |
| 384 | 384 | |
| 385 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 385 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 386 | 386 | <?php |
| 387 | 387 | } |
| 388 | 388 | if (!empty($flightover_array)) { |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 397 | 397 | print 'var series = ['; |
| 398 | 398 | $flightover_data = ''; |
| 399 | - foreach($flightover_array as $flightover_item) { |
|
| 399 | + foreach ($flightover_array as $flightover_item) { |
|
| 400 | 400 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
| 401 | 401 | } |
| 402 | 402 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | } |
| 442 | 442 | ?> |
| 443 | 443 | </div> |
| 444 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 444 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 445 | 445 | </div> |
| 446 | 446 | <?php |
| 447 | 447 | } |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 458 | 458 | print 'var series = ['; |
| 459 | 459 | $flightover_data = ''; |
| 460 | - foreach($flightover_array as $flightover_item) { |
|
| 460 | + foreach ($flightover_array as $flightover_item) { |
|
| 461 | 461 | $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
| 462 | 462 | } |
| 463 | 463 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 515 | 515 | print 'var series = ['; |
| 516 | 516 | $flightover_data = ''; |
| 517 | - foreach($flightover_array as $flightover_item) { |
|
| 517 | + foreach ($flightover_array as $flightover_item) { |
|
| 518 | 518 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
| 519 | 519 | } |
| 520 | 520 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -564,14 +564,14 @@ discard block |
||
| 564 | 564 | <div class="row column"> |
| 565 | 565 | <div class="col-md-6"> |
| 566 | 566 | <?php |
| 567 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 567 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 568 | 568 | if (count($airport_airport_array) > 0) { |
| 569 | 569 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
| 570 | 570 | print '<div id="chart3" class="chart" width="100%"></div><script>'; |
| 571 | 571 | print "\n"; |
| 572 | 572 | print 'var series = ['; |
| 573 | 573 | $airport_data = ''; |
| 574 | - foreach($airport_airport_array as $airport_item) { |
|
| 574 | + foreach ($airport_airport_array as $airport_item) { |
|
| 575 | 575 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 576 | 576 | } |
| 577 | 577 | $airport_data = substr($airport_data, 0, -1); |
@@ -621,18 +621,18 @@ discard block |
||
| 621 | 621 | } |
| 622 | 622 | ?> |
| 623 | 623 | </div> |
| 624 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 624 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 625 | 625 | |
| 626 | 626 | <div class="col-md-6"> |
| 627 | 627 | <?php |
| 628 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 628 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 629 | 629 | if (count($airport_airport_array2) > 0) { |
| 630 | 630 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
| 631 | 631 | print '<div id="chart4" class="chart" width="100%"></div><script>'; |
| 632 | 632 | print "\n"; |
| 633 | 633 | print 'var series = ['; |
| 634 | 634 | $airport_data = ''; |
| 635 | - foreach($airport_airport_array2 as $airport_item) |
|
| 635 | + foreach ($airport_airport_array2 as $airport_item) |
|
| 636 | 636 | { |
| 637 | 637 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
| 638 | 638 | } |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | ?> |
| 685 | 685 | </div> |
| 686 | 686 | </div> |
| 687 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 687 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 688 | 688 | <?php |
| 689 | 689 | } |
| 690 | 690 | if ($type == 'aircraft') { |
@@ -696,18 +696,18 @@ discard block |
||
| 696 | 696 | <div class="col-md-6"> |
| 697 | 697 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 698 | 698 | <?php |
| 699 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
| 699 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
| 700 | 700 | if (count($year_array) == 0) print _("No data available"); |
| 701 | 701 | else { |
| 702 | 702 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 703 | 703 | $year_data = ''; |
| 704 | 704 | $year_cnt = ''; |
| 705 | - foreach($year_array as $year_item) { |
|
| 705 | + foreach ($year_array as $year_item) { |
|
| 706 | 706 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 707 | 707 | $year_cnt .= $year_item['date_count'].','; |
| 708 | 708 | } |
| 709 | 709 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 710 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 710 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 711 | 711 | print 'c3.generate({ |
| 712 | 712 | bindto: "#chart8", |
| 713 | 713 | data: { x: "x", |
@@ -720,22 +720,22 @@ discard block |
||
| 720 | 720 | <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 721 | 721 | </div> |
| 722 | 722 | </div> |
| 723 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 723 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 724 | 724 | <div class="col-md-6"> |
| 725 | 725 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 726 | 726 | <?php |
| 727 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
| 727 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
| 728 | 728 | if (count($month_array) == 0) print _("No data available"); |
| 729 | 729 | else { |
| 730 | 730 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 731 | 731 | $month_data = ''; |
| 732 | 732 | $month_cnt = ''; |
| 733 | - foreach($month_array as $month_item) { |
|
| 733 | + foreach ($month_array as $month_item) { |
|
| 734 | 734 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 735 | 735 | $month_cnt .= $month_item['date_count'].','; |
| 736 | 736 | } |
| 737 | 737 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 738 | - $month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
| 738 | + $month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
| 739 | 739 | print 'c3.generate({ |
| 740 | 740 | bindto: "#chart9", |
| 741 | 741 | data: { x: "x", |
@@ -748,23 +748,23 @@ discard block |
||
| 748 | 748 | <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 749 | 749 | </div> |
| 750 | 750 | </div> |
| 751 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 751 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 752 | 752 | |
| 753 | 753 | <div class="col-md-6"> |
| 754 | 754 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 755 | 755 | <?php |
| 756 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
| 756 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
| 757 | 757 | if (empty($date_array)) print _("No data available"); |
| 758 | 758 | else { |
| 759 | 759 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 760 | 760 | $date_data = ''; |
| 761 | 761 | $date_cnt = ''; |
| 762 | - foreach($date_array as $date_item) { |
|
| 762 | + foreach ($date_array as $date_item) { |
|
| 763 | 763 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 764 | 764 | $date_cnt .= $date_item['date_count'].','; |
| 765 | 765 | } |
| 766 | 766 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 767 | - $date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
| 767 | + $date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
| 768 | 768 | print 'c3.generate({ |
| 769 | 769 | bindto: "#chart5", |
| 770 | 770 | data: { x: "x", |
@@ -777,22 +777,22 @@ discard block |
||
| 777 | 777 | <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 778 | 778 | </div> |
| 779 | 779 | </div> |
| 780 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 780 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 781 | 781 | <div class="col-md-6"> |
| 782 | 782 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 783 | 783 | <?php |
| 784 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
| 784 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
| 785 | 785 | if (empty($hour_array)) print _("No data available"); |
| 786 | 786 | else { |
| 787 | 787 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 788 | 788 | $hour_data = ''; |
| 789 | 789 | $hour_cnt = ''; |
| 790 | - foreach($hour_array as $hour_item) { |
|
| 790 | + foreach ($hour_array as $hour_item) { |
|
| 791 | 791 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 792 | 792 | $hour_cnt .= $hour_item['hour_count'].','; |
| 793 | 793 | } |
| 794 | 794 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 795 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 795 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 796 | 796 | print 'c3.generate({ |
| 797 | 797 | bindto: "#chart6", |
| 798 | 798 | data: { |
@@ -805,7 +805,7 @@ discard block |
||
| 805 | 805 | <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 806 | 806 | </div> |
| 807 | 807 | </div> |
| 808 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 808 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 809 | 809 | </div> |
| 810 | 810 | <?php |
| 811 | 811 | } |
@@ -821,18 +821,18 @@ discard block |
||
| 821 | 821 | <div class="col-md-6"> |
| 822 | 822 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 823 | 823 | <?php |
| 824 | - $year_array = $Marine->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
| 824 | + $year_array = $Marine->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
| 825 | 825 | if (count($year_array) == 0) print _("No data available"); |
| 826 | 826 | else { |
| 827 | 827 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 828 | 828 | $year_data = ''; |
| 829 | 829 | $year_cnt = ''; |
| 830 | - foreach($year_array as $year_item) { |
|
| 830 | + foreach ($year_array as $year_item) { |
|
| 831 | 831 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 832 | 832 | $year_cnt .= $year_item['date_count'].','; |
| 833 | 833 | } |
| 834 | 834 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 835 | - $year_cnt = "['vessels',".substr($year_cnt,0,-1)."]"; |
|
| 835 | + $year_cnt = "['vessels',".substr($year_cnt, 0, -1)."]"; |
|
| 836 | 836 | print 'c3.generate({ |
| 837 | 837 | bindto: "#chart8", |
| 838 | 838 | data: { x: "x", |
@@ -846,22 +846,22 @@ discard block |
||
| 846 | 846 | </div> |
| 847 | 847 | </div> |
| 848 | 848 | |
| 849 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 849 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 850 | 850 | <div class="col-md-6"> |
| 851 | 851 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 852 | 852 | <?php |
| 853 | - $month_array = $Marine->countAllDatesLastMonth($airline_icao,$filter_name); |
|
| 853 | + $month_array = $Marine->countAllDatesLastMonth($airline_icao, $filter_name); |
|
| 854 | 854 | if (count($month_array) == 0) print _("No data available"); |
| 855 | 855 | else { |
| 856 | 856 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 857 | 857 | $month_data = ''; |
| 858 | 858 | $month_cnt = ''; |
| 859 | - foreach($month_array as $month_item) { |
|
| 859 | + foreach ($month_array as $month_item) { |
|
| 860 | 860 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 861 | 861 | $month_cnt .= $month_item['date_count'].','; |
| 862 | 862 | } |
| 863 | 863 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 864 | - $month_cnt = "['vessels',".substr($month_cnt,0,-1)."]"; |
|
| 864 | + $month_cnt = "['vessels',".substr($month_cnt, 0, -1)."]"; |
|
| 865 | 865 | print 'c3.generate({ |
| 866 | 866 | bindto: "#chart9", |
| 867 | 867 | data: { x: "x", |
@@ -874,23 +874,23 @@ discard block |
||
| 874 | 874 | <a href="<?php print $globalURL; ?>/marine/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 875 | 875 | </div> |
| 876 | 876 | </div> |
| 877 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 877 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 878 | 878 | |
| 879 | 879 | <div class="col-md-6"> |
| 880 | 880 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 881 | 881 | <?php |
| 882 | - $date_array = $Marine->countAllDatesLast7Days($airline_icao,$filter_name); |
|
| 882 | + $date_array = $Marine->countAllDatesLast7Days($airline_icao, $filter_name); |
|
| 883 | 883 | if (empty($date_array)) print _("No data available"); |
| 884 | 884 | else { |
| 885 | 885 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 886 | 886 | $date_data = ''; |
| 887 | 887 | $date_cnt = ''; |
| 888 | - foreach($date_array as $date_item) { |
|
| 888 | + foreach ($date_array as $date_item) { |
|
| 889 | 889 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 890 | 890 | $date_cnt .= $date_item['date_count'].','; |
| 891 | 891 | } |
| 892 | 892 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 893 | - $date_cnt = "['vessels',".substr($date_cnt,0,-1)."]"; |
|
| 893 | + $date_cnt = "['vessels',".substr($date_cnt, 0, -1)."]"; |
|
| 894 | 894 | print 'c3.generate({ |
| 895 | 895 | bindto: "#chart5", |
| 896 | 896 | data: { x: "x", |
@@ -903,22 +903,22 @@ discard block |
||
| 903 | 903 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 904 | 904 | </div> |
| 905 | 905 | </div> |
| 906 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 906 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 907 | 907 | <div class="col-md-6"> |
| 908 | 908 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 909 | 909 | <?php |
| 910 | - $hour_array = $Marine->countAllHours('hour',true,$airline_icao,$filter_name); |
|
| 910 | + $hour_array = $Marine->countAllHours('hour', true, $airline_icao, $filter_name); |
|
| 911 | 911 | if (empty($hour_array)) print _("No data available"); |
| 912 | 912 | else { |
| 913 | 913 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 914 | 914 | $hour_data = ''; |
| 915 | 915 | $hour_cnt = ''; |
| 916 | - foreach($hour_array as $hour_item) { |
|
| 916 | + foreach ($hour_array as $hour_item) { |
|
| 917 | 917 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 918 | 918 | $hour_cnt .= $hour_item['hour_count'].','; |
| 919 | 919 | } |
| 920 | 920 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 921 | - $hour_cnt = "['vessels',".substr($hour_cnt,0,-1)."]"; |
|
| 921 | + $hour_cnt = "['vessels',".substr($hour_cnt, 0, -1)."]"; |
|
| 922 | 922 | print 'c3.generate({ |
| 923 | 923 | bindto: "#chart6", |
| 924 | 924 | data: { |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | <a href="<?php print $globalURL; ?>/marine/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 932 | 932 | </div> |
| 933 | 933 | </div> |
| 934 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 934 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 935 | 935 | </div> |
| 936 | 936 | <?php |
| 937 | 937 | } |
@@ -953,12 +953,12 @@ discard block |
||
| 953 | 953 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 954 | 954 | $year_data = ''; |
| 955 | 955 | $year_cnt = ''; |
| 956 | - foreach($year_array as $year_item) { |
|
| 956 | + foreach ($year_array as $year_item) { |
|
| 957 | 957 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 958 | 958 | $year_cnt .= $year_item['date_count'].','; |
| 959 | 959 | } |
| 960 | 960 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 961 | - $year_cnt = "['trackers',".substr($year_cnt,0,-1)."]"; |
|
| 961 | + $year_cnt = "['trackers',".substr($year_cnt, 0, -1)."]"; |
|
| 962 | 962 | print 'c3.generate({ |
| 963 | 963 | bindto: "#chart8", |
| 964 | 964 | data: { x: "x", |
@@ -972,7 +972,7 @@ discard block |
||
| 972 | 972 | </div> |
| 973 | 973 | </div> |
| 974 | 974 | |
| 975 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 975 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 976 | 976 | <div class="col-md-6"> |
| 977 | 977 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 978 | 978 | <?php |
@@ -982,12 +982,12 @@ discard block |
||
| 982 | 982 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 983 | 983 | $month_data = ''; |
| 984 | 984 | $month_cnt = ''; |
| 985 | - foreach($month_array as $month_item) { |
|
| 985 | + foreach ($month_array as $month_item) { |
|
| 986 | 986 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 987 | 987 | $month_cnt .= $month_item['date_count'].','; |
| 988 | 988 | } |
| 989 | 989 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 990 | - $month_cnt = "['trackers',".substr($month_cnt,0,-1)."]"; |
|
| 990 | + $month_cnt = "['trackers',".substr($month_cnt, 0, -1)."]"; |
|
| 991 | 991 | print 'c3.generate({ |
| 992 | 992 | bindto: "#chart9", |
| 993 | 993 | data: { x: "x", |
@@ -1000,7 +1000,7 @@ discard block |
||
| 1000 | 1000 | <a href="<?php print $globalURL; ?>/tracker/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1001 | 1001 | </div> |
| 1002 | 1002 | </div> |
| 1003 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1003 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1004 | 1004 | |
| 1005 | 1005 | <div class="col-md-6"> |
| 1006 | 1006 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1011,12 +1011,12 @@ discard block |
||
| 1011 | 1011 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 1012 | 1012 | $date_data = ''; |
| 1013 | 1013 | $date_cnt = ''; |
| 1014 | - foreach($date_array as $date_item) { |
|
| 1014 | + foreach ($date_array as $date_item) { |
|
| 1015 | 1015 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 1016 | 1016 | $date_cnt .= $date_item['date_count'].','; |
| 1017 | 1017 | } |
| 1018 | 1018 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 1019 | - $date_cnt = "['trackers',".substr($date_cnt,0,-1)."]"; |
|
| 1019 | + $date_cnt = "['trackers',".substr($date_cnt, 0, -1)."]"; |
|
| 1020 | 1020 | print 'c3.generate({ |
| 1021 | 1021 | bindto: "#chart5", |
| 1022 | 1022 | data: { x: "x", |
@@ -1029,22 +1029,22 @@ discard block |
||
| 1029 | 1029 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1030 | 1030 | </div> |
| 1031 | 1031 | </div> |
| 1032 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1032 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1033 | 1033 | <div class="col-md-6"> |
| 1034 | 1034 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 1035 | 1035 | <?php |
| 1036 | - $hour_array = $Tracker->countAllHours('hour',true); |
|
| 1036 | + $hour_array = $Tracker->countAllHours('hour', true); |
|
| 1037 | 1037 | if (empty($hour_array)) print _("No data available"); |
| 1038 | 1038 | else { |
| 1039 | 1039 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 1040 | 1040 | $hour_data = ''; |
| 1041 | 1041 | $hour_cnt = ''; |
| 1042 | - foreach($hour_array as $hour_item) { |
|
| 1042 | + foreach ($hour_array as $hour_item) { |
|
| 1043 | 1043 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 1044 | 1044 | $hour_cnt .= $hour_item['hour_count'].','; |
| 1045 | 1045 | } |
| 1046 | 1046 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 1047 | - $hour_cnt = "['trackers',".substr($hour_cnt,0,-1)."]"; |
|
| 1047 | + $hour_cnt = "['trackers',".substr($hour_cnt, 0, -1)."]"; |
|
| 1048 | 1048 | print 'c3.generate({ |
| 1049 | 1049 | bindto: "#chart6", |
| 1050 | 1050 | data: { |
@@ -1057,7 +1057,7 @@ discard block |
||
| 1057 | 1057 | <a href="<?php print $globalURL; ?>/tracker/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1058 | 1058 | </div> |
| 1059 | 1059 | </div> |
| 1060 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1060 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1061 | 1061 | </div> |
| 1062 | 1062 | <?php |
| 1063 | 1063 | } |
@@ -1079,12 +1079,12 @@ discard block |
||
| 1079 | 1079 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
| 1080 | 1080 | $year_data = ''; |
| 1081 | 1081 | $year_cnt = ''; |
| 1082 | - foreach($year_array as $year_item) { |
|
| 1082 | + foreach ($year_array as $year_item) { |
|
| 1083 | 1083 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
| 1084 | 1084 | $year_cnt .= $year_item['count'].','; |
| 1085 | 1085 | } |
| 1086 | 1086 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1087 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 1087 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 1088 | 1088 | print 'c3.generate({ |
| 1089 | 1089 | bindto: "#chart32", |
| 1090 | 1090 | data: { x: "x", |
@@ -1097,7 +1097,7 @@ discard block |
||
| 1097 | 1097 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1098 | 1098 | </div> |
| 1099 | 1099 | </div> |
| 1100 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1100 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1101 | 1101 | |
| 1102 | 1102 | <div class="row column"> |
| 1103 | 1103 | <div class="col-md-6"> |
@@ -1109,12 +1109,12 @@ discard block |
||
| 1109 | 1109 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
| 1110 | 1110 | $year_data = ''; |
| 1111 | 1111 | $year_cnt = ''; |
| 1112 | - foreach($year_array as $year_item) { |
|
| 1112 | + foreach ($year_array as $year_item) { |
|
| 1113 | 1113 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
| 1114 | 1114 | $year_cnt .= $year_item['count'].','; |
| 1115 | 1115 | } |
| 1116 | 1116 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1117 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 1117 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 1118 | 1118 | print 'c3.generate({ |
| 1119 | 1119 | bindto: "#chart33", |
| 1120 | 1120 | data: { x: "x", |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1128 | 1128 | </div> |
| 1129 | 1129 | </div> |
| 1130 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1130 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1131 | 1131 | <br/> |
| 1132 | 1132 | <?php |
| 1133 | 1133 | } |
@@ -1141,19 +1141,19 @@ discard block |
||
| 1141 | 1141 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
| 1142 | 1142 | if ($year == '' && $month == '') { |
| 1143 | 1143 | if ($type == 'aircraft') { |
| 1144 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
| 1144 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
| 1145 | 1145 | } elseif ($type == 'marine') { |
| 1146 | - $polar = $Stats->getStatsSource('polar_marine',date('Y'),date('m'),date('d')); |
|
| 1146 | + $polar = $Stats->getStatsSource('polar_marine', date('Y'), date('m'), date('d')); |
|
| 1147 | 1147 | } elseif ($type == 'tracker') { |
| 1148 | - $polar = $Stats->getStatsSource('polar_tracker',date('Y'),date('m'),date('d')); |
|
| 1148 | + $polar = $Stats->getStatsSource('polar_tracker', date('Y'), date('m'), date('d')); |
|
| 1149 | 1149 | } |
| 1150 | 1150 | } else { |
| 1151 | 1151 | if ($type == 'aircraft') { |
| 1152 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
| 1152 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
| 1153 | 1153 | } elseif ($type == 'marine') { |
| 1154 | - $polar = $Stats->getStatsSource('polar_marine',$year,$month); |
|
| 1154 | + $polar = $Stats->getStatsSource('polar_marine', $year, $month); |
|
| 1155 | 1155 | } elseif ($type == 'tracker') { |
| 1156 | - $polar = $Stats->getStatsSource('polar_tracker',$year,$month); |
|
| 1156 | + $polar = $Stats->getStatsSource('polar_tracker', $year, $month); |
|
| 1157 | 1157 | } |
| 1158 | 1158 | } |
| 1159 | 1159 | if (!empty($polar)) { |
@@ -1162,7 +1162,7 @@ discard block |
||
| 1162 | 1162 | unset($polar_data); |
| 1163 | 1163 | $Spotter = new Spotter(); |
| 1164 | 1164 | $data = json_decode($eachpolar['source_data']); |
| 1165 | - foreach($data as $value => $key) { |
|
| 1165 | + foreach ($data as $value => $key) { |
|
| 1166 | 1166 | $direction = $Spotter->parseDirection(($value*22.5)); |
| 1167 | 1167 | $distance = $key; |
| 1168 | 1168 | $unit = 'km'; |
@@ -1182,7 +1182,7 @@ discard block |
||
| 1182 | 1182 | ?> |
| 1183 | 1183 | <div class="col-md-6"> |
| 1184 | 1184 | <h4><?php print $eachpolar['source_name']; ?></h4> |
| 1185 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
| 1185 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
| 1186 | 1186 | <script> |
| 1187 | 1187 | (function() { |
| 1188 | 1188 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | color: color, |
| 1207 | 1207 | unit: '<?php echo $unit; ?>' |
| 1208 | 1208 | }; |
| 1209 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
| 1209 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
| 1210 | 1210 | })(); |
| 1211 | 1211 | </script> |
| 1212 | 1212 | </div> |
@@ -1221,19 +1221,19 @@ discard block |
||
| 1221 | 1221 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
| 1222 | 1222 | if ($year == '' && $month == '') { |
| 1223 | 1223 | if ($type == 'aircraft') { |
| 1224 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
| 1224 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
| 1225 | 1225 | } elseif ($type == 'marine') { |
| 1226 | - $msg = $Stats->getStatsSource('msg_marine',date('Y'),date('m'),date('d')); |
|
| 1226 | + $msg = $Stats->getStatsSource('msg_marine', date('Y'), date('m'), date('d')); |
|
| 1227 | 1227 | } elseif ($type == 'tracker') { |
| 1228 | - $msg = $Stats->getStatsSource('msg_tracker',date('Y'),date('m'),date('d')); |
|
| 1228 | + $msg = $Stats->getStatsSource('msg_tracker', date('Y'), date('m'), date('d')); |
|
| 1229 | 1229 | } |
| 1230 | 1230 | } else { |
| 1231 | 1231 | if ($type == 'aircraft') { |
| 1232 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
| 1232 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
| 1233 | 1233 | } elseif ($type == 'marine') { |
| 1234 | - $msg = $Stats->getStatsSource('msg_marine',$year,$month); |
|
| 1234 | + $msg = $Stats->getStatsSource('msg_marine', $year, $month); |
|
| 1235 | 1235 | } elseif ($type == 'tracker') { |
| 1236 | - $msg = $Stats->getStatsSource('msg_tracker',$year,$month); |
|
| 1236 | + $msg = $Stats->getStatsSource('msg_tracker', $year, $month); |
|
| 1237 | 1237 | } |
| 1238 | 1238 | } |
| 1239 | 1239 | if (!empty($msg)) { |
@@ -1241,13 +1241,13 @@ discard block |
||
| 1241 | 1241 | foreach ($msg as $eachmsg) { |
| 1242 | 1242 | //$eachmsg = $msg[0]; |
| 1243 | 1243 | $data = $eachmsg['source_data']; |
| 1244 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
| 1244 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
| 1245 | 1245 | else $max = 500; |
| 1246 | 1246 | ?> |
| 1247 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
| 1247 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
| 1248 | 1248 | <script> |
| 1249 | 1249 | var g = new JustGage({ |
| 1250 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
| 1250 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
| 1251 | 1251 | value: <?php echo $data; ?>, |
| 1252 | 1252 | min: 0, |
| 1253 | 1253 | max: <?php print $max; ?>, |
@@ -1269,19 +1269,19 @@ discard block |
||
| 1269 | 1269 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
| 1270 | 1270 | if ($year == '' && $month == '') { |
| 1271 | 1271 | if ($type == 'aircraft') { |
| 1272 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
| 1272 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
| 1273 | 1273 | } elseif ($type == 'marine') { |
| 1274 | - $hist = $Stats->getStatsSource('hist_marine',date('Y'),date('m'),date('d')); |
|
| 1274 | + $hist = $Stats->getStatsSource('hist_marine', date('Y'), date('m'), date('d')); |
|
| 1275 | 1275 | } elseif ($type == 'tracker') { |
| 1276 | - $hist = $Stats->getStatsSource('hist_tracker',date('Y'),date('m'),date('d')); |
|
| 1276 | + $hist = $Stats->getStatsSource('hist_tracker', date('Y'), date('m'), date('d')); |
|
| 1277 | 1277 | } |
| 1278 | 1278 | } else { |
| 1279 | 1279 | if ($type == 'aircraft') { |
| 1280 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
| 1280 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
| 1281 | 1281 | } elseif ($type == 'marine') { |
| 1282 | - $hist = $Stats->getStatsSource('hist_marine',$year,$month); |
|
| 1282 | + $hist = $Stats->getStatsSource('hist_marine', $year, $month); |
|
| 1283 | 1283 | } elseif ($type == 'tracker') { |
| 1284 | - $hist = $Stats->getStatsSource('hist_tracker',$year,$month); |
|
| 1284 | + $hist = $Stats->getStatsSource('hist_tracker', $year, $month); |
|
| 1285 | 1285 | } |
| 1286 | 1286 | } |
| 1287 | 1287 | foreach ($hist as $hists) { |
@@ -1291,7 +1291,7 @@ discard block |
||
| 1291 | 1291 | $source = $hists['source_name']; |
| 1292 | 1292 | $hist_array = json_decode($hists['source_data']); |
| 1293 | 1293 | $unit = 'km'; |
| 1294 | - foreach($hist_array as $distance => $nb) { |
|
| 1294 | + foreach ($hist_array as $distance => $nb) { |
|
| 1295 | 1295 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 1296 | 1296 | $distance = round($distance*0.539957); |
| 1297 | 1297 | $unit = 'nm'; |
@@ -1311,18 +1311,18 @@ discard block |
||
| 1311 | 1311 | $nb_data = "['flights',".substr($nb_data, 0, -1)."]"; |
| 1312 | 1312 | ?> |
| 1313 | 1313 | <div class="col-md-6"> |
| 1314 | - <h2><?php echo sprintf(_("Distance for %s"),$source); ?></h2> |
|
| 1314 | + <h2><?php echo sprintf(_("Distance for %s"), $source); ?></h2> |
|
| 1315 | 1315 | <?php |
| 1316 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
| 1316 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
| 1317 | 1317 | print 'c3.generate({ |
| 1318 | - bindto: "#charthist-'.str_replace(' ','_',strtolower($source)).'", |
|
| 1318 | + bindto: "#charthist-'.str_replace(' ', '_', strtolower($source)).'", |
|
| 1319 | 1319 | data: { x: "x", |
| 1320 | 1320 | columns: ['.$distance_data.','.$nb_data.'], types: { flights: "area"}, colors: { flights: "#1a3151"}}, |
| 1321 | 1321 | axis: { x: {label : { text: "Distance in '.$unit.'", position: "outer-right"}}, y: { label: "# of Flights"}},legend: { show: false }});'; |
| 1322 | 1322 | print '</script>'; |
| 1323 | 1323 | ?> |
| 1324 | 1324 | </div> |
| 1325 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1325 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1326 | 1326 | <?php |
| 1327 | 1327 | } |
| 1328 | 1328 | ?> |