X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsurfbar_functions.php;h=8468645b285a0d6f717f172e5a17db240ed253bd;hb=d4cff9c73632a8d93428a80dcf54b3a8daa80a24;hp=92655c666615c52b54cbed68b9b3d8f472186577;hpb=4cc62618b7a59c6641b057c34047b2dd531c16ad;p=mailer.git diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 92655c6666..8468645b28 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -876,7 +876,7 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = '0') { } // END - if // Is the exlude userid set? - if ($excludeUserId > 0) { + if (isValidUserId($excludeUserId)) { // Then add it $userids['url_userid'][$excludeUserId] = $excludeUserId; } // END - if @@ -1214,14 +1214,14 @@ ORDER BY // Determine how many users are Online in surfbar function SURFBAR_DETERMINE_TOTAL_ONLINE () { // Count all users in surfbar modue and return the value - $result = SQL_QUERY("SELECT + $result = SQL_QUERY('SELECT `stats_id` FROM `{?_MYSQL_PREFIX?}_surfbar_stats` WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`stats_last_surfed`)) <= {?online_timeout?} GROUP BY - `stats_userid` ASC", __FUNCTION__, __LINE__); + `stats_userid` ASC', __FUNCTION__, __LINE__); // Fetch count $cnt = SQL_NUMROWS($result); @@ -1463,10 +1463,10 @@ LEFT JOIN ON sbu.url_id=l.locks_url_id WHERE - sbu.url_userid NOT IN (".implode(',', $userids).") AND + sbu.url_userid NOT IN (" . implode(',', $userids) . ") AND (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0)) AND sbu.url_status='ACTIVE' - ".$add." + " . $add . " GROUP BY sbu.url_id ASC", __FUNCTION__, __LINE__);