Hi guys, I'm having one of those moments where I'm so deep in code that I can't work out what should be obvious in this case.
The following is a bit of PHP code which executes a certain function depending on if the timestamp $userlastsync is less than 1 or 2 weeks ago.
I've set $warn_time to 10 minutes for debugging purposes because it appears to be executing both functions for no apparent reason.
Both $userlastsync and $warn_time are returned as Unix timestamps.
PHP Code:
$warn_time = strtotime("-10 minutes");
$alert_time = strtotime("-2 weeks");
if ($alert_time > $userlastsync)
{
do_alert();
}
elseif ($warn_time > $userlastsync )
{
do_warn();
}
If this code right?
It looks right to me, that's the problem.
Because I've set the warn level to -10 minutes it should only be executing do_warn() based on the time given in the image in my sig.