Indentation de fichiers sur les quotas

This commit is contained in:
Alan Garcia 2013-01-30 11:17:16 +00:00
parent 01e220f6ce
commit b496a01f04
2 changed files with 59 additions and 54 deletions

View File

@ -31,7 +31,7 @@ reset($qlist);
$col=1;
if (!is_array($q)) {
if (!is_array($q) || empty($q) ) {
// "No quotas for this account, or quotas currently unavailable
return;
}

View File

@ -36,10 +36,14 @@ include_once("head.php");
<br />
<?php
$q=$quota->getquota();
if (!is_array($q)) {
if (!is_array($q) || empty($q) ) {
echo "<p class=\"error\">"._("No quotas for this account, or quotas currently unavailable!")."</p>";
} else {
echo "<table cellspacing=\"0\" cellpadding=\"4\"><tr><th>"._("Quota")."</th><th>"._("Used")."</th><th>"._("Total")."</th></tr>";
include_once("foot.php");
die();
}
echo "<table cellspacing=\"0\" cellpadding=\"4\" class='tlist'>";
echo "<tr><th>"._("Quota")."</th><th>"._("Used")."</th><th>"._("Total")."</th></tr>";
$qlist=$quota->qlist();
reset($qlist);
$col=1;
@ -53,16 +57,17 @@ if (!is_array($q)) {
if ($q[$key]["u"] >= $q[$key]["t"]) echo "</font>";
if ($key == 'bw_web') {
echo "&nbsp;</td><td align=\"center\">". format_size($q[$key]["u"]) ."&nbsp;</td><td align=\"center\">". format_size($q[$key]["t"]) ."&nbsp;</td>";
echo "&nbsp;</td><td>". format_size($q[$key]["u"]) ."&nbsp;</td><td>". format_size($q[$key]["t"]) ."&nbsp;</td>";
} elseif ($key == 'web') {
echo "&nbsp;</td><td align=\"center\">". format_size($q[$key]["u"] * 1024) . "&nbsp;</td><td align=\"center\">". format_size($q[$key]["t"] * 1024) ."&nbsp;</td>";
echo "&nbsp;</td><td>". format_size($q[$key]["u"] * 1024) . "&nbsp;</td><td>". format_size($q[$key]["t"] * 1024) ."&nbsp;</td>";
} else {
echo "&nbsp;</td><td align=\"center\">".$q[$key]["u"]."&nbsp;</td><td align=\"center\">".$q[$key]["t"]."&nbsp;</td>";
echo "&nbsp;</td><td>".$q[$key]["u"]."&nbsp;</td><td>".$q[$key]["t"]."&nbsp;</td>";
}
echo "</tr>";
}
echo "</table>";
}
include_once("foot.php");
?>
<?php include_once("foot.php"); ?>