| @@ 64-103 (lines=40) @@ | ||
| 61 | print '<h2>'._("Most Common Routes").'</h2>'; |
|
| 62 | print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 63 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
|
| 64 | if (!empty($route_array)) |
|
| 65 | { |
|
| 66 | print '<div class="table-responsive">'; |
|
| 67 | print '<table class="common-routes table-striped">'; |
|
| 68 | print '<thead>'; |
|
| 69 | print '<th></th>'; |
|
| 70 | print '<th>'._("Departure Airport").'</th>'; |
|
| 71 | print '<th>'._("Arrival Airport").'</th>'; |
|
| 72 | print '<th>'._("# of times").'</th>'; |
|
| 73 | print '<th></th>'; |
|
| 74 | print '<th></th>'; |
|
| 75 | print '</thead>'; |
|
| 76 | print '<tbody>'; |
|
| 77 | $i = 1; |
|
| 78 | foreach($route_array as $route_item) |
|
| 79 | { |
|
| 80 | print '<tr>'; |
|
| 81 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 82 | print '<td>'; |
|
| 83 | print '<a href="'.$globalURL.'/airport/'.$route_item['airport_departure_icao'].'">'.$route_item['airport_departure_city'].', '.$route_item['airport_departure_country'].' ('.$route_item['airport_departure_icao'].')</a>'; |
|
| 84 | print '</td>'; |
|
| 85 | print '<td>'; |
|
| 86 | print '<a href="'.$globalURL.'/airport/'.$route_item['airport_arrival_icao'].'">'.$route_item['airport_arrival_city'].', '.$route_item['airport_arrival_country'].' ('.$route_item['airport_arrival_icao'].')</a>'; |
|
| 87 | print '</td>'; |
|
| 88 | print '<td>'; |
|
| 89 | print $route_item['route_count']; |
|
| 90 | print '</td>'; |
|
| 91 | print '<td>'; |
|
| 92 | print '<a href="'.$globalURL.'/search?airline='.$airline.'&departure_airport_route='.$route_item['airport_departure_icao'].'&arrival_airport_route='.$route_item['airport_arrival_icao'].'">'._("Search Flights").'</a>'; |
|
| 93 | print '</td>'; |
|
| 94 | print '<td>'; |
|
| 95 | print '<a href="'.$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'">'._("Route Profile").'</a>'; |
|
| 96 | print '</td>'; |
|
| 97 | print '</tr>'; |
|
| 98 | $i++; |
|
| 99 | } |
|
| 100 | print '<tbody>'; |
|
| 101 | print '</table>'; |
|
| 102 | print '</div>'; |
|
| 103 | } |
|
| 104 | print '</div>'; |
|
| 105 | } else { |
|
| 106 | $title = _("Airline Statistic"); |
|
| @@ 49-88 (lines=40) @@ | ||
| 46 | print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | ||
| 48 | $route_array = $Spotter->countAllRoutesByManufacturer($manufacturer); |
|
| 49 | if (!empty($route_array)) |
|
| 50 | { |
|
| 51 | print '<div class="table-responsive">'; |
|
| 52 | print '<table class="common-routes table-striped">'; |
|
| 53 | print '<thead>'; |
|
| 54 | print '<th></th>'; |
|
| 55 | print '<th>'._("Departure Airport").'</th>'; |
|
| 56 | print '<th>'._("Arrival Airport").'</th>'; |
|
| 57 | print '<th>'._("# of times").'</th>'; |
|
| 58 | print '<th></th>'; |
|
| 59 | print '<th></th>'; |
|
| 60 | print '</thead>'; |
|
| 61 | print '<tbody>'; |
|
| 62 | $i = 1; |
|
| 63 | foreach($route_array as $route_item) |
|
| 64 | { |
|
| 65 | print '<tr>'; |
|
| 66 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 67 | print '<td>'; |
|
| 68 | print '<a href="'.$globalURL.'/airport/'.$route_item['airport_departure_icao'].'">'.$route_item['airport_departure_city'].', '.$route_item['airport_departure_country'].' ('.$route_item['airport_departure_icao'].')</a>'; |
|
| 69 | print '</td>'; |
|
| 70 | print '<td>'; |
|
| 71 | print '<a href="'.$globalURL.'/airport/'.$route_item['airport_arrival_icao'].'">'.$route_item['airport_arrival_city'].', '.$route_item['airport_arrival_country'].' ('.$route_item['airport_arrival_icao'].')</a>'; |
|
| 72 | print '</td>'; |
|
| 73 | print '<td>'; |
|
| 74 | print $route_item['route_count']; |
|
| 75 | print '</td>'; |
|
| 76 | print '<td>'; |
|
| 77 | print '<a href="'.$globalURL.'/search?manufacturer='.$_GET['aircraft_manufacturer'].'&departure_airport_route='.$route_item['airport_departure_icao'].'&arrival_airport_route='.$route_item['airport_arrival_icao'].'">'._("Search Flights").'</a>'; |
|
| 78 | print '</td>'; |
|
| 79 | print '<td>'; |
|
| 80 | print '<a href="'.$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'">'._("Route History").'</a>'; |
|
| 81 | print '</td>'; |
|
| 82 | print '</tr>'; |
|
| 83 | $i++; |
|
| 84 | } |
|
| 85 | print '<tbody>'; |
|
| 86 | print '</table>'; |
|
| 87 | print '</div>'; |
|
| 88 | } |
|
| 89 | print '</div>'; |
|
| 90 | } else { |
|
| 91 | $title = _("Manufacturer"); |
|