. */ /* */ /*************************************************************************************/ require_once __DIR__ . "/../fonctions/autoload.php"; class Lang extends Baseobj { public $id; public $description; public $code; public $url; public $defaut; const TABLE = "lang"; public $table = self::TABLE; public $bddvars = array("id", "description", "code", "url", "defaut"); public function __construct($id = 0) { parent::__construct(); if($id > 0) $this->charger($id); } public function charger($id) { return $this->getVars("select * from $this->table where id=\"$id\""); } public function charger_code($code) { return $this->getVars("select * from $this->table where code=\"$code\""); } public function charger_url($url) { return $this->getVars("select * from $this->table where url like \"http://$url%\""); } public function charger_defaut() { return $this->getVars("select * from $this->table where defaut<>0"); } } ?>