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

	var $content_id;
	var $lang;
	var $page_id;
	var $type;
	var $context;
	var $hit_counter;
	var $order_by;

	function CContent($row=""){
		$this->content_id = $row["content_id"];
		$this->lang = $row["lang"];
		$this->page_id = $row["page_id"];
		$this->type = $row["type"];
		$this->context = $row["context"];
		$this->hit_counter = $row["hit_counter"];
		$this->order_by = "content_id";
	}
}

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

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

/*********************************************************/
class CContentEngine {
	function GetContent($language, $page_id, $typeofcontent){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->GetContent($language, $page_id, $typeofcontent);
	}

	function InsertContent($CContent, $typeofcontent){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->InsertContent($CContent, $typeofcontent);
	}

	function UpdateContent($language, $CContent, $typeofcontent){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->UpdateContent($language, $CContent, $typeofcontent);
	}

	function DeleteContent($page_id){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->DeleteContent($page_id);
	}

}
?>
 
Return current item: ChiCoMaS - Chilek CMS