bass Posted March 25, 2016 Report Share Posted March 25, 2016 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 } ?> Quote Link to comment Share on other sites More sharing options...
bass Posted March 25, 2016 Author Report Share Posted March 25, 2016 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 } ?> 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.