本文整理汇总了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'];