Pilots shown twice (solved)

Hello, I have a small Problem with kACARS:

If a Pilot is logged in phpvms AND started a flight with the client, then he’s shown twice.

Any ideas to fix that?

phpvms:Version 2.1.934

kACARS: kACARS_Free Application v1.0.0.8

Chris

<div id="Info">
	<h3>Users Online</h3>
	<?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline();

		foreach($usersonline as $pilot)
		{
               echo '<p><img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
               echo " {$pilot->firstname} {$pilot->lastname}</p>";                
		}?>
           <p>Pilots Online: <?php echo count($usersonline);?> / 
           Guests Online: <?php echo count($guestsonline);?></p><br />
</div>

Thanks for the fix. I have been having this problem for several months now and never knew their was a fix for it.

Thanks for the fast reply - it works!

chris

Of course it does, lol!

I got this to work. Thanks for the fix.

Now it shows me only logged in one time as it should. But in the pilot’s online/Guests online it shows 2 pilots online and I am the only one logged in at this time. Issue on my end maybe?

Jeffrey,

thanks for that! but where does that fix need to put in? kacars module php?

Best Regards

Thomas

Where ever you have the list of online pilots. Depending on your skin it could be multiple places.

Your first choice would be to look on the layout tpl file or front page main. BUT I suggest looking at layout.tpl file first.

Sorry for bumping this quite old topic but I don’t feel like this needs a new topic.

I’m not great at PHP, how would I add a Pilot Code before the pilot name and a link to their profile?