Jump to content

Pilots shown twice (solved)


royceair

Recommended Posts

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

kacars01.jpg

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

Link to comment
Share on other sites

Guest lorathon

This has been gone over before.

<?php
$shown = array();
foreach($usersonline as $pilot)
{
if(in_array($pilot->pilotid, $shown))
	continue;
else
	$shown[] = $pilot->pilotid;	
echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
echo "  {$pilot->firstname} {$pilot->lastname}<br />";
}
?>

Link to comment
Share on other sites

  • 5 weeks later...
  • 8 months later...
Guest lorathon

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?

This is not a kACARS question. Please ask in the general support forum.

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