Moderators ProSkyDesign Posted February 23, 2017 Moderators Report Share Posted February 23, 2017 (edited) Hi, I wanna share my code that I'm using to the briefing to my pilots. This code display the pax and cargo that they will use to their flight. It incluides Cargo and Passengers flight. <div class="col-md-4"> <table style="width: 100%"> <tr> <td class="auto-style12"><span class="auto-style26"><strong> <?php if($schedule->flighttype == "P") { echo "Pasajeros:"; } else if($schedule->flighttype == "C") { echo "Carga (KG):"; } ?></strong></span> <span class="auto-style26"><?php $allaircraft = OperationsData::GetAllAircraft(true); foreach($allaircraft as $aircraft) if($aircraft->registration == $schedule->registration) { if($schedule->flighttype == "P"){ echo round($aircraft->maxpax * 0.80, 0);} else if($schedule->flighttype == "C"){ echo round($aircraft->maxcargo * 0.80, 0) ;} } ?></td> </span></td> </tr> <tr> <td class="auto-style26"><strong><?php if($schedule->flighttype == "P") { echo "Carga (KG):"; } else if($schedule->flighttype == "C") { echo "Pasajeros:"; } ?></strong></span> <span class="auto-style26"><?php $allaircraft = OperationsData::GetAllAircraft(true); foreach($allaircraft as $aircraft) if($aircraft->registration == $schedule->registration) { if($schedule->flighttype == "P"){ echo round($aircraft->maxcargo * 0.30, 0);} else if($schedule->flighttype == "C"){ echo '0';} } ?></td> </tr> </table> </div> Put the code in: "/core/templates/schedule_briefing.tpl" Edited February 23, 2017 by joooseb 1 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.