id_empr."' group by rien ";
$lib_all_groupes=pmb_sql_value($requete);
if ($lib_all_groupes) $lib_all_groupes="\n".$lib_all_groupes;
if ($empr->empr_prenom) $empr->empr_nom=$empr->empr_prenom." ".$empr->empr_nom;
$res_final[]=$empr->empr_nom;
if ($empr->empr_adr2 != "") $empr->empr_adr1 = $empr->empr_adr1."\n" ;
if (($empr->empr_cp != "") || ($empr->empr_ville != "")) $empr->empr_adr2 = $empr->empr_adr2."\n" ;
$adr = $empr->empr_adr1.$empr->empr_adr2.$empr->empr_cp." ".$empr->empr_ville ;
if ($empr->empr_pays != "") $adr = $adr."\n".$empr->empr_pays ;
$res_final[]=$adr;
if ($empr->empr_tel1 != "") {
$tel = $tel.$msg['fpdf_tel1']." ".$empr->empr_tel1." " ;
}
if ($empr->empr_tel2 != "") {
$tel = $tel.$msg['fpdf_tel2']." ".$empr->empr_tel2;
}
if ($empr->empr_mail != "") {
if ($tel) $tel = $tel."\n" ;
$mail = $msg['fpdf_email']." ".$empr->empr_mail;
}
$res_final[]="\n".$tel.$mail.$lib_all_groupes;
$res_final[]="";
$res_final[]=$msg['fpdf_carte']." ".$empr->empr_cb;
$res_final[]=$msg['fpdf_adherent']." ".$empr->aff_empr_date_adhesion." ".$msg['fpdf_adherent_au']." ".$empr->aff_empr_date_expiration ;
return implode("\n",$res_final);
} /* fin m_lecteur_info */
// ********************* Imprime l'adresse d'un lecteur **********************************
function m_lecteur_adresse($empr) {
global $msg;
$res_final=array();
if ($empr->empr_prenom) $empr->empr_nom=$empr->empr_prenom." ".$empr->empr_nom;
$res_final[]=$empr->empr_nom;
if ($empr->empr_adr2 != "") $empr->empr_adr1 = $empr->empr_adr1."\n" ;
if (($empr->empr_cp != "") || ($empr->empr_ville != "")) $empr->empr_adr2 = $empr->empr_adr2."\n" ;
$adr = $empr->empr_adr1.$empr->empr_adr2.$empr->empr_cp." ".$empr->empr_ville ;
if ($empr->empr_pays != "") $adr = $adr."\n".$empr->empr_pays ;
$res_final[]=$adr;
if ($empr->empr_tel1 != "") {
$tel = $tel.$msg['fpdf_tel1']." ".$empr->empr_tel1." " ;
}
if ($empr->empr_tel2 != "") {
$tel = $tel.$msg['fpdf_tel2']." ".$empr->empr_tel2;
}
if ($empr->empr_mail != "") {
if ($tel) $tel = $tel."\n" ;
$mail = $msg['fpdf_email']." ".$empr->empr_mail;
}
$res_final[]="\n".$tel.$mail;
return implode("\n",$res_final);
} /* fin m_lecteur_adresse */
// Liste des prêts en cours
function m_liste_prets($destinataire) {
global $dbh, $msg;
$res_final=array();
// $rqt = "select expl_cb from pret, exemplaires where pret_idempr='".$destinataire->id_empr."' and pret_idexpl=expl_id order by pret_date " ;
$requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, expl_cote, pret_date, pret_retour, tdoc_libelle, section_libelle, location_libelle, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, ";
$requete.= " date_format(pret_date, '".$msg["format_date"]."') as aff_pret_date, ";
$requete.= " date_format(pret_retour, '".$msg["format_date"]."') as aff_pret_retour, ";
$requete.= " IF(pret_retour>sysdate(),0,1) as retard, notices_m.tparent_id, notices_m.tnvol " ;
$requete.= " FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), docs_type, docs_section, docs_location, pret ";
$requete.= " WHERE pret_idempr='".$destinataire->id_empr."' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id ";
$req = mysql_query($requete) or die($msg['err_sql'].'
'.$requete.'
'.mysql_error());
while ($expl = mysql_fetch_object($req)) {
$responsabilites = get_notice_authors(($expl->m_id+$expl->s_id)) ;
$as = array_search ("0", $responsabilites["responsabilites"]) ;
if ($as!== FALSE && $as!== NULL) {
$auteur_0 = $responsabilites["auteurs"][$as] ;
$auteur = new auteur($auteur_0["id"]);
$header_aut .= $auteur->isbd_entry;
} else {
$aut1_libelle=array();
$as = array_keys ($responsabilites["responsabilites"], "1" ) ;
for ($i = 0 ; $i < count($as) ; $i++) {
$indice = $as[$i] ;
$auteur_1 = $responsabilites["auteurs"][$indice] ;
$auteur = new auteur($auteur_1["id"]);
$aut1_libelle[]= $auteur->isbd_entry;
}
$header_aut .= implode (", ",$aut1_libelle) ;
}
$header_aut ? $auteur=" / ".$header_aut : $auteur="";
// récupération du titre de série
if ($expl->tparent_id && $expl->m_id) {
$parent = new serie($expl->tparent_id);
$tit_serie = $parent->name;
if($expl->tnvol) $tit_serie .= ', '.$expl->tnvol;
}
if($tit_serie) $expl->tit = $tit_serie.'. '.$expl->tit;
$res_final[]="".$expl->tit." (".$expl->tdoc_libelle.")";
$res_final[]="
".$msg['fpdf_date_pret']." ".$expl->aff_pret_date." ".$msg['fpdf_retour_prevu']." ".$expl->aff_pret_retour; $res_final[]=$expl->location_libelle.": ".$expl->section_libelle.": ".$expl->expl_cote." (".$expl->expl_cb.")"; } return implode("\n",$res_final); } // Liste des réservations en cours function m_liste_resas($destinataire) { global $dbh, $msg; $rqt = "select resa_idnotice, resa_idbulletin from resa where resa_idempr='".$destinataire->id_empr."' " ; $req = mysql_query($rqt) or die($msg['err_sql'].'
".$tmpmsg_res; $date_resa = " ".$msg['fpdf_reserv_enreg']." ".$resa->date_pose_resa."." ; $res_final[]=$msg['fpdf_rang']." ".($j+1).$date_resa.""; } } // fin for return implode("\n",$res_final); } /* fin not_bull_info_resa */