Beispiel #1
0
 function do_isbd()
 {
     global $msg, $dbh, $base_path;
     global $fonction_auteur;
     global $langue_doc;
     global $charset;
     global $thesaurus_mode_pmb, $thesaurus_categories_categ_in_line, $pmb_keyword_sep;
     global $pmb_etat_collections_localise, $pmb_droits_explr_localises, $explr_visible_mod, $thesaurus_categories_affichage_ordre;
     global $categories_memo, $libelle_thesaurus_memo;
     global $categories_top, $use_opac_url_base, $thesaurus_categories_show_only_last;
     global $load_tablist_js;
     global $pmb_show_notice_id, $pmb_opac_url, $pmb_show_permalink;
     global $sort_children;
     global $tdoc;
     global $thesaurus_concepts_active;
     $this->isbd = $this->notice->tit1;
     // constitution de la mention de titre
     $tit3 = $this->notice->tit3;
     $tit4 = $this->notice->tit4;
     if ($tit3) {
         $this->isbd .= " = {$tit3}";
     }
     if ($tit4) {
         $this->isbd .= " : {$tit4}";
     }
     $this->isbd .= ' [' . $tdoc->table[$this->notice->typdoc] . ']';
     // constitution de la mention de responsabilité
     $mention_resp = array();
     // constitution de la mention de responsabilité
     //$this->responsabilites
     $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 ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_0["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_0["fonction"]];
         }
         $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 ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_1["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_1["fonction"]];
         }
         $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 ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_2["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_2["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
     }
     $libelle_mention_resp = implode("; ", $mention_resp);
     if ($libelle_mention_resp) {
         $this->isbd .= "&nbsp;/ " . $libelle_mention_resp . " ";
     }
     global $pmb_map_activate;
     if ($pmb_map_activate) {
         if ($mapisbd = $this->map_info->get_isbd()) {
             $this->isbd .= $mapisbd;
         }
     }
     // zone de l'adresse (ne concerne que s1)
     if ($this->notice->niveau_biblio == 's' && $this->notice->niveau_hierar == 1) {
         if ($this->notice->ed1_id) {
             $editeur = new editeur($this->notice->ed1_id);
             if ($this->print_mode) {
                 $editeurs .= $editeur->isbd_entry;
             } else {
                 $editeurs .= $editeur->isbd_entry_lien_gestion;
             }
         }
         if ($this->notice->ed2_id) {
             $editeur = new editeur($this->notice->ed2_id);
             if ($this->print_mode) {
                 $ed_isbd = $editeur->isbd_entry;
             } else {
                 $ed_isbd = $editeur->isbd_entry_lien_gestion;
             }
             if ($editeurs) {
                 $editeurs .= '&nbsp;; ' . $ed_isbd;
             } else {
                 $editeurs .= $ed_isbd;
             }
         }
         if ($this->notice->year) {
             $editeurs ? $editeurs .= ', ' . $this->notice->year : ($editeurs = $this->notice->year);
         }
         //else
         //$editeurs ? $editeurs .= ', [s.d.]' : $editeurs = "[s.d.]";
         if ($editeurs) {
             $this->isbd .= ".&nbsp;-&nbsp;{$editeurs}";
         }
         // code ici pour la gestion des éditeurs
     }
     // zone de la collation (ne concerne que a2, mention de pagination)
     // pour les périodiques, on rebascule en zone de note
     // avec la mention du périodique parent
     if ($this->notice->niveau_biblio == 'a' && $this->notice->niveau_hierar == 2) {
         $bulletin = $this->parent_title;
         if ($this->parent_numero) {
             $bulletin .= ' ' . $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 . ")";
         } else {
             if ($this->parent_date_date) {
                 $date_affichee .= " [" . formatdate($this->parent_date_date) . "]";
             } else {
                 $date_affichee = "";
             }
         }
         $bulletin .= $date_affichee;
         if ($this->action_bulletin) {
             $this->action_bulletin = str_replace('!!id!!', $this->bul_id, $this->action_bulletin);
             $bulletin = "<a href=\"" . $this->action_bulletin . "\">" . htmlentities($bulletin, ENT_QUOTES, $charset) . "</a>";
         }
         $mention_parent = "in <b>{$bulletin}</b>";
     }
     if ($mention_parent) {
         $this->isbd .= "<br />{$mention_parent}";
         $pagination = htmlentities($this->notice->npages, ENT_QUOTES, $charset);
         if ($pagination) {
             $this->isbd .= ".&nbsp;-&nbsp;{$pagination}";
         }
     }
     //In
     //Recherche des notices parentes
     if (!$this->no_link) {
         $requete = "select linked_notice, relation_type, rank, l.niveau_biblio as lnb, l.niveau_hierar as lnh from notices_relations, notices as l where num_notice=" . $this->notice_id . " and linked_notice=l.notice_id order by relation_type,rank";
         $result_linked = pmb_mysql_query($requete) or die(pmb_mysql_error());
         //Si il y en a, on prépare l'affichage
         if (pmb_mysql_num_rows($result_linked)) {
             global $relation_listup;
             if (!$relation_listup) {
                 $relation_listup = new marc_list("relationtypeup");
             }
         }
         $r_type = array();
         $ul_opened = false;
         $r_type_local = "";
         //Pour toutes les notices liées
         while ($r_rel = pmb_mysql_fetch_object($result_linked)) {
             //Pour avoir le lien par défaut
             if (!$this->print_mode && SESSrights & CATALOGAGE_AUTH) {
                 $link_parent = $base_path . '/catalog.php?categ=isbd&id=!!id!!';
             } else {
                 $link_parent = "";
             }
             if ($r_rel->lnb == 's' && $r_rel->lnh == '1') {
                 // c'est une notice chapeau
                 global $link_serial, $link_analysis, $link_bulletin, $link_explnum_serial;
                 $link_serial_sub = $base_path . "/catalog.php?categ=serials&sub=view&serial_id=" . $r_rel->linked_notice;
                 // function serial_display ($id, $level='1', $action_serial='', $action_analysis='', $action_bulletin='', $lien_suppr_cart="", $lien_explnum="", $bouton_explnum=1,$print=0,$show_explnum=1, $show_statut=0, $show_opac_hidden_fields=true, $draggable=0 ) {
                 $serial = new serial_display($r_rel->linked_notice, 0, $link_serial_sub, $link_analysis, $link_bulletin, "", "", 0, $this->print_mode, $this->show_explnum, $this->show_statut, $this->show_opac_hidden_fields, 1, true);
                 $aff = $serial->header;
             } else {
                 if ($r_rel->lnb == 'a' && $r_rel->lnh == '2') {
                     // c'est un dépouillement de bulletin
                     global $link_serial, $link_analysis, $link_bulletin, $link_explnum_analysis;
                     if (!$link_analysis) {
                         $link_analysis = $base_path . "/catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!bul_id!!&art_to_show=!!id!!";
                     }
                     $serial = new serial_display($r_rel->linked_notice, 0, $link_serial, $link_analysis, $link_bulletin, "", "", 0, $this->print_mode, $this->show_explnum, $this->show_statut, $this->show_opac_hidden_fields, 1, true);
                     $aff = $serial->result;
                 } else {
                     if ($link_parent && $r_rel->lnb == 'b' && $r_rel->lnh == '2') {
                         $requete = "SELECT bulletin_id FROM bulletins WHERE num_notice='" . $r_rel->linked_notice . "'";
                         $res = pmb_mysql_query($requete);
                         if (pmb_mysql_num_rows($res)) {
                             $link_parent = $base_path . "/catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=" . pmb_mysql_result($res, 0, 0);
                         }
                     }
                     // dans les autres cas
                     //function mono_display($id, $level=1, $action='', $expl=1, $expl_link='', $lien_suppr_cart="", $explnum_link='', $show_resa=0, $print=0, $show_explnum=1, $show_statut=0, $anti_loop='', $draggable=0, $no_link=false, $show_opac_hidden_fields=true,$ajax_mode=0) {
                     $parent_notice = new mono_display($r_rel->linked_notice, 0, $link_parent, 1, '', "", '', 0, $this->print_mode, $this->show_explnum, $this->show_statut, '', 1, true, $this->show_opac_hidden_fields, 0);
                     $aff = $parent_notice->header;
                     $this->nb_expl += $parent_notice->nb_expl;
                 }
             }
             //Présentation différente si il y en a un ou plusieurs
             if (pmb_mysql_num_rows($result_linked) == 1) {
                 $this->isbd .= "<br /><b>" . $relation_listup->table[$r_rel->relation_type] . "</b> " . $aff . "<br />";
             } else {
                 if ($r_rel->relation_type != $r_type_local) {
                     $r_type_local = $r_rel->relation_type;
                     if ($ul_opened) {
                         $this->isbd .= "</ul>";
                         $this->isbd .= "\n<b>" . $relation_listup->table[$r_rel->relation_type] . "</b>";
                         $this->isbd .= "\n<ul class='notice_rel'>\n";
                         $ul_opened = true;
                     } else {
                         $this->isbd .= "\n<br />";
                         $this->isbd .= "\n<b>" . $relation_listup->table[$r_rel->relation_type] . "</b>";
                         $this->isbd .= "\n<ul class='notice_rel'>\n";
                         $ul_opened = true;
                     }
                 }
                 $this->isbd .= "\n<li>" . $aff . "</li>\n";
             }
         }
         if ($ul_opened) {
             $this->isbd .= "\n</ul>\n";
         }
     }
     if ($pmb_show_notice_id || $pmb_show_permalink) {
         $this->isbd .= "<br />";
     }
     if ($pmb_show_notice_id) {
         $prefixe = explode(",", $pmb_show_notice_id);
         $this->isbd .= "<b>" . $msg['notice_id_libelle'] . "&nbsp;</b>" . ($prefixe[1] ? $prefixe[1] : '') . $this->notice_id . "<br />";
     }
     // Permalink OPAC
     if ($pmb_show_permalink) {
         $this->isbd .= "<b>" . $msg["notice_permalink_opac"] . "&nbsp;</b><a href='" . $pmb_opac_url . "index.php?lvl=notice_display&id=" . $this->notice_id . "' target=\"__LINK__\">" . $pmb_opac_url . "index.php?lvl=notice_display&id=" . $this->notice_id . "</a><br />";
     }
     // fin du niveau 1
     if ($this->level == 1) {
         if ($this->show_explnum) {
             $explnum = show_explnum_per_notice($this->notice_id, 0, $this->lien_explnum);
             if ($explnum) {
                 $this->isbd .= "<br /><b>{$msg['explnum_docs_associes']}</b><br />" . $explnum;
             }
             if ($this->notice->niveau_biblio == 'a' && $this->notice->niveau_hierar == '2' && SESSrights & CATALOGAGE_AUTH && $this->bouton_explnum) {
                 $this->isbd .= "<br /><input type='button' class='bouton' value=' {$msg['explnum_ajouter_doc']} ' onClick=\"document.location='" . $base_path . "/catalog.php?categ=serials&analysis_id={$this->notice_id}&sub=analysis&action=explnum_form&bul_id={$this->bul_id}'\">";
             }
         }
         return;
     }
     // début du niveau 2
     // map
     if ($pmb_map_activate && $this->show_map) {
         $this->isbd .= $this->map->get_map();
     }
     // note générale
     if ($this->notice->n_gen) {
         $this->isbd .= "<br /><b>{$msg['265']}</b>:&nbsp;" . nl2br(htmlentities($this->notice->n_gen, ENT_QUOTES, $charset));
     }
     // note de contenu : non-applicable aux périodiques ??? Ha bon pourquoi ?
     if ($this->notice->n_contenu) {
         $this->isbd .= "<br /><b>{$msg['266']}</b>:&nbsp;" . nl2br($this->notice->n_contenu);
     }
     // résumé
     if ($this->notice->n_resume) {
         $this->isbd .= "<br /><b>{$msg['267']}</b>:&nbsp;" . nl2br($this->notice->n_resume);
     }
     // fin du niveau 2
     if ($this->level == 2) {
         return;
     }
     // début du niveau 3
     // fin du niveau 3
     if ($this->level == 3) {
         return;
     }
     // début du niveau 4
     // catégories
     $categ_repetables = array();
     if (!count($categories_top)) {
         $q = "select num_thesaurus,id_noeud from noeuds where num_parent in(select id_noeud from noeuds where autorite='TOP') ";
         $r = pmb_mysql_query($q, $dbh);
         while ($res = pmb_mysql_fetch_object($r)) {
             $categories_top[] = $res->id_noeud;
         }
     }
     $requete = "select * from (\n\t\t\tselect libelle_thesaurus, if (catlg.num_noeud is null, catdef.libelle_categorie, catlg.libelle_categorie ) as categ_libelle, noeuds.id_noeud , noeuds.num_parent, langue_defaut,id_thesaurus, if(catdef.langue = '" . $lang . "',2, if(catdef.langue= thesaurus.langue_defaut ,1,0)) as p, ordre_vedette, ordre_categorie\n\t\t\tFROM ((noeuds\n\t\t\tjoin thesaurus ON thesaurus.id_thesaurus = noeuds.num_thesaurus\n\t\t\tleft join categories as catdef on noeuds.id_noeud=catdef.num_noeud and catdef.langue = thesaurus.langue_defaut\n\t\t\tleft join categories as catlg on catdef.num_noeud = catlg.num_noeud and catlg.langue = '" . $lang . "'))\n\t\t\t,notices_categories\n\t\t\twhere notices_categories.num_noeud=noeuds.id_noeud and\n\t\t\tnotices_categories.notcateg_notice=" . $this->notice_id . "\torder by id_thesaurus, noeuds.id_noeud, p desc\n\t\t\t) as list_categ group by id_noeud";
     if ($thesaurus_categories_affichage_ordre == 1) {
         $requete .= " order by ordre_vedette, ordre_categorie";
     }
     $result_categ = @pmb_mysql_query($requete);
     if (pmb_mysql_num_rows($result_categ)) {
         while ($res_categ = pmb_mysql_fetch_object($result_categ)) {
             $libelle_thesaurus = $res_categ->libelle_thesaurus;
             $categ_id = $res_categ->id_noeud;
             $libelle_categ = $res_categ->categ_libelle;
             $num_parent = $res_categ->num_parent;
             $langue_defaut = $res_categ->langue_defaut;
             $categ_head = 0;
             if (in_array($categ_id, $categories_top)) {
                 $categ_head = 1;
             }
             if ($thesaurus_categories_show_only_last || $categ_head) {
                 if ($use_opac_url_base) {
                     $url_base_lien_aut = $opac_url_base . "index.php?&lvl=categ_see&id=";
                 } else {
                     $url_base_lien_aut = $base_path . "/autorites.php?categ=categories&sub=categ_form&id=";
                 }
                 if ((SESSrights & AUTORITES_AUTH || $use_opac_url_base) && !$this->print_mode) {
                     $libelle_aff_complet = "<a href='" . $url_base_lien_aut . $categ_id . "' class='lien_gestion'>" . $libelle_categ . "</a>";
                 } else {
                     $libelle_aff_complet = $libelle_categ;
                 }
                 if ($thesaurus_mode_pmb) {
                     $categ_repetables[$libelle_thesaurus][] = $libelle_aff_complet;
                 } else {
                     $categ_repetables['MONOTHESAURUS'][] = $libelle_aff_complet;
                 }
             } else {
                 if (!$categories_memo[$categ_id]) {
                     $anti_recurse[$categ_id] = 1;
                     $path_table = '';
                     $requete = "select id_noeud as categ_id, num_noeud, num_parent as categ_parent, libelle_categorie as categ_libelle, num_renvoi_voir as categ_see, note_application as categ_comment, if(langue = '" . $lang . "',2, if(langue= '" . $langue_defaut . "' ,1,0)) as p\n\t\t\t\t\t\t\tFROM noeuds, categories where id_noeud ='" . $num_parent . "'\n\t\t\t\t\t\t\tAND noeuds.id_noeud = categories.num_noeud\n\t\t\t\t\t\t\torder by p desc limit 1";
                     $result = @pmb_mysql_query($requete);
                     if (pmb_mysql_num_rows($result)) {
                         $parent = pmb_mysql_fetch_object($result);
                         $anti_recurse[$parent->categ_id] = 1;
                         $path_table[] = array('id' => $parent->categ_id, 'libelle' => $parent->categ_libelle);
                         // on remonte les ascendants
                         while ($parent->categ_parent && !$anti_recurse[$parent->categ_parent]) {
                             $requete = "select id_noeud as categ_id, num_noeud, num_parent as categ_parent, libelle_categorie as categ_libelle,\tnum_renvoi_voir as categ_see, note_application as categ_comment, if(langue = '" . $lang . "',2, if(langue= '" . $langue_defaut . "' ,1,0)) as p\n\t\t\t\t\t\t\t\t\tFROM noeuds, categories where id_noeud ='" . $parent->categ_parent . "'\n\t\t\t\t\t\t\t\t\tAND noeuds.id_noeud = categories.num_noeud\n\t\t\t\t\t\t\t\t\torder by p desc limit 1";
                             $result = @pmb_mysql_query($requete);
                             if (pmb_mysql_num_rows($result)) {
                                 $parent = pmb_mysql_fetch_object($result);
                                 $anti_recurse[$parent->categ_id] = 1;
                                 $path_table[] = array('id' => $parent->categ_id, 'libelle' => $parent->categ_libelle);
                             } else {
                                 break;
                             }
                         }
                         $anti_recurse = array();
                     } else {
                         $path_table = array();
                     }
                     // ceci remet le tableau dans l'ordre général->particulier
                     $path_table = array_reverse($path_table);
                     if (sizeof($path_table)) {
                         $temp_table = '';
                         while (list($xi, $l) = each($path_table)) {
                             $temp_table[] = $l['libelle'];
                         }
                         $parent_libelle = join(':', $temp_table);
                         $catalog_form = $parent_libelle . ':' . $libelle_categ;
                     } else {
                         $catalog_form = $libelle_categ;
                     }
                     if ($use_opac_url_base) {
                         $url_base_lien_aut = $opac_url_base . "index.php?&lvl=categ_see&id=";
                     } else {
                         $url_base_lien_aut = $base_path . "/autorites.php?categ=categories&sub=categ_form&id=";
                     }
                     if ((SESSrights & AUTORITES_AUTH || $use_opac_url_base) && !$this->print_mode) {
                         $libelle_aff_complet = "<a href='" . $url_base_lien_aut . $categ_id . "' class='lien_gestion'>" . $catalog_form . "</a>";
                     } else {
                         $libelle_aff_complet = $catalog_form;
                     }
                     if ($thesaurus_mode_pmb) {
                         $categ_repetables[$libelle_thesaurus][] = $libelle_aff_complet;
                     } else {
                         $categ_repetables['MONOTHESAURUS'][] = $libelle_aff_complet;
                     }
                     $categories_memo[$categ_id] = $libelle_aff_complet;
                     $libelle_thesaurus_memo[$categ_id] = $libelle_thesaurus;
                 } else {
                     if ($thesaurus_mode_pmb) {
                         $categ_repetables[$libelle_thesaurus_memo[$categ_id]][] = $categories_memo[$categ_id];
                     } else {
                         $categ_repetables['MONOTHESAURUS'][] = $categories_memo[$categ_id];
                     }
                 }
             }
         }
     }
     while (list($nom_tesaurus, $val_lib) = each($categ_repetables)) {
         //c'est un tri par libellé qui est demandé
         if ($thesaurus_categories_affichage_ordre == 0) {
             $tmp = array();
             foreach ($val_lib as $key => $value) {
                 $tmp[$key] = strip_tags($value);
             }
             $tmp = array_map("convert_diacrit", $tmp);
             //On enlève les accents
             $tmp = array_map("strtoupper", $tmp);
             //On met en majuscule
             asort($tmp);
             //Tri sur les valeurs en majuscule sans accent
             foreach ($tmp as $key => $value) {
                 $tmp[$key] = $val_lib[$key];
                 //On reprend les bons couples clé / libellé
             }
             $val_lib = $tmp;
         }
         if ($thesaurus_mode_pmb) {
             if (!$thesaurus_categories_categ_in_line) {
                 $categ_repetables_aff = "[" . $nom_tesaurus . "]" . implode("<br />[" . $nom_tesaurus . "]", $val_lib);
             } else {
                 $categ_repetables_aff = "<b>" . $nom_tesaurus . "</b><br />" . implode(" {$pmb_keyword_sep} ", $val_lib);
             }
         } else {
             if (!$thesaurus_categories_categ_in_line) {
                 $categ_repetables_aff = implode("<br />", $val_lib);
             } else {
                 $categ_repetables_aff = implode(" {$pmb_keyword_sep} ", $val_lib);
             }
         }
         if ($categ_repetables_aff) {
             $tmpcateg_aff .= "<br />{$categ_repetables_aff}";
         }
     }
     if ($tmpcateg_aff) {
         $this->isbd .= "<br />{$tmpcateg_aff}";
     }
     // Concepts
     if ($thesaurus_concepts_active == 1) {
         $index_concept = new index_concept($this->notice_id, TYPE_NOTICE);
         $this->isbd .= $index_concept->get_isbd_display();
     }
     // fin du niveau 4
     if ($this->level == 4) {
         return;
     }
     // début du niveau 5
     // langues
     if (count($this->langues)) {
         $langues = "<b>{$msg[537]}</b>&nbsp;: " . construit_liste_langues($this->langues);
     }
     if (count($this->languesorg)) {
         $langues .= " <b>{$msg[711]}</b>&nbsp;: " . construit_liste_langues($this->languesorg);
     }
     if ($langues) {
         $this->isbd .= "<br />{$langues}";
     }
     // indexation libre
     if ($this->notice->index_l) {
         $this->isbd .= "<br /><b>{$msg[324]}</b>&nbsp;: " . htmlentities($this->notice->index_l, ENT_QUOTES, $charset);
     }
     // indexation interne
     if ($this->notice->indexint) {
         $indexint = new indexint($this->notice->indexint);
         if ($this->print_mode) {
             $indexint_isbd = $indexint->display;
         } else {
             $indexint_isbd = $indexint->isbd_entry_lien_gestion;
         }
         $this->isbd .= "<br /><b>{$msg[indexint_catal_title]}</b>&nbsp;: " . $indexint_isbd;
     }
     //code (ISSN,...)
     if ($this->notice->code) {
         $this->isbd .= "<br /><b>{$msg[165]}</b>&nbsp;: " . $this->notice->code;
     }
     $authperso = new authperso_notice($this->notice_id);
     $this->isbd .= $authperso->get_notice_display();
     //Champs personalisés
     $perso_aff = "";
     if (!$this->p_perso->no_special_fields) {
         $perso_ = $this->p_perso->show_fields($this->notice_id);
         for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
             $p = $perso_["FIELDS"][$i];
             // ajout de && ($p['OPAC_SHOW']||$this->show_opac_hidden_fields) afin de masquer les champs masqué de l'POAC en diff de bannette.
             if ($p["AFF"] && ($p['OPAC_SHOW'] || $this->show_opac_hidden_fields)) {
                 $perso_aff .= "<br />" . $p["TITRE"] . " " . $p["AFF"];
             }
         }
     }
     if ($perso_aff) {
         $this->isbd .= $perso_aff;
     }
     //Notices liées
     if (count($this->childs) && !$this->print_mode && !$this->no_link) {
         $link = $base_path . '/catalog.php?categ=isbd&id=!!id!!';
         $link_expl = $base_path . '/catalog.php?categ=edit_expl&id=!!notice_id!!&cb=!!expl_cb!!&expl_id=!!expl_id!!';
         $link_explnum = $base_path . '/catalog.php?categ=edit_explnum&id=!!notice_id!!&explnum_id=!!explnum_id!!';
         global $relation_typedown;
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         if (!$load_tablist_js) {
             $aff_childs = "<script type='text/javascript' src='" . $base_path . "/javascript/tablist.js'></script>\n";
         }
         $aff_childs .= "<br />";
         $load_tablist_js = 1;
         $anti_loop = $this->anti_loop;
         $anti_loop[] = $this->notice_id;
         $n_childs = 0;
         while ((list($rel_type, $child_notices) = each($this->childs)) && $n_childs < 100) {
             $aff_intermediaire = "";
             for ($i = 0; $i < count($child_notices); $i++) {
                 $as = array_search($child_notices[$i], $anti_loop);
                 if ($as === false) {
                     global $pmb_notice_fille_format;
                     if ($pmb_notice_fille_format) {
                         $level_fille = 0;
                     } else {
                         $level_fille = 6;
                     }
                     // il faut aller chercher le niveau biblio et niveau hierar de la notice liée
                     $requete_nbnh = "select l.niveau_biblio as lnb, l.niveau_hierar as lnh, rank from notices as l join notices_relations on num_notice=notice_id where notice_id='" . $child_notices[$i] . "' ";
                     $r_rel = pmb_mysql_fetch_object(pmb_mysql_query($requete_nbnh));
                     if ($r_rel->rank != $i) {
                         $req = "update notices_relations set rank='{$i}' where num_notice='" . $child_notices[$i] . "' and relation_type='" . $rel_type . "' and linked_notice='" . $anti_loop[count($serial->anti_loop) - 1] . "'";
                         pmb_mysql_query($req, $dbh);
                     }
                     if ($r_rel->lnb == 'a' && $r_rel->lnh == '2') {
                         // c'est un dépouillement de bulletin
                         global $link_serial, $link_analysis, $link_bulletin, $link_explnum_analysis;
                         if (!$link_analysis) {
                             $link_analysis = $base_path . "/catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!bul_id!!&art_to_show=!!id!!";
                         }
                         $serial = new serial_display($child_notices[$i], $level_fille, $link_serial, $link_analysis, $link_bulletin, "", $link_explnum_analysis, 0, 0, 1, 1, 1, 0, 0, $anti_loop);
                         if (count($serial->anti_loop) == 1 && $sort_children) {
                             //Drag pour trier les notices filles
                             $id_elt = $serial->notice_id . ($serial->anti_loop ? "_p" . implode("_", $serial->anti_loop) : "");
                             $drag_fille = "<div id=\"drag_" . $id_elt . "\" handler=\"handle_" . $id_elt . "\" dragtype='daughter' draggable='yes' recepttype='daughter' recept='yes'\n\t\t\t\t\t\t\t\t\tdragicon=\"" . $base_path . "/images/icone_drag_notice.png\" dragtext='" . htmlentities($serial->tit1, ENT_QUOTES, $charset) . "' callback_before=\"is_expandable\"\n\t\t\t\t\t\t\t\t\tcallback_after=\"\" downlight=\"noti_downlight\" highlight=\"noti_highlight\" fille='{$child_notices[$i]}' pere='" . $anti_loop[count($serial->anti_loop) - 1] . "' order='{$i}' type_rel=\"{$rel_type}\">";
                             $drag_fille .= "<span id=\"handle_" . $id_elt . "\" style=\"float:left; padding-right : 7px\"><img src=\"" . $base_path . "/images/sort.png\" style='width:12px; vertical-align:middle' /></span>";
                             $display_fille = $serial->result;
                         } else {
                             $drag_fille = "";
                             $display_fille = $pmb_notice_fille_format ? "<li>" . $serial->result . "</li>" : $serial->result;
                         }
                         $aff = $drag_fille . $display_fille;
                         if ($drag_fille) {
                             $aff .= "</div>";
                         }
                     } elseif ($r_rel->lnb == 'b' && $r_rel->lnh == '2') {
                         // c'est une notice de bulletin, on n'affiche rien en aff de notice chapeau
                         //On décrémente pour neutraliser l'incrément ultérieur : on ne compte pas les liens vers notices de bulletin dans la limite de liens affichés
                         $n_childs--;
                         $aff = "";
                     } elseif ($r_rel->lnb == 's' && $r_rel->lnh == '1') {
                         // c'est une notice de pério
                         global $link_serial, $link_analysis, $link_bulletin, $link_explnum_serial;
                         $link_serial_sub = $base_path . "/catalog.php?categ=serials&sub=view&serial_id=" . $child_notices[$i];
                         $serial = new serial_display($child_notices[$i], $level_fille, $link_serial_sub, $link_analysis, $link_bulletin, "", $link_explnum_serial, 0, $this->print_mode, 1, 1, 1, 0, 0, $anti_loop);
                         if (count($serial->anti_loop) == 1 && $sort_children) {
                             //Drag pour trier les notices filles
                             $id_elt = $serial->notice_id . ($serial->anti_loop ? "_p" . implode("_", $serial->anti_loop) : "");
                             $drag_fille = "<div id=\"drag_" . $id_elt . "\" handler=\"handle_" . $id_elt . "\" dragtype='daughter' draggable='yes' recepttype='daughter' recept='yes'\n\t\t\t\t\t\t\t\t\tdragicon=\"" . $base_path . "/images/icone_drag_notice.png\" dragtext='" . htmlentities($serial->tit1, ENT_QUOTES, $charset) . "' callback_before=\"is_expandable\"\n\t\t\t\t\t\t\t\t\tcallback_after=\"\" downlight=\"noti_downlight\" highlight=\"noti_highlight\" fille='{$child_notices[$i]}' pere='" . $anti_loop[count($serial->anti_loop) - 1] . "' order='{$i}' type_rel=\"{$rel_type}\">";
                             $drag_fille .= "<span id=\"handle_" . $id_elt . "\" style=\"float:left; padding-right : 7px\"><img src=\"" . $base_path . "/images/sort.png\" style='width:12px; vertical-align:middle' /></span>";
                             $display_fille = $serial->result;
                         } else {
                             $drag_fille = "";
                             $display_fille = $pmb_notice_fille_format ? "<li>" . $serial->result . "</li>" : $serial->result;
                         }
                         $aff = $drag_fille . $display_fille;
                         if ($drag_fille) {
                             $aff .= "</div>";
                         }
                     } else {
                         $display = new mono_display($child_notices[$i], $level_fille, $link, 1, $link_expl, '', $link_explnum, 1, 0, 1, 1, $anti_loop, $this->drag);
                         if (count($display->anti_loop) == 1 && $sort_children) {
                             //Drag pour trier les notices filles
                             $id_elt = $display->notice_id . ($display->anti_loop ? "_p" . implode("_", $display->anti_loop) : "");
                             $drag_fille = "<div id=\"drag_" . $id_elt . "\" handler=\"handle_" . $id_elt . "\" dragtype='daughter' draggable='yes' recepttype='daughter' recept='yes'\n\t\t\t\t\t\t\t\t\tdragicon=\"" . $base_path . "/images/icone_drag_notice.png\" dragtext='" . htmlentities($display->tit1, ENT_QUOTES, $charset) . "' callback_before=\"is_expandable\"\n\t\t\t\t\t\t\t\t\tcallback_after=\"\" downlight=\"noti_downlight\" highlight=\"noti_highlight\" fille='{$child_notices[$i]}' pere='" . $anti_loop[count($display->anti_loop) - 1] . "' order='{$i}' type_rel=\"{$rel_type}\" >";
                             $drag_fille .= "<span id=\"handle_" . $id_elt . "\" style=\"float:left; padding-right : 7px\"><img src=\"" . $base_path . "/images/sort.png\" style='width:12px; vertical-align:middle' /></span>";
                             $display_fille = $display->result;
                         } else {
                             $drag_fille = "";
                             $display_fille = $pmb_notice_fille_format ? "<li>" . $display->result . "</li>" : $display->result;
                         }
                         $display->result = str_replace("<!-- !!bouton_modif!! -->", " ", $display->result);
                         $aff = $drag_fille . $display_fille;
                         $this->nb_expl += $display->nb_expl;
                         if ($drag_fille) {
                             $aff .= "</div>";
                         }
                     }
                     $aff_intermediaire .= $aff;
                 }
                 $n_childs++;
             }
             if ($aff_intermediaire) {
                 $aff_childs .= "<b>" . $relation_typedown->table[$rel_type] . "</b>";
                 $aff_childs .= "<blockquote>";
                 if ($pmb_notice_fille_format) {
                     $aff_childs .= "<ul class='notice_rel'>";
                 }
                 $aff_childs .= $aff_intermediaire;
                 if ($pmb_notice_fille_format) {
                     $aff_childs .= "</ul>";
                 }
                 $aff_childs .= "</blockquote>";
             }
         }
         $this->isbd .= $aff_childs;
     }
     $this->do_image($this->isbd);
     $this->isbd .= "<!-- !!avis_notice!! -->";
     //Documents numériques
     if ($this->show_explnum) {
         $explnum = show_explnum_per_notice($this->notice_id, 0, $this->lien_explnum);
         if ($explnum) {
             $this->isbd .= "<br /><b>{$msg['explnum_docs_associes']}</b> (" . show_explnum_per_notice($this->notice->notice_id, 0, $this->lien_explnum, array(), true) . ")<br />" . $explnum;
         }
         if ($this->notice->niveau_biblio == 'a' && $this->notice->niveau_hierar == '2' && SESSrights & CATALOGAGE_AUTH && $this->bouton_explnum) {
             $this->isbd .= "<br /><input type='button' class='bouton' value=' {$msg['explnum_ajouter_doc']} ' onClick=\"document.location='" . $base_path . "/catalog.php?categ=serials&analysis_id={$this->notice_id}&sub=analysis&action=explnum_form&bul_id={$this->bul_id}'\">";
         }
     }
     // fin du niveau 5
     if ($this->level == 5) {
         return;
     }
     // début du niveau 6
     if ($this->notice->niveau_biblio == "s") {
         // Si notice-mère alors on compte le nombre de numéros (bulletins)
         $this->isbd .= $this->get_etat_periodique();
         $this->isbd .= $this->print_etat_periodique();
         //état des collections
         $collstate = new collstate(0, $this->notice_id);
         //$this->isbd.= $collstate->get_callstate_isbd();
         if ($pmb_etat_collections_localise) {
             $collstate->get_display_list("", 0, 0, 0, 1, 0, true);
         } else {
             $collstate->get_display_list("", 0, 0, 0, 0, 0, true);
         }
         if ($collstate->nbr) {
             $this->isbd .= "<br /><b>" . $msg["abts_onglet_collstate"] . "</b><br />";
             $this->isbd .= $collstate->liste;
         }
     }
     // fin du niveau 6
     return;
 }
