Location: PHPKode > projects > Todo Manager > todo/model/user.class.php
<?php
require_once $_SERVER["DOCUMENT_ROOT"]."/".FOLDER."/classes/activerecord.class.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/".FOLDER."/library/cookie.lib.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/".FOLDER."/library/session.lib.php";

class User extends ActiveRecord {
	function User($db, $id = NULL) {
		parent::ActiveRecord($db, "user", $id);
	}
	
	function getLanguage() {
		$language = util_empty(session_get("language"))? cookie_get("language"): session_get("language");
		return util_empty($language)? "en": $language;
		return util_empty(cookie_get("language"))? "en": cookie_get("language");
	}
	
	function setLanguage($language) {
		session_set("language", $language);
		cookie_set("language", $language);
	}
}
?>
Return current item: Todo Manager