This snippet is from index.php, it's supposed to only update when the number of users online is equal or greater then the previous stat. Problem is this template keeps getting updated with a lower number.
PHP Code:
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}
Is there another instance of it anywhere that is breaking it or is this a bug?