[imp] IMAP Quota Redhat 7.3 extra code

Hanser, Kevin kevin@merchantinternetgroup.com
Mon, 3 Jun 2002 20:17:23 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

---------------------- multipart/mixed attachment

------_=_NextPart_001_01C20B5D.3300F500
I just tried this code on my IMP installation, and I'm getting a weird
error..
 
The bar shows, but it's all light blue (none filled), and I get a message of
"Quota not available" instead of "quota on ..."
 
Also, I'm receiving these errors @ the top (above the quota bar):
 
Warning: Undefined variable: percent in
/var/www/vhosts/webmail/horde/imp/config/conf.php on line 412

Warning: Undefined variable: color in
/var/www/vhosts/webmail/horde/imp/config/conf.php on line 412
 
 
Here's the code I put in imp/config/conf.php:
 
if (!function_exists('imp_show_quota')) {
   function imp_show_quota ($imp) {
        $imap_admin = $imp['user'];
        $passwd_array = posix_getpwnam($imap_admin);
        $homedir = split("/", $passwd_array['dir']);
        $realname = split(",", $passwd_array['gecos']);
 
        $quota_html = '<table width="100%" border="0" cellpadding="0"
cellspacing="0"><tr><td class="item"><table border="0" cellspacing="0"
cellpadding="0" width="100%"><tr>';
        $quota_html .= '<td align="left" class="header">Login: ' .
$realname[0] . " (" . $imap_admin . ")" . '</td>';
 
        $junk = exec("sudo /usr/bin/quota -u $imap_admin | grep /dev/hda2",
                     $quota_data,$return_code);
        if ($return_code == 0 && count($quota_data) == 1) {
           $splitted = split("[[:blank:]]+", trim($quota_data[0]));
           $taken = $splitted[1] / 1000 ; $total = $splitted[2] / 1000 ;
           $percent = $taken * 100 / $total ;
           if ($percent >= 90) {
               $color = '#FF0000';
           } elseif ($percent >= 80) {
               $color = '#FCE30D';
           } else {
               $color = '#339933';
           }
           $quota_html .= '<td align="center" class="header">';
           $quota_html .= sprintf("<font size=-2>Quota on /%s: %.1fMB/%.1fMB
(%.1f%%)</font>", $homedir[1], $taken, $total, $percent);
        } else {
            $quota_html .= '<td align="center" class="header">';
            $quota_html .= "Quota not available";
        }
        $quota_html .= '</td><td width="30" class="header"
align="right"><font size="-3">0%</font></td><td width="200"
class="header">';
        $quota_html .= '<table width="100%"><tr><td bgcolor="#ccccff"><div
style="height:6px; width:'. sprintf("%.1f%%", $percent). '; font-size:3px;
background-color:'.$color.'">';
        $quota_html .= '</div></td></tr></table></td><td width="30"
class="header" align="left"><font
size="-3">100%</font></td></tr></table></td></tr></table>';
        return $quota_html;
    }
}
 
 
Any help would be appreciated.  The screenshots of this look great, I can't
wait to get it working on my system :)
 
k
 

-----Original Message-----
From: Arie Kraak [mailto:maillists@obdnwh.nl]
Sent: Sunday, June 02, 2002 02:38
To: imp@lists.horde.org
Subject: [imp] IMAP Quota Redhat 7.3 extra code



I changed the code a bit,
 
Here's the result.
 

 
// See the 'imp_show_quota' function below for an example.
$conf['hooks']['quota'] = 'imp_show_quota';
 
