Jump to content

Recommended Posts

Posted

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>    "; }
                          ?>

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...