@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 20 | 20 | $previous = null; |
| 21 | 21 | print '<div class="alphabet-legend">'; |
| 22 | - foreach($aircraft_types as $value) { |
|
| 22 | + foreach ($aircraft_types as $value) { |
|
| 23 | 23 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
| 24 | 24 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
| 25 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
| 25 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
| 26 | 26 | { |
| 27 | 27 | if ($previous !== null) print ' | '; |
| 28 | 28 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -31,12 +31,12 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | print '</div>'; |
| 33 | 33 | $previous = null; |
| 34 | - foreach($aircraft_types as $value) { |
|
| 34 | + foreach ($aircraft_types as $value) { |
|
| 35 | 35 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
| 36 | 36 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
| 37 | 37 | if ($firstLetter != "") |
| 38 | 38 | { |
| 39 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
| 39 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
| 40 | 40 | { |
| 41 | 41 | if ($previous !== null) print '</div>'; |
| 42 | 42 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -16,7 +16,9 @@ discard block |
||
| 16 | 16 | print '<h1>'._("Aircrafts Types").'</h1>'; |
| 17 | 17 | |
| 18 | 18 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 19 | - if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 19 | + if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') { |
|
| 20 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 21 | + } |
|
| 20 | 22 | $previous = null; |
| 21 | 23 | print '<div class="alphabet-legend">'; |
| 22 | 24 | foreach($aircraft_types as $value) { |
@@ -24,10 +26,14 @@ discard block |
||
| 24 | 26 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
| 25 | 27 | if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
| 26 | 28 | { |
| 27 | - if ($previous !== null) print ' | '; |
|
| 29 | + if ($previous !== null) { |
|
| 30 | + print ' | '; |
|
| 31 | + } |
|
| 28 | 32 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
| 29 | 33 | } |
| 30 | - if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter; |
|
| 34 | + if ($firstLetter != '(' && $firstLetter != ')') { |
|
| 35 | + $previous = $firstLetter; |
|
| 36 | + } |
|
| 31 | 37 | } |
| 32 | 38 | print '</div>'; |
| 33 | 39 | $previous = null; |
@@ -38,10 +44,14 @@ discard block |
||
| 38 | 44 | { |
| 39 | 45 | if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
| 40 | 46 | { |
| 41 | - if ($previous !== null) print '</div>'; |
|
| 47 | + if ($previous !== null) { |
|
| 48 | + print '</div>'; |
|
| 49 | + } |
|
| 42 | 50 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
| 43 | 51 | } |
| 44 | - if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter; |
|
| 52 | + if ($firstLetter != '(' && $firstLetter != ')') { |
|
| 53 | + $previous = $firstLetter; |
|
| 54 | + } |
|
| 45 | 55 | print '<div class="alphabet-item">'; |
| 46 | 56 | print '<a href="'.$globalURL.'/aircraft/'.$value['aircraft_icao'].'">'; |
| 47 | 57 | if ($value['aircraft_name'] == '') { |