Jump to content

Pilots last location not working?


markusr

Recommended Posts

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

Link to comment
Share on other sites

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>

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...