var $dblist;
function User($userId) {
$this->userId = $userId;
- $sql = sprintf("SELECT User.UserId, Username, Password, Name, Email, UL, bEnabled, nBytesSoft, nBytesHard, nBytes, nDatabases, nDatabasesHard
+ $sql = sprintf("SELECT User.UserId, Username, Password, Name, Email, UL, bEnabled, nBytesSoft, nBytesHard, nBytes, nDatabases, nDatabasesHard, IF(nBytes>nBytesHard,1,0) AS bOverQuota
FROM User
INNER JOIN UserQuota ON User.UserId = UserQuota.UserId
INNER JOIN UserStat ON User.UserId = UserStat.UserId
function getUsername() {
return $this->exists()?$this->info['Username']:'';
}
+ function isOverQuota() {
+ return $this->exists()?($this->info['bOverQuota']>0?true:false):'';
+ }
function getBytes() {
if($this->exists()) {
$arr['nBytes'] = $this->info['nBytes'];
mysql_escape_string($this->getUserId()));
// $r = fetchRows(DBSelect($sql),'DatabaseId');
$r = fetchRows(DBSelect($sql),'Name');
+ ksort($r);
return $r;
}
}