3 require_once(
"../class/config.php");
4 if (!defined(
"QUOTASONE"))
return;
7 if (!
isset(
$mode)) { # when included from adm_login, mode is not
set
14 <h3
style=
"text-align:center;"><?php printf(_(
"<b>%s</b> account"),
$mem->user[
"login"]); ?></h3>
16 <div style=
"width: 600px">
25 echo
"<p>"._(
"quota_web").
" ";
26 echo sprintf(
"%.1f",
$t[
'size']).
" ".
$t[
'unit'];
33 <table
class=
"tedit" width=
"100%">
36 <th><?php
__(
"Domains"); ?></th>
37 <th><?php
__(
"Emails"); ?></th>
38 <th><?php
__(
"Space"); ?></th>
47 $mstmp = $quota->get_size_mail_sum_domain($domaine);
54 $alias_sizes = $quota->get_size_mail_details_domain($domaine);
56 foreach ($alias_sizes as $e) {
58 $domsize += $e[
'size'];
59 echo
"<tr><td>{$domaine}</td>";
60 echo
"<td>".str_replace(
"_",
"@",$e[
"alias"]).
"</td>";
61 echo
"<td";
if (
$mode!=2) echo
" style=\"text-align: right\""; echo
">";
62 $ms = $quota->get_size_unit($e[
'size']);
69 echo sprintf(
"%.1f", $ms[
'size']).
" ".$ms[
'unit'];
71 echo sprintf(
"%.1f", $pc).
" %";
73 $quota->quota_displaybar($pc);
79 $d = $quota->get_size_unit($domsize);
86 if (count($alias_sizes) > 0) {
87 echo
"<tr><td><i>". _(
'Total').
" {$domaine}</i></td><td></td>";
89 if (
$mode!=2) echo
" style=\"text-align: right\"";
92 echo sprintf(
"%.1f",
$d[
'size']).
" ".
$d[
'unit'];
94 echo sprintf(
"%.1f", $tpc).
" %";
96 $quota->quota_displaybar($tpc);
98 echo
"</i></td></tr>";
112 echo
"<p>"._(
"Databases:").
" ";
113 echo sprintf(
"%.1f",
$t[
'size']).
" ".
$t[
'unit'];
117 <table
class=
"tedit" width=
"100%">
120 <th width=
'50%'><?php
__(
"DB"); ?></th>
121 <th width=
'50%'><?php
__(
"Space"); ?></th>
129 echo
"<tr><td>".$d[
"db"].
"</td><td";
130 if (
$mode!=2) echo
" style=\"text-align: right\"";
132 $ds = $quota->get_size_unit($d[
"size"]);
134 $pc=intval(100*$d[
'size']/
$totaldb);
139 echo sprintf(
"%.1f", $ds[
'size']).
" ".$ds[
'unit'];
141 echo sprintf(
"%.1f", $pc).
" %";
143 $quota->quota_displaybar(2*$pc, 0);
151 <!-- Mailing lists -->
158 echo
"<p>"._(
"Mailman lists:").
" ";
159 echo sprintf(
"%.1f",
$t[
'size']).
" ".
$t[
'unit'];
163 <table
class=
"tedit" width=
'60%'>
166 <th><?php
__(
"Lists"); ?></th>
167 <th><?php
__(
"Space"); ?></th>
173 $mailman_size = $quota->get_size_mailman_details_user(
$mem->user[
"uid"]);
174 foreach ($mailman_size as $d) {
175 echo
"<tr><td>".$d[
"list"].
"</td><td";
176 if (
$mode!=2) echo
" style=\"text-align: right\"";
178 $ds = $quota->get_size_unit($d[
"size"] * 1024);
185 echo sprintf(
"%.1f", $ds[
'size']).
" ".$ds[
'unit'];
186 } elseif (
$mode==1) {
187 echo sprintf(
"%.1f", $pc).
" %";
189 $quota->quota_displaybar($pc);