Jump to content
Sign in to follow this  
ProAvia

Show Scheduled Aircraft, Flight Time and Flight Level in admin pireps_list.php

Recommended Posts

Requesting help to show scheduled aircraft, flight time and flight level in admin/templates/pireps_list.php

phpVMS 5.5.2

pireps_list.php file around line 57 - Instead of showing the PIREP flight time, I would like to display the SCHEDULED flight time, aircraft and flight level. How do I call the Schedules data to display the scheduled flight time, aircraft and flight level from the schedules table to display in this area. These three items would show in the area above the Details, Log, Comments, etc. buttons.

I would like to display this data in that location to make it easier to compare the scheduled aircraft, flight time and flight level to the actual submitted PIREP data for those three parameters.

Any help is much appreciated!

 

 

Share this post


Link to post
Share on other sites

See if this works

Find this on line 37

<?php
foreach($pireps as $pirep)
{

Replace it with this (deprecated function, but it works)

<?php
foreach($pireps as $pirep)
{
$schedule = SchedulesData::getScheduleByFlight($pirep->code, $pirep->flightnum);

Find this

<strong>Flight Time: </strong><?php echo $pirep->flighttime; ?> <br />

Now the $schedule variable should be activated, so you should be able to read it like this

<strong>Actual Flight Time: </strong><?php echo $pirep->flighttime; ?> <br />
<strong>Scheduled Flight Time: </strong><?php echo $schedule->flighttime; ?> <br />
<strong>Scheduled Aircraft: </strong><?php echo $schedule->aircraft; ?> <br />
<strong>Scheduled Flight Level: </strong><?php echo $schedule->flightlevel; ?> <br />

 

Edited by web541
  • Thanks 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×