garcez Posted March 14, 2020 Report Share Posted March 14, 2020 Charter flights are always "delayed", as Schedules flights are normal in flight status. What should I do for charter flights to have their normal status? <?php $schedule = SchedulesData::getScheduleByFlight($pirep->code,$pirep->flightnum); $fltime = explode(".", $schedule->flighttime); $minstar = substr($fltime[1],0,1); $minstarmin = substr($fltime[1],1,2); $flmin = $minstar * 10; $flhou = $fltime[0] * 60; $flminu = $flhou + $flmin + $minstarmin; $actfltime = explode(".", $pirep->flighttime); $actminstar = substr($actfltime[1],0,1); $actminstarmin = substr($actfltime[1],1,2); $actflmin = $actminstar * 10; $actflhou = $actfltime[0] * 60; $actflminu = $actflhou + $actflmin + $actminstarmin; if(($flminu - 20) > $actflminu) { echo "<font color='Blue'><b>Early</b></font> "; } elseif (($flminu + 15) < $actflminu) { echo "<font color='#ff0000'><b>Delayed</b></font> "; } else { echo "<font color='#090'><b>On Time</b></font> "; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.