);
}
+// Checks whether given URL is blacklisted
+function isUrlBlacklisted ($url) {
+ // Mark it as not listed by default
+ $listed = false;
+
+ // Is black-listing enbaled?
+ if (!isUrlBlacklistEnabled()) {
+ // No, then all URLs are not in this list
+ return false;
+ } elseif (!isset($GLOBALS['blacklist_data'][$url])) {
+ // Check black-list for given URL
+ $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS `blist_timestamp` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
+ array($url), __FILE__, __LINE__);
+
+ // Is there an entry?
+ if (SQL_NUMROWS($result) == 1) {
+ // Jupp, we got one listed
+ $GLOBALS['blacklist_data'][$url] = SQL_FETCHARRAY($result);
+
+ // Mark it as listed
+ $listed = true;
+ } // END - if
+
+ // Free result
+ SQL_FREERESULT($result);
+ } else {
+ // Is found in cache -> black-listed
+ $listed = true;
+ }
+
+ // Return result
+ return $listed;
+}
+
// [EOF]
?>