g-force2k2, do these 2 pieces of code look right to you? They work the way they are but I'm not sure if they will interfere with anything else. This also includes the code you gave me to NOT display users with zero time in the list. I would also like to be able to NOT display the Total Online Time in the posts for users who have zero time or Admins. Any way to do that?
Code:
if($bbuserinfo[usergroupid] != 6) {
$totalusers = $DB_site->query_first("
SELECT COUNT(*) AS users
FROM user
WHERE usergroupid != 6 AND timeonline > 0");
} else {
$totalusers = $DB_site->query_first("
SELECT COUNT(*) AS users
FROM user
WHERE timeonline > 0");
}
And:
Code:
if($bbuserinfo[usergroupid] != 6) {
$leadtime = $DB_site->query("
SELECT userid, username, joindate, timeonline, posts
FROM user
WHERE timeonline > 0
ORDER by timeonline DESC LIMIT $startat,$perpage");
} else {
$leadtime = $DB_site->query("
SELECT userid, username, joindate, timeonline, posts
FROM user
WHERE usergroupid != 6 AND timeonline > 0
ORDER by timeonline DESC LIMIT $startat,$perpage");
}