Jump to content

Disable bided aircraft in all schedules


Ephendi

Recommended Posts

Can someone help me with this topic?

I finished code to show schedules for aircrafts located on airport based on last pirep.

Next step and need help with code, probably in Schedule.php and schedule_results.tpl -> when flight is in bid i need to bided aircraft will be hidden from all schedules to time, when flight is in bid.

Link to comment
Share on other sites

Thanks, i work today on it and this works for me:

$search1 = (array(

'a.registration' => $route->registration,

's.bidid != 0'

));

$schedules = SchedulesData::findSchedules($search1);

$disabled = $schedules[0]->registration;

if($route->registration==$disabled)

{

continue;

}

  • Like 1
Link to comment
Share on other sites

  • 5 months later...
  • 3 years later...

that`s great.... i have added it to my schedules in a bit different way by just displaying an image ;) thank you very much for that.

How do you do it? I'm using this code, but it shows only the freedom or not the flight.

You can make it so that showed - Aircraft at the airport is no

<?php
    if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0)
 {
    ?>

    <div class="btn btn-danger btn-sm sharp disabled">Booked</div>
    <?php
 }
    else
 {
 ?>
   <a data-toggle="modal" href="<?php echo SITE_URL?>/action.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Available</a>
   <?php				   
    }
    ?>

Link to comment
Share on other sites

  • 7 months later...

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