<?php
// $Id: help.class.php,v 1.1 2003/09/19 11:19:26 eddieajau Exp $
/**
* Content code
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.1 $
**/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

//
// Classes and helper functions to the helpsystem
//

class mosHelp extends mosDBTable
{
	/** @var int Unique id*/
	var $id = null;
	/** @var string lang*/
	var $lang = 'eng';

	/** @var string name*/
	var $context = null;

	/** @var string name*/
	var $name = null;

	/** @var string title*/
	var $title = null;

	/** @var int parent*/
	var $parent = null;

	/** @var int ordering*/
	var $ordering = null;

	/** @var string helptext*/
	var $helptext = null;

	var $catid = null;
	var $checked_out = null;
	var $checked_out_time = null;

	function mosHelp( &$database )
	{
		$this->mosDBTable( '#__help', 'id', $database );
	}

	function check()
	{
		if (trim( $this->name ) == '')
		{
			$this->_error = "Your helppage must contain a name.";
			return false;
		}

		if (trim( $this->title ) == '')
		{
			$this->_error = "Your helppage must contain a title.";
			return false;
		}

		if (trim( $this->helptext ) == '')
		{
			$this->_error = "Your helppage must contain some help text.";
			return false;
		}

		return true;
	}
}

?>
