this code is looking at all folders:
PHP Code:
$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
if ($inboxpms < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($inboxpms[messages] / $pmquota) * 100,2);
}
if ($pmpercent>50) {
$barimg="{imagesfolder}/yellow.gif";
} elseif ($pmpercent>75) {
$barimg="{imagesfolder}/red.gif";
} else {
$barimg="{imagesfolder}/green.gif";
}