Commit b4daebfa authored by xaver's avatar xaver
Browse files

added file count in Website quota #2105

parent 7ad91f34
......@@ -4,5 +4,5 @@ $wb['domain_txt'] = 'Domain / Website';
$wb['system_user_txt'] = 'Linux user';
$wb['used_txt'] = 'Used space';
$wb['hard_txt'] = 'Hard limit';
$wb['soft_txt'] = 'Soft limit';
$wb["files_txt"] = 'Dateien';
?>
......@@ -5,4 +5,5 @@ $wb["system_user_txt"] = 'Linux user';
$wb["used_txt"] = 'Used space';
$wb["hard_txt"] = 'Hard limit';
$wb["soft_txt"] = 'Soft limit';
$wb["files_txt"] = 'Single files';
?>
\ No newline at end of file
......@@ -12,6 +12,7 @@
<th class="tbl_col_system_user" scope="col" style="text-align:right;"><tmpl_var name="used_txt"></th>
<th class="tbl_col_system_user" scope="col" style="text-align:right;"><tmpl_var name="soft_txt"></th>
<th class="tbl_col_system_user" scope="col" style="text-align:right;"><tmpl_var name="hard_txt"></th>
<th class="tbl_col_system_user" scope="col" style="text-align:right;"><tmpl_var name="files_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
......@@ -20,6 +21,7 @@
<td class="tbl_col_system_user">&nbsp;</td>
<td class="tbl_col_system_user">&nbsp;</td>
<td class="tbl_col_system_user">&nbsp;</td>
<td class="tbl_col_system_user">&nbsp;</td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','sites/user_quota_stats.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
......@@ -31,6 +33,7 @@
<td class="tbl_col_used" style="text-align:right;"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="used"}</a></td>
<td class="tbl_col_soft" style="text-align:right;"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="soft"}</a></td>
<td class="tbl_col_hard" style="text-align:right;"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="hard"}</a></td>
<td class="tbl_col_files" style="text-align:right;"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="files"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
&nbsp;
......@@ -41,7 +44,7 @@
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
<td class="tbl_footer tbl_paging" colspan="7"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
......
......@@ -44,10 +44,12 @@ class list_action extends listform_actions {
$rec['used'] = $monitor_data['user'][$username]['used'];
$rec['soft'] = $monitor_data['user'][$username]['soft'];
$rec['hard'] = $monitor_data['user'][$username]['hard'];
$rec['files'] = $monitor_data['user'][$username]['files'];
if (!is_numeric($rec['used'])) $rec['used']=$rec['used'][1];
if (!is_numeric($rec['soft'])) $rec['soft']=$rec['soft'][1];
if (!is_numeric($rec['hard'])) $rec['hard']=$rec['hard'][1];
if (!is_numeric($rec['files'])) $rec['files']=$rec['files'][1];
if($rec['used'] > 1024) {
$rec['used'] = round($rec['used'] / 1024,2).' MB';
......
......@@ -241,10 +241,12 @@ class monitor_tools {
$data['user'][$username]['used'] += $s[2];
$data['user'][$username]['soft'] += $s[3];
$data['user'][$username]['hard'] += $s[4];
$data['user'][$username]['files'] += $s[5];
} else {
$data['user'][$username]['used'] = $s[2];
$data['user'][$username]['soft'] = $s[3];
$data['user'][$username]['hard'] = $s[4];
$data['user'][$username]['files'] = $s[5];
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment