error_message="";
// empr ok
$info_expl->id_expl = $r['expl_id'];
$info_expl->cb_expl = $r['expl_cb'];
$info_expl->tdoc_libelle = $r['tdoc_libelle'];
$info_expl->expl_notice = $r['expl_notice'];
if ($info_expl->expl_notice) {
$notice = new mono_display($info_expl->expl_notice, 0);
$info_expl->libelle = $notice->header;
} else {
$bulletin = new bulletinage_display( $r['expl_bulletin']);
$info_expl->libelle = $bulletin->display ;
$info_expl->expl_notice = $r['expl_bulletin'];
}
$pos=strpos($info_expl->libelle,'libelle = substr($info_expl->libelle,0,strpos($info_expl->libelle,'error_message=$msg[367];
}
} else {
$info_expl->error_message=$msg[367];
}
return $info_expl;
}
function get_info_expl($cb_doc) {
global $dbh,$msg;
$requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, expl_cote, expl_location,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 expl_cb='".$cb_doc."' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id ";
$res = pmb_mysql_query($requete, $dbh) or die ("
".pmb_mysql_error());
$expl = pmb_mysql_fetch_object($res);
$responsabilites = get_notice_authors(($expl->m_id+$expl->s_id)) ;
$header_aut= gen_authors_header($responsabilites);
$header_aut ? $auteur=" / ".$header_aut : $auteur="";
$expl->header_aut=$header_aut;
// 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;
}
return $expl;
} /* fin get_info_expl */
?>