Jump to content

Pax and cargo to your briefing


ProSkyDesign

Recommended Posts

  • Moderators

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 by joooseb
  • Like 1
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...