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

	var $language_id;
	var $default_lang;
	var $active;
	var $language;
	var $lang;
	var $image_path;
	var $order_by;

	function CLanguage($row=""){
		$this->language_id = $row["language_id"];
		$this->default_lang = $row["default_lang"];
		$this->active = $row["active"];
		$this->language = $row["language"];
		$this->lang = $row["lang"];
		$this->image_path = $row["image_path"];
		$this->order_by = "language_id";
	}
}

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

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

/*********************************************************/
class CLanguageEngine {
	function GetLanguages($active){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->GetLanguages($active);
	}

	function GetLanguage($lang){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->GetLanguage($lang);
	}

	function FindLanguage($languageid){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->FindLanguage($languageid);
	}

	function UpdateLanguage($lang, $active){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->UpdateLanguage($lang, $active);
	}

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

	function SetDefaultLanguage($lang){
		$o_dataaccess = new CDataAccess();
		return $o_dataaccess->SetDefaultLanguage($lang);
	}
}
?>
 
Return current item: ChiCoMaS - Chilek CMS