tbrehm
2010-10-27 9eb7b343b2db5bb757e07c84322b2fe30bea9229
interface/web/sites/user_quota_stats.php
@@ -45,12 +45,34 @@
      $rec['soft'] = $monitor_data['user'][$username]['soft'];
      $rec['hard'] = $monitor_data['user'][$username]['hard'];
      
      if($rec['used'] > 1024) {
         $rec['used'] = round($rec['used'] / 1024,2).' MB';
      } else {
         $rec['used'] .= ' KB';
      }
      if($rec['soft'] > 1024) {
         $rec['soft'] = round($rec['soft'] / 1024,2).' MB';
      } else {
         $rec['soft'] .= ' KB';
      }
      if($rec['hard'] > 1024) {
         $rec['hard'] = round($rec['hard'] / 1024,2).' MB';
      } else {
         $rec['hard'] .= ' KB';
      }
      /*
      if(!strstr($rec['used'],'M') && !strstr($rec['used'],'K')) $rec['used'].= ' B';
      if(!strstr($rec['soft'],'M') && !strstr($rec['soft'],'K')) $rec['soft'].= ' B';
      if(!strstr($rec['hard'],'M') && !strstr($rec['hard'],'K')) $rec['hard'].= ' B';
      */
      
      if($rec['soft'] == '0 B' || $rec['soft'] == '0K' || $rec['soft'] == '0') $rec['soft'] = $app->lng('unlimited');
      if($rec['hard'] == '0 B' || $rec['hard'] == '0K' || $rec['hard'] == '0') $rec['hard'] = $app->lng('unlimited');
      if($rec['soft'] == '0 B' || $rec['soft'] == '0 KB' || $rec['soft'] == '0') $rec['soft'] = $app->lng('unlimited');
      if($rec['hard'] == '0 B' || $rec['hard'] == '0 KB' || $rec['hard'] == '0') $rec['hard'] = $app->lng('unlimited');
      
      //* The variable "id" contains always the index variable
      $rec['id'] = $rec[$this->idx_key];