Jump to content

Recommended Posts

Posted

Hello everybody,

i have a problem with the current location of my pilots.

They all make flights but the current location they have, is MY current location always.

All have my current location

Does anyone know how to fix that ???

thankssss

Posted

if i send a pirep for example lebl -> eddf the system understand i am in eddf. time ago o had it working in my local site but for sometime the current location for all pilots is MY current location thats it if i arrive in eddf for all pilots appear " current location: eddf"

Posted

Hi Nabeel,

It seems this is my case as well, whatever my location (ceo) becomes everyone else's location as well. Normally I would not be too phased about it, except I am trying to write scripts that will only allow schedules from the last location of each pilot.

But again, for me its not a big stress, I have a slightly bigger fish to fry at the moment, but that's for another post

Guest AirCeltic
Posted

Hello together,

i installed the latest beta, but where can I find the "Current Location" or do you mean the Base Location?

  • Administrators
Posted

Not sure what data your are trying to use but the "location" field in the pilots table returns the country that the pilot is based and is the variable to display country flags, like in the table below....

Capture11.gif

I have also set up the pilot center to do what I think you are trying to do, show the location of the pilot currently according to the last flight flown, as below. This data is coming out of the PIREP table using the newest PIREP filed for that pilot. If this is what you are doing to come up with the location and everyone is showing up in the same location my guess would be that you are not using a where statement in your sql select to qualify the pilot, it is just grabbing the newest PIREP and returning the destination airport for that one, it is not qualifying the data according to the pilot so everyone is going to be at the destination airport of the newest PIREP filed no matter who filed it....

Capture10.gif

I am currently running beta 741 without any issues.

  • Administrators
Posted

I just realized this isn't a default feature.

In the profile_main.tpl, you can use

<?php echo $report->arricao; ?>

Should give you the latest location

Posted

I just realized this isn't a default feature.

In the profile_main.tpl, you can use

<?php echo $report->arricao; ?>

Should give you the latest location

Thanks Nabeel,

i have it working right in profile_main.tpl but just 2 things...

1º with: <?php echo $report->arricao; ?>  just says the airport code ( EDDF ) how can also say the name of the Airport ( for example... FRANKFURT AIRPORT )

2º <?php echo $report->arricao; ?> doesnt work for me in pilot_public_profile.tpl

    any ideas?

thanksssss

Posted

In pilot_public_profile it would be:

echo $pireps[0]->arricao;

That should be the last one

i got it working in both sites but just with the code ( for example EDDF ). I still can not get it working with the aiport name with the tips you gave.

Any other ideas?

sorry !!!

Posted

Yess, with this now,  pilot_public_profile.tpl  is working perfect. EDDF and also says FRANKFURT AIRPORT but...

in  profile_main.tpl  I have the code:

<td><strong><strong>Current Location:
        <?php
$lastreport = PIREPData::GetLastReports($pilotid, 001);

if(!$lastreport)
{
    $location = $userinfo->hub;
}
else
{
    $location = $lastreport->arricao;
}

?>
        <?php
$airport_info = OperationsData::GetAirportInfo($location);

   $airportname = $airport_info->name;
?>
      </strong>
      </strong></td>
      <td align="left"> <?php echo $report->arricao; ?> - <?php echo $pireps[0]->arrname;?> </td>
    </tr>

with this the system only says

Current Location:  EDDF - 

No Airport name

---------------------------------------------------

Somehow i dont want you to disturb at all... if you have any ideas would be great and if not, with the airport code will be enough

Thanks guyssss

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