This is the code i'm using but nothing is showing in the status fro arrivals????
<?php
date_default_timezone_set('europe/london');
$query = "SELECT * FROM phpvms_schedules ORDER BY deptime + 0 ASC";
$list = DB::get_results($query);
echo '<h3>Expected Departures - Current Time is '.date('D M j H:i:s T Y').'</h3>';
echo '<table width="90%" border="1">';
echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Departure Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>';
$count = 0;
foreach($list as $flight)
{
if(date('G:i') >= '23')
{$time = '0';}
else
{$time = date('G:i');}
if(($flight->deptime + 0) > $time)
{
if($count < 10)
{
$aircraft = OperationsData::getAircraftInfo($flight->aircraft);
echo '<tr><td>'.$flight->code.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->fullname.'</td>';
echo '<td>';
if(($flight->deptime - date('G:i')) <= 2 / 120 * 15)
{
echo 'Final Call';
}
if(($flight->deptime - date('G:i')) <= 2 / 120 * 30)
{
echo 'Boarding';
}
if(($flight->deptime - date('G:i')) <= 2)
{
echo 'Check-In open';
}
else
{
echo '';
}
echo '</td></tr>';
$count++;
}
}
}
echo '</table>';
echo '<h3>Expected Arrivals - Current Time is '.date('G:i').'</h3>';
echo '<table width="90%" border="1">';
echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Arrival Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>';
$count = 0;
foreach($list as $flight)
{
if(date('G:i') >= '23')
{$time = '0';}
else
{$time = date('G:i');}
if(($flight->arrtime + 0) > $time)
{
if($count < 10)
{
$aircraft = OperationsData::getAircraftInfo($flight->aircraft);
echo '<tr><td>'.$flight->code.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>';
echo '<td>';
if(($flight->arrtime - date('G:i')) <= 1 / 60 * 1)
{
echo 'Landed';
}
if(($flight->arrtime - date('G:i')) <= 1 / 60 * 15)
{
echo 'On Time';
}
echo '</td></tr>';
$count++;
}
}
}
echo '</table>';
?>