".htmlspecialchars($biblio_name,ENT_QUOTES,$charset).""; $xml_bibli.="".htmlspecialchars($biblio_adr1,ENT_QUOTES,$charset).""; $xml_bibli.="".htmlspecialchars($biblio_town,ENT_QUOTES,$charset).""; $xml_bibli.="".htmlspecialchars($biblio_phone,ENT_QUOTES,$charset).""; $xml_bibli.="".htmlspecialchars($biblio_email,ENT_QUOTES,$charset).""; $xml_bibli.=""; $xml_bibli.="".htmlspecialchars($msg['fpdf_edite']." ".formatdate(date("Y-m-d",time())),ENT_QUOTES,$charset).""; $xml_bibli.=""; $xml_bibli.="Emprunteur: "; $xml_bibli.="".htmlspecialchars($empr->nom." ". $empr->prenom,ENT_QUOTES,$charset).""; $xml_bibli.=""; function print_expl($cb_doc) { global $charset; $expl=get_info_expl($cb_doc); $xml_expl.=""; $titre=substr($expl->tit,0,25); $xml_expl.="".htmlspecialchars($titre,ENT_QUOTES,$charset).""; $xml_expl.="".htmlspecialchars($expl->aff_pret_retour,ENT_QUOTES,$charset).""; $xml_expl.="".htmlspecialchars($expl->expl_cb.". ".$msg['fpdf_date_pret']." ".$expl->aff_pret_date,ENT_QUOTES,$charset).""; $xml_expl.="".htmlspecialchars($expl->location_libelle." / ".$expl->section_libelle." / ".$expl->expl_cote,ENT_QUOTES,$charset).""; return $xml_expl; } //En fonction de $sub, inclure les fichiers correspondants switch($sub): case 'one': $xml_bibli.="".htmlspecialchars($msg["ticket_de_pret"],ENT_QUOTES,$charset).""; $xml_bibli.=print_expl($cb_doc); $xml_bibli.=""; break; case 'all': $xml_bibli.="".htmlspecialchars("Liste des prêts:",ENT_QUOTES,$charset).""; $query = "select expl_cb from pret,exemplaires where pret_idempr=$id_empr and expl_id=pret_idexpl "; $result = pmb_mysql_query($query, $dbh); while (($r= pmb_mysql_fetch_array($result))) $xml_bibli.=print_expl( $r['expl_cb']); $xml_bibli.=""; break; default: ajax_http_send_error('400',"commande inconnue"); break; endswitch; $xml=file_get_contents ( $base_path . "/includes/printer/ticket_pret.xml"); $xml=str_replace("!!document-contents!!",$xml_bibli , $xml); ajax_http_send_response($xml,"text/xml"); ?>