name=$pmb_printer_name; $this->printer_data= new printer_data(); require_once($class_path."/printer/$pmb_printer_name.class.php"); $this->printer_driver=new $pmb_printer_name(); } protected function fetch_data(){ } function print_pret($id_empr,$cb_doc,$tpl_perso=""){ $this->printer_data->get_data_empr($id_empr); $this->printer_data->get_data_expl($cb_doc); return $this->printer_driver->gen_print($this->printer_data->data); } function print_all_pret($id_empr,$tpl_perso=""){ global $dbh; $this->printer_data->get_data_empr($id_empr); $query = "select expl_cb from pret,exemplaires where pret_idempr=$id_empr and expl_id=pret_idexpl "; $result = mysql_query($query, $dbh); while (($r= mysql_fetch_object($result))) { $this->printer_data->get_data_expl($r->expl_cb); } return $this->printer_driver->gen_print($this->printer_data->data); } }