mobitu Posted August 23, 2009 Report Share Posted August 23, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 23, 2009 Administrators Report Share Posted August 23, 2009 What do you mean it's your current location? Quote Link to comment Share on other sites More sharing options...
mobitu Posted August 24, 2009 Author Report Share Posted August 24, 2009 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" Quote Link to comment Share on other sites More sharing options...
mobitu Posted August 25, 2009 Author Report Share Posted August 25, 2009 any idea about it Nabeel? thankssss Quote Link to comment Share on other sites More sharing options...
selwynorren Posted August 25, 2009 Report Share Posted August 25, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 25, 2009 Administrators Report Share Posted August 25, 2009 It's on my list to get to Quote Link to comment Share on other sites More sharing options...
selwynorren Posted August 25, 2009 Report Share Posted August 25, 2009 Thanks Nabeel, its appreciated, all your hard work. Quote Link to comment Share on other sites More sharing options...
Guest AirCeltic Posted September 1, 2009 Report Share Posted September 1, 2009 Hello together, i installed the latest beta, but where can I find the "Current Location" or do you mean the Base Location? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted September 1, 2009 Administrators Report Share Posted September 1, 2009 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.... 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.... I am currently running beta 741 without any issues. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 1, 2009 Administrators Report Share Posted September 1, 2009 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 Quote Link to comment Share on other sites More sharing options...
mobitu Posted September 1, 2009 Author Report Share Posted September 1, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 1, 2009 Administrators Report Share Posted September 1, 2009 Try $report->arrname. In public profile, I'm not sure, I'll look Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 1, 2009 Administrators Report Share Posted September 1, 2009 In pilot_public_profile it would be: echo $pireps[0]->arricao; That should be the last one Quote Link to comment Share on other sites More sharing options...
mobitu Posted September 2, 2009 Author Report Share Posted September 2, 2009 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 !!! Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 2, 2009 Administrators Report Share Posted September 2, 2009 Did you try echo $pireps[0]->arrname; Quote Link to comment Share on other sites More sharing options...
mobitu Posted September 2, 2009 Author Report Share Posted September 2, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 3, 2009 Administrators Report Share Posted September 3, 2009 $location = $lastreport->arricao; do $lastreport->arrname Quote Link to comment Share on other sites More sharing options...
mobitu Posted September 3, 2009 Author Report Share Posted September 3, 2009 $location = $lastreport->arricao; do $lastreport->arrname sorry lol but it also does not work fo me 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.