[imp] Quota Bar not showing
Michel Bulgado
michel at casa.co.cu
Thu Aug 20 17:26:58 UTC 2009
Hello
I use Horde Groupware Webmail 123.
My users have their mailboxes quota, when using the traditional way
(imp) do not get the quota bar, but when I enter using the dynamic mode
(dimp) if it is.
In old version in imp/templates/quota/quota.inc i see the quota bar but
this change with the new versions.
<?php
if (is_a($quota, 'PEAR_Error')) {
$class = 'quotawarn';
$message = $quota->getMessage();
} else {
$percent=0;
$color='';
if ($quota['limit'] != 0) {
$quota['usage'] = $quota['usage'] / (1024 * 1024.0);
$quota['limit'] = $quota['limit'] / (1024 * 1024.0);
$percent = ($quota['usage'] * 100) / $quota['limit'];
if ($percent >= 90) {
$class = 'quotaalert';
$color = '#FF0000';
} elseif ($percent >= 75) {
$class = 'quotawarn';
$color = '#FCE30D';
} else {
$class = 'control';
$color = '#339933';
}
$message = sprintf(_("Quota status: %.2fMB / %.2fMB (%.2f%%)"),
$quota['usage'], $quota['limit'], $percent);
} elseif ($quota['usage'] != 0) {
$quota['usage'] = $quota['usage'] / (1024 * 1024.0);
$class = 'control';
$message = sprintf(_("Quota status: %.2fMB / NO LIMIT"),
$quota['usage']);
} else {
$class = 'control';
$message = sprintf(_("Quota status: NO LIMIT"));
}
$message .= '</td><td width="30" class="header"
align="right"><font size="-3">0%</font></td><td width="200"
class="header">';
$message .= '<table width="100%"><tr><td bgcolor="#ffffff"><div
style="height:4px; width:';
$message .= sprintf("%.0f%%", $percent). '; font-size:3px;
background-color:'.$color.'">';
$message .= '</div></td></tr></table></td><td width="30"
class="header" align="left"><font size="-3">100%</font>';
$message .= '</td></tr></table></td></tr></table>';
}
?>
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr><td class="<?php echo $class ?>" align="center">
<?php echo $message ?>
</td></tr>
</table>
just remote code php from quota.inc and rename to quota.html
That might be happening?
Thanks
Michel
More information about the imp
mailing list