From 7ee023d7db1b758cebe3431718987f57e7a6d859 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Thu, 25 May 2006 13:26:20 +0000 Subject: [PATCH] correction du commit precedent --- bureau/admin/quota_show_all.php | 56 ++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/bureau/admin/quota_show_all.php b/bureau/admin/quota_show_all.php index 76238a06..983fc5c4 100644 --- a/bureau/admin/quota_show_all.php +++ b/bureau/admin/quota_show_all.php @@ -37,8 +37,8 @@ include("head.php"); user['uid'] == "2000") $user_list = $admin->get_list(1); @@ -53,8 +53,8 @@ reset($ql); print ""._("User").""; $sequence = array(); foreach ($ql as $key => $name) { - print "$name"; - $sequence[] = $key; + print "$name"; + $sequence[] = $key; } print ""; $u = array(); @@ -63,30 +63,36 @@ foreach ($user_list as $user) { } asort($u); foreach ($u as $uid => $login) { -$class = ($class== 'lst1' ? 'lst2' : 'lst1'); -print ""; -print $login.'('.$uid.")"; -$mem->su($uid); -if (!($quots = $quota->getquota())) { - $error = $err->errstr(); -} -foreach($sequence as $key) { - $q = $quots[$key]; - if ($q['u'] > $q['t']) { - $style = ' style="color: red"'; - } else { - $style = ''; + $class = ($class== 'lst1' ? 'lst2' : 'lst1'); + print ""; + print $login.'('.$uid.")"; + $mem->su($uid); + if (!($quots = $quota->getquota())) { + $error = $err->errstr(); } - $quota_utilise = $quota_utilise + $q['u']; - $tot = $tot + $q['t']; - print "".str_replace(" ", " ", m_quota::display_val($key, $q['u']).'/'.m_quota::display_val($key, $q['t'])).''; -} -print ""; -$mem->unsu(); + foreach($sequence as $key) { + $q = $quots[$key]; + if ($q['u'] > $q['t']) { + $style = ' style="color: red"'; + } else { + $style = ''; + } + $quota_utilise[$key] += $q['u']; + $tot[$key]+= $q['t']; + print "".str_replace(" ", " ", m_quota::display_val($key, $q['u']).'/'.m_quota::display_val($key, $q['t'])).''; + } + print ""; + $mem->unsu(); } -echo "
"._("Total").""; -echo format_size($quota_utilise)." / ".format_size($tot).""; +echo ""; +echo ""._("Total").""; +foreach($sequence as $key) { + echo ""; + echo $quota_utilise[$key]."/".$tot[$key]; + echo ""; +} +echo ""; print "";