Changeset 1661

Show
Ignore:
Timestamp:
05/25/06 15:26:20 (2 years ago)
Author:
benjamin
Message:

correction du commit precedent

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/trunk/bureau/admin/quota_show_all.php

    r1660 r1661  
    3838<?php 
    3939 
    40 $quota_utilise = 0
    41 $tot = 0
     40$quota_utilise = array()
     41$tot = array()
    4242 
    4343if ($mem->user['uid'] == "2000") 
     
    5454$sequence = array(); 
    5555foreach ($ql as $key => $name) { 
    56        print "<td>$name</td>"; 
    57        $sequence[] = $key; 
     56  print "<td>$name</td>"; 
     57  $sequence[] = $key; 
    5858} 
    5959print "</tr>"; 
     
    6464asort($u); 
    6565foreach ($u as $uid => $login) { 
    66 $class = ($class== 'lst1' ? 'lst2' : 'lst1'); 
    67 print "<tr class=\"$class\"><td>"; 
    68 print $login.'('.$uid.")</td>"; 
    69 $mem->su($uid); 
    70 if (!($quots = $quota->getquota())) { 
    71         $error = $err->errstr(); 
    72 
    73 foreach($sequence as $key) { 
    74   $q = $quots[$key]; 
    75   if ($q['u'] > $q['t']) { 
    76     $style = ' style="color: red"'; 
    77   } else { 
    78     $style = ''; 
     66  $class = ($class== 'lst1' ? 'lst2' : 'lst1'); 
     67  print "<tr class=\"$class\"><td>"; 
     68  print $login.'('.$uid.")</td>"; 
     69  $mem->su($uid); 
     70  if (!($quots = $quota->getquota())) { 
     71    $error = $err->errstr(); 
    7972  } 
    80   $quota_utilise = $quota_utilise + $q['u'];  
    81   $tot = $tot + $q['t'];  
    82   print "<td $style>".str_replace(" ", "&nbsp;", m_quota::display_val($key, $q['u']).'/'.m_quota::display_val($key, $q['t'])).'</td>'; 
    83 
    84 print "</tr>"; 
    85 $mem->unsu(); 
     73  foreach($sequence as $key) { 
     74    $q = $quots[$key]; 
     75    if ($q['u'] > $q['t']) { 
     76      $style = ' style="color: red"'; 
     77    } else { 
     78      $style = ''; 
     79    } 
     80    $quota_utilise[$key] += $q['u'];  
     81    $tot[$key]+= $q['t'];  
     82    print "<td $style>".str_replace(" ", "&nbsp;", m_quota::display_val($key, $q['u']).'/'.m_quota::display_val($key, $q['t'])).'</td>'; 
     83  } 
     84  print "</tr>"; 
     85  $mem->unsu(); 
    8686} 
    8787 
    88 echo "<br><tr height=\"15\"></tr><tr><td>"._("Total")."</td><td $style>"; 
    89 echo format_size($quota_utilise)." / ".format_size($tot)."</td></tr>"; 
     88echo "<tr>"; 
     89echo "<td $style><b>"._("Total")."</b></td>"; 
     90foreach($sequence as $key) { 
     91  echo "<td $style><b>"; 
     92  echo $quota_utilise[$key]."/".$tot[$key]; 
     93  echo "</b></td>"; 
     94
     95echo "</tr>"; 
    9096 
    9197print "</table>";