Jump to content

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


ProAvia

Recommended Posts

  • Administrators

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!

 

 

Link to comment
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
  • Like 1
  • Thanks 2
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...