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

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

	function DAOUpdateFile()
	{
		global $db, $db_table, $db_field;
		$this->db = $db;
		$this->db_table = $db_table;
		$this->db_field = $db_field;
	}
	
	function updateFile($_ufdobj)
	{
		$wfileobj = $_ufdobj->getobj();
		$sqlq = "UPDATE `".$this->db_table['fileattr']."` SET ".
			"`fullpath`='".$wfileobj->getfullpath()."', ".
			"`filename`='".$wfileobj->getfilename()."', ".
			"`filesize`=".$wfileobj->getfilesize().", ".
			"`contenttype`='".$wfileobj->getcontenttype()."', ".
			"`location`='".$wfileobj->getlocation()."', ".
			"`status`=".$wfileobj->getstatus().", ".
			"`temppass`='".$wfileobj->gettemppass()."' WHERE ".
			" id=".$wfileobj->getid();

		if ($this->db->sql_query($sqlq))
		{
			return true;
		}
		return false;
	}


	function rollback()
	{
		$this->db->sql_query("", ROLLBACK);
	}

	function commit()
	{
		$this->db->sql_query("", END_TRANSACTION);
	}

}


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