Jump to content

Recent Acticty


flyalaska

Recommended Posts

  • Moderators

It works. :D

Code:

<h3>Activities</h3>
<hr>
<table>
<?php
$count = 10;
$allactivities = ActivityData::getActivity(array(), $count);

foreach($allactivities as $activity)
{
?>
<tr><td><?php echo $activity->message ;?></td></tr>
<?php
}
?>
</table>

Screenshot:

25.png

Link to comment
Share on other sites

  • Moderators

That's correct. Because I intended to show only the message. If you need to specify the pilot name along with the pilot ID then you'll need to get the pilot id and use it in another function to pull information for that pilot id, so:

The code:

<h3>Activities</h3>
<hr>
<table>
<?php
$count = 10;
$allactivities = ActivityData::getActivity(array(), $count);

foreach($allactivities as $activity)
   {
       $pilot = PilotData::getPilotData($activity->pilotid);
?>
   <tr><td><?php echo $pilot->code.$pilot->pilotid ;?> - <?php echo $pilot->firstname.' '.$pilot->lastname ;?> - <?php echo $activity->message ;?></td></tr>
<?php
   }
?>
</table>

Screenshot:

activ.png

Link to comment
Share on other sites

  • Moderators

The code:

<h3>Activities</h3>
<hr>
<table>
<?php
$count = 10;
$allactivities = ActivityData::getActivity(array(), $count);

foreach($allactivities as $activity)
   {
       $pilot = PilotData::getPilotData($activity->pilotid);
?>
   <tr><td><?php echo $pilot->code.$pilot->pilotid ;?> -
           <?php echo $pilot->firstname.' '.$pilot->lastname ;?>
           ( <img src="<?php echo Countries::getCountryImage($pilot->location);?>"> ) -
           <?php echo $activity->message ;?>
   </td></tr>
<?php
   }
?>
</table>

Screenshot:

activity.png

Link to comment
Share on other sites

  • 1 month later...

The code:

<h3>Activities</h3>
<hr>
<table>
<?php
$count = 10;
$allactivities = ActivityData::getActivity(array(), $count);

foreach($allactivities as $activity)
{
$pilot = PilotData::getPilotData($activity->pilotid);
?>
<tr><td><?php echo $pilot->code.$pilot->pilotid ;?> -
<?php echo $pilot->firstname.' '.$pilot->lastname ;?>
( <img src="<?php echo Countries::getCountryImage($pilot->location);?>"> ) -
<?php echo $activity->message ;?>
</td></tr>
<?php
}
?>
</table>

Screenshot:

activity.png

Where we have to put it :( ??

Link to comment
Share on other sites

  • 1 year 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...