Jump to content

Newest Pireps and Flights


sasvirtual

Recommended Posts

I got an error. Here is my coding:

<div id="sidearea">

<h3>Newest Pilots</h3>

<?php

foreach($pilots as $pilot);

{

?>

<p><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?></a></p>

<?php

}

?>

</div>

Warning: Invalid argument supplied for foreach() in /home/alaskaai/public_html/lib/skins/brilliancev1/layout.tpl on line 166

Link to comment
Share on other sites

Yeah that wont work with Brilliance. I already went down that road.

Try this

<?php

$usersonline = StatsData::UsersOnline();

$guestsonline = StatsData::GuestsOnline();



?>

<h2>Pilots Online</h2>

<?php

      foreach($usersonline as $pilot)	

      {

       echo "<p>";

	echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';

	echo "  {$pilot->firstname} {$pilot->lastname}<br />"; 

	echo "</p>";

   }

   ?>

<h2>Guests Online</h2>

<p class="txt-red10">Currently

<?php echo count($guestsonline);?>

guest(s) visiting.

</p>

                           </ul>

I grabbed that out my old ObsessBlue template and it works. I did end up changing my frontpage_recentbids.tpl file too because it was also showing the bid id # which I did not like.

If this code fails, I got one more little trick you can try. Try this first though and let me know how it goes. If it works, please mark your original post as solved.

PLEASE NOTE: This may not look right on your page. This code is rather generic so it will need to be altered to fit your needs and or wants.

I would love to show an example but it is on a local host WAMP server.

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