Hold on, if you are using the second code, you should replace it with this:
<?php $totaldays = Config::Get('PILOT_INACTIVE_TIME');
{
?>
<?php
if ($userinfo->lastpirep == '0000-00-00 00:00:00') {
echo 'You have 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 'Your 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 'You have being marked as a retired pilot!'; }
else {
echo $daysleft . ' days left until you are marked as retired';
}
}
?><?php
}
?>
Otherwise it will show: You have -[X] (a minus number) days left until you are marked as a retired pilot when they are retired.
If you are using the first code however, this doesn't matter