markusr Posted January 31, 2010 Report Share Posted January 31, 2010 Hi guys, i have implemented in our website couple of weeks ago that in the public and private profile your current location is shown. <?php $lastreport = PIREPData::GetLastReports($userinfo, 1); if(!$lastreport) { $location = $userinfo->hub; } else { $location = $lastreport->arricao; } ?> <?php $airport_info = OperationsData::GetAirportInfo($location); $airportname = $airport_info->name; ?> <li><strong>Pilot Current Location: </strong><?php echo $location; ?> - <?php echo $airportname; ?></li> Now i figured out that all pilots have the same location displayed. Can anybody help me with the issue resolving. Thanks alot, Markus Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 31, 2010 Report Share Posted January 31, 2010 http://forum.phpvms.net/index.php?topic=1973.0 I think that is what you need!? Quote Link to comment Share on other sites More sharing options...
kbohme Posted January 31, 2010 Report Share Posted January 31, 2010 i changed it to what is below and it seemed to have worked..for the pilot profile page. <?php $lastreport = PIREPData::getLastReports($userinfo->pilotid, 1, PIREP_ACCEPTED);; if(!$lastreport) { $location = $userinfo->hub; } else { $location = $lastreport->arricao; } ?> <?php $airport_info = OperationsData::GetAirportInfo($location); $airportname = $airport_info->name; ?> <li><strong>Current Location: </strong><?php echo $location; ?> - <?php echo $airportname; ?></li> Quote Link to comment Share on other sites More sharing options...
markusr Posted February 1, 2010 Author Report Share Posted February 1, 2010 Thanks a lot, that worked now! 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.