Pilot Checks.

I was looking to add a section on the pilots_list.tpl with an Active/ Inactive icon. I wanted this to be automatic and therefore wondered if there was a code that I could use to change these images. The check would be to ensure that the pilot has filed a PiREP within the last 31 Days.

Cheers,

Jack.

There’s a lastpirep column in a pilot’s information, you can use that

Is there any specific code that you could give me?

If you have not changed the default variables

<?php echo $pilot->lastpirep; ?>

You’d have to use that to compare dates

http://www.google.com/#hl=en&source=hp&q=php+compare+dates&aq=f&aqi=g3&oq=&fp=49bb1336baeea163

I know it sounds silly but could you right a code for me, the expiry would be 31 days before the date of today.