Corrige des bugs sur le récap des quotas
Commence a dégager hippo_bleue.gif
This commit is contained in:
parent
62019ba9f6
commit
0919c6d115
|
@ -150,7 +150,6 @@ bureau/admin/ftp_edit.php -text
|
||||||
bureau/admin/ftp_list.php -text
|
bureau/admin/ftp_list.php -text
|
||||||
bureau/admin/ftp_switch_enable.php -text
|
bureau/admin/ftp_switch_enable.php -text
|
||||||
bureau/admin/head.php -text
|
bureau/admin/head.php -text
|
||||||
bureau/admin/hippo_bleue.gif -text
|
|
||||||
bureau/admin/hta_add.php -text
|
bureau/admin/hta_add.php -text
|
||||||
bureau/admin/hta_adduser.php -text
|
bureau/admin/hta_adduser.php -text
|
||||||
bureau/admin/hta_del.php -text
|
bureau/admin/hta_del.php -text
|
||||||
|
@ -209,6 +208,7 @@ bureau/admin/images/folder.png -text
|
||||||
bureau/admin/images/folderhta.png -text
|
bureau/admin/images/folderhta.png -text
|
||||||
bureau/admin/images/ftp.png -text
|
bureau/admin/images/ftp.png -text
|
||||||
bureau/admin/images/help.png -text
|
bureau/admin/images/help.png -text
|
||||||
|
bureau/admin/images/hippo_bleue.gif -text
|
||||||
bureau/admin/images/home.png -text
|
bureau/admin/images/home.png -text
|
||||||
bureau/admin/images/ip.png -text
|
bureau/admin/images/ip.png -text
|
||||||
bureau/admin/images/lang.png -text
|
bureau/admin/images/lang.png -text
|
||||||
|
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
|
@ -29,7 +29,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
|
|
||||||
<!-- Mails -->
|
<!-- Mails -->
|
||||||
|
|
||||||
<table class="tedit">
|
<table class="tedit" width="90%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php __("Domains"); ?></th>
|
<th><?php __("Domains"); ?></th>
|
||||||
|
@ -60,7 +60,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
echo "<td"; if ($mode!=2) echo " style=\"text-align: right\""; echo ">";
|
echo "<td"; if ($mode!=2) echo " style=\"text-align: right\""; echo ">";
|
||||||
$ms = $quota->get_size_unit($e['size']);
|
$ms = $quota->get_size_unit($e['size']);
|
||||||
if ($totalmail) {
|
if ($totalmail) {
|
||||||
$pc=intval(100*($ms['size']/$totalmail));
|
$pc=intval(100*($e['size']/$totalmail));
|
||||||
} else {
|
} else {
|
||||||
$pc=0;
|
$pc=0;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f", $pc)." %";
|
echo sprintf("%.1f", $pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(2*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."\"/>";
|
$quota->quota_displaybar($pc);
|
||||||
}
|
}
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f", $tpc)." %";
|
echo sprintf("%.1f", $tpc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(2*$tpc)."px; height: 16px\" alt=\"".$tpc."%\" title=\"".$tpc."\"/>";
|
$quota->quota_displaybar($tpc);
|
||||||
}
|
}
|
||||||
echo "</i></td></tr>";
|
echo "</i></td></tr>";
|
||||||
}
|
}
|
||||||
|
@ -112,11 +112,11 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
echo "</p>";
|
echo "</p>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="tedit">
|
<table class="tedit" width="50%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php __("DB"); ?></th>
|
<th width='50%'><?php __("DB"); ?></th>
|
||||||
<th><?php __("Space"); ?></th>
|
<th width='50%'><?php __("Space"); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -129,7 +129,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
echo ">";
|
echo ">";
|
||||||
$ds = $quota->get_size_unit($d["size"]);
|
$ds = $quota->get_size_unit($d["size"]);
|
||||||
if ($totaldb) {
|
if ($totaldb) {
|
||||||
$pc=intval(100*$ds['size']/$totaldb);
|
$pc=intval(100*$d['size']/$totaldb);
|
||||||
} else {
|
} else {
|
||||||
$pc=0;
|
$pc=0;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
} elseif (isset($mode) &&$mode==1) {
|
} elseif (isset($mode) &&$mode==1) {
|
||||||
echo sprintf("%.1f", $pc)." %";
|
echo sprintf("%.1f", $pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(2*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
$quota->quota_displaybar(2*$pc);
|
||||||
}
|
}
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
echo "</p>";
|
echo "</p>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="tedit">
|
<table class="tedit" width='60%'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php __("Lists"); ?></th>
|
<th><?php __("Lists"); ?></th>
|
||||||
|
@ -184,7 +184,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f", $pc)." %";
|
echo sprintf("%.1f", $pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(2*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
$quota->quota_displaybar($pc);
|
||||||
}
|
}
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,7 +296,7 @@ if ($mode==0) {
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f",$pc)." %";
|
echo sprintf("%.1f",$pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."\"/>";
|
echo "<img src=\"images/hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."\"/>";
|
||||||
}
|
}
|
||||||
echo "</td><td";
|
echo "</td><td";
|
||||||
if ($mode!=2) echo " style=\"text-align: right\"";
|
if ($mode!=2) echo " style=\"text-align: right\"";
|
||||||
|
@ -314,7 +314,7 @@ if ($mode==0) {
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f",$pc)." %";
|
echo sprintf("%.1f",$pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
echo "<img src=\"images/hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</td><td";
|
echo "</td><td";
|
||||||
|
@ -332,7 +332,7 @@ if ($mode==0) {
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f",$pc)." %";
|
echo sprintf("%.1f",$pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
echo "<img src=\"images/hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</td><td";
|
echo "</td><td";
|
||||||
|
@ -353,7 +353,7 @@ if ($mode==0) {
|
||||||
} elseif ($mode==1) {
|
} elseif ($mode==1) {
|
||||||
echo sprintf("%.1f",$pc)." %";
|
echo sprintf("%.1f",$pc)." %";
|
||||||
} else {
|
} else {
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
echo "<img src=\"images/hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</td><td";
|
echo "</td><td";
|
||||||
|
@ -372,7 +372,7 @@ if ($mode==0) {
|
||||||
} else {
|
} else {
|
||||||
$pc=0;
|
$pc=0;
|
||||||
}
|
}
|
||||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
echo "<img src=\"images/hippo_bleue.gif\" style=\"width: ".(1*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -520,6 +520,17 @@ class m_quota {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cette fonction doit disparaitre quand on refera les pages d'affichage du quota
|
||||||
|
// trop sale
|
||||||
|
function quota_displaybar($usage) {
|
||||||
|
$usage_color = '#A0CFEC';
|
||||||
|
$usage_color = ((85 < $usage && $usage <= 100) ? '#82CAFF' : $usage_color); // yellow
|
||||||
|
echo '<div class="progress-bar">';
|
||||||
|
echo '<div style="width:'.$usage.'%; background: ' . $usage_color . '; text-align:center; font-weight: bold;" >'.$usage.'%</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ==== Hook functions ==== */
|
/* ==== Hook functions ==== */
|
||||||
|
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue