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

class BSGetAttrList
{
	function BSGetAttrList()
	{
	}

	function getOwner($_id, $_ownerid)
	{
		/*$daobsga = new DAOGetAttrList();
		$r = $daobsga->getOwnerParam($_id, $_ownerid);
		if (count($r[0][SFILE])==0)
		{
		}
		else
		{
			return $r[0][SFILE][0];
		}*/
		$daogf = new DAOGetFileDirAttr();
		$filedirdb = $daogf->getFileById($_id);
		if ($filedirdb!=null)
		{
			$bsga = new BSGAuthRight();
			return $bsga->getBasicAuthWFileDirDb($filedirdb, $_ownerid, $_ownerid);
		}
		else
			return new UserFileParamAttr(0, 0, 0, 0, "N", "N");
	}

	function getOwnerDir($_request, $_response)
	{
		$daogf = new DAOGetFileDirAttr();
		$filedirdb = $daogf->getDirById($_request['dir_id']);
		if ($filedirdb!=null)
		{
			$bsga = new BSGAuthRight();
			$_response['owneraccess'] = $bsga->getBasicAuthWFileDirDb($filedirdb, $_request['ownerid'], $_request['ownerid']);
		}
		else
			$_response['owneraccess'] = new UserDirParamAttr(0, 0, 0, 0, "N", "N", "N", "N", "N", "N", "N");
		return $_response;
	}

	function getUserFileAttrListbyId($_id, $_ownerid)
	{
		$daobsga = new DAOGetAttrList();
		$rattr = $daobsga->getUserFileParamAttrById($_id, $_ownerid);
		
		
		/*if (count($rattr[0][SFILE])==0)
		{
			$tempuserfileauth = new userFileParamAttr(-1, $_id, $_ownerid, $_ownerid, "Y", "Y");
			$rattr[0][SFILE][0]= $tempuserfileauth;
			$rattr[1][0]= new UserAccount($_ownerid, NSession::getusername(), "", "", "", 0, "", "", "", "", "", "", "", "", "", "", "");

		}*/

		if ($rattr!=null)
		{
			return $rattr;
		}
	}

	function getGroupFileAttrListbyId($_id, $_groupid)
	{
		$daobsga = new DAOGetAttrList();
		$rattr = $daobsga->getGroupFileParamAttrById($_id, $_groupid);

		if ($rattr != null)
		{
			return $rattr;
		}
	}

}

?>
Return current item: RabbitBB - Online Web Storage Project