/* Gets the quota usage for a user.  */
/* This requires a modified "quota" command that allows the httpd server */
/* account to get quotas for other users...  It also requires that your  */
/* web server and imap server be the same server or at least have shared */
/* authentication and file servers (e.g. via NIS/NFS)                    */
if (!function_exists('imp_show_quota')) {
   function imp_show_quota ($imp) {
        $imap_admin = $imp['user'];
        $passwd_array = posix_getpwnam($imap_admin);
        $homedir = split("/", $passwd_array['dir']);
        $realname = split(",", $passwd_array['gecos']);
 
        $quota_html = '<table width="100%" border="0" cellpadding="0"
cellspacing="0"><tr><td class="item"><table border="0" cellspacing="0"
cellpadding="0" width="100%"><tr>';
        $quota_html .= '<td align="left" class="header">Login: ' .
$realname[0] . " (" . $imap_admin . ")" . '</td>';
 
        $junk = exec("sudo /usr/bin/quota -u $imap_admin | grep /dev/md1",
                     $quota_data,$return_code);
        if ($return_code == 0 && count($quota_data) == 1) {
           $splitted = split("[[:blank:]]+", trim($quota_data[0]));
           $taken = $splitted[1] / 1000 ; $total = $splitted[2] / 1000 ;
           $percent = $taken * 100 / $total ;
           if ($percent >= 90) {
               $color = '#FF0000';
           } elseif ($percent >= 80) {
               $color = '#FCE30D';
           } else {
               $color = '#339933';
           }
           $quota_html .= '<td align="center" class="header">';
           $quota_html .= sprintf("<font size=-2>Quota on /%s: %.1fMB/%.1fMB
(%.1f%%)</font>", $homedir[1], $taken, $total, $percent);
        } else {
            $quota_html .= '<td align="center" class="header">';
            $quota_html .= "Quota not available";
        }
        $quota_html .= '</td><td width="30" class="header"
align="right"><font size="-3">0%</font></td><td width="200"
class="header">';
        $quota_html .= '<table width="100%"><tr><td bgcolor="#ccccff"><div
style="height:6px; width:'. sprintf("%.1f%%", $percent). '; font-size:3px;
background-color:'.$color.'">';
        $quota_html .= '</div></td></tr></table></td><td width="30"
class="header" align="left"><font
size="-3">100%</font></td></tr></table></td></tr></table>';
        return $quota_html;
    }
}

 
Arie Kraak jr.


------_=_NextPart_001_01C20B5D.3300F500
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>I just tried this code on my IMP installation, and I'm getting a weird 
error..</FONT></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>The bar shows, but it's all light blue (none filled), and I get a message 
of "Quota not available" instead of "quota on ..."</FONT></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>Also, I'm receiving these errors @ the top (above the quota 
bar):</FONT></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><STRONG>Warning</STRONG>: Undefined 
variable: percent in <B>/var/www/vhosts/webmail/horde/imp/config/conf.php</B> on 
line <B>412</B><BR><BR><B>Warning</B>: Undefined variable: color in 
<B>/var/www/vhosts/webmail/horde/imp/config/conf.php</B> on line 
<B>412</B></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>Here's the code I put in imp/config/conf.php:</FONT></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>if (!function_exists('imp_show_quota')) {<BR>&nbsp;&nbsp; function 
imp_show_quota ($imp) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$imap_admin = $imp['user'];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$passwd_array = 
posix_getpwnam($imap_admin);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$homedir = split("/", 
$passwd_array['dir']);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $realname = 
split(",", $passwd_array['gecos']);</FONT></SPAN></DIV>
<DIV><FONT face="Century Gothic" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html = '&lt;table 
width="100%" border="0" cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td 
class="item"&gt;&lt;table border="0" cellspacing="0" cellpadding="0" 
width="100%"&gt;&lt;tr&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$quota_html .= '&lt;td align="left" class="header"&gt;Login: ' . $realname[0] . 
" (" . $imap_admin . ")" . '&lt;/td&gt;';</FONT></SPAN></DIV>
<DIV><FONT face="Century Gothic" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $junk = exec("sudo 
/usr/bin/quota -u $imap_admin | grep 
/dev/hda2",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$quota_data,$return_code);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
($return_code == 0 &amp;&amp; count($quota_data) == 1) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $splitted = 
split("[[:blank:]]+", 
trim($quota_data[0]));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$taken = $splitted[1] / 1000 ; $total = $splitted[2] / 1000 
;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $percent = 
$taken * 100 / $total 
;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($percent 
&gt;= 90) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$color = 
'#FF0000';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
elseif ($percent &gt;= 80) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$color = 
'#FCE30D';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
else 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$color = 
'#339933';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html .= 
'&lt;td align="center" 
class="header"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$quota_html .= sprintf("&lt;font size=-2&gt;Quota on /%s: %.1fMB/%.1fMB 
(%.1f%%)&lt;/font&gt;", $homedir[1], $taken, $total, 
$percent);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$quota_html .= '&lt;td align="center" 
class="header"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$quota_html .= "Quota not 
available";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html .= 
'&lt;/td&gt;&lt;td width="30" class="header" align="right"&gt;&lt;font 
size="-3"&gt;0%&lt;/font&gt;&lt;/td&gt;&lt;td width="200" 
class="header"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html 
.= '&lt;table width="100%"&gt;&lt;tr&gt;&lt;td bgcolor="#ccccff"&gt;&lt;div 
style="height:6px; width:'. sprintf("%.1f%%", $percent). '; font-size:3px; 
background-color:'.$color.'"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$quota_html .= 
'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;td width="30" 
class="header" align="left"&gt;&lt;font 
size="-3"&gt;100%&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return $quota_html;<BR>&nbsp;&nbsp;&nbsp; }<BR>}</FONT></SPAN></DIV>
<DIV><FONT face="Century Gothic" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Century Gothic" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>Any help would be appreciated.&nbsp; The screenshots of this look great, 
I can't wait to get it working on my system :)</FONT></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2>k</FONT></SPAN></DIV>
<DIV><SPAN class=225121500-04062002><FONT face="Century Gothic" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Arie Kraak 
  [mailto:maillists@obdnwh.nl]<BR><B>Sent:</B> Sunday, June 02, 2002 
  02:38<BR><B>To:</B> imp@lists.horde.org<BR><B>Subject:</B> [imp] IMAP Quota 
  Redhat 7.3 extra code<BR><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>
  <DIV><FONT face=Arial size=2>I changed&nbsp;the code a bit,</FONT></DIV>
  <DIV><FONT face="Century Gothic" color=#0000ff></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Here's the result.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><IMG alt="" hspace=0 src="cid:225121500@04062002-074e" align=baseline 
  border=0></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>// See the 'imp_show_quota' function below for an 
  example.<BR>$conf['hooks']['quota'] = 'imp_show_quota';</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>/* Gets the quota usage for a user.&nbsp; 
  */<BR>/* This requires a modified "quota" command that allows the httpd server 
  */<BR>/* account to get quotas for other users...&nbsp; It also requires that 
  your&nbsp; */<BR>/* web server and imap server be the same server or at least 
  have shared */<BR>/* authentication and file servers (e.g. via 
  NIS/NFS)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  */<BR>if (!function_exists('imp_show_quota')) {<BR>&nbsp;&nbsp; function 
  imp_show_quota ($imp) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $imap_admin = $imp['user'];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $passwd_array = 
  posix_getpwnam($imap_admin);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $homedir = split("/", 
  $passwd_array['dir']);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $realname 
  = split(",", $passwd_array['gecos']);</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_html = '&lt;table width="100%" border="0" cellpadding="0" 
  cellspacing="0"&gt;&lt;tr&gt;&lt;td class="item"&gt;&lt;table border="0" 
  cellspacing="0" cellpadding="0" 
  width="100%"&gt;&lt;tr&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_html .= '&lt;td align="left" class="header"&gt;Login: ' . $realname[0] 
  . " (" . $imap_admin . ")" . '&lt;/td&gt;';</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $junk 
  = exec("sudo /usr/bin/quota -u $imap_admin | grep 
  /dev/md1",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_data,$return_code);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
  ($return_code == 0 &amp;&amp; count($quota_data) == 1) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $splitted = 
  split("[[:blank:]]+", 
  trim($quota_data[0]));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $taken = $splitted[1] / 1000 ; $total = $splitted[2] / 1000 
  ;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $percent = 
  $taken * 100 / $total 
  ;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($percent 
  &gt;= 90) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $color = 
  '#FF0000';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
  elseif ($percent &gt;= 80) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $color = 
  '#FCE30D';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
  else 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $color = 
  '#339933';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html 
  .= '&lt;td align="center" 
  class="header"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_html .= sprintf("&lt;font size=-2&gt;Quota on /%s: %.1fMB/%.1fMB 
  (%.1f%%)&lt;/font&gt;", $homedir[1], $taken, $total, 
  $percent);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_html .= '&lt;td align="center" 
  class="header"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_html .= "Quota not 
  available";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html .= 
  '&lt;/td&gt;&lt;td width="30" class="header" align="right"&gt;&lt;font 
  size="-3"&gt;0%&lt;/font&gt;&lt;/td&gt;&lt;td width="200" 
  class="header"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $quota_html 
  .= '&lt;table width="100%"&gt;&lt;tr&gt;&lt;td bgcolor="#ccccff"&gt;&lt;div 
  style="height:6px; width:'. sprintf("%.1f%%", $percent). '; font-size:3px; 
  background-color:'.$color.'"&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $quota_html .= 
  '&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;td width="30" 
  class="header" align="left"&gt;&lt;font 
  size="-3"&gt;100%&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  return $quota_html;<BR>&nbsp;&nbsp;&nbsp; }<BR>}<BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT>
  <DIV><FONT face=Arial size=2>Arie Kraak 
jr.</DIV></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C20B5D.3300F500--

---------------------- multipart/mixed attachment
A non-text attachment was scrubbed...
Name: imp_quota_screenshot.gif
Type: image/gif
Size: 7664 bytes
Desc: not available
Url : http://lists.horde.org/archives/imp/attachments/4bb660a1/imp_quota_screenshot.gif

---------------------- multipart/mixed attachment--