Location: PHPKode > projects > ChiCoMaS - Chilek CMS > chicomas/objects/obj_pagetypes.php
<?
/*********************************************************/
class CPageType{

	var $page_type_id;
	var $active;
	var $page_type;
	var $page_file;
	var $order_by;

	function CPageType($row=""){
		$this->page_type_id = $row["page_type_id"];
		$this->active = $row["active"];
		$this->page_type = $row["page_type"];
		$this->page_file = $row["page_file"];
		$this->order_by = "page_type_id";
	}

}

/*********************************************************/
class CPageTypeArray{
	var $pagetypes=array();
	var $top=0;
	var $count=0;
	
	function get(){
		if ($this->top <= $this->count){
			$this->top++;			
			return $this->pagetypes[$this->top-1];
		}
		else 
			return false;
	}

	function add($CPageType) {
		$this->pagetypes[$this->count] = $CPageType;
		$this->count++;				
		return true;
	}
	
	function count() {
		return ($this->count);
	}
}

/*********************************************************/
class CPageTypeEngine {
	function GetPageType($page_type_id){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->GetPageType($page_type_id);
	}

	function GetPageTypes($active){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->GetPageTypes($active);
	}


}
?>
 
Return current item: ChiCoMaS - Chilek CMS