Beispiel #1
0
                <div id="content">
                    <div id="welcome">
                        <h1>Itinerary List</h1>
                        <p>
                            You can find out the sectors we support through our broad range of comfortable aircrafts.
                        </p>
                        <!-- Fetch Rows -->
                        <table class="aatable">
                            <tr>
                                <th>Flight ID</th>
                                <th>Flight</th>
                                <th>Flies From</th>
                                <th>Flies To</th>
                            </tr>
                            <?php 
$flightData = getFlightInfo($FID);
for ($index = 0; $index < count($flightData); $index++) {
    $flight = $flightData[$index];
    echo "<tr>";
    echo "<td>" . $flight->get_FID() . "</td>";
    echo "<td>" . $flight->get_FName() . "</td>";
    echo "<td>" . $flight->get_source() . "</td>";
    echo "<td>" . $flight->get_dest() . "</td>";
    echo "</tr>";
}
?>
                        </table>
                    </div>
                    <!-- end div#welcome -->

                </div>
Beispiel #2
0
     if (mysql_num_rows($result2) == 1) {
         $takeoff = mysql_fetch_object($result2);
         $track['start']['lat'] = $takeoff->latitude;
         $track['start']['lon'] = $takeoff->longitude;
     }
 }
 // Get landing info
 $query = "SELECT latitude, longitude FROM point " . "WHERE flightId = {$row->flightId} " . "ORDER BY point.time DESC " . "LIMIT 0,1";
 if ($result2 = mysql_query($query)) {
     if (mysql_num_rows($result2) == 1) {
         $landing = mysql_fetch_object($result2);
         $track['end']['lat'] = $landing->latitude;
         $track['end']['lon'] = $landing->longitude;
     }
 }
 $flightInfo = getFlightInfo($track, $geoServerStatus);
 if ($row->utc) {
     // Convert UTC to local time
     try {
         $timeZone = new DateTimeZone($flightInfo->timezone);
         $timeOffset = timezone_offset_get($timeZone, new DateTime($track['start']['time']));
     } catch (Exception $e) {
         $timeOffset = 0;
     }
     $startTime = mysql2timestamp($track['start']['time']) + $timeOffset;
     $track['start']['time'] = date("Y-m-d H:i:s", $startTime);
     if (!$track['live']) {
         // Live tracks don't have an end time
         $endTime = mysql2timestamp($track['end']['time']) + $timeOffset;
         $track['end']['time'] = date("Y-m-d H:i:s", $endTime);
     }