Beispiel #2
0
 function serial_delete()
 {
     global $dbh;
     global $pmb_synchro_rdf, $pmb_notice_img_folder_id;
     $requete = "SELECT bulletin_id,num_notice from bulletins WHERE bulletin_notice='" . $this->serial_id . "' ";
     $myQuery1 = pmb_mysql_query($requete, $dbh);
     if ($myQuery1 && pmb_mysql_num_rows($myQuery1)) {
         while ($bul = pmb_mysql_fetch_object($myQuery1)) {
             $bulletin = new bulletinage($bul->bulletin_id);
             $bulletin->delete();
         }
     }
     //Suppression de la vignette de la notice si il y en a une d'uploadée
     if ($pmb_notice_img_folder_id) {
         $req = "select repertoire_path from upload_repertoire where repertoire_id ='" . $pmb_notice_img_folder_id . "'";
         $res = pmb_mysql_query($req, $dbh);
         if (pmb_mysql_num_rows($res)) {
             $rep = pmb_mysql_fetch_object($res);
             $img = $rep->repertoire_path . "img_" . $this->serial_id;
             @unlink($img);
         }
     }
     if ($pmb_synchro_rdf) {
         $synchro_rdf = new synchro_rdf();
         $synchro_rdf->delRdf($this->serial_id, 0);
     }
     // élimination des docs numériques
     $req_explNum = "select explnum_id from explnum where explnum_notice='" . $this->serial_id . "' ";
     $result_explNum = @pmb_mysql_query($req_explNum, $dbh);
     while ($explNum = pmb_mysql_fetch_object($result_explNum)) {
         $myExplNum = new explnum($explNum->explnum_id);
         $myExplNum->delete();
     }
     $requete = "DELETE FROM responsability WHERE responsability_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($requete, $dbh);
     // suppression des entrées dans les caddies
     $requete = "delete from caddie_content using caddie, caddie_content where caddie_id=idcaddie and type='NOTI' and object_id='" . $this->serial_id . "' ";
     @pmb_mysql_query($requete, $dbh);
     //élimination des champs persos
     $p_perso = new parametres_perso("notices");
     $p_perso->delete_values($this->serial_id);
     // suppression des audits
     audit::delete_audit(AUDIT_NOTICE, $this->serial_id);
     // suppression des categories
     $rqt_del = "delete from notices_categories where notcateg_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($rqt_del, $dbh);
     // suppression des bannettes
     $rqt_del = "delete from bannette_contenu where num_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($rqt_del, $dbh);
     // suppression des tags
     $rqt_del = "delete from tags where num_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($rqt_del, $dbh);
     // suppression des avis
     $rqt_del = "delete from avis where num_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($rqt_del, $dbh);
     //suppression des langues
     $query = "delete from notices_langues where num_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($query, $dbh);
     // suppression index global
     $query = "delete from notices_global_index where num_notice='" . $this->serial_id . "' ";
     @pmb_mysql_query($query, $dbh);
     // Effacement des occurences de la notice ds la table notices_mots_global_index :
     $requete = "DELETE FROM notices_mots_global_index WHERE id_notice=" . $this->serial_id;
     @pmb_mysql_query($requete, $dbh);
     // Effacement des occurences de la notice ds la table notices_fields_global_index :
     $requete = "DELETE FROM notices_fields_global_index WHERE id_notice=" . $this->serial_id;
     @pmb_mysql_query($requete, $dbh);
     //Suppression de la reference a la notice dans la table suggestions
     $query = "UPDATE suggestions set num_notice = 0 where num_notice=" . $this->serial_id;
     @pmb_mysql_query($query, $dbh);
     //Suppression de la reference a la notice dans la table lignes_actes
     $requete = "UPDATE lignes_actes set num_produit=0, type_ligne=0 where num_produit='" . $this->serial_id . "' and type_ligne in ('1','5') ";
     @pmb_mysql_query($requete, $dbh);
     // liens entre notices
     $requete = "DELETE FROM notices_relations WHERE linked_notice='" . $this->serial_id . "' OR num_notice='" . $this->serial_id . "' ";
     pmb_mysql_query($requete, $dbh);
     //suppression des droits d'acces user_notice
     $requete = "delete from acces_res_1 where res_num=" . $this->serial_id;
     @pmb_mysql_query($requete, $dbh);
     //suppression des droits d'acces empr_notice
     $requete = "delete from acces_res_2 where res_num=" . $this->serial_id;
     @pmb_mysql_query($requete, $dbh);
     // suppression des modeles
     $requete = "SELECT modele_id from abts_modeles WHERE num_notice='" . $this->serial_id . "' ";
     $result_modele = pmb_mysql_query($requete, $dbh);
     while ($modele = pmb_mysql_fetch_object($result_modele)) {
         $mon_modele = new abts_modele($modele->modele_id);
         $mon_modele->delete();
     }
     // Suppression des etats de collections
     $collstate = new collstate(0, $this->serial_id);
     $collstate->delete();
     //si intégré depuis une source externe, on suprrime aussi la référence
     $query = "delete from notices_externes where num_notice=" . $this->serial_id;
     @pmb_mysql_query($query, $dbh);
     // on supprime la notice
     $requete = "DELETE FROM notices WHERE notice_id='" . $this->serial_id . "' ";
     pmb_mysql_query($requete, $dbh);
     $result = pmb_mysql_affected_rows($dbh);
     //Suppression dans les listes de lecture partagées
     $requete = "SELECT id_liste, notices_associees from opac_liste_lecture";
     $res = pmb_mysql_query($requete, $dbh);
     $id_tab = array();
     while ($notices = pmb_mysql_fetch_object($res)) {
         $id_tab = explode(',', $notices->notices_associees);
         for ($i = 0; $i < sizeof($id_tab); $i++) {
             if ($id_tab[$i] == $this->serial_id) {
                 unset($id_tab[$i]);
             }
         }
         $requete = "UPDATE opac_liste_lecture set notices_associees='" . addslashes(implode(',', $id_tab)) . "' where id_liste='" . $notices->id_liste . "'";
         pmb_mysql_query($requete, $dbh);
     }
     $req = "delete from notices_authperso where notice_authperso_notice_num=" . $this->serial_id;
     pmb_mysql_query($req, $dbh);
     return $result;
 }
Beispiel #3
0
 function delete()
 {
     global $dbh;
     if ($this->id) {
         //On nettoye l'index
         if (!$this->serial_id) {
             $req = "SELECT id_serial FROM collections_state WHERE collstate_id='" . $this->id . "'";
             $res = pmb_mysql_query($req, $dbh);
             if ($res && pmb_mysql_num_rows($res)) {
                 $this->serial_id = pmb_mysql_result($res, 0, 0);
             }
         }
         //elimination des champs persos
         $p_perso = new parametres_perso("collstate");
         $p_perso->delete_values($this->id);
         pmb_mysql_query("DELETE from collections_state WHERE collstate_id='" . $this->id . "' ", $dbh);
     } else {
         if ($this->serial_id) {
             $myQuery = pmb_mysql_query("SELECT collstate_id FROM collections_state WHERE id_serial='" . $this->serial_id . "' ", $dbh);
             if (pmb_mysql_num_rows($myQuery)) {
                 while ($coll = pmb_mysql_fetch_object($myQuery)) {
                     $my_collstate = new collstate($coll->collstate_id);
                     $my_collstate->delete();
                 }
             }
         }
     }
     //On nettoye l'index
     notice::majNoticesMotsGlobalIndex($this->serial_id, 'collstate');
 }
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: collstate_form.inc.php,v 1.1 2009-03-10 08:31:00 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/collstate.class.php";
$collstate = new collstate($id, $serial_id);
echo $collstate->do_form();
 function affichage_etat_collections()
 {
     global $msg;
     global $pmb_etat_collections_localise;
     $collstate = new collstate(0, $this->notice_id);
     if ($pmb_etat_collections_localise) {
         $collstate->get_display_list("", 0, 0, 0, 1);
     } else {
         $collstate->get_display_list("", 0, 0, 0, 0);
     }
     if ($collstate->nbr) {
         $affichage .= "<h3><span id='titre_exemplaires'>" . $msg["perio_etat_coll"] . "</span></h3>";
         $affichage .= $collstate->liste;
     }
     return $affichage;
 }
<?php

// +-------------------------------------------------+
// | 2002-2007 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: view_collstate.inc.php,v 1.2 2013-09-19 14:08:34 dgoron Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
global $class_path, $include_path;
global $tpl_collstate_liste;
require_once $class_path . "/collstate.class.php";
$collstate = new collstate(0, $serial_id);
$filtre = new stdClass();
$filtre->location = $location;
if ($pmb_etat_collections_localise && $location == 0) {
    $collstate->get_display_list($base_url, $filtre, $debut, $page, 1);
} else {
    $collstate->get_display_list($base_url, $filtre, $debut, $page, 0);
}
$bulletins = $collstate->liste;
$pages_display = $collstate->pagination;
 function affichage_etat_collections()
 {
     global $msg;
     global $pmb_etat_collections_localise;
     global $tpl_collstate_liste, $tpl_collstate_liste_line;
     $tpl_collstate_liste[2] = "\r\n\t\t<table class='exemplaires' cellpadding='2' width='100%'>\r\n\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>" . $msg["collstate_form_emplacement"] . "</th>\t\t\r\n\t\t\t\t\t<th>" . $msg["collstate_form_support"] . "</th>\r\n\t\t\t\t\t<th>" . $msg["collstate_form_statut"] . "</th>\t\t\t\t\r\n\t\t\t\t\t<th>" . $msg["collstate_form_collections"] . "</th>\r\n\t\t\t\t\t<th>" . $msg["collstate_form_lacune"] . "</th>\t\t\r\n\t\t\t\t</tr>\r\n\t\t\t\t!!collstate_liste!!\t\r\n\t\t\t</tbody>\t\r\n\t\t</table>\r\n\t\t";
     $tpl_collstate_liste_line[2] = "\r\n\t\t<tr class='!!pair_impair!!' !!tr_surbrillance!! >\r\n\t\t\t<!-- surloc -->\r\n\t\t\t<td !!tr_javascript!! >!!emplacement_libelle!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!type_libelle!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!statut_libelle!!</td>\t\r\n\t\t\t<td !!tr_javascript!! >!!state_collections!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!lacune!!</td>\r\n\t\t</tr>";
     $tpl_collstate_liste[3] = "\r\n\t\t<table class='exemplaires' cellpadding='2' width='100%'>\r\n\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<!-- surloc -->\r\n\t\t\t\t\t<th>" . $msg["collstate_form_localisation"] . "</th>\t\t\r\n\t\t\t\t\t<th>" . $msg["collstate_form_emplacement"] . "</th>\t\t\r\n\t\t\t\t\t<th>" . $msg["collstate_form_support"] . "</th>\r\n\t\t\t\t\t<th>" . $msg["collstate_form_statut"] . "</th>\t\t\r\n\t\t\t\t\t<th>" . $msg["collstate_form_collections"] . "</th>\r\n\t\t\t\t\t<th>" . $msg["collstate_form_lacune"] . "</th>\t\t\r\n\t\t\t\t</tr>\r\n\t\t\t\t!!collstate_liste!!\r\n\t\t\t</tbody>\t\r\n\t\t</table>\r\n\t\t";
     $tpl_collstate_surloc_liste = "<th>" . $msg["collstate_form_surloc"] . "</th>";
     $tpl_collstate_liste_line[3] = "\r\n\t\t<tr class='!!pair_impair!!' !!tr_surbrillance!! >\r\n\t\t\t<!-- surloc -->\r\n\t\t\t<td !!tr_javascript!! >!!localisation!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!emplacement_libelle!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!type_libelle!!</td>\t\r\n\t\t\t<td !!tr_javascript!! >!!statut_libelle!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!state_collections!!</td>\r\n\t\t\t<td !!tr_javascript!! >!!lacune!!</td>\r\n\t\t</tr>";
     $collstate = new collstate(0, $this->notice_id);
     if ($pmb_etat_collections_localise) {
         $collstate->get_display_list("", 0, 0, 0, 3);
     } else {
         $collstate->get_display_list("", 0, 0, 0, 2);
     }
     if ($collstate->nbr) {
         $affichage .= "<h3><span id='titre_exemplaires'>" . $msg["perio_etat_coll"] . "</span></h3>";
         $affichage .= $collstate->liste;
     }
     return $affichage;
 }
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: collstate_delete.inc.php,v 1.1 2009-03-10 08:31:00 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/collstate.class.php";
$collstate = new collstate($id);
$collstate->delete();
$view = "collstate";
include './catalog/serials/serial_view.inc.php';
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: collstate_update.inc.php,v 1.1 2009-03-10 08:31:00 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/collstate.class.php";
$collstate = new collstate($id, $serial_id);
$collstate->update_from_form();
$view = "collstate";
$location = $location_id;
include './catalog/serials/serial_view.inc.php';