本文整理匯總了PHP中Spotter::getSpotterDataByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Spotter::getSpotterDataByID方法的具體用法?PHP Spotter::getSpotterDataByID怎麽用?PHP Spotter::getSpotterDataByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Spotter
的用法示例。
在下文中一共展示了Spotter::getSpotterDataByID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
<?php
if ($_GET['id'] == "") {
header('Location: /');
}
require 'require/class.Connection.php';
require 'require/class.Spotter.php';
require 'require/class.SpotterArchive.php';
$Spotter = new Spotter();
$SpotterArchive = new SpotterArchive();
$spotter_array = $Spotter->getSpotterDataByID($_GET['id']);
if (!empty($spotter_array)) {
if (isset($spotter_array[0]['flightaware_id'])) {
$flightaware_id = $spotter_array[0]['flightaware_id'];
}
if (isset($spotter_array[0]['latitude'])) {
$latitude = $spotter_array[0]['latitude'];
}
if (isset($spotter_array[0]['longitude'])) {
$longitude = $spotter_array[0]['longitude'];
}
$title = '';
if (isset($spotter_array[0]['ident'])) {
$title .= $spotter_array[0]['ident'];
}
if (isset($spotter_array[0]['airline_name'])) {
$title .= ' - ' . $spotter_array[0]['airline_name'];
}
if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') {
$title .= ' - ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ')';
}
示例2: header
<?php
if ($_GET['id'] == "") {
header('Location: /');
}
require 'require/class.Connection.php';
require 'require/class.Spotter.php';
require 'require/class.SpotterArchive.php';
$spotter_array = Spotter::getSpotterDataByID($_GET['id']);
if (!empty($spotter_array)) {
if (isset($spotter_array[0]['flightaware_id'])) {
$flightaware_id = $spotter_array[0]['flightaware_id'];
}
if (isset($spotter_array[0]['latitude'])) {
$latitude = $spotter_array[0]['latitude'];
}
if (isset($spotter_array[0]['longitude'])) {
$longitude = $spotter_array[0]['longitude'];
}
$title = '';
if (isset($spotter_array[0]['ident'])) {
$title .= $spotter_array[0]['ident'];
}
if (isset($spotter_array[0]['airline_name'])) {
$title .= ' - ' . $spotter_array[0]['airline_name'];
}
if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') {
$title .= ' - ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ')';
}
if (isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA' && $spotter_array[0]['registration'] != 'N/A') {
$title .= ' - ' . $spotter_array[0]['registration'];