@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | function drawChart() { |
| 62 | 62 | var data = google.visualization.arrayToDataTable([ |
| 63 | 63 | ["'._("Country").'", "'._("# of times").'"], '; |
| 64 | - $country_data = ''; |
|
| 64 | + $country_data = ''; |
|
| 65 | 65 | foreach($airline_array as $airline_item) |
| 66 | 66 | { |
| 67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | |
| 13 | 13 | if (isset($_GET['sort'])) { |
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Airlines by Country of %s"),$country); |
|
| 21 | + $title = sprintf(_("Most Common Airlines by Country of %s"), $country); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="select-item">'; |
| 24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 26 | 26 | print '<option></option>'; |
| 27 | 27 | $all_countries = $Spotter->getAllCountries(); |
| 28 | - foreach($all_countries as $all_country) |
|
| 28 | + foreach ($all_countries as $all_country) |
|
| 29 | 29 | { |
| 30 | - if($country == $all_country['country']) |
|
| 30 | + if ($country == $all_country['country']) |
|
| 31 | 31 | { |
| 32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | if ($_GET['country'] != "NA") |
| 43 | 43 | { |
| 44 | 44 | print '<div class="info column">'; |
| 45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 46 | 46 | print '</div>'; |
| 47 | 47 | } else { |
| 48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | include('country-sub-menu.php'); |
| 52 | 52 | print '<div class="column">'; |
| 53 | 53 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
| 54 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
| 54 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
| 55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByCountry($country); |
| 56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 57 | 57 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | var data = google.visualization.arrayToDataTable([ |
| 63 | 63 | ["'._("Country").'", "'._("# of times").'"], '; |
| 64 | 64 | $country_data = ''; |
| 65 | - foreach($airline_array as $airline_item) |
|
| 65 | + foreach ($airline_array as $airline_item) |
|
| 66 | 66 | { |
| 67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
| 68 | 68 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | print '</thead>'; |
| 97 | 97 | print '<tbody>'; |
| 98 | 98 | $i = 1; |
| 99 | - foreach($airline_array as $airline_item) |
|
| 99 | + foreach ($airline_array as $airline_item) |
|
| 100 | 100 | { |
| 101 | 101 | print '<tr>'; |
| 102 | 102 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -1,19 +1,19 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once('require/class.Connection.php'); |
| 3 | -require_once('require/class.Spotter.php');; |
|
| 3 | +require_once('require/class.Spotter.php'); ; |
|
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | require_once('require/class.SpotterLive.php'); |
| 6 | 6 | |
| 7 | 7 | $title = "Current Activity"; |
| 8 | 8 | require_once('header.php'); |
| 9 | -$SpotterLive=new SpotterLive(); |
|
| 9 | +$SpotterLive = new SpotterLive(); |
|
| 10 | 10 | //calculuation for the pagination |
| 11 | -if(!isset($_GET['limit'])) |
|
| 11 | +if (!isset($_GET['limit'])) |
|
| 12 | 12 | { |
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
| 15 | 15 | $absolute_difference = 25; |
| 16 | -} else { |
|
| 16 | +} else { |
|
| 17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
| 18 | 18 | $limit_start = $limit_explode[0]; |
| 19 | 19 | $limit_end = $limit_explode[1]; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | print '<div class="table column">'; |
| 37 | 37 | print '<p>'._("The table below shows the detailed information of all current flights.").'</p>'; |
| 38 | 38 | |
| 39 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 39 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 40 | 40 | if (isset($_GET['sort'])) { |
| 41 | 41 | $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort); |
| 42 | 42 | } else { |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $limit_start = 0; |
| 19 | 19 | $limit_end = 25; |
| 20 | 20 | $absolute_difference = 25; |
| 21 | -} else { |
|
| 21 | +} else { |
|
| 22 | 22 | $limit_explode = explode(",", $_GET['limit']); |
| 23 | 23 | $limit_start = $limit_explode[0]; |
| 24 | 24 | $limit_end = $limit_explode[1]; |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['ident']); |
|
| 16 | + $title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['ident']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="info column">'; |
| 19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | include('ident-sub-menu.php'); |
| 25 | 25 | print '<div class="column">'; |
| 26 | 26 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
| 28 | 28 | |
| 29 | 29 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByIdent($ident); |
| 30 | 30 | if (!empty($manufacturers_array)) |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | print '</thead>'; |
| 40 | 40 | print '<tbody>'; |
| 41 | 41 | $i = 1; |
| 42 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 42 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 43 | 43 | { |
| 44 | 44 | print '<tr>'; |
| 45 | 45 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['ident'])) { |
| 6 | - header('Location: '.$globalURL.'/ident'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/ident'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
@@ -3,15 +3,15 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 7 | 7 | |
| 8 | 8 | $Spotter = new Spotter(); |
| 9 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
| 9 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
| 10 | 10 | else $spotter_array = array(); |
| 11 | 11 | |
| 12 | 12 | if (!empty($spotter_array)) |
| 13 | 13 | { |
| 14 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 14 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 15 | 15 | require_once('header.php'); |
| 16 | 16 | print '<div class="select-item">'; |
| 17 | 17 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -22,13 +22,13 @@ discard block |
||
| 22 | 22 | print '</div>'; |
| 23 | 23 | |
| 24 | 24 | print '<div class="info column">'; |
| 25 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 25 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 26 | 26 | print '</div>'; |
| 27 | 27 | |
| 28 | 28 | include('date-sub-menu.php'); |
| 29 | 29 | print '<div class="column">'; |
| 30 | 30 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
| 31 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 31 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 32 | 32 | |
| 33 | 33 | $airline_array = $Spotter->countAllAirlineCountriesByDate($_GET['date']); |
| 34 | 34 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | var data = google.visualization.arrayToDataTable([ |
| 41 | 41 | ["'._("Country").'", "'._("# of times").'"], '; |
| 42 | 42 | $country_data = ''; |
| 43 | - foreach($airline_array as $airline_item) |
|
| 43 | + foreach ($airline_array as $airline_item) |
|
| 44 | 44 | { |
| 45 | 45 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
| 46 | 46 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | print '</thead>'; |
| 75 | 75 | print '<tbody>'; |
| 76 | 76 | $i = 1; |
| 77 | - foreach($airline_array as $airline_item) |
|
| 77 | + foreach ($airline_array as $airline_item) |
|
| 78 | 78 | { |
| 79 | 79 | print '<tr>'; |
| 80 | 80 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,11 @@ |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
| 7 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
| 8 | -else $spotter_array = array(); |
|
| 7 | +if (isset($_GET['date'])) { |
|
| 8 | + $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
| 9 | +} else { |
|
| 10 | + $spotter_array = array(); |
|
| 11 | +} |
|
| 9 | 12 | |
| 10 | 13 | if (!empty($spotter_array)) |
| 11 | 14 | { |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | include('country-sub-menu.php'); |
| 52 | 52 | print '<div class="column">'; |
| 53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 55 | 55 | |
| 56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
| 57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | function drawChart() { |
| 63 | 63 | var data = google.visualization.arrayToDataTable([ |
| 64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
| 65 | - $country_data = ''; |
|
| 65 | + $country_data = ''; |
|
| 66 | 66 | foreach($airport_country_array as $airport_item) |
| 67 | 67 | { |
| 68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | |
| 13 | 13 | if (isset($_GET['sort'])) { |
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s"),$country); |
|
| 21 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s"), $country); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="select-item">'; |
| 24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 26 | 26 | print '<option></option>'; |
| 27 | 27 | $all_countries = $Spotter->getAllCountries(); |
| 28 | - foreach($all_countries as $all_country) |
|
| 28 | + foreach ($all_countries as $all_country) |
|
| 29 | 29 | { |
| 30 | - if($country == $all_country['country']) |
|
| 30 | + if ($country == $all_country['country']) |
|
| 31 | 31 | { |
| 32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | if ($_GET['country'] != "NA") |
| 43 | 43 | { |
| 44 | 44 | print '<div class="info column">'; |
| 45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 46 | 46 | print '</div>'; |
| 47 | 47 | } else { |
| 48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | include('country-sub-menu.php'); |
| 52 | 52 | print '<div class="column">'; |
| 53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
| 55 | 55 | |
| 56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
| 57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | var data = google.visualization.arrayToDataTable([ |
| 64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
| 65 | 65 | $country_data = ''; |
| 66 | - foreach($airport_country_array as $airport_item) |
|
| 66 | + foreach ($airport_country_array as $airport_item) |
|
| 67 | 67 | { |
| 68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
| 69 | 69 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | print '</thead>'; |
| 98 | 98 | print '<tbody>'; |
| 99 | 99 | $i = 1; |
| 100 | - foreach($airport_country_array as $airport_item) |
|
| 100 | + foreach ($airport_country_array as $airport_item) |
|
| 101 | 101 | { |
| 102 | 102 | print '<tr>'; |
| 103 | 103 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | <footer class="container"> |
| 4 | 4 | <?php |
| 5 | - if (isset($sql_time)) { |
|
| 5 | + if (isset($sql_time)) { |
|
| 6 | 6 | ?> |
| 7 | 7 | <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
| 8 | 8 | <br /> |
| 9 | 9 | <?php |
| 10 | - } |
|
| 10 | + } |
|
| 11 | 11 | ?> |
| 12 | 12 | <span>Developed in Barrie by <a href="http://www.mariotrunz.com" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
| 13 | 13 | </footer> |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | <?php |
| 5 | 5 | if (isset($sql_time)) { |
| 6 | 6 | ?> |
| 7 | - <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
|
| 7 | + <i><?php echo _("Page generated in").' '.round($sql_time + $page_time, 2); ?>s (<?php print round($page_time, 2); ?>ms PHP - <?php print round($sql_time, 2); ?>ms SQL)</i> |
|
| 8 | 8 | <br /> |
| 9 | 9 | <?php |
| 10 | 10 | } |
@@ -9,7 +9,10 @@ |
||
| 9 | 9 | <?php |
| 10 | 10 | } |
| 11 | 11 | ?> |
| 12 | - <span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
| 12 | + <span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) { |
|
| 13 | + print $globalURL; |
|
| 14 | +} |
|
| 15 | +?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
| 13 | 16 | </footer> |
| 14 | 17 | |
| 15 | 18 | <div class="notifications bottom-left"></div> |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | $page_url = $globalURL.'/tools-acars'; |
| 10 | 10 | |
| 11 | -$message = filter_input(INPUT_POST,'acars_message',FILTER_SANITIZE_STRING); |
|
| 11 | +$message = filter_input(INPUT_POST, 'acars_message', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | |
| 13 | 13 | print '<div class="info column">'; |
| 14 | 14 | print '<h1>'._("Parse ACARS messages").'</h1>'; |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<fieldset class="form-group">'; |
| 24 | 24 | print '<label for="notam_message">'._("NOTAM Message").'</label>'; |
| 25 | 25 | print '<textarea class="form-control" name="notam_message" id="notam_message" rows="5">'; |
| 26 | -if ($message != '') print $message; |
|
| 26 | +if ($message != '') { |
|
| 27 | + print $message; |
|
| 28 | +} |
|
| 27 | 29 | print '</textarea>'; |
| 28 | 30 | print '</fieldset>'; |
| 29 | 31 | print '<button type="submit" class="btn btn-primary">Submit</button>'; |
@@ -4,12 +4,12 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | 6 | $Spotter = new Spotter(); |
| 7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 8 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
| 7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 8 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
| 9 | 9 | |
| 10 | 10 | if (!empty($spotter_array)) |
| 11 | 11 | { |
| 12 | - $title = sprintf(_("Most Common Departure Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 12 | + $title = sprintf(_("Most Common Departure Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | 13 | |
| 14 | 14 | require_once('header.php'); |
| 15 | 15 | print '<div class="select-item">'; |
@@ -21,13 +21,13 @@ discard block |
||
| 21 | 21 | print '</div>'; |
| 22 | 22 | |
| 23 | 23 | print '<div class="info column">'; |
| 24 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 24 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 25 | 25 | print '</div>'; |
| 26 | 26 | |
| 27 | 27 | include('date-sub-menu.php'); |
| 28 | 28 | print '<div class="column">'; |
| 29 | 29 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 30 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 30 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 31 | 31 | |
| 32 | 32 | $airport_airport_array = $Spotter->countAllDepartureAirportsByDate($_GET['date']); |
| 33 | 33 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 44 | 44 | |
| 45 | 45 | $airport_data = ''; |
| 46 | - foreach($airport_airport_array as $airport_item) |
|
| 46 | + foreach ($airport_airport_array as $airport_item) |
|
| 47 | 47 | { |
| 48 | 48 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
| 49 | 49 | $name = str_replace("'", "", $name); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | print '</thead>'; |
| 83 | 83 | print '<tbody>'; |
| 84 | 84 | $i = 1; |
| 85 | - foreach($airport_airport_array as $airport_item) |
|
| 85 | + foreach ($airport_airport_array as $airport_item) |
|
| 86 | 86 | { |
| 87 | 87 | print '<tr>'; |
| 88 | 88 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airline'])) { |
| 6 | - header('Location: '.$globalURL.'/airline'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airline'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | function drawChart() { |
| 70 | 70 | var data = google.visualization.arrayToDataTable([ |
| 71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
| 72 | - $country_data = ''; |
|
| 72 | + $country_data = ''; |
|
| 73 | 73 | foreach($airport_country_array as $airport_item) |
| 74 | 74 | { |
| 75 | 75 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -6,22 +6,22 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/airline'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 15 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
| 18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
| 19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
| 20 | 20 | print '<option></option>'; |
| 21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
| 22 | - foreach($airline_names as $airline_name) |
|
| 22 | + foreach ($airline_names as $airline_name) |
|
| 23 | 23 | { |
| 24 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
| 24 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
| 25 | 25 | { |
| 26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | include('airline-sub-menu.php'); |
| 60 | 60 | print '<div class="column">'; |
| 61 | 61 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 62 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 62 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 63 | 63 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirline($airline); |
| 64 | 64 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 65 | 65 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | var data = google.visualization.arrayToDataTable([ |
| 71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
| 72 | 72 | $country_data = ''; |
| 73 | - foreach($airport_country_array as $airport_item) |
|
| 73 | + foreach ($airport_country_array as $airport_item) |
|
| 74 | 74 | { |
| 75 | 75 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
| 76 | 76 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | print '</thead>'; |
| 105 | 105 | print '<tbody>'; |
| 106 | 106 | $i = 1; |
| 107 | - foreach($airport_country_array as $airport_item) |
|
| 107 | + foreach ($airport_country_array as $airport_item) |
|
| 108 | 108 | { |
| 109 | 109 | print '<tr>'; |
| 110 | 110 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,9 @@ discard block |
||
| 22 | 22 | print '<option></option>'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $airline_names = $Stats->getAllAirlineNames(); |
| 25 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
| 25 | + if (empty($airline_names)) { |
|
| 26 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($airline_names as $airline_name) |
| 27 | 29 | { |
| 28 | 30 | if($airline == $airline_name['airline_icao']) |
@@ -44,8 +46,7 @@ discard block |
||
| 44 | 46 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 45 | 47 | { |
| 46 | 48 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 47 | - } |
|
| 48 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 49 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 49 | 50 | { |
| 50 | 51 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 51 | 52 | } |