diff --git a/views/bootstrap/class.MyAccount.php b/views/bootstrap/class.MyAccount.php index a538511a0..95ac656bc 100644 --- a/views/bootstrap/class.MyAccount.php +++ b/views/bootstrap/class.MyAccount.php @@ -37,14 +37,17 @@ class SeedDMS_View_MyAccount extends SeedDMS_Bootstrap_Style { $enableuserimage = $this->params['enableuserimage']; $passwordexpiration = $this->params['passwordexpiration']; $httproot = $this->params['httproot']; + $quota = $this->params['quota']; $this->htmlStartPage(getMLText("my_account")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("my_account"), "my_account"); - if(($remain = checkQuota()) < 0) { - $this->warningMsg(getMLText('quota_warning', array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain))))); + if($quota > 0) { + if(($remain = checkQuota()) < 0) { + $this->warningMsg(getMLText('quota_warning', array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain))))); + } } $this->contentHeading(getMLText("user_info")); $this->contentContainerStart(); @@ -81,13 +84,34 @@ class SeedDMS_View_MyAccount extends SeedDMS_Bootstrap_Style { print "\n"; } print "\n"; - print "".getMLText("quota")." : \n"; - print "".SeedDMS_Core_File::format_filesize($user->getQuota())."\n"; - print "\n"; - print "\n"; print "".getMLText("used_discspace")." : \n"; print "".SeedDMS_Core_File::format_filesize($user->getUsedDiskSpace())."\n"; print "\n"; + if($quota > 0) { + print "\n"; + print "".getMLText("quota")." : \n"; + print "".SeedDMS_Core_File::format_filesize($user->getQuota())."\n"; + print "\n"; + if($user->getQuota() > $user->getUsedDiskSpace()) { + $used = (int) ($user->getUsedDiskSpace()/$user->getQuota()*100.0+0.5); + $free = 100-$used; + } else { + $free = 0; + $used = 100; + } + print "\n"; + print "\n"; + print "\n"; + print "\n"; +?> +
+
+
+
+\n"; + print "\n"; + } print "\n"; print "\n"; print "\n";