// Old status
list($old_status) = $DB->fetch("SELECT active FROM {$CONF['sql_prefix']}_sites WHERE username = '{$TMPL['username']}'", __FILE__, __LINE__);
// If old status 3 ( temp. inactive ) and new status 1 ( active ), reset inactive days
if($old_status == 3 && $TMPL['active'] == 1)
{
$DB->query("UPDATE {$CONF['sql_prefix']}_stats SET days_inactive = 0 WHERE username = '{$TMPL['username']}", __FILE__, __LINE__);
}