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

class BSGPublicAuth extends BSGBasicAuth
{
	var $daoga;
	var $param = null;
	var $cid;
	
	function BSGPublicAuth()
	{
		$this->daoga = new DAOGAuth();
		$this->cid=0;
	}
	function publicAuth($_filedirdb)
	{
		if ($this->daoga!=null)
		{
			if ($this->cid!= $_filedirdb->getid())
			{
				$this->param = $this->daoga->getuserparamattr($_filedirdb, ANONYMOUS);
				$this->cid = $_filedirdb->getid();
			}

			if ($this->param!=null)
			{
				if ($_filedirdb->gettype()==DIRECTORY)
				{
					if (isset($this->param[DIRECTORY][0]))
					{
						//return $this->param[DIRECTORY][0]->getread();
						return $this->param[DIRECTORY][0];
					}
				}
				elseif ($_filedirdb->gettype()==SFILE)
				{
					if (isset($this->param[SFILE][0]))
					{
						return $this->param[SFILE][0];//->getread();
					}
				}
			}
			return null;
			
		}
		else
			return null;
	}

}

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