Location: PHPKode > projects > RabbitBB - Online Web Storage Project > mywebdrive/PHP_CON/user/BSGetDriveProp.php
<?PHP

class BSGetDriveProp
{
	function BSGetDriveProp()
	{
	}

	function getDriveProp($_userid)
	{
		if ($_userid != NSession::getuid())
		{
			$tres['totalsize'] = "---";
			$tres['usedsize'] = "---";
			$tres['leftsize'] = "---";
			return array($tres);
		}

		
		$daodp = new DAOGetDriveProp();
		$tresult = $daodp->getDriveTotalSize($_userid);
		$tres = array();
		$tres['totalsize'] = $tresult['acctypedb'][0]->gettotalsize();
		$tresult = $daodp->getUsedSize($_userid);
		if (isset($tresult['other']))
			$tres['usedsize'] = round($tresult['other'][0]['totalsize']/1000/1000, 1);
		else
			$tres['usedsize'] = 0;
		$tres['leftsize'] = round($tres['totalsize']-$tres['usedsize'], 1);

		return array($tres);
	}
}
?>
Return current item: RabbitBB - Online Web Storage Project