. */ /* */ /*************************************************************************************/ require_once __DIR__ . "/../fonctions/autoload.php"; class Devise extends Baseobj { public $id; public $nom; public $code; public $symbole; public $taux; public $defaut; const TABLE="devise"; public $table=self::TABLE; public $bddvars = array("id", "nom", "code", "symbole", "taux", "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_nom($nom){ return $this->getVars("select * from $this->table where nom=\"$nom\""); } public function charger_symbole($symbole){ return $this->getVars("select * from $this->table where symbole=\"$symbole\""); } /** * Charger la devise par défaut. * * @return la devise par defaut. */ public function charger_defaut() { return $this->getVars("select * from $this->table where defaut<>0"); } } ?>