correction du commit precedent
This commit is contained in:
parent
e4057ebcc0
commit
7ee023d7db
|
@ -37,8 +37,8 @@ include("head.php");
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$quota_utilise = 0;
|
$quota_utilise = array();
|
||||||
$tot = 0;
|
$tot = array();
|
||||||
|
|
||||||
if ($mem->user['uid'] == "2000")
|
if ($mem->user['uid'] == "2000")
|
||||||
$user_list = $admin->get_list(1);
|
$user_list = $admin->get_list(1);
|
||||||
|
@ -53,8 +53,8 @@ reset($ql);
|
||||||
print "<td>"._("User")."</td>";
|
print "<td>"._("User")."</td>";
|
||||||
$sequence = array();
|
$sequence = array();
|
||||||
foreach ($ql as $key => $name) {
|
foreach ($ql as $key => $name) {
|
||||||
print "<td>$name</td>";
|
print "<td>$name</td>";
|
||||||
$sequence[] = $key;
|
$sequence[] = $key;
|
||||||
}
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$u = array();
|
$u = array();
|
||||||
|
@ -63,30 +63,36 @@ foreach ($user_list as $user) {
|
||||||
}
|
}
|
||||||
asort($u);
|
asort($u);
|
||||||
foreach ($u as $uid => $login) {
|
foreach ($u as $uid => $login) {
|
||||||
$class = ($class== 'lst1' ? 'lst2' : 'lst1');
|
$class = ($class== 'lst1' ? 'lst2' : 'lst1');
|
||||||
print "<tr class=\"$class\"><td>";
|
print "<tr class=\"$class\"><td>";
|
||||||
print $login.'('.$uid.")</td>";
|
print $login.'('.$uid.")</td>";
|
||||||
$mem->su($uid);
|
$mem->su($uid);
|
||||||
if (!($quots = $quota->getquota())) {
|
if (!($quots = $quota->getquota())) {
|
||||||
$error = $err->errstr();
|
$error = $err->errstr();
|
||||||
}
|
|
||||||
foreach($sequence as $key) {
|
|
||||||
$q = $quots[$key];
|
|
||||||
if ($q['u'] > $q['t']) {
|
|
||||||
$style = ' style="color: red"';
|
|
||||||
} else {
|
|
||||||
$style = '';
|
|
||||||
}
|
}
|
||||||
$quota_utilise = $quota_utilise + $q['u'];
|
foreach($sequence as $key) {
|
||||||
$tot = $tot + $q['t'];
|
$q = $quots[$key];
|
||||||
print "<td $style>".str_replace(" ", " ", m_quota::display_val($key, $q['u']).'/'.m_quota::display_val($key, $q['t'])).'</td>';
|
if ($q['u'] > $q['t']) {
|
||||||
}
|
$style = ' style="color: red"';
|
||||||
print "</tr>";
|
} else {
|
||||||
$mem->unsu();
|
$style = '';
|
||||||
|
}
|
||||||
|
$quota_utilise[$key] += $q['u'];
|
||||||
|
$tot[$key]+= $q['t'];
|
||||||
|
print "<td $style>".str_replace(" ", " ", m_quota::display_val($key, $q['u']).'/'.m_quota::display_val($key, $q['t'])).'</td>';
|
||||||
|
}
|
||||||
|
print "</tr>";
|
||||||
|
$mem->unsu();
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<br><tr height=\"15\"></tr><tr><td>"._("Total")."</td><td $style>";
|
echo "<tr>";
|
||||||
echo format_size($quota_utilise)." / ".format_size($tot)."</td></tr>";
|
echo "<td $style><b>"._("Total")."</b></td>";
|
||||||
|
foreach($sequence as $key) {
|
||||||
|
echo "<td $style><b>";
|
||||||
|
echo $quota_utilise[$key]."/".$tot[$key];
|
||||||
|
echo "</b></td>";
|
||||||
|
}
|
||||||
|
echo "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue