array(),"auteurs" => array()); // les auteurs public $ed1_id = 0; // id éditeur 1 public $ed1 = ''; // libellé éditeur 1 public $coll_id = 0; // id collection public $coll = ''; // libellé collection public $subcoll_id = 0; // id sous collection public $subcoll = ''; // libellé sous collection public $ed2_id = 0; // id éditeur 2 public $ed2 = ''; // libellé éditeur 2 public $code = ''; // ISBN, code barre commercial ou no. commercial public $npages = ''; // importance matérielle (nombre de pages, d'éléments...) public $ill = ''; // mention d'illustration public $size = ''; // format public $prix = ''; // prix du document public $year = ''; // année de publication public $nocoll = ''; // no. dans la collection public $accomp = ''; // matériel d'accompagnement public $n_gen = ''; // note générale public $n_contenu = ''; // note de contenu public $n_resume = ''; // resumé/extrait public $categories =array(); // les categories public $indexint = 0; // indexation interne public $index_l = ''; // indexation libre public $lien = ''; // URL de la ressource électronique associée public $eformat = ''; // format de la ressource électronique associée public $index_sew = ''; // pseudo index titre strippé public $index_wew = ''; // pseudo index titre public $index_serie = ''; // pseudo index serie public $statut = ''; //statut de la notice public $niveau_biblio = 'm'; //niveau biblio utilisé pour les périodiques : 'm' monographie 'a' article public $niveau_hierar = '0'; //niveau hiérarchique utilisé pour les périodiques public $validfields = 0; // champs valides public $create_date = "0000-00-00 00:00:00"; // date création public $date_parution; public $thumbnail_url = ''; // constructeur public function __construct($id) { global $fonction_auteur; // récupération des codes de fonction if (!count($fonction_auteur)) { $fonction_auteur = new marc_list('function'); $fonction_auteur = $fonction_auteur->table; } $this->id = $id+0; $this->get_primaldata(); // mise à jour des catégories $this->categories = get_notice_categories($this->id) ; } public function fetch_visibilite() { global $dbh; global $hide_explnum; global $gestion_acces_active,$gestion_acces_empr_notice; if ($gestion_acces_active==1 && $gestion_acces_empr_notice==1) { $ac = new acces(); $this->dom_2= $ac->setDomain(2); if ($hide_explnum) { $this->rights = $this->dom_2->getRights($_SESSION['id_empr_session'],$this->id,4); } else { $this->rights = $this->dom_2->getRights($_SESSION['id_empr_session'],$this->id); } } else { $requete = "SELECT opac_libelle, notice_visible_opac, expl_visible_opac, notice_visible_opac_abon, expl_visible_opac_abon, explnum_visible_opac, explnum_visible_opac_abon FROM notice_statut WHERE id_notice_statut='".$this->statut."' "; $myQuery = pmb_mysql_query($requete, $dbh); if(pmb_mysql_num_rows($myQuery)) { $statut_temp = pmb_mysql_fetch_object($myQuery); $this->statut_notice = $statut_temp->opac_libelle ; $this->visu_notice = $statut_temp->notice_visible_opac ; $this->visu_notice_abon = $statut_temp->notice_visible_opac_abon ; $this->visu_expl = $statut_temp->expl_visible_opac ; $this->visu_expl_abon = $statut_temp->expl_visible_opac_abon ; $this->visu_explnum = $statut_temp->explnum_visible_opac ; $this->visu_explnum_abon = $statut_temp->explnum_visible_opac_abon ; if ($hide_explnum) { $this->visu_explnum=0; $this->visu_explnum_abon=0; } } } } public function get_primaldata() { global $dbh; global $fonction_auteur; // on récupère les infos de la notice $query = "select * from notices where notice_id=".$this->id." limit 1"; $result = pmb_mysql_query($query, $dbh); if(pmb_mysql_num_rows($result)) { $obj = pmb_mysql_fetch_object($result); pmb_mysql_free_result($result); $this->get_primaldatafrom($obj); } } public function get_primaldatafrom($obj) { global $fonction_auteur; // prend les données à partir d'un objet retourné par une requête sur la table notices $this->id = $obj->notice_id; $this->typdoc = $obj->typdoc; $this->tit1 = $obj->tit1; $this->tit2 = $obj->tit2; $this->tit3 = $obj->tit3; $this->tit4 = $obj->tit4; $this->tparent_id = $obj->tparent_id; if($this->tparent_id) { $serie = new serie($this->tparent_id); $this->tparent = $serie->get_isbd(); } $this->tnvol = $obj->tnvol; $this->responsabilites = get_notice_authors($this->id) ; $this->ed1_id = $obj->ed1_id; $this->ed2_id = $obj->ed2_id; $this->coll_id = $obj->coll_id; $this->subcoll_id = $obj->subcoll_id; $this->year = $obj->year; $this->nocoll = $obj->nocoll; $this->code = $obj->code; $this->npages = $obj->npages; $this->ill = $obj->ill; $this->size = $obj->size; $this->prix = $obj->prix; $this->accomp = $obj->accomp; $this->n_gen = $obj->n_gen; $this->n_contenu = $obj->n_contenu; $this->n_resume = $obj->n_resume; $this->index_l = $obj->index_l; $this->lien = $obj->lien; $this->eformat = $obj->eformat; $this->index_sew = $obj->index_sew; $this->index_wew = $obj->index_wew; $this->index_serie = $obj->index_serie; $this->niveau_biblio = $obj->niveau_biblio; $this->niveau_hierar = $obj->niveau_hierar; $this->prix = $obj->prix; $this->statut= $obj->statut; $this->create_date = $obj->create_date; /** * Ajout de la date de parution pour le module timeline */ if ((trim($obj->date_parution)) && ($obj->date_parution!='0000-00-00')){ $this->date_parution = $obj->date_parution; } else { $this->date_parution = static::get_date_parution($obj->year); } $this->thumbnail_url = $obj->thumbnail_url; $this->validfields = N_VALID_PRIMAL; } public function check_fields($fields) { global $opac_show_book_pics ; global $fonction_auteur; global $base_path ; // informations sur les noms et fonctions des auteurs if (($fields & N_VALID_AUTHORS) && ! ($this->validfields & N_VALID_AUTHORS)) { $this->responsabilites = get_notice_authors($this->id) ; $this->validfields = $this->validfields | N_VALID_AUTHORS; } // informations type de document if (($fields & N_VALID_TYPDOC) && ! ($this->validfields & N_VALID_TYPDOC)) { if($this->typdoc) { require_once($base_path."/classes/marc_table.class.php"); $doctype = new marc_list('doctype'); $this->typdocdisplay = $doctype->table[$this->typdoc]; } $this->validfields = $this->validfields | N_VALID_TYPDOC; } // informations langue du document et langue de l'original if (($fields & N_VALID_LANG) && ! ($this->validfields & N_VALID_LANG)) { if($this->lang_code || $this->org_lang_code) { require_once($base_path."/classes/marc_table.class.php"); $lang = new marc_list('lang'); if($this->lang_code) { // libellé langue de la publication $this->lang = $lang->table[$this->lang_code]; } if($this->org_lang_code) { // libellé de la langue originale $this->org_lang = $lang->table[$this->org_lang_code]; } } $this->validfields = $this->validfields | N_VALID_LANG; } // informations collection et sous-colection if (($fields & N_VALID_COLLECTION) && ! ($this->validfields & N_VALID_COLLECTION)) { if ($this->coll_id) { require_once($base_path."/classes/collection.class.php"); require_once($base_path."/classes/publisher.class.php"); $coll = new collection($this->coll_id); $this->coll = $coll->name; } if ($this->subcoll_id) { require_once($base_path."/classes/collection.class.php"); require_once($base_path."/classes/subcollection.class.php"); $subcoll = new subcollection($this->subcoll_id); $this->subcoll = $subcoll->name; } $this->validfields = $this->validfields | N_VALID_COLLECTION; } // informations éditeurs if (($fields & N_VALID_PUBLISHERS) && ! ($this->validfields & N_VALID_PUBLISHERS)) { require_once($base_path."/classes/publisher.class.php"); if ($this->ed1_id) { $publisher = new publisher($this->ed1_id); $this->ed1 = $publisher->display; } if ($this->ed2_id) { $publisher = new publisher($this->ed2_id); $this->ed2 = $publisher->display; } $this->validfields = $this->validfields | N_VALID_PUBLISHERS; } // libellé du titre parent if (($fields & N_VALID_PARENT_TITLE) && ! ($this->validfields & N_VALID_PARENT_TITLE)) { if($this->tparent_id) { require_once($base_path."/classes/serie.class.php"); $serie = new serie($this->tparent_id); $this->tparent = $serie->get_isbd(); } $this->validfields = $this->validfields | N_VALID_PARENT_TITLE; } } public function print_resume($level = 2,$css) { global $fonction_auteur; global $base_path ; // récupération localisation require_once($base_path."/includes/localisation.inc.php"); global $msg; global $css; global $opac_show_book_pics ; global $charset; if(!$this->id) return; // adaptation par rapport au niveau de détail souhaité // niveau par défaut : 2 // niveau 3 : format public switch ($level) { case 1 : global $notice_level1_display; global $notice_level1_no_coll_info; global $notice_level1_no_author_info; global $notice_level1_no_authors_info; global $notice_level1_no_publisher_info; $notice_display = $notice_level1_display; $notice_no_coll_information = $notice_level1_no_coll_info; $notice_no_author_information = $notice_level1_no_author_info; $notice_no_authors_information = $notice_level1_no_authors_info; $notice_no_publisher_information = $notice_level1_no_publisher_info; // utilise les bons champs IMPORTANT $this->check_fields(N_VALID_TYPDOC | N_VALID_AUTHORS | N_VALID_PARENT_TITLE); break; case 3 : // Format Public global $notice_level3_display; global $notice_level3_no_coll_info; global $notice_level3_no_author_info; global $notice_level3_no_authors_info; global $notice_level3_no_publisher_info; $notice_display = $notice_level3_display; $notice_no_coll_information = $notice_level3_no_coll_info; $notice_no_author_information = $notice_level3_no_author_info; $notice_no_authors_information = $notice_level3_no_authors_info; $notice_no_publisher_information = $notice_level3_no_publisher_info; // utilise les bons champs IMPORTANT $this->check_fields(N_VALID_TYPDOC | N_VALID_AUTHORS | N_VALID_PUBLISHERS | N_VALID_COLLECTION | N_VALID_PARENT_TITLE); break; case 2 : default : global $notice_level2_display; global $notice_level2_no_coll_info; global $notice_level2_no_author_info; global $notice_level2_no_authors_info; global $notice_level2_no_publisher_info; $notice_display = $notice_level2_display; $notice_no_coll_information = $notice_level2_no_coll_info; $notice_no_author_information = $notice_level2_no_author_info; $notice_no_authors_information = $notice_level2_no_authors_info; $notice_no_publisher_information = $notice_level2_no_publisher_info; // utilise les bons champs IMPORTANT $this->check_fields(N_VALID_TYPDOC | N_VALID_AUTHORS | N_VALID_PUBLISHERS | N_VALID_COLLECTION); break; } $print = $notice_display; // remplacement des champs statiques // $print = str_replace("!!notice_id!!", $this->id, $print); if ($this->id<>"") { $print = str_replace("!!notice_id!!", $msg['notice_id_start']." ".$this->id." ".(!empty($msg['notice_id_end'])?$msg['notice_id_end']:"")."
", $print); $print = str_replace("!!notice_id_only!!", $this->id, $print); } else { $print = str_replace("!!notice_id!!", "", $print); $print = str_replace("!!notice_id_only!!","", $print); } if ($this->niveau_hierar<>"2") $print = str_replace("!!niveau_hierar!!", "".$msg["hierarchical_level"]." ".$this->niveau_hierar."
", $print); else $print = str_replace("!!niveau_hierar!!", "", $print); if ($this->typdoc<>"") { if ($this->niveau_hierar<>"2") { // ce n'est pas un article $print = str_replace("!!typdoc!!", $this->typdoc." ".$msg["article"], $print); $print = str_replace("!!typdocpic!!", "typdoc.".gif> ".$this->niveau_hierar, $print); } else { // c'est un article $print = str_replace("!!typdoc!!", $this->typdoc, $print); $print = str_replace("!!typdocpic!!", "typdoc.".gif>".$this->niveau_hierar, $print); } } else { $print = str_replace("!!typdoc!!", "", $print); $print = str_replace("!!typdocpic!!", "", $print); } if ($this->tit1<>"") { switch($this->niveau_biblio) { case "s": $tit1_ico = "".$msg["serial"]." "; break; case "a": $tit1_ico = "".$msg["article"]." "; break; case "m": default : $tit1_ico =""; break; } $print = str_replace("!!tit1!!", $this->tit1, $print); $print = str_replace("!!tit1_ico!!", $tit1_ico, $print); $print = str_replace("!!tit1display!!", ''.$msg['tit1display_start'].''.$this->tit1.(!empty($msg['tit1display_end']) ? $msg['tit1display_end'] : "")."
", $print); } else { $print = str_replace("!!tit1!!","", $print); } if ($this->tit2<>"") $print = str_replace("!!tit2!!", ''.$msg['238'].''.$this->tit2."
", $print); else $print = str_replace("!!tit2!!", "", $print); if ($this->tit3<>"") $print = str_replace("!!tit3!!", ''.$msg['239'].''.$this->tit3."
", $print); else $print = str_replace("!!tit3!!", "", $print); if ($this->tit4<>"") $print = str_replace("!!tit4!!", ''.$msg['240'].''.$this->tit4."
", $print); else $print = str_replace("!!tit4!!","", $print); if ($this->typdocdisplay<>"") $print = str_replace("!!typdocdisplay!!", ''.$msg['typdocdisplay_start'].''.$this->typdocdisplay."
", $print); else $print = str_replace("!!typdocdisplay!!", $this->typdoc, $print); if ($this->tparent<>"") { if ($this->tnvol) $tparent_libelle = ''.$msg['tparent_start'].''.$this->tparent." [".$this->tnvol."]
"; else $tparent_libelle = ''.$msg['tparent_start'].''.$this->tparent."
"; $print = str_replace("!!tparent!!", $tparent_libelle, $print); } else $print = str_replace("!!tparent!!", "", $print); if ($this->tnvol<>"") $print = str_replace("!!tnvol!!", "$msg[tnvol_start]".$this->tnvol."
", $print); else $print = str_replace("!!tnvol!!", "", $print); // constitution de la mention de responsabilité //$this->responsabilites $mention_resp=array(); $as = array_search ("0", $this->responsabilites["responsabilites"]) ; if ($as!== FALSE && $as!== NULL) { $auteur_0 = $this->responsabilites["auteurs"][$as] ; $auteur = new auteur($auteur_0["id"]); if ($auteur_0["fonction"]) $f_auteur =" (".$fonction_auteur[$auteur_0["fonction"]].")"; else $f_auteur=""; $mention_resp_lib = "".$msg['auteur_start']." "."".$auteur->get_isbd()." ".$f_auteur."
"; $mention_resp[] = $mention_resp_lib ; } $as = array_keys ($this->responsabilites["responsabilites"], "1" ) ; for ($i = 0 ; $i < count($as) ; $i++) { $indice = $as[$i] ; $auteur_1 = $this->responsabilites["auteurs"][$indice] ; $auteur = new auteur($auteur_1["id"]); if ($auteur_1["fonction"]) $f_auteur =" (".$fonction_auteur[$auteur_1["fonction"]].")"; else $f_auteur=""; $mention_resp_lib = "".$msg['auteur_start']." "."".$auteur->get_isbd()." ".$f_auteur."
"; $mention_resp[] = $mention_resp_lib ; } $as = array_keys ($this->responsabilites["responsabilites"], "2" ) ; for ($i = 0 ; $i < count($as) ; $i++) { $indice = $as[$i] ; $auteur_2 = $this->responsabilites["auteurs"][$indice] ; $auteur = new auteur($auteur_2["id"]); if ($auteur_2["fonction"]) $f_auteur =" (".$fonction_auteur[$auteur_2["fonction"]].")"; else $f_auteur=""; $mention_resp_lib = "".$msg['auteur_start']." "."".$auteur->get_isbd()." ".$f_auteur."
"; $mention_resp[] = $mention_resp_lib ; } $libelle_mention_resp = implode (" ",$mention_resp) ; // ********************************************** if ($this->ed1<>"") $print = str_replace("!!ed1!!", ''.$msg['ed1_start'].''.$this->ed1."
", $print); else $print = str_replace("!!ed1!!", "", $print); if ($this->ed2<>"") $print = str_replace("!!ed2!!", ''.$msg['ed2_start'].''.$this->ed2."
", $print); else $print = str_replace("!!ed2!!", "", $print); if ($this->coll<>"") $print = str_replace("!!coll!!", ''.$msg['coll_start'].''.$this->coll."
", $print); else $print = str_replace("!!coll!!", "", $print); if ($this->subcoll<>"") $print = str_replace("!!subcoll!!", ''.$msg['subcoll_start'].''.$this->subcoll."
", $print); else $print = str_replace("!!subcoll!!", "", $print); if ($this->year<>"") $print = str_replace("!!year!!", ''.$msg['year_start'].''.$this->year."
", $print); else $print = str_replace("!!year!!", "", $print); if ($this->nocoll<>"") $print = str_replace("!!nocoll!!", (!empty($msg['nocoll_start']) ? ''.$msg['nocoll_start'].'' : '') .$this->nocoll."
", $print); else $print = str_replace("!!nocoll!!", "", $print); if ($this->code<>"") { // Si c'est un livre, c'est magique alors on affiche l'image tirée de chez amazon europe. if (($this->typdoc=='a') && ($opac_show_book_pics=='1')) { $code_chiffre = pmb_preg_replace('/-|\.| /', '', $this->code); //if (@fopen("http://images-eu.amazon.com/images/P/".$code_chiffre.".08.MZZZZZZZ.jpg","r")) if (isISBN($this->code)) $print = str_replace("!!image_petit!!", "", $print); else $print = str_replace("!!image_petit!!", "", $print); } else $print = str_replace("!!image_petit!!", "", $print); $print = str_replace("!!code!!", ''.$msg['code_start'].''.$this->code."
", $print); } else { $print = str_replace("!!image_petit!!", "", $print); $print = str_replace("!!code!!", "", $print); } if ($this->npages<>"") $print = str_replace("!!npages!!", ''.$msg['npages_start'].''.$this->npages."
", $print); else $print = str_replace("!!npages!!", "", $print); if ($this->ill<>"") $print = str_replace("!!ill!!", ''.$msg['ill_start'].''.$this->ill."
", $print); else $print = str_replace("!!ill!!", "", $print); if ($this->size<>"") $print = str_replace("!!size!!", ''.$msg['size_start'].''.$this->size."
", $print); else $print = str_replace("!!size!!", "", $print); if ($this->accomp<>"") $print = str_replace("!!accomp!!", ''.$msg['accomp_start'].''.$this->accomp."
", $print); else $print = str_replace("!!accomp!!", "", $print); if ($this->n_gen<>"") $print = str_replace("!!n_gen!!", ''.$msg['n_gen_start'].''.nl2br(htmlentities($this->n_gen,ENT_QUOTES, $charset))."
", $print); else $print = str_replace("!!n_gen!!", "", $print); if ($this->n_contenu<>"") $print = str_replace("!!n_contenu!!", ''.$msg['n_contenu_start'].''.nl2br(htmlentities($this->n_contenu,ENT_QUOTES, $charset))."
", $print); else $print = str_replace("!!n_contenu!!", "", $print); if ($this->n_resume<>"") $print = str_replace("!!n_resume!!", ''.$msg['n_resume_start'].''.nl2br(htmlentities($this->n_resume,ENT_QUOTES, $charset))."
", $print); else $print = str_replace("!!n_resume!!","", $print); if ($this->index_l<>"") $print = str_replace("!!index_l!!", ''.(!empty($msg['index_l_start']) ? $msg['index_l_start'] : '').''.nl2br($this->index_l)."
", $print); else $print = str_replace("!!index_l!!", "", $print); if (!empty($this->lang)) $print = str_replace("!!lang!!", $this->lang."
", $print); else $print = str_replace("!!lang!!", "", $print); if (!empty($this->org_lang)) $print = str_replace("!!org_lang!!", $this->org_lang."
", $print); else $print = str_replace("!!org_lang!!","", $print); if ($this->lien<>"") $print = str_replace("!!lien!!", "
lien."\" title=".$this->lien."> $this->lien", $print); else $print = str_replace("!!lien!!", "", $print); if ($this->eformat<>"") $print = str_replace("!!eformat!!", "[".$this->eformat."]
"."
", $print); else $print = str_replace("!!eformat!!", "", $print); if ($this->prix<>"") $print = str_replace("!!prix!!", ''.$msg['price_start'].' '.$this->prix." ".(!empty($msg['price_end']) ? $msg['price_end'] : "")." ", $print); else $print = str_replace("!!prix!!", "", $print); // remplacement des champs dynamiques if (preg_match("#!!auteur!!#", $print)); { if ($libelle_mention_resp) $print = str_replace("!!auteur!!", $libelle_mention_resp, $print); else $print = str_replace("!!auteur!!", $notice_no_authors_information, $print); } if (preg_match("#!!editeur!!#", $print)) { $remplacement = ""; if ($this->ed1_id) $remplacement = ''.$msg['editeur_start'].' '."$this->ed1"."
"; elseif ($this->ed2_id) $remplacement = ''.$msg['editeur_start'].' '."$this->ed2"."
"; else $remplacement = ""; $print = str_replace("!!editeur!!", $remplacement, $print); } if (preg_match("#!!collection!!#", $print)) { $remplacement = ""; if ($this->coll_id) $remplacement = ''.$msg['coll_start']."$this->coll"; if ($this->subcoll_id) { $remplacement .= $remplacement ? ", " : ""; $remplacement .= "($this->subcoll)
"; } else $remplacement .= "
"; if ($remplacement == "") $remplacement = ""; $print = str_replace("!!collection!!", $remplacement, $print); } if (preg_match("#!!level1!!#", $print)) { if ($this->tparent) { if ($this->tnvol) $titre_affiche = $this->tit1." - ".$this->tparent." [".$this->tnvol."]" ; else $titre_affiche = $this->tit1." - ".$this->tparent ; } else $titre_affiche = $this->tit1 ; if ($this->tit1) $titre = "$titre_affiche"; elseif ($this->tit2) $titre = "$this->tit2"; elseif ($this->tit3) $titre = "$this->tit3"; elseif ($this->tit4) $titre = "$this->tit4"; else $titre = ""; // *** //$this->responsabilites $auteur = gen_authors_header($this->responsabilites); // *** $remplacement = $titre; if (($remplacement != "") && ($auteur != "")) $remplacement .= " / ".$auteur; $print = str_replace("!!level1!!", $remplacement, $print); } return $print; } //Récupération d'un titre de notice public static function get_notice_title($notice_id) { $requete="select serie_name, tnvol, tit1, code from notices left join series on serie_id=tparent_id where notice_id=".$notice_id; $resultat=pmb_mysql_query($requete); if (pmb_mysql_num_rows($resultat)) { $r=pmb_mysql_fetch_object($resultat); return ($r->serie_name?$r->serie_name." ":"").($r->tnvol?$r->tnvol." ":"").$r->tit1.($r->code?" (".$r->code.")":""); } return ''; } public static function get_niveau_biblio($notice_id) { $query = "SELECT niveau_biblio FROM notices WHERE notice_id = ".$notice_id; $result = pmb_mysql_query($query); return pmb_mysql_result($result, 0, 'niveau_biblio'); } public static function get_permalink($notice_id) { global $opac_url_base; $requete="select niveau_biblio, serie_name, tnvol, tit1, code from notices left join series on serie_id=tparent_id where notice_id=".$notice_id; $fetch = pmb_mysql_query($requete); if (pmb_mysql_num_rows($fetch)) { $r = pmb_mysql_fetch_object($fetch); if($r->niveau_biblio == 's'){ // périodique // $link = './catalog.php?categ=serials&sub=view&serial_id='.$notice_id; $link = $opac_url_base."index.php?lvl=notice_display&id=".$notice_id; }elseif($r->niveau_biblio == 'b') { // notice de bulletin $query = 'select bulletin_id, bulletin_notice from bulletins where num_notice = '.$notice_id; $result = pmb_mysql_query($query); if($result && pmb_mysql_num_rows($result)){ $row = pmb_mysql_fetch_object($result); // $link = './catalog.php?categ=serials&sub=view&sub=bulletinage&action=view&bul_id='.$row->bulletin_id; $link = $opac_url_base."index.php?lvl=bulletin_display&id=".$row->bulletin_id; } }else{ // notice de monographie $link = $opac_url_base."index.php?lvl=notice_display&id=".$notice_id; } return $link; } return ''; } public static function get_icon($id) { global $icon_list_instance; if(!isset($icon_list_instance)) { $icon_list_instance=new marc_list("icondoc"); } $requete="select concat(niveau_biblio,typdoc) as i from notices where notice_id=".$id; $resultat=pmb_mysql_query($requete); if (pmb_mysql_num_rows($resultat)) { $icon= get_url_icon($icon_list_instance->table[pmb_mysql_result($resultat,0,0)]); } else $icon='./images/icon_a_16x16.gif'; return $icon; } /** * Récupère les infos de la notice */ public static function recup_notice_infos($id){ global $infos_notice, $infos_expl; $id = intval($id); $rqt='select notice_id, typdoc, niveau_biblio, index_l, libelle_categorie, name_pclass, indexint_name from notices n left join notices_categories nc on nc.notcateg_notice=n.notice_id left join categories c on nc.num_noeud=c.num_noeud left join indexint i on n.indexint=i.indexint_id left join pclassement pc on i.num_pclass=pc.id_pclass where notice_id='.$id.' limit 1'; $res_noti = pmb_mysql_query($rqt); if(pmb_mysql_num_rows($res_noti)) { $noti=pmb_mysql_fetch_array($res_noti); $infos_notice=$noti; $rqt_expl = " select section_libelle, location_libelle, statut_libelle, codestat_libelle, expl_date_depot, expl_date_retour, tdoc_libelle from exemplaires e left join docs_codestat co on e.expl_codestat = co.idcode left join docs_location dl on e.expl_location=dl.idlocation left join docs_section ds on ds.idsection=e.expl_section left join docs_statut dst on e.expl_statut=dst.idstatut left join docs_type dt on dt.idtyp_doc=e.expl_typdoc where expl_notice='".$id."'"; $res_expl=pmb_mysql_query($rqt_expl); if(pmb_mysql_num_rows($res_expl)) { while(($expl = pmb_mysql_fetch_array($res_expl))) { $infos_expl[]=$expl; } } } } public function get_entity_type(){ return 'record'; } //Récupérer une date au format AAAA-MM-JJ public static function get_date_parution($annee) { return detectFormatDate($annee); } //Récupération de la no_image public static function get_picture_url_no_image($niveau_biblio, $typdoc) { $picture_url = get_url_icon("no_image_".$niveau_biblio.$typdoc.".jpg"); if(!file_exists($picture_url)) { $picture_url = get_url_icon("no_image_".$niveau_biblio.".jpg"); if(!file_exists($picture_url)) { $picture_url = get_url_icon("no_image.jpg"); } } return $picture_url; } } // fin de la classe Notice } // fin de définition de NOTICE_CLASS