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

class DAONewUfd
{
	var $db;
	var $db_table;
	var $db_field;

	function DAONewUfd()
	{
		global $db, $db_table, $db_field;
		$this->db = $db;
		$this->db_table = $db_table;
		$this->db_field = $db_field;
	}
	
	function newUfd($_ufdobj)
	{
		$sqlq = "INSERT INTO `".$this->db_table['filedirdb']."` (".
			"`linkid`, `type`, `pid`, `status`, `ownerid`,".
			" `ownertype`) VALUES (".
			$_ufdobj->getlinkid().",".$_ufdobj->gettype().",".
			$_ufdobj->getpid().",".$_ufdobj->getstatus().",".
			$_ufdobj->getownerid().",".$_ufdobj->getownertype().
			")";

		if ($this->db->sql_query($sqlq))
		{
			$NUfdid = $this->db->sql_nextid();
			if ($NUfdid>0)
				return $NUfdid;
		}
		return -1;
	}

}


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