本文整理汇总了PHP中Spotter::getSpotterDataByRegistration方法的典型用法代码示例。如果您正苦于以下问题:PHP Spotter::getSpotterDataByRegistration方法的具体用法?PHP Spotter::getSpotterDataByRegistration怎么用?PHP Spotter::getSpotterDataByRegistration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spotter
的用法示例。
在下文中一共展示了Spotter::getSpotterDataByRegistration方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Spotter
<?php
require 'require/class.Connection.php';
require 'require/class.Spotter.php';
$Spotter = new Spotter();
$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
$spotter_array = $Spotter->getSpotterDataByRegistration($_GET['registration'], "0,1", $sort);
$aircraft_array = $Spotter->getAircraftInfoByRegistration($_GET['registration']);
if (!empty($spotter_array)) {
$title = 'Most Common Routes from aircraft with registration ' . $_GET['registration'];
require 'header.php';
print '<div class="info column">';
print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>';
print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>';
print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>';
print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>';
print '</div>';
include 'registration-sub-menu.php';
print '<div class="column">';
print '<h2>Most Common Routes</h2>';
print '<p>The statistic below shows the most common routes of aircraft with registration <strong>' . $_GET['registration'] . '</strong>.</p>';
$route_array = $Spotter->countAllRoutesByRegistration($_GET['registration']);
if (!empty($route_array)) {
print '<div class="table-responsive">';
print '<table class="common-routes table-striped">';
print '<thead>';
print '<th></th>';
print '<th>Departure Airport</th>';
print '<th>Arrival Airport</th>';
print '<th># of Times</th>';
print '<th></th>';
示例2: Spotter
<?php
require 'require/class.Connection.php';
require 'require/class.Spotter.php';
$Spotter = new Spotter();
$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
if (isset($_GET['registration'])) {
$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
$spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
$aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
} else {
$spotter_array = array();
}
if (!empty($spotter_array)) {
$title = 'Most Common Departure Airports by Country of aircraft with registration ' . $_GET['registration'];
require 'header.php';
print '<div class="info column">';
print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>';
print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>';
print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>';
print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>';
print '</div>';
include 'registration-sub-menu.php';
print '<div class="column">';
print '<h2>Most Common Departure Airports by Country</h2>';
?>
<p>The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong><?php
print $_GET['registration'];
?>
</strong>.</p>
<?php
开发者ID:linuxpronl,项目名称:FlightAirMap,代码行数:31,代码来源:registration-statistics-departure-airport-country.php
示例3: strtolower
<?php
require 'require/class.Connection.php';
require 'require/class.Spotter.php';
$spotter_array = Spotter::getSpotterDataByRegistration($_GET['registration'], "0,1", $_GET['sort']);
$aircraft_array = Spotter::getAircraftInfoByRegistration($_GET['registration']);
if (!empty($spotter_array)) {
$title = 'Most Common Departure Airports of aircraft with registration ' . $_GET['registration'];
require 'header.php';
print '<div class="info column">';
print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>';
print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>';
print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>';
print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>';
print '</div>';
include 'registration-sub-menu.php';
print '<div class="column">';
print '<h2>Most Common Departure Airports</h2>';
?>
<p>The statistic below shows all departure airports of flights with aircraft registration <strong><?php
print $_GET['registration'];
?>
</strong>.</p>
<?php
$airport_airport_array = Spotter::countAllDepartureAirportsByRegistration($_GET['registration']);
?>
<script>
google.load("visualization", "1", {packages:["geochart"]});
google.setOnLoadCallback(drawCharts);
$(window).resize(function(){
drawCharts();
示例4: date
print '<div class="detail date">';
print '<div class="title">Date (UTC)</div>';
print '<div>';
date_default_timezone_set('UTC');
print date("M j, Y G:i", strtotime($spotter_item['date_iso_8601']));
print '</div>';
print '</div>';
print '</div>';
}
print '</div>';
// print '<div id="archive-map"></div>';
if ($spotter_array[0]['registration'] != "" && $spotter_array[0]['registration'] != "NA" && $spotter_array[0]['registration'] != "N/A") {
print '<div class="last-flights">';
print '<h3>Last 5 Flights of this Aircraft (' . $spotter_array[0]['registration'] . ')</h3>';
$hide_th_links = true;
$spotter_array = $Spotter->getSpotterDataByRegistration($spotter_array[0]['registration'], "0,5", "");
include 'table-output.php';
print '<div class="more">';
print '<a href="' . $globalURL . '/registration/' . $spotter_array[0]['registration'] . '" class="btn btn-default btn" role="button">See all Flights»</a>';
print '</div>';
print '</div>';
}
/* ?>
<div class="column">
<div class="share">
<span class='st_facebook' displayText='Facebook'></span>
<span class='st_twitter' displayText='Tweet'></span>
<span class='st_googleplus' displayText='Google +'></span>
<span class='st_pinterest' displayText='Pinterest'></span>
<span class='st_email' displayText='Email'></span>
示例5: explode
if (!isset($_GET['limit'])) {
$limit_start = 0;
$limit_end = 25;
$absolute_difference = 25;
} else {
$limit_explode = explode(",", $_GET['limit']);
$limit_start = $limit_explode[0];
$limit_end = $limit_explode[1];
}
$absolute_difference = abs($limit_start - $limit_end);
$limit_next = $limit_end + $absolute_difference;
$limit_previous_1 = $limit_start - $absolute_difference;
$limit_previous_2 = $limit_end - $absolute_difference;
$page_url = $globalURL . '/registration/' . $_GET['registration'];
if (isset($_GET['sort'])) {
$spotter_array = $Spotter->getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, $_GET['sort']);
} else {
$spotter_array = $Spotter->getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, '');
}
$aircraft_array = $Spotter->getAircraftInfoByRegistration($_GET['registration']);
if (!empty($spotter_array)) {
$title = 'Detailed View of aircraft with registration ' . $_GET['registration'];
require 'header.php';
print '<div class="info column">';
print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>';
print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>';
print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>';
print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>';
print '</div>';
include 'registration-sub-menu.php';
print '<div class="table column">';
示例6: explode
$limit_end = 25;
$absolute_difference = 25;
} else {
$limit_explode = explode(",", $_GET['limit']);
$limit_start = $limit_explode[0];
$limit_end = $limit_explode[1];
}
$absolute_difference = abs($limit_start - $limit_end);
$limit_next = $limit_end + $absolute_difference;
$limit_previous_1 = $limit_start - $absolute_difference;
$limit_previous_2 = $limit_end - $absolute_difference;
$page_url = $globalURL . '/registration/' . $_GET['registration'];
if (isset($_GET['sort'])) {
$spotter_array = Spotter::getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, $_GET['sort']);
} else {
$spotter_array = Spotter::getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, '');
}
$aircraft_array = Spotter::getAircraftInfoByRegistration($_GET['registration']);
if (!empty($spotter_array)) {
$title = 'Detailed View of aircraft with registration ' . $_GET['registration'];
require 'header.php';
print '<div class="info column">';
print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>';
print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>';
print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>';
print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>';
print '</div>';
include 'registration-sub-menu.php';
print '<div class="table column">';
print '<p>The table below shows the detailed information of all flights of aircraft with the registration <strong>' . $_GET['registration'] . '</strong>.</p>';
include 'table-output.php';