Guest FWX001 Posted October 19, 2010 Report Posted October 19, 2010 Hi, I wanted to list on my pilot's list , the last location off my pilots.... <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> <th>Location</th> </tr> </thead> <tbody> <?php foreach($allpilots 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> <td><?php echo $pirep->arricao?></td> <?php } ?> </tbody> </table> Uploaded with ImageShack.us Pls can anywhere help me? Regard FWX001 Quote
Alex Posted October 19, 2010 Report Posted October 19, 2010 i believe you can grab your current location using. <?php echo $current_location.'-'.$current_location2; ?> Alex Quote
Guest FWX001 Posted October 19, 2010 Report Posted October 19, 2010 i believe you can grab your current location using. <?php echo $current_location.'-'.$current_location2; ?> Alex Hi Alex, I can´t see it over the Pilotlist here are my code from the Pilots_list.tpl <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> <th>Location</th> </tr> </thead> <tbody> <?php foreach($allpilots 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> <td><?php echo $current_location.'-'.$current_location2; ?></td> <?php } ?> </tbody> </table> Regard Ramon Quote
Guest FWX001 Posted October 19, 2010 Report Posted October 19, 2010 here is my homepage link: My homepage Regard Ramon Quote
Guest FWX001 Posted October 20, 2010 Report Posted October 20, 2010 Need Help PLS My homepage Regard Ramon Quote
Administrators simpilot Posted October 20, 2010 Administrators Report Posted October 20, 2010 You can use the PIREP Data class to get the last location of the pilot. Something like: $location = PIREPData::getLastReports($pilot->pilotid, 1, ''); echo $location->arricao; Would output the icao of the arrival field of the last PIREP filed by the pilot. You can use Operationsdata to get the airfield name from there if you want more than the icao code. Quote
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.