Exemplo n.º 1
0
<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$Spotter = new Spotter();
$spotter_array = $Spotter->getRealTimeData();
print '{';
print '"airline_logo": "';
if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
    print 'http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png';
}
print '",';
print '"body": "' . $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '",';
print '"url": "http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '",';
print '"html": "';
if (!empty($spotter_array)) {
    print '<a href=\\"http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '\\">';
    if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
        print '<img src=\\"http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png\\" width=\\"50px\\" /> ';
    }
    print $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '</a>';
}
print '"';
print '}';
Exemplo n.º 2
0
<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$spotter_array = Spotter::getRealTimeData($_GET['q']);
$output = '{';
$output .= '"flights": [';
foreach ($spotter_array as $spotter_item) {
    $output .= '{';
    $output .= '"flight_id": "' . $spotter_item['spotter_id'] . '",';
    $output .= '"html": "';
    $output .= '<tr id=\\"table-tr-' . $spotter_item['spotter_id'] . '\\" style=\\"display:none;\\">';
    if ($_GET['image'] == "true") {
        if ($spotter_item['image'] != "") {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $spotter_item['image'] . '\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        } else {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $globalURL . '/images/placeholder.png\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        }
    }
    if ($globalIVAO && @getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif')) {
        $output .= '<td class=\\"logo\\">';
        $output .= '<img src=\\"' . $globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif\\" />';
        $output .= '</td>';
    } elseif (@getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.png')) {
        $output .= '<td class=\\"logo\\">';
        $output .= '<img src=\\"' . $globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.png\\" />';
Exemplo n.º 3
0
<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$spotter_array = Spotter::getRealTimeData();
print '{';
print '"airline_logo": "';
if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
    print 'http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png';
}
print '",';
print '"body": "' . $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '",';
print '"url": "http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '",';
print '"html": "';
if (!empty($spotter_array)) {
    print '<a href=\\"http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '\\">';
    if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
        print '<img src=\\"http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png\\" width=\\"50px\\" /> ';
    }
    print $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '</a>';
}
print '"';
print '}';
Exemplo n.º 4
0
<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$Spotter = new Spotter();
$spotter_array = $Spotter->getRealTimeData($_GET['q']);
$output = '{';
$output .= '"flights": [';
foreach ($spotter_array as $spotter_item) {
    $output .= '{';
    $output .= '"flight_id": "' . $spotter_item['spotter_id'] . '",';
    $output .= '"html": "';
    $output .= '<tr id=\\"table-tr-' . $spotter_item['spotter_id'] . '\\" style=\\"display:none;\\">';
    if ($_GET['image'] == "true") {
        if ($spotter_item['image'] != "") {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $spotter_item['image'] . '\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        } else {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $globalURL . '/images/placeholder.png\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        }
    }
    if ($globalIVAO && @getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif')) {
        $output .= '<td class=\\"logo\\">';
        $output .= '<img src=\\"' . $globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif\\" />';
        $output .= '</td>';
    } elseif (@getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.png')) {
        $output .= '<td class=\\"logo\\">';