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

class DAORecursiveUpdate extends DAOGetFileDirAttr
{
	var $db;
	var $db_table;
	var $db_field;

	function DAOGetAttrList()
	{
		global $db, $db_table, $db_field;
		$this->db = $db;
		$this->db_table = $db_table;
		$this->db_field = $db_field;
	}

	function getChildFile($_file_id)
	{
		$sqlq = new SQLSelect();

		$sqlq->setSelect($this->db_field['filedirdb'],
			$this->db_table['filedirdb']);
		$sqlq->setSelect($this->db_field['fileattr'],
			$this->db_table['fileattr']);
		$sqlq->setWhere($this->db_table['filedirdb'].".linkid=".
			$this->db_table['fileattr'].".id");
		$sqlq->setWhere($this->db_table['filedirdb'].".pid=".$_file_id);
		$sqlq->setWhere($this->db_table['filedirdb'].".type=".
			SFILE);
		$tobj = $this->populate($sqlq->getRow($this->db, $sqlq->SQLReturn()));
		if (count($tobj)>0)
			return $tobj;
		else
			return null;
	}

	function getChildDir($_dir_id)
	{
		$sqlq = new SQLSelect();

		$sqlq->setSelect($this->db_field['filedirdb'],
			$this->db_table['filedirdb']);
		$sqlq->setSelect($this->db_field['dirattr'],
			$this->db_table['dirattr']);
		$sqlq->setWhere($this->db_table['filedirdb'].".linkid=".
			$this->db_table['dirattr'].".id");
		$sqlq->setWhere($this->db_table['filedirdb'].".pid=".$_dir_id);
		$sqlq->setWhere($this->db_table['filedirdb'].".type=".
			DIRECTORY);
		$tobj = $this->populate($sqlq->getRow($this->db, $sqlq->SQLReturn()));
		if (count($tobj)>0)
			return $tobj;
		else
			return null;
	}
}

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