i'd really change the code to that:
PHP Code:
$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
$pmpercent=round(($inboxpms[messages] / $pmquota) * 100,2);
if ($pmpercent>50 && $pmpercent<=76) {
$barimg="https://vborg.vbsupport.ru/vbimages/yellow.gif";
} else if ($pmpercent>75) {
$barimg="https://vborg.vbsupport.ru/vbimages/red.gif";
} else {
$barimg="https://vborg.vbsupport.ru/vbimages/green.gif";
}
no division by zero is possible, because zero is devided by something else, not the other way round...