Jump to content

The status of the aircraft at the airport. (schedules_result.tpl)


bass

Recommended Posts

Help to complete the code.

This code should reflect the flight status.

- Flight free

- No aircraft at the airport

- Book

as can be seen from the code below, now there is no warning that the aircraft is out of this airport. How do I add ???

at the moment I am using the following code:

<?php
    if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0)
 {
    ?>
 <?php $search1 = (array(
  'a.registration' => $route->registration,
  's.bidid != 0'
));
$schedules = SchedulesData::findSchedules($search1);
$disabled = $schedules[0]->registration;if($route->registration==$disabled)
{
continue;
} ?>

    <div class="btn btn-danger btn-sm sharp disabled">Book</div>
    <?php
 }
    else
 {
 ?>
   <a data-toggle="modal" href="/index.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Free</a>
   <?php				   
    }
    ?>

Link to comment
Share on other sites

I try this code, but it does not work as expected.

<?php
 # Don't allow overlapping bids and a bid exists
 if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0) {
  if($schedule->online){
  ?>
  <strong style="color:royalblue;font-weight:normal;">In Flight </strong>
  <?php
  }else{
  ?>
   <strong style="color:#FF0000;font-weight:normal;">Book</strong>
  <?php
  }
 }
 elseif($schedule->aircraft_count == 0) {
   ?>
   <strong style="color:#FF0000;font-weight:normal;">No Aircraft 
    <?php
 }
    else
 {
 ?>
   <a data-toggle="modal" href="/index.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Free</a>
   <?php				   
    }
    ?>

Link to comment
Share on other sites

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...