query("UPDATE users_notify_quoted SET UnRead = '0' WHERE UserID = '$LoggedUser[ID]'"); } list($Page, $Limit) = Format::page_limit(TOPICS_PER_PAGE); if ($LoggedUser['CustomForums']) { unset($LoggedUser['CustomForums']['']); $RestrictedForums = implode("','", array_keys($LoggedUser['CustomForums'], 0)); $PermittedForums = implode("','", array_keys($LoggedUser['CustomForums'], 1)); } $sql = "SELECT SQL_CALC_FOUND_ROWS f.ID as ForumID, f.Name as ForumName, t.Title, q.TopicID, q.PostID, q.QuoterID FROM users_notify_quoted AS q LEFT JOIN forums_topics AS t ON t.ID = q.TopicID LEFT JOIN forums AS f ON f.ID = q.ForumID WHERE q.UserID = $LoggedUser[ID] AND ((f.MinClassRead <= '$LoggedUser[Class]'"; if (!empty($RestrictedForums)) { $sql .= ' AND f.ID NOT IN (\'' . $RestrictedForums . '\')'; } $sql .= ')'; if (!empty($PermittedForums)) { $sql .= ' OR f.ID IN (\'' . $PermittedForums . '\')'; } $sql .= ") $UnreadSQL ORDER BY q.Date DESC LIMIT $Limit"; $DB->query($sql); $Results = $DB->to_array(false, MYSQLI_ASSOC, false); $DB->query("SELECT FOUND_ROWS()"); list($NumResults) = $DB->next_record(); //Start printing page View::show_header('Quote Notifications'); ?>
=$Result['ForumName'] ?> > =Format::cut_string($Result['Title'], 75) ?> > Quoted by =Users::format_username($Result['QuoterID'], false, false, false, false) ?> ↑ |