Jump to content

Active Pilots on Ranks Page


flyalaska

Recommended Posts

  • Moderators

Inside the foreach loop add the following:

if($pilot->retired == 1)
 {
 continue;
 }

This will exclude retired pilots. If by active pilots you mean pilots who had filed any reports then add the following:

$pirep = $pilot->lastpirep;
$check = date("d", $pirep);
$today = date("d");
$days = $today - $check;
if($days < 3)
 {
 continue;
 }

This will check if the pilot has filed any reports for the last 3 days and if true it will show the pilot otherwise it will hide the pilot from the list.

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