| @@ 65-94 (lines=30) @@ | ||
| 62 | print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 63 | ||
| 64 | $aircraft_array = $Spotter->countAllAircraftTypesByAirline($airline); |
|
| 65 | if (!empty($aircraft_array)) |
|
| 66 | { |
|
| 67 | print '<div class="table-responsive">'; |
|
| 68 | print '<table class="common-type table-striped">'; |
|
| 69 | print '<thead>'; |
|
| 70 | print '<th></th>'; |
|
| 71 | print '<th>'._("Aircraft Type").'</th>'; |
|
| 72 | print '<th>'._("# of times").'</th>'; |
|
| 73 | print '<th></th>'; |
|
| 74 | print '</thead>'; |
|
| 75 | print '<tbody>'; |
|
| 76 | $i = 1; |
|
| 77 | foreach($aircraft_array as $aircraft_item) |
|
| 78 | { |
|
| 79 | print '<tr>'; |
|
| 80 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 81 | print '<td>'; |
|
| 82 | print '<a href="'.$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'">'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')</a>'; |
|
| 83 | print '</td>'; |
|
| 84 | print '<td>'; |
|
| 85 | print $aircraft_item['aircraft_icao_count']; |
|
| 86 | print '</td>'; |
|
| 87 | print '<td><a href="'.$globalURL.'/search?aircraft='.$aircraft_item['aircraft_icao'].'&airline='.$airline.'">'._("Search flights").'</a></td>'; |
|
| 88 | print '</tr>'; |
|
| 89 | $i++; |
|
| 90 | } |
|
| 91 | print '<tbody>'; |
|
| 92 | print '</table>'; |
|
| 93 | print '</div>'; |
|
| 94 | } |
|
| 95 | print '</div>'; |
|
| 96 | } else { |
|
| 97 | $title = _("Airline Statistic"); |
|
| @@ 61-90 (lines=30) @@ | ||
| 58 | print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 59 | ||
| 60 | $aircraft_array = $Spotter->countAllAircraftTypesByAirport($airport); |
|
| 61 | if (!empty($aircraft_array)) |
|
| 62 | { |
|
| 63 | print '<div class="table-responsive">'; |
|
| 64 | print '<table class="common-type table-striped">'; |
|
| 65 | print '<thead>'; |
|
| 66 | print '<th></th>'; |
|
| 67 | print '<th>'._("Aircraft Type").'</th>'; |
|
| 68 | print '<th>'._("# of times").'</th>'; |
|
| 69 | print '<th></th>'; |
|
| 70 | print '</thead>'; |
|
| 71 | print '<tbody>'; |
|
| 72 | $i = 1; |
|
| 73 | foreach($aircraft_array as $aircraft_item) |
|
| 74 | { |
|
| 75 | print '<tr>'; |
|
| 76 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 77 | print '<td>'; |
|
| 78 | print '<a href="'.$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'">'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')</a>'; |
|
| 79 | print '</td>'; |
|
| 80 | print '<td>'; |
|
| 81 | print $aircraft_item['aircraft_icao_count']; |
|
| 82 | print '</td>'; |
|
| 83 | print '<td><a href="'.$globalURL.'/search?aircraft='.$aircraft_item['aircraft_icao'].'&airport='.$_GET['airport'].'">'._("Search flights").'</a></td>'; |
|
| 84 | print '</tr>'; |
|
| 85 | $i++; |
|
| 86 | } |
|
| 87 | print '<tbody>'; |
|
| 88 | print '</table>'; |
|
| 89 | print '</div>'; |
|
| 90 | } |
|
| 91 | print '</div>'; |
|
| 92 | } else { |
|
| 93 | $title = _("Airport"); |
|
| @@ 34-63 (lines=30) @@ | ||
| 31 | print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
| 32 | ||
| 33 | $aircraft_array = $Spotter->countAllAircraftTypesByIdent($_GET['ident']); |
|
| 34 | if (!empty($aircraft_array)) |
|
| 35 | { |
|
| 36 | print '<div class="table-responsive">'; |
|
| 37 | print '<table class="common-type table-striped">'; |
|
| 38 | print '<thead>'; |
|
| 39 | print '<th></th>'; |
|
| 40 | print '<th>'._("Aircraft Type").'</th>'; |
|
| 41 | print '<th>'._("# of times").'</th>'; |
|
| 42 | print '<th></th>'; |
|
| 43 | print '</thead>'; |
|
| 44 | print '<tbody>'; |
|
| 45 | $i = 1; |
|
| 46 | foreach($aircraft_array as $aircraft_item) |
|
| 47 | { |
|
| 48 | print '<tr>'; |
|
| 49 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 50 | print '<td>'; |
|
| 51 | print '<a href="'.$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'">'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')</a>'; |
|
| 52 | print '</td>'; |
|
| 53 | print '<td>'; |
|
| 54 | print $aircraft_item['aircraft_icao_count']; |
|
| 55 | print '</td>'; |
|
| 56 | print '<td><a href="'.$globalURL.'/search?aircraft='.$aircraft_item['aircraft_icao'].'&callsign='.$_GET['ident'].'">'._("Search flights").'</a></td>'; |
|
| 57 | print '</tr>'; |
|
| 58 | $i++; |
|
| 59 | } |
|
| 60 | print '<tbody>'; |
|
| 61 | print '</table>'; |
|
| 62 | print '</div>'; |
|
| 63 | } |
|
| 64 | print '</div>'; |
|
| 65 | } else { |
|
| 66 | $title = _("Ident"); |
|
| @@ 48-77 (lines=30) @@ | ||
| 45 | print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 46 | ||
| 47 | $aircraft_array = $Spotter->countAllAircraftTypesByManufacturer($manufacturer); |
|
| 48 | if (!empty($aircraft_array)) |
|
| 49 | { |
|
| 50 | print '<div class="table-responsive">'; |
|
| 51 | print '<table class="common-type table-striped">'; |
|
| 52 | print '<thead>'; |
|
| 53 | print '<th></th>'; |
|
| 54 | print '<th>'._("Aircraft Type").'</th>'; |
|
| 55 | print '<th>'._("# of times").'</th>'; |
|
| 56 | print '<th></th>'; |
|
| 57 | print '</thead>'; |
|
| 58 | print '<tbody>'; |
|
| 59 | $i = 1; |
|
| 60 | foreach($aircraft_array as $aircraft_item) |
|
| 61 | { |
|
| 62 | print '<tr>'; |
|
| 63 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 64 | print '<td>'; |
|
| 65 | print '<a href="'.$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'">'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')</a>'; |
|
| 66 | print '</td>'; |
|
| 67 | print '<td>'; |
|
| 68 | print $aircraft_item['aircraft_icao_count']; |
|
| 69 | print '</td>'; |
|
| 70 | print '<td><a href="'.$globalURL.'/search?aircraft='.$aircraft_item['aircraft_icao'].'&manufacturer='.$manufacturer.'">'._("Search flights").'</a></td>'; |
|
| 71 | print '</tr>'; |
|
| 72 | $i++; |
|
| 73 | } |
|
| 74 | print '<tbody>'; |
|
| 75 | print '</table>'; |
|
| 76 | print '</div>'; |
|
| 77 | } |
|
| 78 | print '</div>'; |
|
| 79 | } else { |
|
| 80 | $title = _("Manufacturer"); |
|