@@ -28,16 +28,25 @@ discard block |
||
| 28 | 28 | } elseif (is_numeric(substr(substr($ident, 0, 4), -1, 1))) { |
| 29 | 29 | //$airline_icao = substr($ident, 0, 3); |
| 30 | 30 | return $ident; |
| 31 | - } else return $ident; |
|
| 32 | - } else return $ident; |
|
| 31 | + } else { |
|
| 32 | + return $ident; |
|
| 33 | + } |
|
| 34 | + } else { |
|
| 35 | + return $ident; |
|
| 36 | + } |
|
| 33 | 37 | if ($airline_icao == 'AF') { |
| 34 | - if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
|
| 35 | - else $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
| 38 | + if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) { |
|
| 39 | + $icao = $ident; |
|
| 40 | + } else { |
|
| 41 | + $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
| 42 | + } |
|
| 36 | 43 | } else { |
| 37 | 44 | $identicao = $Spotter->getAllAirlineInfo($airline_icao); |
| 38 | 45 | if (isset($identicao[0])) { |
| 39 | 46 | $icao = $identicao[0]['icao'].ltrim(substr($ident,2),'0'); |
| 40 | - } else $icao = $ident; |
|
| 47 | + } else { |
|
| 48 | + $icao = $ident; |
|
| 49 | + } |
|
| 41 | 50 | } |
| 42 | 51 | return $icao; |
| 43 | 52 | } |
@@ -56,7 +65,9 @@ discard block |
||
| 56 | 65 | $sth->closeCursor(); |
| 57 | 66 | if (count($row) > 0) { |
| 58 | 67 | return $row['operator_correct']; |
| 59 | - } else return $ident; |
|
| 68 | + } else { |
|
| 69 | + return $ident; |
|
| 70 | + } |
|
| 60 | 71 | } |
| 61 | 72 | |
| 62 | 73 | public function addOperator($ident,$correct_ident,$source) { |
@@ -85,7 +96,9 @@ discard block |
||
| 85 | 96 | global $globalTranslationSources, $globalTranslationFetch; |
| 86 | 97 | //if (!isset($globalTranslationSources)) $globalTranslationSources = array('planefinder'); |
| 87 | 98 | $globalTranslationSources = array(); |
| 88 | - if (!isset($globalTranslationFetch)) $globalTranslationFetch = TRUE; |
|
| 99 | + if (!isset($globalTranslationFetch)) { |
|
| 100 | + $globalTranslationFetch = TRUE; |
|
| 101 | + } |
|
| 89 | 102 | //echo "Check Translation for ".$ident."..."; |
| 90 | 103 | $correct = $this->getOperator($ident); |
| 91 | 104 | if ($correct != '' && $correct != $ident) { |
@@ -21,7 +21,9 @@ discard block |
||
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
| 24 | + if (empty($airline_names)) { |
|
| 25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
| 26 | + } |
|
| 25 | 27 | foreach($airline_names as $airline_name) |
| 26 | 28 | { |
| 27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
| 43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 44 | 46 | { |
| 45 | 47 | 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" />'; |
| 46 | - } |
|
| 47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | 49 | { |
| 49 | 50 | 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" />'; |
| 50 | 51 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $limit_start = 0; |
| 15 | 15 | $limit_end = 25; |
| 16 | 16 | $absolute_difference = 25; |
| 17 | - } else { |
|
| 17 | + } else { |
|
| 18 | 18 | $limit_explode = explode(",", $_GET['limit']); |
| 19 | 19 | $limit_start = $limit_explode[0]; |
| 20 | 20 | $limit_end = $limit_explode[1]; |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -21,7 +21,9 @@ discard block |
||
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
| 24 | + if (empty($airline_names)) { |
|
| 25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
| 26 | + } |
|
| 25 | 27 | foreach($airline_names as $airline_name) |
| 26 | 28 | { |
| 27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
| 43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 44 | 46 | { |
| 45 | 47 | 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" />'; |
| 46 | - } |
|
| 47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | 49 | { |
| 49 | 50 | 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" />'; |
| 50 | 51 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -12,7 +12,9 @@ |
||
| 12 | 12 | $METAR = new METAR(); |
| 13 | 13 | $metar_info = $METAR->getMETAR($icao); |
| 14 | 14 | //print_r($metar_info); |
| 15 | - if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
| 15 | + if (isset($metar_info[0]['metar'])) { |
|
| 16 | + $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
| 17 | + } |
|
| 16 | 18 | //print_r($metar_parse); |
| 17 | 19 | } |
| 18 | 20 | ?> |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |