";
}elseif($depliable == 2){
$template="$simili_search_script_all
";
}else{
$template="
$case_a_cocher";
if ($icon) {
$info_bulle_icon=str_replace("!!niveau_biblio!!",$biblio_doc[$this->notice->niveau_biblio],$msg["info_bulle_icon"]);
$info_bulle_icon=str_replace("!!typdoc!!",$tdoc->table[$this->notice->typdoc],$info_bulle_icon);
$template.="

";
}
$template.="
!!heada!!".$this->notice_header_doclink;
if($opac_allow_simili_search){
$simili_search_script="";
$expl_voisin_search_script="";
}
}
$template.="!!CONTENU!!
!!SUITE!!
";
if($this->notice->niveau_biblio != "b"){
$this->permalink = "index.php?lvl=notice_display&id=".$this->notice_id;
}else {
$this->permalink = "index.php?lvl=bulletin_display&id=".$this->bulletin_id;
}
if($opac_show_social_network){
if($this->notice_header_without_html == ""){
$this->do_header_without_html();
}
$template_in.="
";
}
if($img_tag) $li_tags="
$img_tag";
if($basket || $img_tag || $opac_notice_enrichment){
$template_in.="
";
if ($basket) $template_in.="- $basket
";
if($opac_notice_enrichment){
if($what =='ISBD') $template_in.="- ".$msg['ISBD']."
";
else $template_in.="- ".$msg['Public']."
";
}
$template_in.="
$li_tags
";
}
if($what =='ISBD') $template_in.="
!!ISBD!!
!!PUBLIC!!
";
else $template_in.="
!!PUBLIC!!
!!ISBD!!
"
;
$template_in.="
";
if (($opac_avis_display_mode==1) && (($this->avis_allowed && $this->avis_allowed !=2)|| ($_SESSION["user_code"] && $this->avis_allowed ==2))) $this->affichage_avis_detail=$this->avis_detail();
// Serials : diff�rence avec les monographies on affiche [p�riodique] et [article] devant l'ISBD
if ($this->notice->niveau_biblio =='s') {
if(!$flag_no_get_bulletin){
if($this->get_bulletins()){
if ($lvl == "notice_display")$voir_bulletins="
".$msg["see_bull"]."";
else $voir_bulletins="
".$msg["see_bull"]."";
}
}
$template_in = str_replace('!!ISBD!!', "
[".$msg['isbd_type_perio']."]$voir_bulletins !!ISBD!!", $template_in);
$template_in = str_replace('!!PUBLIC!!', "
[".$msg['isbd_type_perio']."]$voir_bulletins !!PUBLIC!!", $template_in);
} elseif ($this->notice->niveau_biblio =='a') {
$template_in = str_replace('!!ISBD!!', "
[".$msg['isbd_type_art']."] !!ISBD!!", $template_in);
$template_in = str_replace('!!PUBLIC!!', "
[".$msg['isbd_type_art']."] !!PUBLIC!!", $template_in);
} elseif ($this->notice->niveau_biblio =='b') {
$template_in = str_replace('!!ISBD!!', "
[".$msg['isbd_type_bul']."] !!ISBD!!", $template_in);
$template_in = str_replace('!!PUBLIC!!', "
[".$msg['isbd_type_bul']."] !!PUBLIC!!", $template_in);
}
$template_in.=$this->get_serialcirc_form_actions();
$template_in = str_replace('!!ISBD!!', $this->notice_isbd, $template_in);
$template_in = str_replace('!!PUBLIC!!', $this->notice_public, $template_in);
$template_in = str_replace('!!id!!', $this->notice_id, $template_in);
$this->do_image($template_in,$depliable);
$this->result = str_replace('!!id!!', $this->notice_id, $template);
if($this->notice_header_doclink){
$this->result = str_replace('!!heada!!', $this->notice_header_without_doclink, $this->result);
}elseif($this->notice_header)
$this->result = str_replace('!!heada!!', $this->notice_header, $this->result);
else $this->result = str_replace('!!heada!!', '', $this->result);
$this->result = str_replace('!!CONTENU!!', $template_in, $this->result);
if($opac_allow_simili_search){
$this->affichage_simili_search_head="
".$expl_voisin_search_script."
".$simili_search_script;
}
if ($this->affichage_resa_expl || $this->notice_childs || $this->affichage_avis_detail || $this->affichage_simili_search_head) $this->result = str_replace('!!SUITE!!', $this->notice_childs.$this->affichage_resa_expl.$this->affichage_avis_detail.$this->affichage_simili_search_head, $this->result);
else $this->result = str_replace('!!SUITE!!', '', $this->result);
} // fin genere_simple($depliable=1, $what='ISBD')
function genere_ajax($aj_type_aff,$header_only_origine=0){
global $msg;
global $opac_url_base,$opac_notice_enrichment ;
global $icon_doc,$biblio_doc,$tdoc;
global $lvl; // pour savoir qui demande l'affichage
global $opac_notices_depliable;
global $opac_allow_simili_search;
if ($this->no_header) $icon="";
else $icon = $icon_doc[$this->notice->niveau_biblio.$this->notice->typdoc];
$param['id']=$this->notice_id;
$param['function_to_call']="aff_notice";
$param['aj_liens']=$this->liens;
$param['aj_cart']=$this->cart_allowed;
$param['aj_to_print']=$this->to_print;
$param['aj_header_only']=$header_only_origine;
$param['aj_no_header']=$this->no_header;
$param['aj_nodocnum']=($this->docnum_allowed ? 0:1);
$param['aj_type_aff']=$aj_type_aff;
$this->notice_affichage_cmd=serialize($param);
if($opac_notice_enrichment ){
$enrichment = new enrichment();
if($enrichment->active[$this->notice->niveau_biblio.$this->notice->typdoc]){
$source_enrichment = implode(",",$enrichment->active[$this->notice->niveau_biblio.$this->notice->typdoc]);
}else if ($enrichment->active[$this->notice->niveau_biblio]){
$source_enrichment = implode(",",$enrichment->active[$this->notice->niveau_biblio]);
}
}
if($this->notice->niveau_biblio != "b"){
$this->permalink = $opac_url_base."index.php?lvl=notice_display&id=".$this->notice_id;
}else{
$this->permalink = $opac_url_base."index.php?lvl=bulletin_display&id=".$this->bulletin_id;
}
if($opac_allow_simili_search) {
$script_simili_search="show_simili_search('".$this->notice_id."');";
$simili_search_script_all="
";
$script_expl_voisin_search="show_expl_voisin_search('".$this->notice_id."');";
}
if($opac_notices_depliable == 2){
$template="$simili_search_script_all
$case_a_cocher
";
if ($icon) {
$info_bulle_icon=str_replace("!!niveau_biblio!!",$biblio_doc[$this->notice->niveau_biblio],$msg["info_bulle_icon"]);
$info_bulle_icon=str_replace("!!typdoc!!",$tdoc->table[$this->notice->typdoc],$info_bulle_icon);
$template.="
";
}
$template.="
!!heada!!".$this->notice_header_doclink."
";
}else{
$template="$simili_search_script_all
$case_a_cocher
![\"".$msg["expandable_notice"]."\"](\"./getgif.php?nomgif=plus\")
";
if ($icon) {
$info_bulle_icon=str_replace("!!niveau_biblio!!",$biblio_doc[$this->notice->niveau_biblio],$msg["info_bulle_icon"]);
$info_bulle_icon=str_replace("!!typdoc!!",$tdoc->table[$this->notice->typdoc],$info_bulle_icon);
$template.="

";
}
$template.="
!!heada!!".$this->notice_header_doclink."
";
}
$template.="
permalink."\" style=\"display:none;\">Permalink
$simili_search_script_all
";
$template_in = str_replace('!!id!!', $this->notice_id, $template_in);
$this->do_image($template_in,$opac_notices_depliable);
$this->result = str_replace('!!id!!', $this->notice_id, $template);
if($this->notice_header_doclink){
$this->result = str_replace('!!heada!!', $this->notice_header_without_doclink, $this->result);
}elseif($this->notice_header)
$this->result = str_replace('!!heada!!', $this->notice_header, $this->result);
else $this->result = str_replace('!!heada!!', '', $this->result);
} // fin genere_ajax()
// g�n�ration de l'isbd----------------------------------------------------
function do_isbd($short=0,$ex=1) {
global $dbh;
global $msg;
global $tdoc;
global $charset;
global $opac_notice_affichage_class;
global $memo_notice;
$this->notice_isbd="";
if(!$this->notice_id) return;
// Notices parentes
$this->notice_isbd.=$this->parents;
// constitution de la mention de titre
if($this->notice->serie_name) {
$serie_temp .= inslink($this->notice->serie_name, str_replace("!!id!!", $this->notice->tparent_id, $this->lien_rech_serie));
if($this->notice->tnvol) $serie_temp .= ', '.$this->notice->tnvol;
}
if ($serie_temp) $this->notice_isbd .= $serie_temp.". ".$this->notice->tit1 ;
else $this->notice_isbd .= $this->notice->tit1;
if ($this->notice->tit3) $this->notice_isbd .= " = ".$this->notice->tit3 ;
if ($this->notice->tit4) $this->notice_isbd .= " : ".$this->notice->tit4 ;
if ($this->notice->tit2) $this->notice_isbd .= " ; ".$this->notice->tit2 ;
$this->notice_isbd .= ' ['.$tdoc->table[$this->notice->typdoc].']';
if ($this->auteurs_tous) $this->notice_isbd .= " / ".$this->auteurs_tous;
if ($this->congres_tous) $this->notice_isbd .= " / ".$this->congres_tous;
// mention d'�dition
if($this->notice->mention_edition) $this->notice_isbd .= " . - ".$this->notice->mention_edition;
// zone de collection et �diteur
if($this->notice->subcoll_id) {
$collection = new subcollection($this->notice->subcoll_id);
$editeurs .= inslink($collection->publisher_libelle, str_replace("!!id!!", $collection->publisher, $this->lien_rech_editeur));
$collections = inslink($collection->isbd_entry, str_replace("!!id!!", $this->notice->subcoll_id, $this->lien_rech_subcollection));
} elseif ($this->notice->coll_id) {
$collection = new collection($this->notice->coll_id);
$editeurs .= inslink($collection->publisher_libelle, str_replace("!!id!!", $collection->parent, $this->lien_rech_editeur));
$collections = inslink($collection->isbd_entry, str_replace("!!id!!", $this->notice->coll_id, $this->lien_rech_collection));
} elseif ($this->notice->ed1_id) {
$editeur = new publisher($this->notice->ed1_id);
$this->publishers[]=$editeur;
$editeurs .= inslink($editeur->isbd_entry, str_replace("!!id!!", $this->notice->ed1_id, $this->lien_rech_editeur));
}
if($this->notice->ed2_id) {
$editeur = new publisher($this->notice->ed2_id);
$this->publishers[]=$editeur;
$editeurs ? $editeurs .= ' : '.inslink($editeur->isbd_entry, str_replace("!!id!!", $this->notice->ed2_id, $this->lien_rech_editeur)) : $editeurs = inslink($editeur->isbd_entry, str_replace("!!id!!", $this->notice->ed2_id, $this->lien_rech_editeur));
}
if($this->notice->year) $editeurs ? $editeurs .= ', '.$this->notice->year : $editeurs = $this->notice->year;
elseif ($this->notice->niveau_biblio == 'm' && $this->notice->niveau_hierar == 0)
$editeurs ? $editeurs .= ', [s.d.]' : $editeurs = "[s.d.]";
if($editeurs) $this->notice_isbd .= " . - $editeurs";
// zone de la collation
if($this->notice->npages) $collation = $this->notice->npages;
if($this->notice->ill) $collation .= ' : '.$this->notice->ill;
if($this->notice->size) $collation .= ' ; '.$this->notice->size;
if($this->notice->accomp) $collation .= ' + '.$this->notice->accomp;
if($collation) $this->notice_isbd .= " . - $collation";
if($collections) {
if($this->notice->nocoll) $collections .= '; '.$this->notice->nocoll;
$this->notice_isbd .= ". - ($collections)".' ';
}
if(substr(trim($this->notice_isbd), -1) != "."){
$this->notice_isbd .= '.';
}
// ISBN ou NO. commercial
if($this->notice->code) {
if(isISBN($this->notice->code)) $zoneISBN = '
ISBN : ';
else $zoneISBN .= '
'.$msg["issn"].' : ';
$zoneISBN .= $this->notice->code;
}
if($this->notice->prix) {
if($this->notice->code) $zoneISBN .= ' : '.$this->notice->prix;
else {
if ($zoneISBN) $zoneISBN .= ' '.$this->notice->prix;
else $zoneISBN = $this->notice->prix;
}
}
if($zoneISBN) $this->notice_isbd .= "
".$zoneISBN;
// note g�n�rale
if($this->notice->n_gen) $zoneNote = nl2br(htmlentities($this->notice->n_gen,ENT_QUOTES, $charset));
if($zoneNote) $this->notice_isbd .= "
".$zoneNote;
// langues
if(count($this->langues)) {
$langues = "
${msg[537]} : ".$this->construit_liste_langues($this->langues);
}
if(count($this->languesorg)) {
$langues .= "
${msg[711]} : ".$this->construit_liste_langues($this->languesorg);
}
if ($langues) $this->notice_isbd .= "
".$langues ;
$this->notice_isbd.=$this->genere_in_perio();
if (!$short) {
$this->notice_isbd .="";
$this->notice_isbd .= $this->aff_suite() ;
$this->notice_isbd .="
";
}
//etat des collections
if ($this->notice->niveau_biblio=='s' && $this->notice->niveau_hierar==1) $this->notice_isbd.=$this->affichage_etat_collections();
//Notices li�es
// ajout�es en dehors de l'onglet PUBLIC ailleurs
if ($ex) $this->affichage_resa_expl = $this->aff_resa_expl() ;
} // fin do_isbd($short=0,$ex=1)
// g�n�ration de l'affichage public----------------------------------------
function do_public($short=0,$ex=1) {
global $dbh;
global $msg;
global $tdoc;
global $charset;
global $memo_notice;
global $opac_notice_affichage_class;
$this->notice_public= $this->genere_in_perio ();
if(!$this->notice_id) return;
// Notices parentes
$this->notice_public.=$this->parents;
$this->notice_public .= "";
// constitution de la mention de titre
if ($this->notice->serie_name) {
$this->notice_public.= "";
}
$this->notice_public .= "";
$this->notice_public .= "";
if ($this->notice->tit2) $this->notice_public .= "" ;
if ($this->notice->tit3) $this->notice_public .= "" ;
if ($tdoc->table[$this->notice->typdoc]) $this->notice_public .= "";
if ($this->auteurs_tous) $this->notice_public .= "";
if ($this->congres_tous) $this->notice_public .= "";
// mention d'�dition
if ($this->notice->mention_edition) $this->notice_public .= "";
// zone de l'�diteur
if ($this->notice->year)
$annee = "" ;
if ($this->notice->ed1_id) {
$editeur = new publisher($this->notice->ed1_id);
$this->publishers[]=$editeur;
$this->notice_public .= "" ;
if ($annee) {
$this->notice_public .= $annee ;
$annee = "" ;
}
}
// Autre editeur
if ($this->notice->ed2_id) {
$editeur_2 = new publisher($this->notice->ed2_id);
$this->publishers[]=$editeur;
$this->notice_public .= "" ;
}
// collection
if ($this->notice->nocoll) $affnocoll = " ".str_replace("!!nocoll!!", $this->notice->nocoll, $msg['subcollection_details_nocoll']) ;
else $affnocoll = "";
if($this->notice->subcoll_id) {
$subcollection = new subcollection($this->notice->subcoll_id);
$collection = new collection($this->notice->coll_id);
$this->collections[]=$collection;
$this->notice_public .= "" ;
$this->notice_public .= "";
} elseif ($this->notice->coll_id) {
$collection = new collection($this->notice->coll_id);
$this->collections[]=$collection;
$this->notice_public .= "";
}
// $annee est vide si ajout�e avec l'�diteur, donc si pas �diteur, on l'affiche ici
$this->notice_public .= $annee ;
// Titres uniformes
if($this->notice->tu_print_type_2) {
$this->notice_public.=
"";
}
// zone de la collation
if($this->notice->npages) {
if ($this->notice->niveau_biblio<>"a") {
$this->notice_public .= "";
} else {
$this->notice_public .= "";
}
}
if ($this->notice->ill) $this->notice_public .= "";
if ($this->notice->size) $this->notice_public .= "";
if ($this->notice->accomp) $this->notice_public .= "";
// ISBN ou NO. commercial
if ($this->notice->code) $this->notice_public .= "";
if ($this->notice->prix) $this->notice_public .= "";
// note g�n�rale
if ($this->notice->n_gen) $zoneNote = nl2br(htmlentities($this->notice->n_gen,ENT_QUOTES, $charset));
if ($zoneNote) $this->notice_public .= "";
// langues
if (count($this->langues)) {
$this->notice_public .= "";
} elseif (count($this->languesorg)) {
$this->notice_public .= "";
}
if (!$short) $this->notice_public .= $this->aff_suite() ;
else $this->notice_public.=$this->genere_in_perio();
$this->notice_public.="
".$msg['tparent_start']." | ".inslink($this->notice->serie_name, str_replace("!!id!!", $this->notice->tparent_id, $this->lien_rech_serie));;
if ($this->notice->tnvol) $this->notice_public .= ', '.$this->notice->tnvol;
$this->notice_public .=" |
".$msg['title']." : | ".$this->notice->tit1 ;
if ($this->notice->tit4) $this->notice_public .= " : ".$this->notice->tit4 ;
$this->notice_public.=" |
".$msg['other_title_t2']." : | ".$this->notice->tit2." |
".$msg['other_title_t3']." : | ".$this->notice->tit3." |
".$msg['typdocdisplay_start']." | ".$tdoc->table[$this->notice->typdoc]." |
".$msg['auteur_start']." | ".$this->auteurs_tous." |
".$msg['congres_aff_public_libelle']." | ".$this->congres_tous." |
".$msg['mention_edition_start']." | ".$this->notice->mention_edition." |
".$msg['year_start']." | ".$this->notice->year." |
".$msg['editeur_start']." | ".inslink($editeur->display, str_replace("!!id!!", $this->notice->ed1_id, $this->lien_rech_editeur))." |
".$msg['other_editor']." | ".inslink($editeur_2->display, str_replace("!!id!!", $this->notice->ed2_id, $this->lien_rech_editeur))." |
".$msg['coll_start']." | ".inslink($collection->name, str_replace("!!id!!", $this->notice->coll_id, $this->lien_rech_collection))." ".$collection->collection_web_link." |
".$msg['subcoll_start']." | ".inslink($subcollection->name, str_replace("!!id!!", $this->notice->subcoll_id, $this->lien_rech_subcollection)) ;
$this->notice_public .=$affnocoll." |
".$msg['coll_start']." | ".inslink($collection->isbd_entry, str_replace("!!id!!", $this->notice->coll_id, $this->lien_rech_collection)) ;
$this->notice_public .=$affnocoll." ".$collection->collection_web_link." |
".$msg['titre_uniforme_aff_public']." |
".$this->notice->tu_print_type_2." |
".$msg['npages_start']." | ".$this->notice->npages." |
".$msg['npages_start_perio']." | ".$this->notice->npages." |
".$msg['ill_start']." | ".$this->notice->ill." |
".$msg['size_start']." | ".$this->notice->size." |
".$msg['accomp_start']." | ".$this->notice->accomp." |
".$msg['code_start']." | ".$this->notice->code." |
".$msg['price_start']." | ".$this->notice->prix." |
".$msg['n_gen_start']." | ".$zoneNote." |
".$msg['537']." : | ".$this->construit_liste_langues($this->langues);
if (count($this->languesorg)) $this->notice_public .= " ".$msg['711']." : ".$this->construit_liste_langues($this->languesorg);
$this->notice_public.=" |
".$msg['711']." : | ".$this->construit_liste_langues($this->languesorg)." |
\n";
//etat des collections
if ($this->notice->niveau_biblio=='s' && $this->notice->niveau_hierar==1) $this->notice_public.=$this->affichage_etat_collections();
// exemplaires, r�sas et compagnie
if ($ex) $this->affichage_resa_expl = $this->aff_resa_expl() ;
return;
} // fin do_public($short=0,$ex=1)
// g�n�ration du header----------------------------------------------------
function do_header($id_tpl=0) {
global $opac_notice_reduit_format ;
global $opac_url_base, $msg, $charset;
global $memo_notice;
global $opac_visionneuse_allow;
global $opac_url_base;
global $charset;
$this->notice_header="";
if(!$this->notice_id) return;
$type_reduit = substr($opac_notice_reduit_format,0,1);
$notice_tpl_header="";
if ($type_reduit=="H" || $id_tpl){
if(!$id_tpl) $id_tpl=substr($opac_notice_reduit_format,2);
if($id_tpl){
$tpl = new notice_tpl_gen($id_tpl);
$notice_tpl_header=$tpl->build_notice($this->notice_id);
if($notice_tpl_header){
$this->notice_header=$notice_tpl_header;
return;
}
}
}
if ($type_reduit=="E" || $type_reduit=="P" ) {
// peut-�tre veut-on des personnalis�s ?
$perso_voulus_temp = substr($opac_notice_reduit_format,2) ;
if ($perso_voulus_temp!="") $perso_voulus = explode(",",$perso_voulus_temp);
}
if ($type_reduit=="E") {
// zone de l'�diteur
if ($this->notice->ed1_id) {
$editeur = new publisher($this->notice->ed1_id);
$editeur_reduit = $editeur->display ;
if ($this->notice->year) $editeur_reduit .= " (".$this->notice->year.")";
} elseif ($this->notice->year) {
// ann�e mais pas d'�diteur et si pas un article
if($this->notice->niveau_biblio != 'a' && $this->notice->niveau_hierar != 2) $editeur_reduit = $this->notice->year." ";
}
} else $editeur_reduit = "" ;
//Champs personalis�s � ajouter au r�duit
if (!$this->p_perso->no_special_fields) {
if (count($perso_voulus)) {
$this->p_perso->get_values($this->notice_id) ;
for ($i=0; $i
p_perso->get_formatted_output($this->p_perso->values[$perso_voulus[$i]],$perso_voulus[$i])." " ;
}
$perso_voulu_aff=trim($perso_voulu_aff);
} else $perso_voulu_aff = "" ;
} else $perso_voulu_aff = "" ;
//Si c'est un depouillement, ajout du titre et bulletin
if($this->notice->niveau_biblio == 'a' && $this->notice->niveau_hierar == 2 && $this->parent_title) {
$aff_perio_title="".$msg[in_serial]." ".$this->parent_title.", ".$this->parent_numero." (".($this->parent_date?$this->parent_date:"[".$this->parent_aff_date_date."]").")";
}
//Si c'est une notice de bulletin ajout du titre et bulletin
if($this->notice->niveau_biblio == 'b' && $this->notice->niveau_hierar == 2) {
$aff_bullperio_title = " ".($this->parent_date?sprintf($msg["bul_titre_perio"],$this->parent_title):sprintf($msg["bul_titre_perio"],$this->parent_title.", ".$this->parent_numero." [".$this->parent_aff_date_date."]"))."";
} else $aff_bullperio_title="";
// r�cup�ration du titre de s�rie
// constitution de la mention de titre
if($this->notice->serie_name) {
$this->notice_header = $this->notice->serie_name;
if($this->notice->tnvol) $this->notice_header .= ', '.$this->notice->tnvol;
} elseif ($this->notice->tnvol) $this->notice_header .= $this->notice->tnvol;
if ($this->notice_header) $this->notice_header .= ". ".$this->notice->tit1 ;
else $this->notice_header = $this->notice->tit1;
if ($type_reduit=='4') {
if ($this->notice->tit3 != "") $this->notice_header .= " = ".$this->notice->tit3;
}
$this->notice_header .= $aff_bullperio_title;
if ($this->notice->niveau_biblio =='m') {
switch($type_reduit) {
case '1':
if ($this->notice->year != '') $this->notice_header.=' ('.htmlentities($this->notice->year,ENT_QUOTES,$charset).')';
break;
case '2':
if ($this->notice->year != '' && $this->notice->niveau_biblio!='b') $this->notice_header.=' ('.htmlentities($this->notice->year, ENT_QUOTES, $charset).')';
if ($this->notice->code != '') $this->notice_header.=' / '.htmlentities($this->notice->code, ENT_QUOTES, $charset);
break;
default:
break;
}
}
//$this->notice_header_without_html = $this->notice_header;
$this->notice_header = "";
//on ne propose � Zotero que les monos et les articles...
if($this->notice->niveau_biblio == "m" ||($this->notice->niveau_biblio == "a" && $this->notice->niveau_hierar == 2)) {
$this->notice_header =str_replace("!!zoteroNotice!!"," notice='".$this->notice_id."' ",$this->notice_header);
}else $this->notice_header =str_replace("!!zoteroNotice!!","",$this->notice_header);
$this->notice_header = 'statut_notice)?'title="'.htmlentities($this->statut_notice,ENT_QUOTES,$charset).'"':'').'>'.$this->notice_header;
$notice_header_suite = "";
if ($type_reduit=="T" && $this->notice->tit4) $notice_header_suite = " : ".$this->notice->tit4;
if ($type_reduit!='3' && $this->auteurs_principaux) $notice_header_suite .= " / ".$this->auteurs_principaux;
if ($editeur_reduit) $notice_header_suite .= " / ".$editeur_reduit ;
if ($perso_voulu_aff) $notice_header_suite .= " / ".$perso_voulu_aff ;
if ($aff_perio_title) $notice_header_suite .= " ".$aff_perio_title;
//$this->notice_header_without_html .= $notice_header_suite ;
//$this->notice_header .= $notice_header_suite."";
//Un span de trop ?
$this->notice_header .= $notice_header_suite;
//$this->notice_header.=" notice->notice_id."\" style=\"visibility:hidden\">
";
$this->notice_header_doclink="";
if ($this->notice->lien) {
if(!$this->notice->eformat) $info_bulle=$msg["open_link_url_notice"];
else $info_bulle=$this->notice->eformat;
// ajout du lien pour les ressources �lectroniques
$this->notice_header_doclink .= " notice->lien."\" target=\"__LINK__\">";
$this->notice_header_doclink .= "
notice_header_doclink .= " alt=\"";
$this->notice_header_doclink .= $info_bulle;
$this->notice_header_doclink .= "\" title=\"";
$this->notice_header_doclink .= $info_bulle;
$this->notice_header_doclink .= "\" />";
$this->notice_header_doclink .= "";
}
if ($this->notice->niveau_biblio == 'b') {
$sql_explnum = "SELECT explnum_id, explnum_nom, explnum_nomfichier, explnum_url FROM explnum, bulletins WHERE bulletins.num_notice = ".$this->notice_id." AND bulletins.bulletin_id = explnum.explnum_bulletin order by explnum_id";
} else {
$sql_explnum = "SELECT explnum_id, explnum_nom, explnum_nomfichier,explnum_url FROM explnum WHERE explnum_notice = ".$this->notice_id." order by explnum_id";
}
$explnums = mysql_query($sql_explnum);
$explnumscount = mysql_num_rows($explnums);
if ( (is_null($this->dom_2) && $this->visu_explnum && (!$this->visu_explnum_abon || ($this->visu_explnum_abon && $_SESSION["user_code"]))) || ($this->rights & 16) ) {
if ($explnumscount == 1) {
$explnumrow = mysql_fetch_object($explnums);
if ($explnumrow->explnum_nomfichier){
if($explnumrow->explnum_nom == $explnumrow->explnum_nomfichier) $info_bulle=$msg["open_doc_num_notice"].$explnumrow->explnum_nomfichier;
else $info_bulle=$explnumrow->explnum_nom;
}elseif ($explnumrow->explnum_url){
if($explnumrow->explnum_nom == $explnumrow->explnum_url) $info_bulle=$msg["open_link_url_notice"].$explnumrow->explnum_url;
else $info_bulle=$explnumrow->explnum_nom;
}
$this->notice_header_doclink .= " ";
if ($opac_visionneuse_allow && $this->docnum_allowed){
$this->notice_header_doclink .="
explnum_id.");return false;\" alt='$alt' title='$alt'>";
}else{
$this->notice_header_doclink .= "explnum_id."\" target=\"__LINK__\">";
}
$this->notice_header_doclink .= "
notice_header_doclink .= " alt=\"";
$this->notice_header_doclink .= htmlentities($info_bulle,ENT_QUOTES,$charset);
$this->notice_header_doclink .= "\" title=\"";
$this->notice_header_doclink .= htmlentities($info_bulle,ENT_QUOTES,$charset);
$this->notice_header_doclink .= "\">";
$this->notice_header_doclink .= "";
} elseif ($explnumscount > 1) {
$explnumrow = mysql_fetch_object($explnums);
$info_bulle=$msg["info_docs_num_notice"];
$this->notice_header_doclink .= "
";
}
}
//coins pour Zotero
$coins_span=$this->gen_coins_span();
$this->notice_header.=$coins_span;
$this->notice_header_without_doclink=$this->notice_header;
$this->notice_header.=$this->notice_header_doclink;
$memo_notice[$this->notice_id]["header_without_doclink"]=$this->notice_header_without_doclink;
$memo_notice[$this->notice_id]["header_doclink"]= $this->notice_header_doclink;
$memo_notice[$this->notice_id]["header"]=$this->notice_header;
$memo_notice[$this->notice_id]["niveau_biblio"] = $this->notice->niveau_biblio;
$this->notice_header_with_link=inslink($this->notice_header, str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice)) ;
} // fin do_header()
// g�n�ration du header_without_html----------------------------------------------------
function do_header_without_html($id_tpl=0) {
global $opac_notice_reduit_format,$charset ;
global $msg ;
$this->notice_header_without_html="";
if(!$this->notice_id) return;
$type_reduit = substr($opac_notice_reduit_format,0,1);
$notice_tpl_header="";
if ($type_reduit=="E" || $type_reduit=="P" ) {
// peut-�tre veut-on des personnalis�s ?
$perso_voulus_temp = substr($opac_notice_reduit_format,2) ;
if ($perso_voulus_temp!="") $perso_voulus = explode(",",$perso_voulus_temp);
}
if ($type_reduit=="E") {
// zone de l'�diteur
if ($this->notice->ed1_id) {
$editeur = new publisher($this->notice->ed1_id);
$editeur_reduit = $editeur->display ;
if ($this->notice->year) $editeur_reduit .= " - ".$this->notice->year." ";
} elseif ($this->notice->year) {
// ann�e mais pas d'�diteur et si pas un article
if($this->notice->niveau_biblio != 'a' && $this->notice->niveau_hierar != 2) $editeur_reduit = $this->notice->year." ";
}
} else $editeur_reduit = "" ;
//Champs personalis�s � ajouter au r�duit
if (!$this->p_perso->no_special_fields) {
if (count($perso_voulus)) {
$this->p_perso->get_values($this->notice_id) ;
for ($i=0; $ip_perso->get_formatted_output($this->p_perso->values[$perso_voulus[$i]],$perso_voulus[$i])." " ;
}
} else $perso_voulu_aff = "" ;
} else $perso_voulu_aff = "" ;
//Si c'est un depouillement, ajout du titre et bulletin
if($this->notice->niveau_biblio == 'a' && $this->notice->niveau_hierar == 2 && $this->parent_title) {
$aff_perio_title="".$msg[in_serial]." ".$this->parent_title.", ".$this->parent_numero." (".($this->parent_date?$this->parent_date:"[".$this->parent_aff_date_date."]").")";
}
//Si c'est une notice de bulletin ajout du titre et bulletin
if($this->notice->niveau_biblio == 'b' && $this->notice->niveau_hierar == 2) {
$aff_bullperio_title = " ".($this->parent_date?sprintf($msg["bul_titre_perio"],$this->parent_title):sprintf($msg["bul_titre_perio"],$this->parent_title.", ".$this->parent_numero." [".$this->parent_aff_date_date."]"))."";
} else $aff_bullperio_title="";
// r�cup�ration du titre de s�rie
// constitution de la mention de titre
if($this->notice->serie_name) {
$this->notice_header_without_html = $this->notice->serie_name;
if($this->notice->tnvol) $this->notice_header_without_html .= ', '.$this->notice->tnvol;
} elseif ($this->notice->tnvol) $this->notice_header_without_html .= $this->notice->tnvol;
if ($this->notice_header_without_html) $this->notice_header_without_html .= ". ".$this->notice->tit1 ;
else $this->notice_header_without_html = $this->notice->tit1;
$this->notice_header_without_html .= $aff_bullperio_title;
if ($this->notice->niveau_biblio =='m') {
switch($type_reduit) {
case '1':
if ($this->notice->year != '') $this->notice_header_without_html.=' ('.htmlentities($this->notice->year,ENT_QUOTES,$charset).')';
break;
case '2':
if ($this->notice->year != '' && $this->notice->niveau_biblio!='b') $this->notice_header_without_html.=' ('.htmlentities($this->notice->year, ENT_QUOTES, $charset).')';
if ($this->notice->code != '') $this->notice_header_without_html.=' / '.htmlentities($this->notice->code, ENT_QUOTES, $charset);
break;
default:
break;
}
}
} // fin do_header_without_html()
// Construction des parents-----------------------------------------------------
function do_parents() {
global $dbh;
global $msg;
global $charset;
global $memo_notice;
global $opac_notice_affichage_class;
global $relation_listup, $parents_to_childs ;
// Pour ne pas afficher en parents les liens transf�rer dans les childs
if (sizeof($parents_to_childs)>0) $clause = " AND relation_type not in ('".implode("','", $parents_to_childs)."') ";
// gestion des droits d'affichage des parents
if (is_null($this->dom_2)) {
$acces_j='';
$statut_j=',notice_statut';
$statut_r="and statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)".($_SESSION["user_code"]?" or (notice_visible_opac_abon=1 and notice_visible_opac=1)":"").")";
} else {
$acces_j = $this->dom_2->getJoin($_SESSION['id_empr_session'],4,'notice_id');
$statut_j = "";
$statut_r = "";
}
//Recherche des notices parentes
$requete="select linked_notice, relation_type, rank from notices_relations join notices on notice_id=linked_notice $acces_j $statut_j
where num_notice=".$this->notice_id." $clause $statut_r
order by relation_type,rank";
$result_linked=mysql_query($requete,$dbh);
//Si il y en a, on pr�pare l'affichage
if (!mysql_num_rows($result_linked)) {
$this->parents = "";
return ;
}
$this->parents = "";
if (!$relation_listup) $relation_listup=new marc_list("relationtypeup");
$r_type=array();
$ul_opened=false;
//Pour toutes les notices li�es
while (($r_rel=mysql_fetch_object($result_linked))) {
if ($opac_notice_affichage_class) $notice_affichage=$opac_notice_affichage_class; else $notice_affichage="notice_affichage";
// if($memo_notice[$r_rel->linked_notice]["header"]) {
// $parent_notice->notice_header=$memo_notice[$r_rel->linked_notice]["header"];
// } else {
// $parent_notice=new $notice_affichage($r_rel->linked_notice,$this->liens,1,$this->to_print,1);
// $parent_notice->visu_expl = 0 ;
// $parent_notice->visu_explnum = 0 ;
// $parent_notice->do_header();
// }
if(!$memo_notice[$r_rel->linked_notice]["header_without_doclink"]) {
$parent_notice=new $notice_affichage($r_rel->linked_notice,$this->liens,1,$this->to_print,1);
$parent_notice->visu_expl = 0 ;
$parent_notice->visu_explnum = 0 ;
$parent_notice->do_header();
}
//Pr�sentation diff�rente si il y en a un ou plusieurs
if (mysql_num_rows($result_linked)==1) {
// si une seule, peut-�tre est-ce une notice de bulletin, aller cherche $this>bulletin_id
$this->parents.="
".$relation_listup->table[$r_rel->relation_type]." ";
if ($this->lien_rech_notice) $this->parents.="";
//$this->parents.=$parent_notice->notice_header;
$this->parents.=$memo_notice[$r_rel->linked_notice]["header_without_doclink"];
if ($this->lien_rech_notice) $this->parents.="";
$this->parents.="
";
// si une seule, peut-�tre est-ce une notice de bulletin, aller cherche $this->bulletin_id
$rqbull="select bulletin_id from bulletins where num_notice=".$this->notice_id;
$rqbullr=mysql_query($rqbull);
$rqbulld=@mysql_fetch_object($rqbullr);
$this->bulletin_id=$rqbulld->bulletin_id;
} else {
if (!$r_type[$r_rel->relation_type]) {
$r_type[$r_rel->relation_type]=1;
if ($ul_opened) $this->parents.="";
else {
$this->parents.="
";
$ul_opened=true;
}
$this->parents.="".$relation_listup->table[$r_rel->relation_type]."";
$this->parents.="\n";
return ;
} // fin do_parents()
// Construction des mots cl�----------------------------------------------------
function do_mots_cle() {
global $pmb_keyword_sep ;
if (!$pmb_keyword_sep) $pmb_keyword_sep=" ";
if (!trim($this->notice->index_l)) return "";
$tableau_mots = explode ($pmb_keyword_sep,trim($this->notice->index_l)) ;
if (!sizeof($tableau_mots)) return "";
for ($i=0; $ilien_rech_motcle)) ;
}
if(ord($pmb_keyword_sep)==0xa || ord($pmb_keyword_sep)==0xd) $mots_cles = implode("
", $tableau_mots);
else $mots_cles = implode(" ", $tableau_mots);
return $mots_cles ;
}
// r�cup�ration des info de bulletinage (si applicable)
function get_bul_info() {
global $dbh;
global $msg;
if ($this->notice->niveau_biblio == 'a') {
// r�cup�ration des donn�es du bulletin et de la notice apparent�e
$requete = "SELECT b.tit1,b.notice_id,a.*,c.*, date_format(date_date, '".$msg["format_date"]."') as aff_date_date ";
$requete .= "from analysis a, notices b, bulletins c";
$requete .= " WHERE a.analysis_notice=".$this->notice_id;
$requete .= " AND c.bulletin_id=a.analysis_bulletin";
$requete .= " AND c.bulletin_notice=b.notice_id";
$requete .= " LIMIT 1";
} elseif ($this->notice->niveau_biblio == 'b') {
// r�cup�ration des donn�es du bulletin et de la notice apparent�e
$requete = "SELECT tit1,notice_id,b.*, date_format(date_date, '".$msg["format_date"]."') as aff_date_date ";
$requete .= "from bulletins b, notices";
$requete .= " WHERE num_notice=$this->notice_id ";
$requete .= " AND bulletin_notice=notice_id ";
$requete .= " LIMIT 1";
}
$myQuery = mysql_query($requete, $dbh);
if (mysql_num_rows($myQuery)) {
$parent = mysql_fetch_object($myQuery);
$this->parent_title = $parent->tit1;
$this->parent_id = $parent->notice_id;
$this->bulletin_id = $parent->bulletin_id;
$this->parent_numero = $parent->bulletin_numero;
$this->parent_date = $parent->mention_date;
$this->parent_date_date = $parent->date_date;
$this->parent_aff_date_date = $parent->aff_date_date;
}
} // fin get_bul_info()
// fonction de g�n�ration de ,la mention in titre du p�rio + num�ro
function genere_in_perio () {
global $charset ;
// serials : si article
if($this->notice->niveau_biblio == 'a' && $this->notice->niveau_hierar == 2) {
$bulletin = $this->parent_title;
$notice_mere = inslink("".$this->parent_title."", str_replace("!!id!!", $this->parent_id, $this->lien_rech_perio));
if($this->parent_numero) $numero = $this->parent_numero." " ;
// affichage de la mention de date utile : mention_date si existe, sinon date_date
if ($this->parent_date) $date_affichee = " (".$this->parent_date.")";
elseif ($this->parent_date_date) $date_affichee .= " [".formatdate($this->parent_date_date)."]";
else $date_affichee="" ;
$bulletin = inslink("".$numero.$date_affichee."", str_replace("!!id!!", $this->bulletin_id, $this->lien_rech_bulletin));
$this->bulletin_numero=$numero;
$this->bulletin_date=$date_affichee;
$mention_parent = "in $notice_mere > $bulletin ";
$retour .= "
$mention_parent";
$pagination = htmlentities($this->notice->npages,ENT_QUOTES, $charset);
if ($pagination) $retour .= ". - $pagination";
}
return $retour ;
} // fin genere_in_perio ()
// fonction d'affichage des exemplaires, r�sa et expl_num
function aff_resa_expl() {
global $opac_resa ;
global $opac_max_resa ;
global $opac_show_exemplaires ;
global $msg;
global $dbh;
global $popup_resa ;
global $opac_resa_popup ; // la r�sa se fait-elle par popup ?
global $opac_resa_planning; // la r�sa est elle planifi�e
global $allow_book;
global $opac_show_exemplaires_analysis;
// afin d'�viter de recalculer un truc d�j� calcul�...
if ($this->affichage_resa_expl_flag) return $this->affichage_resa_expl ;
if ( (is_null($this->dom_2) && $opac_show_exemplaires && $this->visu_expl && (!$this->visu_expl_abon || ($this->visu_expl_abon && $_SESSION["user_code"]))) || ($this->rights & 8) ) {
if (!$opac_resa_planning) {
if($this->bulletin_id) $resa_check=check_statut(0,$this->bulletin_id) ;
else $resa_check=check_statut($this->notice_id,0) ;
// v�rification si exemplaire r�servable
if ($resa_check) {
// d�plac� dans le IF, si pas visible : pas de bouton r�sa
if ($this->bulletin_id) $requete_resa = "SELECT count(1) FROM resa WHERE resa_idbulletin='$this->bulletin_id' ";
else $requete_resa = "SELECT count(1) FROM resa WHERE resa_idnotice='$this->notice_id' ";
$nb_resa_encours = mysql_result(mysql_query($requete_resa,$dbh), 0, 0) ;
if ($nb_resa_encours) $message_nbresa = str_replace("!!nbresa!!", $nb_resa_encours, $msg["resa_nb_deja_resa"]) ;
if (($this->notice->niveau_biblio=="m" || $this->notice->niveau_biblio=="b" || ($this->notice->niveau_biblio=="a" && $opac_show_exemplaires_analysis)) && ($_SESSION["user_code"] && $allow_book) && $opac_resa && !$popup_resa) {
$ret .= "".$msg["bulletin_display_resa"]."
";
if ($opac_max_resa==0 || $opac_max_resa>$nb_resa_encours) {
if ($opac_resa_popup) $ret .= "notice_id."&id_bulletin=".$this->bulletin_id."&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">".$msg["bulletin_display_place_resa"]."" ;
else $ret .= "".$msg["bulletin_display_place_resa"]."" ;
$ret .= $message_nbresa ;
} else $ret .= str_replace("!!nb_max_resa!!", $opac_max_resa, $msg["resa_nb_max_resa"]) ;
$ret.= "
";
} elseif ( ($this->notice->niveau_biblio=="m" || $this->notice->niveau_biblio=="b" || ($this->notice->niveau_biblio=="a" && $opac_show_exemplaires_analysis)) && !($_SESSION["user_code"]) && $opac_resa && !$popup_resa) {
// utilisateur pas connect�
// pr�paration lien r�servation sans �tre connect�
$ret .= "".$msg["bulletin_display_resa"]."
";
if ($opac_resa_popup) $ret .= "notice_id."&id_bulletin=".$this->bulletin_id."&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">".$msg["bulletin_display_place_resa"]."" ;
else $ret .= "".$msg["bulletin_display_place_resa"]."" ;
$ret .= $message_nbresa ;
$ret .= "
";
}
} // fin if resa_check
$temp = $this->expl_list($this->notice->niveau_biblio,$this->notice->notice_id, $this->bulletin_id);
$ret .= $temp ;
$this->affichage_expl = $temp ;
} else {
// planning de r�servations
$nb_resa_encours = resa_planning::countResa($this->notice_id);
if ($nb_resa_encours) $message_nbresa = str_replace("!!nbresa!!", $nb_resa_encours, $msg["resa_nb_deja_resa"]) ;
if (($this->notice->niveau_biblio=="m") && ($_SESSION["user_code"] && $allow_book) && $opac_resa && !$popup_resa) {
$ret .= "".$msg["bulletin_display_resa"]."
";
if ($opac_max_resa==0 || $opac_max_resa>$nb_resa_encours) {
if ($opac_resa_popup) $ret .= "notice_id."&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;\" id=\"bt_resa\">".$msg["bulletin_display_place_resa"]."" ;
else $ret .= "".$msg["bulletin_display_place_resa"]."" ;
$ret .= $message_nbresa ;
} else $ret .= str_replace("!!nb_max_resa!!", $opac_max_resa, $msg["resa_nb_max_resa"]) ;
$ret.= "
";
} elseif ( ($this->notice->niveau_biblio=="m") && !($_SESSION["user_code"]) && $opac_resa && !$popup_resa) {
// utilisateur pas connect�
// pr�paration lien r�servation sans �tre connect�
$ret .= "".$msg["bulletin_display_resa"]."
";
if ($opac_resa_popup) $ret .= "notice_id."&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;\" id=\"bt_resa\">".$msg["bulletin_display_place_resa"]."" ;
else $ret .= "".$msg["bulletin_display_place_resa"]."" ;
$ret .= $message_nbresa ;
$ret .= "
";
}
$temp = $this->expl_list($this->notice->niveau_biblio,$this->notice->notice_id, $this->bulletin_id);
$ret .= $temp ;
$this->affichage_expl = $temp ;
}
}
//affichage exemplaires numeriques
if($this->docnum_allowed) $ret.= $this->aff_explnum();
if (($autres_lectures = $this->autres_lectures($this->notice_id,$this->bulletin_id))) {
$ret .= $autres_lectures;
}
$this->affichage_resa_expl = $ret ;
$this->affichage_resa_expl_flag = 1 ;
return $ret ;
}
// fonction d'affichage des exemplaires numeriques
function aff_explnum () {
global $opac_show_links_invisible_docnums;
global $msg;
$ret='';
if ($opac_show_links_invisible_docnums || (is_null($this->dom_2) && $this->visu_explnum && (!$this->visu_explnum_abon || ($this->visu_explnum_abon && $_SESSION["user_code"]))) || ($this->rights & 16)){
if ($this->notice->niveau_biblio=="b" && ($explnum = show_explnum_per_notice(0, $this->bulletin_id, ''))) {
$ret .= "$msg[explnum]
".$explnum;
$this->affichage_expl .= "$msg[explnum]
".$explnum;
} elseif (($explnum = show_explnum_per_notice($this->notice_id,0, ''))) {
$ret .= "$msg[explnum]
".$explnum;
$this->affichage_expl .= "$msg[explnum]
".$explnum;
}
}
return $ret;
} // fin aff_explnum ()
// fonction d'affichage de la suite ISBD ou PUBLIC : partie commune, pour �viter la redondance de calcul
function aff_suite() {
global $msg;
global $charset;
global $opac_allow_tags_search, $opac_permalink, $opac_url_base;
// afin d'�viter de recalculer un truc d�j� calcul�...
if ($this->affichage_suite_flag) return $this->affichage_suite ;
//Espace
//$ret.=" ";
// toutes indexations
$ret_index = "";
// Cat�gories
if ($this->categories_toutes) $ret_index .= "".$msg['categories_start']."".$this->categories_toutes."";
// Affectation du libell� mots cl�s ou tags en fonction de la recherche pr�c�dente
if($opac_allow_tags_search == 1) $libelle_key = $msg['tags'];
else $libelle_key = $msg['motscle_start'];
// indexation libre
$mots_cles = $this->do_mots_cle() ;
if($mots_cles) $ret_index.= "".$libelle_key."".nl2br($mots_cles)."";
// indexation interne
if($this->notice->indexint) {
$indexint = new indexint($this->notice->indexint);
$ret_index.= "".$msg['indexint_start']."".inslink($indexint->name, str_replace("!!id!!", $this->notice->indexint, $this->lien_rech_indexint))." ".nl2br(htmlentities($indexint->comment,ENT_QUOTES, $charset))."" ;
}
if ($ret_index) {
$ret.=$ret_index;
//$ret.=" ";
}
// r�sum�
if($this->notice->n_resume) $ret .= "".$msg['n_resume_start']."".nl2br($this->notice->n_resume)."";
// note de contenu
if($this->notice->n_contenu) $ret .= "".$msg['n_contenu_start']."".nl2br(htmlentities($this->notice->n_contenu,ENT_QUOTES, $charset))."";
//Champs personalis�s
$perso_aff = "" ;
if (!$this->p_perso->no_special_fields) {
// $this->memo_perso_ permet au affichages personalis�s dans notice_affichage_ex de gagner du temps
if(!$this->memo_perso_) $this->memo_perso_=$this->p_perso->show_fields($this->notice_id);
for ($i=0; $imemo_perso_["FIELDS"]); $i++) {
$p=$this->memo_perso_["FIELDS"][$i];
if ($p['OPAC_SHOW'] && $p["AFF"]) $perso_aff .="".strip_tags($p["TITRE"])."".$p["AFF"]."";
}
}
$ret .= $perso_aff ;
if ($this->notice->lien) {
//$ret.=" ";
$ret.="".$msg["lien_start"]."" ;
if (substr($this->notice->eformat,0,3)=='RSS') {
$ret .= affiche_rss($this->notice->notice_id) ;
} else {
if (strlen($this->notice->lien)>80) {
$ret.="notice->lien."\" target=\"top\" class='lien856'>".htmlentities(substr($this->notice->lien, 0, 80),ENT_QUOTES,$charset)." [...]";
} else {
$ret.="notice->lien."\" target=\"top\" class='lien856'>".htmlentities($this->notice->lien,ENT_QUOTES,$charset)."";
}
//$ret.="";
}
$ret.="";
if ($this->notice->eformat && substr($this->notice->eformat,0,3)!='RSS') $ret.="".$msg["eformat_start"]."".htmlentities($this->notice->eformat,ENT_QUOTES,$charset)."";
}
// Permalink avec Id
if ($opac_permalink) {
if($this->notice->niveau_biblio != "b"){
$ret.= "".$msg["notice_permalink"]."".substr($opac_url_base."index.php?lvl=notice_display&id=".$this->notice_id,0,80)."";
}else {
$ret.= "".$msg["notice_permalink"]."".substr($opac_url_base."index.php?lvl=bulletin_display&id=".$this->bulletin_id,0,80)."";
}
}
$this->affichage_suite = $ret ;
$this->affichage_suite_flag = 1 ;
return $ret;
} // fin aff_suite()
function gen_coins_span(){
// Attention!! Fait pour Zotero qui ne traite pas toute la norme ocoins
global $charset,$opac_url_base;
if($charset!="UTF-8") $f="utf8_encode";
// http://generator.ocoins.info/?sitePage=info/book.html&
// http://ocoins.info/cobg.html
$coins_span="notice->tit1));
$coins_span.="&rft.title=".rawurlencode($f($this->notice->tit1));
if($this->notice->code) $coins_span.="&rft.isbn=".rawurlencode($f($this->notice->code));
if($this->notice->npages) $coins_span.="&rft.tpages=".rawurlencode($f($this->notice->npages));
if($this->notice->year) $coins_span.="&rft.date=".rawurlencode($f($this->notice->year));
break;
case 'sa':// periodique
/*
$coins_span.="book";
$coins_span.="&rft.genre=book";
$coins_span.="&rft.btitle=".rawurlencode($f($this->notice->tit1));
$coins_span.="&rft.title=".rawurlencode($f($this->notice->tit1));
if($this->notice->code) $coins_span.="&rft.issn=".rawurlencode($f($this->notice->code));
if($this->notice->npages) $coins_span.="&rft.epage=".rawurlencode($f($this->notice->npages));
if($this->notice->year) $coins_span.="&rft.date=".rawurlencode($f($this->notice->year));
*/
break;
case 'aa': // article
$coins_span.="journal";
$coins_span.="&rft.genre=article";
$coins_span.="&rft.atitle=".rawurlencode($f($this->notice->tit1));
$coins_span.="&rft.jtitle=".rawurlencode($f($this->parent_title));
if($this->bulletin_numero) $coins_span.="&rft.volume=".rawurlencode($f($this->bulletin_numero));
if($this->bulletin_date) $coins_span.="&rft.date=".rawurlencode($f($this->bulletin_date));
if($this->notice->code) $coins_span.="&rft.issn=".rawurlencode($f($this->notice->code));
if($this->notice->npages) $coins_span.="&rft.epage=".rawurlencode($f($this->notice->npages));
break;
case 'ba': //Bulletin
/*
$coins_span.="book";
$coins_span.="&rft.genre=issue"; // issue
$coins_span.="&rft.btitle=".rawurlencode($f($this->notice->tit1." / ".$this->parent_title));
if($this->notice->code) $coins_span.="&rft.isbn=".rawurlencode($f($this->notice->code));
if($this->notice->npages) $coins_span.="&rft.epage=".rawurlencode($f($this->notice->npages));
if($this->bulletin_date) $coins_span.="&rft.date=".rawurlencode($f($this->bulletin_date));
*/
break;
default:
$coins_span.="book";
$coins_span.="&rft.genre=book";
$coins_span.="&rft.btitle=".rawurlencode($f($this->notice->tit1));
$coins_span.="&rft.title=".rawurlencode($f($this->notice->tit1));
if($this->notice->code) $coins_span.="&rft.isbn=".rawurlencode($f($this->notice->code));
if($this->notice->npages) $coins_span.="&rft.tpages=".rawurlencode($f($this->notice->npages));
if($this->notice->year) $coins_span.="&rft.date=".rawurlencode($f($this->notice->year));
break;
}
if($this->notice->niveau_biblio != "b"){
$coins_span.="&rft_id=".rawurlencode($f($opac_url_base."index.php?lvl=notice_display&id=".$this->notice_id));
}else {
$coins_span.="&rft_id=".rawurlencode($f($opac_url_base."index.php?lvl=bulletin_display&id=".$this->bulletin_id));
}
if($this->notice->serie_name) $coins_span.="&rft.series=".rawurlencode($f($this->notice->series));
if (is_array($this->publishers) && count($this->publishers)) {
foreach($this->publishers as $publisher){
$coins_span.="&rft.pub=".rawurlencode($f($publisher->name));
if($publisher->ville)$coins_span.="&rft.place=".rawurlencode($f($publisher->ville));
}
}
if (is_array($this->responsabilites["auteurs"]) && count($this->responsabilites["auteurs"])) {
foreach($this->responsabilites["auteurs"] as $responsabilites){
if($responsabilites['name']) $coins_span.="&rft.aulast=".rawurlencode($f($responsabilites['name']));
if($responsabilites['rejete']) $coins_span.="&rft.aufirst=".rawurlencode($f($responsabilites['rejete']));
}
}
$coins_span.="'>";
return $coins_span;
}
// fonction de g�n�ration du tableau des exemplaires
function expl_list($type,$id,$bull_id=0,$build_ifempty=1) {
global $dbh;
global $msg, $charset;
global $expl_list_header, $expl_list_footer;
global $opac_expl_data, $opac_expl_order, $opac_url_base;
global $pmb_transferts_actif,$transferts_statut_transferts;
global $memo_p_perso_expl;
global $opac_show_empty_items_block ;
global $opac_show_exemplaires_analysis;
global $expl_list_header_loc_tpl,$opac_aff_expl_localises;
global $opac_sur_location_activate,$opac_view_filter_class;
$nb_expl_autre_loc=0;
$nb_perso_aff=0;
// les d�pouillements ou p�riodiques n'ont pas d'exemplaire
if (($type=="a" && !$opac_show_exemplaires_analysis) || $type=="s") return "" ;
if(!$memo_p_perso_expl) $memo_p_perso_expl=new parametres_perso("expl");
$header_found_p_perso=0;
if($opac_sur_location_activate){
$opac_sur_location_select=", sur_location.*";
$opac_sur_location_from=", sur_location";
$opac_sur_location_where=" AND docs_location.surloc_num=sur_location.surloc_id";
}
if($opac_view_filter_class){
$opac_view_filter_where=" AND idlocation in (". implode(",",$opac_view_filter_class->params["nav_sections"]).")";
}
// les exemplaires des monographies
if ($type=="m") {
$requete = "SELECT exemplaires.*, pret.*, docs_location.*, docs_section.*, docs_statut.*, docs_type.*, docs_codestat.*, lenders.* $opac_sur_location_select";
$requete .= " FROM exemplaires LEFT JOIN pret ON exemplaires.expl_id=pret.pret_idexpl, docs_location, docs_section, docs_statut, docs_type, docs_codestat, lenders $opac_sur_location_from";
$requete .= " WHERE expl_notice='$id' and expl_bulletin='$bull_id'";
$requete .= " AND location_visible_opac=1 AND section_visible_opac=1 AND statut_visible_opac=1";
$requete .= $opac_sur_location_where;
$requete .= $opac_view_filter_where;
$requete .= " AND exemplaires.expl_location=docs_location.idlocation";
$requete .= " AND exemplaires.expl_section=docs_section.idsection ";
$requete .= " AND exemplaires.expl_statut=docs_statut.idstatut ";
$requete .= " AND exemplaires.expl_typdoc=docs_type. idtyp_doc ";
$requete .= " AND exemplaires.expl_codestat=docs_codestat.idcode ";
$requete .= " AND exemplaires.expl_owner=lenders.idlender ";
if ($opac_expl_order) $requete .= " ORDER BY $opac_expl_order ";
$requete_resa = "SELECT count(1) from resa where resa_idnotice='$id' ";
} // fin si "m"
// les exemplaires des bulletins
if ($type=="b") {
$requete = "SELECT exemplaires.*, pret.*, docs_location.*, docs_section.*, docs_statut.*, docs_type.*, docs_codestat.*, lenders.* $opac_sur_location_select";
$requete .= " FROM exemplaires LEFT JOIN pret ON exemplaires.expl_id=pret.pret_idexpl, docs_location, docs_section, docs_statut, docs_type, docs_codestat, lenders $opac_sur_location_from";
$requete .= " WHERE expl_notice='0' and expl_bulletin='$bull_id'";
$requete .= " AND location_visible_opac=1 AND section_visible_opac=1 AND statut_visible_opac=1";
$requete .= $opac_sur_location_where;
$requete .= $opac_view_filter_where;
$requete .= " AND exemplaires.expl_location=docs_location.idlocation";
$requete .= " AND exemplaires.expl_section=docs_section.idsection ";
$requete .= " AND exemplaires.expl_statut=docs_statut.idstatut ";
$requete .= " AND exemplaires.expl_typdoc=docs_type. idtyp_doc ";
$requete .= " AND exemplaires.expl_codestat=docs_codestat.idcode ";
$requete .= " AND exemplaires.expl_owner=lenders.idlender ";
if ($opac_expl_order) $requete .= " ORDER BY $opac_expl_order ";
$requete_resa = "SELECT count(1) from resa where resa_idbulletin='$bull_id' ";
} // fin si "b"
// les exemplaires des bulletins des articles affich�s
// ERICROBERT : A faire ici !
if ($type=="a" && $opac_show_exemplaires_analysis) {
$requete = "SELECT exemplaires.*, pret.*, docs_location.*, docs_section.*, docs_statut.*, docs_type.*, docs_codestat.*, lenders.* $opac_sur_location_select";
$requete .= " FROM exemplaires LEFT JOIN pret ON exemplaires.expl_id=pret.pret_idexpl, docs_location, docs_section, docs_statut, docs_type, docs_codestat, lenders $opac_sur_location_from";
$requete .= " WHERE expl_notice='0' and expl_bulletin='$bull_id'";
$requete .= " AND location_visible_opac=1 AND section_visible_opac=1 AND statut_visible_opac=1";
$requete .= $opac_sur_location_where;
$requete .= $opac_view_filter_where;
$requete .= " AND exemplaires.expl_location=docs_location.idlocation";
$requete .= " AND exemplaires.expl_section=docs_section.idsection ";
$requete .= " AND exemplaires.expl_statut=docs_statut.idstatut ";
$requete .= " AND exemplaires.expl_typdoc=docs_type. idtyp_doc ";
$requete .= " AND exemplaires.expl_codestat=docs_codestat.idcode ";
$requete .= " AND exemplaires.expl_owner=lenders.idlender ";
if ($opac_expl_order) $requete .= " ORDER BY $opac_expl_order ";
$requete_resa = "SELECT count(1) from resa where resa_idbulletin='$bull_id' ";
} // fin si "a"
// r�cup�ration du nombre d'exemplaires
$res = mysql_query($requete, $dbh);
if(!$build_ifempty && !mysql_num_rows($res))return"";
$surloc_field="";
if ($opac_sur_location_activate==1) $surloc_field="surloc_libelle,";
if (!$opac_expl_data) $opac_expl_data="expl_cb,expl_cote,tdoc_libelle,".$surloc_field."location_libelle,section_libelle";
$colonnesarray=explode(",",$opac_expl_data);
$expl_list_header_deb="";
for ($i=0; $i