diff --git a/bureau/admin/menu.php b/bureau/admin/menu.php index 2b5a5043..9ed0791f 100644 --- a/bureau/admin/menu.php +++ b/bureau/admin/menu.php @@ -37,7 +37,7 @@ include("head.php"); -

Menu user["login"]; ?>

+

user["login"]; ?>

diff --git a/bureau/admin/menu_quota.php b/bureau/admin/menu_quota.php index d5b075ec..69047764 100644 --- a/bureau/admin/menu_quota.php +++ b/bureau/admin/menu_quota.php @@ -27,5 +27,40 @@ Purpose of file: ---------------------------------------------------------------------- */ -?> -
+ +$q=$quota->getquota(); + +$qlist=$quota->qlist(); +reset($qlist); + +echo '
' . _("Quotas") . '
'; +echo '
' . _("Show my quotas") . '
'; + +if (!is_array($q)) { + // "No quotas for this account, or quotas currently unavailable + return; +} + +while (list($key,$val)=each($qlist)) { + $col=3-$col; + + if (($key == 'bw_web' || $key == 'web') && ($q[$key]["t"] > 0)) { + if ($key == 'web') { + $q[$key]["u"] = $q[$key]["u"] * 1024; + } + + $usage_percent = (int) ($q[$key]["u"] / $q[$key]["t"] * 100); + $usage_color = ($q[$key]["u"] > $q[$key]["t"] ? '#f00' : '#0f0'); + $usage_color = ((85 < $usage_percent && $usage_percent < 100) ? '#ff0' : $usage_color); // yellow if 85 < x < 100 + + echo "
"; + echo '
' . /* _($val) */ $key . ' ' . $usage_percent . '%' . ' (' . format_size($q[$key]["u"]) . ' / ' . format_size($q[$key]["t"]) . ')
'; + echo "
"; + echo "
"; + echo '
'; + echo '
 
'; + echo '
'; + echo "
"; + } +} + diff --git a/etc/alternc/menulist.txt b/etc/alternc/menulist.txt index 4b6283f7..fc75f7dc 100644 --- a/etc/alternc/menulist.txt +++ b/etc/alternc/menulist.txt @@ -8,5 +8,5 @@ menu_sql.php menu_adm.php menu_lang.php menu_mem.php -menu_quota.php menu_aide.php +menu_quota.php