<?php

	
	include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );

	class GuestbookRecord
	{
		var $_id;
		var $_blogId;
		var $_topic;
		var $_content;
		var $_userName;
		var $_userEmail;
		var $_userUrl;
		var $_date;
		var $_clientIp;
		var $_parentId;
		var $_private;
		var $_spamRate;

		function GuestbookRecord($blogId, $topic = "", $content = "", $date = null, $userName = "", $userEmail = "", $userUrl = "", $clientIp = "0.0.0.0", $parentId = 0, $private = false, $spamRate = 0)
		{
			

			$this->_blogId = $blogId;
			$this->_topic = $topic;
			$this->_content  = $content;

			$this->_userName  = $userName;
			$this->_userEmail = $userEmail;
			$this->_userUrl   = $userUrl;

			$this->_clientIp  = $clientIp;

			$this->_parentId = $parentId;
			$this->_private = $private;

			$this->_spamRate = $spamRate;

			if( $date == null )
			{
				$t = new Timestamp();
				$this->_date = $t->getTimestamp();
			}
		}

		function getId()
		{
			return $this->_id;
		}

		function setId($id)
		{
			$this->_id = $id;
		}

		function getBlogId()
		{
			return $this->_blogId;
		}

		function setBlogId($blogId)
		{
			$this->_blogId = $blogId;
		}

		function getTopic()
		{
			return $this->_topic;
		}

		function setTopic($topic)
		{
			$this->_topic = $topic;
		}

		function getContent()
		{
			return $this->_content;
		}

		function setContent($content)
		{
			$this->_content = $content;
		}

		function getUserName()
		{
			return $this->_userName;
		}

		function setUserName($userName)
		{
			$this->_userName = $userName;
		}

		function getUserEmail()
		{
			return $this->_userEmail;
		}

		function setUserEmail($userEmail)
		{
			$this->_userEmail = $userEmail;
		}

		function getUserUrl()
		{
			return $this->_userUrl;
		}

		function setUserUrl($userUrl)
		{
			$this->_userUrl = $userUrl;
		}

		function getDate()
		{
			$date = new Date($this->_date);

			return $date->getDate();
		}

		function setDate($date)
		{
			$this->_date = $date;
		}

		function getClientIp()
		{
			return $this->_clientIp;
		}

		function setClientIp($clientIp)
		{
			$this->_clientIp = $clientIp;
		}

		function setParentId($parentId)
		{
			$this->_parentId = $parentId;
		}

		function getParentId()
		{
			return $this->_parentId;
		}

		function setPrivate($private)
		{
			$this->_private = $private;
		}

		function getPrivate()
		{
			return $this->_private;
		}

		function setSpamRate($spamRate)
		{
			$this->_spamRate = $spamRate;
		}

		function getSpamRate()
		{
			return $this->_spamRate;
		}
	}
?>