Commit 21dda6ed authored by mlutfy's avatar mlutfy

link to bw usage history if showing bw_web stats

parent a2c28284
......@@ -32,6 +32,7 @@ $q=$quota->getquota();
$qlist=$quota->qlist();
reset($qlist);
$col=1;
echo '<dt id="#quotas">' . _("Quotas") . '</dt>';
echo '<dd><a href="quota_show.php">' . _("Show my quotas") . '</a></dd>';
......@@ -51,10 +52,12 @@ while (list($key,$val)=each($qlist)) {
$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
$usage_color = ((85 < $usage_percent && $usage_percent < 100) ? '#ff0' : $usage_color); // yellow
$url = ($key == 'bw_web' ? 'stats_show_per_month.php' : 'quota_show.php');
echo "<dd>";
echo '<div><a href="quota_show.php">' . /* _($val) */ $key . ' ' . $usage_percent . '%' . ' (' . format_size($q[$key]["u"]) . ' / ' . format_size($q[$key]["t"]) . ')</a></div>';
echo '<div><a href="' . $url . '">' . /* _($val) */ $key . ' ' . $usage_percent . '%' . ' (' . format_size($q[$key]["u"]) . ' / ' . format_size($q[$key]["t"]) . ')</a></div>';
echo "</dd>";
echo "<dd>";
echo '<div style="width: 100%; background: #fff;">';
......@@ -64,3 +67,4 @@ while (list($key,$val)=each($qlist)) {
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment