Administrators ProAvia Posted December 7, 2017 Administrators Report Share Posted December 7, 2017 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! Quote Link to comment Share on other sites More sharing options...
web541 Posted December 7, 2017 Report Share Posted December 7, 2017 (edited) 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 December 7, 2017 by web541 1 2 Quote Link to comment Share on other sites More sharing options...
Thomasha Posted December 7, 2017 Report Share Posted December 7, 2017 Works perfect thanks :-) Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted December 8, 2017 Author Administrators Report Share Posted December 8, 2017 Thanks web541 - works perfect! 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.