Jump to content

Recent bids


mattsmith

Recommended Posts

Try to check your foreach() on the frontpage_recentbids.tpl.

Mine is this way and it works fine:

<table class="table table-condensed">
   <thead>
 <tr>	 
  <th>Voo</th>
  <th>Trecho</th>
  <th>Piloto</th>
 </tr>
   </thead>   
<tbody>
<?php
foreach($lastbids as $lastbid)
{
?>
 <tr>
  <td><?php echo $lastbid->code . $lastbid->flightnum; ?></td>
  <td><?php echo $lastbid->depicao; ?> - <?php echo $lastbid->arricao; ?></td>
<?php
 $params = $lastbid->pilotid;
 $pilot = PilotData::GetPilotData($params);
 $pname = $pilot->firstname;
 $psurname = $pilot->lastname;
?>
  <td><a href="http://vai.aero/index.php/profile/view/<?php echo $lastbid->pilotid; ?>"><?php echo $pname; ?> <?php echo $psurname; ?></a></td>
 </tr>	 
  <?php
  }
  ?>
</tbody>
</table>

  • Like 1
Link to comment
Share on other sites

Well, using parts of your code solved it.

It seems that the foreach was pretty buggy, and it was the default one used.

LE:

After removing my test bids, my page is messed up. Having no bids I'm receiving an error.

I've changed to be like this:

<?php
if(!$lastbids)
{
echo 'No bids have been made';
return;

}
foreach($lastbids as $lastbid);
{
?>

and now I'm getting only one bid. This part of the code is messing things up.

Link to comment
Share on other sites

  • 5 months later...

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