array ("get", "integer" ,0), "sd" => array ("get", "integer" ,0), "usr" => array ("get", "integer" ,0), ); getFields($fields); if (!$admin->enabled) { __("This page is restricted to authorized staff"); exit(); } include_once ("head.php"); ?>
get_list(0, $cuid); foreach ($membres_list as $n) { $domList = $dom->enum_domains($n["uid"]); $mList[$n["uid"]] = array ( "login" => $n["login"], "domaines" => $domList, ); } $totalweb = 0; $totalmail = 0; $totallist = 0; $totaldb = 0; $dc = 0; $mc = 0; $mlc = 0; $dbc = 0; foreach ($mList as $mUID => $mData) { $tmpweb = $quota->get_size_web_sum_user($mUID); $totalweb += $tmpweb; if (!empty($mData["domaines"])) { foreach ($mData["domaines"] as $domaine) { $dc++; $tmpmail = $quota->get_size_mail_sum_domain($domaine); $totalmail += $tmpmail; $mc = $quota->get_size_mail_count_domain($domaine); $tmplist = $quota->get_size_mailman_sum_domain($domaine); $totallist += $tmplist; } } $mlc = $quota->get_size_mailman_count_user($mUID); $tmpdb = $quota->get_size_db_sum_user($mData["login"]); $totaldb += $tmpdb; $dbc = $quota->get_size_db_count_user($mData["login"]); } $totaltotal=$totalweb+$totallist+$totalmail+($totaldb/1024); // en Ko } else { $totalweb = $quota->get_size_web_sum_all(); $totalmail = $quota->get_size_mail_sum_all(); $totallist = $quota->get_size_mailman_sum_all(); $totaldb = $quota->get_size_db_sum_all(); $totaltotal=$totalweb+$totallist+$totalmail+($totaldb/1024); // en Ko $dc = $dom->count_domains_all(); $mc = $quota->get_size_mail_count_all(); $mlc = $quota->get_size_mailman_count_all(); $dbc = $quota->get_size_db_count_all(); } ?>
Mo | ||
Mo | ||
Mo | ||
Mo | ||
Mo |
";
// On affiche le compte et ses domaines :
echo "".$c["login"]." \n"; $domaines_list = $dom->enum_domains($c["uid"]); $dc=0; // Domain Count $ms=0; // Mail Space $mls=0; foreach ($domaines_list as $d) { if ($sd) echo " - {$d} \n"; $dc++; $mstmp = $quota->get_size_mail_sum_domain($d); $ms+=$mstmp; $mlstmp = $quota->get_size_mailman_sum_domain($d); $mls+=$mlstmp; } // Mail Count $maildomains_list = $mail->enum_domains($c["uid"]); $mc = 0; foreach ($maildomains_list as $md) { $mc += $md['nb_mail']; } if (isset($mailman)) { // Mailman List Count $mlc = $mailman->count_ml_user($c["uid"]); echo " | $dc | $mc | $mlc | "; } // isset mailman // Espace WEB $ws = $quota->get_size_web_sum_user($c["uid"]); if (isset($totalweb) && $totalweb){ $pc=intval(100*$ws/$totalweb); } else{ $pc=0; } if ($mode==0) { echo sprintf("%.1f", $ws / 1024)." "._("MB"); } elseif ($mode==1) { echo sprintf("%.1f",$pc)." %"; } else { echo ""; } echo " | "; // Espace Mail : if ($totalmail) $pc=intval(100*$ms/$totalmail); else $pc=0; if ($mode==0) { echo sprintf("%.1f", $ms / 1024)." Mo"; } elseif ($mode==1) { echo sprintf("%.1f",$pc)." %"; } else { echo ""; } echo " | "; // Espace Mailman : if ($totallist) $pc=intval(100*$mls/$totallist); else $pc=0; if ($mode==0) { echo sprintf("%.1f", $mls / 1024)." "._("MB"); } elseif ($mode==1) { echo sprintf("%.1f",$pc)." %"; } else { echo ""; } echo " | "; // Espace DB : $ds = $quota->get_size_db_sum_user($c["login"]); if ($totaldb) $pc=intval(100*$ds/$totaldb); else $pc=0; if ($mode==0) { echo sprintf("%.1f", $ds / 1024/1024)." "._("MB"); } elseif ($mode==1) { echo sprintf("%.1f",$pc)." %"; } else { echo ""; } echo " | "; $ts=$ds/1024+$ws+$ms+$mls; if ($mode==0) { echo sprintf("%.1f", $ts/1024)." "._("MB"); } elseif ($mode==1) { echo sprintf("%.1f",(100*$ts/$totaltotal))." %"; } else { if ($totaltotal) { $pc=intval(100*$ts/$totaltotal); } else { $pc=0; } echo ""; } echo " | "; echo "