| @@ 32-71 (lines=40) @@ | ||
| 29 | print '<p>'.sprintf(_("The statistic below shows the most common routes on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 30 | ||
| 31 | $route_array = $Spotter->countAllRoutesByDate($_GET['date']); |
|
| 32 | if (!empty($route_array)) |
|
| 33 | { |
|
| 34 | print '<div class="table-responsive">'; |
|
| 35 | print '<table class="common-routes table-striped">'; |
|
| 36 | print '<thead>'; |
|
| 37 | print '<th></th>'; |
|
| 38 | print '<th>'._("Departure Airport").'</th>'; |
|
| 39 | print '<th>'._("Arrival Airport").'</th>'; |
|
| 40 | print '<th>'._("# of times").'</th>'; |
|
| 41 | print '<th></th>'; |
|
| 42 | print '<th></th>'; |
|
| 43 | print '</thead>'; |
|
| 44 | print '<tbody>'; |
|
| 45 | $i = 1; |
|
| 46 | foreach($route_array as $route_item) |
|
| 47 | { |
|
| 48 | print '<tr>'; |
|
| 49 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 50 | print '<td>'; |
|
| 51 | 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>'; |
|
| 52 | print '</td>'; |
|
| 53 | print '<td>'; |
|
| 54 | 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>'; |
|
| 55 | print '</td>'; |
|
| 56 | print '<td>'; |
|
| 57 | print $route_item['route_count']; |
|
| 58 | print '</td>'; |
|
| 59 | print '<td>'; |
|
| 60 | print '<a href="'.$globalURL.'/search?start_date='.$_GET['date'].'+00:00&end_date='.$_GET['date'].'+23:59&departure_airport_route='.$route_item['airport_departure_icao'].'&arrival_airport_route='.$route_item['airport_arrival_icao'].'">Search Flights</a>'; |
|
| 61 | print '</td>'; |
|
| 62 | print '<td>'; |
|
| 63 | print '<a href="'.$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'">Route Profile</a>'; |
|
| 64 | print '</td>'; |
|
| 65 | print '</tr>'; |
|
| 66 | $i++; |
|
| 67 | } |
|
| 68 | print '<tbody>'; |
|
| 69 | print '</table>'; |
|
| 70 | print '</div>'; |
|
| 71 | } |
|
| 72 | print '</div>'; |
|
| 73 | } else { |
|
| 74 | $title = _("Unknown Date"); |
|
| @@ 30-69 (lines=40) @@ | ||
| 27 | print '<p>'.sprintf(_("The statistic below shows the most common routes from flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
| 28 | ||
| 29 | $route_array = $Spotter->countAllRoutesByIdent($ident); |
|
| 30 | if (!empty($route_array)) |
|
| 31 | { |
|
| 32 | print '<div class="table-responsive">'; |
|
| 33 | print '<table class="common-routes table-striped">'; |
|
| 34 | print '<thead>'; |
|
| 35 | print '<th></th>'; |
|
| 36 | print '<th>'._("Departure Airport").'</th>'; |
|
| 37 | print '<th>'._("Arrival Airport").'</th>'; |
|
| 38 | print '<th>'._("# of times").'</th>'; |
|
| 39 | print '<th></th>'; |
|
| 40 | print '<th></th>'; |
|
| 41 | print '</thead>'; |
|
| 42 | print '<tbody>'; |
|
| 43 | $i = 1; |
|
| 44 | foreach($route_array as $route_item) |
|
| 45 | { |
|
| 46 | print '<tr>'; |
|
| 47 | print '<td><strong>'.$i.'</strong></td>'; |
|
| 48 | print '<td>'; |
|
| 49 | 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>'; |
|
| 50 | print '</td>'; |
|
| 51 | print '<td>'; |
|
| 52 | 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>'; |
|
| 53 | print '</td>'; |
|
| 54 | print '<td>'; |
|
| 55 | print $route_item['route_count']; |
|
| 56 | print '</td>'; |
|
| 57 | print '<td>'; |
|
| 58 | print '<a href="'.$globalURL.'/search?callsign='.$ident.'&departure_airport_route='.$route_item['airport_departure_icao'].'&arrival_airport_route='.$route_item['airport_arrival_icao'].'">Search Flights</a>'; |
|
| 59 | print '</td>'; |
|
| 60 | print '<td>'; |
|
| 61 | print '<a href="'.$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'">'._("Route Profile").'</a>'; |
|
| 62 | print '</td>'; |
|
| 63 | print '</tr>'; |
|
| 64 | $i++; |
|
| 65 | } |
|
| 66 | print '<tbody>'; |
|
| 67 | print '</table>'; |
|
| 68 | print '</div>'; |
|
| 69 | } |
|
| 70 | print '</div>'; |
|
| 71 | } else { |
|
| 72 | $title = _("Ident"); |
|