Jump to content

Recommended Posts

  • 1 month later...
Posted

I put in just as you said and all it did was show that code. Could it be the issue that i'm using the page editor in the admin center to edit the source code?

If so, how do i edit the source code through my file manager?

Posted

Firstly, I noticed you've changed the thread title. Rosters are already displayed by default when you go to index.php/pilots.

If you want it for just one hub then:

<tr>
<th>Pilot code</th>
<th>First name</th>
<th>Last name</th>
<th>Country</th>
<th>Total Hours</th>
<th>Total Flights</th>
</tr>

<?php
$params['p.hub'] = 'CYYZ';
$pilots = PilotData::findPilots($params);
foreach($pilots as $pilot){
?>

<tr>
<td><?php echo $pilot->code.$pilot->pilotid;?></td>
<td><?php echo $pilot->firstname;?></td>
<td><?php echo $pilot->lastname;?></td>
<td><?php echo $pilot->country;?></td>
<td><?php echo $pilot->totalhours;?></td>
<td><?php echo $pilot->totalflights;?></td>
</tr>
<?php
}
?>

That will display all your pilots based in Toronto and some of their details.

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