You can use the same code that is above and it should still show the same information. But you might want to change the text like: "You have being marked as a retired pilot!" to "this pilot has being marked as a retired pilot!" etc..
Example:
<?php $totaldays = Config::Get('PILOT_INACTIVE_TIME');
{
?>
<?php
if ($userinfo->lastpirep == '0000-00-00 00:00:00') {
echo 'This pilot hasn't not flown any flights yet!';
}
else {
$datebefore1 = substr($userinfo->lastpirep, 0, 10);
$datetoday2 = date("Y-m-d");
$datebefore3 = strtotime($datebefore1);
$datetoday4 = strtotime($datetoday2);
$newdate = $datetoday4-$datebefore3;
$lastpirep = floor($newdate/(60*60*24));
$daysleft = $totaldays-$lastpirep;
echo 'Last flight was ';
if ($lastpirep == 0) { echo 'today'; }
else if ($lastpirep == 1) { echo 'yesterday'; }
else {
echo $lastpirep . ' day(s) ago.';
}
echo ' You have ';
if ($daysleft == 0) { echo 'This pilot has being marked as a retired pilot!'; }
else {
echo $daysleft . ' days left until they are marked as retired';
}
}
?><?php
}
?>
I have tried the above code on localhost, and it worked fine