omglookeyhere Posted September 5, 2019 Report Share Posted September 5, 2019 (edited) Not sure what's happening here. This code is straight from IceBlue by FlyAlaska. <section class="page-contents"> <div class="container"> <br /> <h3><i class="fa fa-users" fa-lg style="color:#04327F"></i> Our Pilots</h3> <script type="text/javascript"> $(document).ready(function() { oTable = $('#blueIce_Pilots_List').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers" }); } ); </script> <table id="blueIce_Pilots_List" width="100%" border="0" cellspacing="0" cellpadding="0" class="blueIce_table"> <thead> <tr> <th>PID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> </section> And this is the error I keep getting. If I remove that line, than the whole page disappears. http://prntscr.com/p2cgqc Edited September 5, 2019 by omglookeyhere Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted September 5, 2019 Administrators Report Share Posted September 5, 2019 (edited) What are the contents of /lib/skins/blueice/pilots_list.php line 16? What version of php are you using? What version of phpVMS are you using? Edited September 5, 2019 by ProAvia Quote Link to comment Share on other sites More sharing options...
omglookeyhere Posted September 5, 2019 Author Report Share Posted September 5, 2019 line 16 is http://prntscr.com/p2ds Phpvms version 5.5.x Php version 5.6.40 Quote Link to comment Share on other sites More sharing options...
magicflyer Posted September 6, 2019 Report Share Posted September 6, 2019 The variable $pilot_list is either undefined or an empty object. Where in the code are you assigning a value to it? If your core/modules/Pilots/Pilots.php file is the same as this: https://github.com/nabeelio/phpvms_v2/blob/master/core/modules/Pilots/Pilots.php Then you should instead be using $allpilots instead of $pilot_list. Also, noticing you have one pilot in the VA, try adding another pilot and see if the results change. Quote Link to comment Share on other sites More sharing options...
omglookeyhere Posted September 6, 2019 Author Report Share Posted September 6, 2019 If I am understanding you correctly, the value is assigned in the pilot_list.php My core Pilots.php is the same as one you posted. I have also tried to replace $allpilots instead of $pilot_list but it ends up breaking the page. Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted September 6, 2019 Administrators Report Share Posted September 6, 2019 OP is using phpVMS 5.5.x - the Simpilot version. /core/modules/Pilots/Pilots.php shows $this->set('allpilots', $pilot_list); # deprecated $this->set('pilot_list', $pilot_list); So $pilot_list should work. In looking at http://www.gatewayvirtual.com/index.php/Pilots - there are 3 hubs listed, but no pilots assign to any of them. Try assigning your one pilot to a hub. Quote Link to comment Share on other sites More sharing options...
omglookeyhere Posted September 9, 2019 Author Report Share Posted September 9, 2019 I assigned one, it looks to be working now. Thank you. 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.