Corrige des bugs sur le récap des quotas

Commence a dégager hippo_bleue.gif
This commit is contained in:
Alan Garcia 2013-04-23 22:41:07 +00:00
parent 62019ba9f6
commit 0919c6d115
5 changed files with 28 additions and 17 deletions

2
.gitattributes vendored
View File

@ -150,7 +150,6 @@ bureau/admin/ftp_edit.php -text
bureau/admin/ftp_list.php -text
bureau/admin/ftp_switch_enable.php -text
bureau/admin/head.php -text
bureau/admin/hippo_bleue.gif -text
bureau/admin/hta_add.php -text
bureau/admin/hta_adduser.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/ftp.png -text
bureau/admin/images/help.png -text
bureau/admin/images/hippo_bleue.gif -text
bureau/admin/images/home.png -text
bureau/admin/images/ip.png -text
bureau/admin/images/lang.png -text

View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

View File

@ -29,7 +29,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
<!-- Mails -->
<table class="tedit">
<table class="tedit" width="90%">
<thead>
<tr>
<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 ">";
$ms = $quota->get_size_unit($e['size']);
if ($totalmail) {
$pc=intval(100*($ms['size']/$totalmail));
$pc=intval(100*($e['size']/$totalmail));
} else {
$pc=0;
}
@ -69,7 +69,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
} elseif ($mode==1) {
echo sprintf("%.1f", $pc)."&nbsp;%";
} 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>";
}
@ -92,7 +92,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
} elseif ($mode==1) {
echo sprintf("%.1f", $tpc)."&nbsp;%";
} 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>";
}
@ -112,11 +112,11 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
echo "</p>";
?>
<table class="tedit">
<table class="tedit" width="50%">
<thead>
<tr>
<th><?php __("DB"); ?></th>
<th><?php __("Space"); ?></th>
<th width='50%'><?php __("DB"); ?></th>
<th width='50%'><?php __("Space"); ?></th>
</tr>
</thead>
<tbody>
@ -129,7 +129,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
echo ">";
$ds = $quota->get_size_unit($d["size"]);
if ($totaldb) {
$pc=intval(100*$ds['size']/$totaldb);
$pc=intval(100*$d['size']/$totaldb);
} else {
$pc=0;
}
@ -138,7 +138,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
} elseif (isset($mode) &&$mode==1) {
echo sprintf("%.1f", $pc)."&nbsp;%";
} 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>";
}
@ -158,7 +158,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
echo "</p>";
?>
<table class="tedit">
<table class="tedit" width='60%'>
<thead>
<tr>
<th><?php __("Lists"); ?></th>
@ -184,7 +184,7 @@ if (!isset($mode)) { # when included from adm_login, mode is not set
} elseif ($mode==1) {
echo sprintf("%.1f", $pc)."&nbsp;%";
} 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>";
}

View File

@ -296,7 +296,7 @@ if ($mode==0) {
} elseif ($mode==1) {
echo sprintf("%.1f",$pc)."&nbsp;%";
} 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";
if ($mode!=2) echo " style=\"text-align: right\"";
@ -314,7 +314,7 @@ if ($mode==0) {
} elseif ($mode==1) {
echo sprintf("%.1f",$pc)."&nbsp;%";
} 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";
@ -332,7 +332,7 @@ if ($mode==0) {
} elseif ($mode==1) {
echo sprintf("%.1f",$pc)."&nbsp;%";
} 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";
@ -353,7 +353,7 @@ if ($mode==0) {
} elseif ($mode==1) {
echo sprintf("%.1f",$pc)."&nbsp;%";
} 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";
@ -372,7 +372,7 @@ if ($mode==0) {
} else {
$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."%\"/>";
}

View File

@ -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 ==== */
/* ----------------------------------------------------------------- */