diff --git a/displaynotifications.asp b/displaynotifications.asp index 8993447..0aefbdb 100644 --- a/displaynotifications.asp +++ b/displaynotifications.asp @@ -96,8 +96,11 @@ ' Add WHERE clause based on showall parameter If showAll <> "1" Then + ' Show only truly active notifications: + ' 1. isactive = 1 AND (endtime is NULL OR endtime >= NOW()) + ' 2. OR recently completed (within 30 min grace period for fade-out) strSQL = strSQL & _ - "WHERE n.isactive = 1 OR " & _ + "WHERE (n.isactive = 1 AND (n.endtime IS NULL OR n.endtime >= NOW())) OR " & _ " (n.isactive = 0 AND n.endtime IS NOT NULL AND " & _ " DATE_ADD(n.endtime, INTERVAL 30 MINUTE) >= NOW()) " End If