function genere_notice_childs()
 {
     global $msg, $opac_notice_affichage_class;
     $this->antiloop[$this->notice_id] = true;
     //Notices liees
     if ($this->notice_childs) {
         return $this->notice_childs;
     }
     if (count($this->childs) && !$this->to_print) {
         if ($this->seule) {
             $affichage = "";
         } else {
             $affichage = "<a href='" . str_replace("!!id!!", "es" . $this->notice_id, $this->lien_rech_notice) . "&seule=1'>" . $msg[voir_contenu_detail] . "</a>";
         }
         global $relation_typedown;
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         $affichage .= "<br />";
         while (list($rel_type, $child_notices) = each($this->childs)) {
             $affichage = "<b>" . $relation_typedown->table[$rel_type] . "</b>";
             if ($this->seule) {
             } else {
                 $affichage .= "<ul>";
             }
             $bool = false;
             for ($i = 0; $i < count($child_notices) && ($i < 20 || $this->seule); $i++) {
                 if (!$this->antiloop[$child_notices[$i]]) {
                     if ($opac_notice_affichage_class) {
                         $child_notice = new $opac_notice_affichage_class($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print);
                     } else {
                         $child_notice = new notice_affichage($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print);
                     }
                     if ($child_notice->notice->niveau_biblio != 'b' || $child_notice->notice->niveau_biblio == 'b' && $this->notice->niveau_biblio != "s") {
                         $child_notice->antiloop = $this->antiloop;
                         $child_notice->do_header();
                         if ($this->seule) {
                             $child_notice->do_isbd();
                             $child_notice->do_public();
                             if ($this->double_ou_simple == 2) {
                                 $child_notice->genere_double(1, $this->premier);
                             }
                             $child_notice->genere_simple(1, $this->premier);
                             $affichage .= $child_notice->result;
                         } else {
                             $child_notice->visu_expl = 0;
                             $child_notice->visu_explnum = 0;
                             $affichage .= "<li><a href='" . str_replace("!!id!!", "es" . $child_notices[$i], $this->lien_rech_notice) . "'>" . $child_notice->notice_header . "</a></li>";
                         }
                         $bool = true;
                     }
                 }
             }
             if ($bool == true) {
                 $aff_childs .= $affichage;
             }
             if (count($child_notices) > 20 && !$this->seule) {
                 $aff_childs .= "<br />";
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "<a href='" . str_replace("!!id!!", "es" . $this->notice_id, $this->lien_rech_notice) . "&seule=1'>";
                 }
                 $aff_childs .= sprintf($msg["see_all_childs"], 20, count($child_notices), count($child_notices) - 20);
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "</a>";
                 }
             }
             if ($this->seule) {
             } else {
                 $aff_childs .= "</ul>";
             }
         }
         $this->notice_childs = $aff_childs . "<br />";
     } else {
         $this->notice_childs = "";
     }
     return $this->notice_childs;
 }
 function genere_notice_childs()
 {
     global $msg, $opac_url_base, $opac_notice_affichage_class;
     global $memo_notice;
     global $icon_doc, $biblio_doc, $tdoc;
     global $relation_typedown;
     $onglet_perso = new notice_onglets();
     $this->antiloop[$this->notice_id] = true;
     //Notices liées
     if ($this->notice_childs) {
         return $this->notice_childs;
     }
     if (count($this->childs) && !$this->to_print) {
         if ($this->seule) {
             $affichage = "";
         } else {
             $affichage = "<a href='" . str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice) . "&seule=1'>" . $msg[voir_contenu_detail] . "</a>";
         }
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         $affichage .= "<br />";
         while (list($rel_type, $child_notices) = each($this->childs)) {
             $affichage = "<br /><b>" . $relation_typedown->table[$rel_type] . "</b>";
             if ($this->seule) {
             } else {
                 $affichage .= "<ul>";
             }
             $bool = false;
             for ($i = 0; $i < count($child_notices); $i++) {
                 if (!$this->antiloop[$child_notices[$i]]) {
                     //if(!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"]!='b' && $memo_notice[$child_notices[$i]]["header"]) {
                     if (!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"] != 'b' && $memo_notice[$child_notices[$i]]["header_without_doclink"]) {
                         //$affichage.="<li><a href='".str_replace("!!id!!",$child_notices[$i],$this->lien_rech_notice)."'>".$memo_notice[$child_notices[$i]]["header"]."</a></li>";
                         $icon = $icon_doc[$memo_notice[$child_notices[$i]]["niveau_biblio"] . $memo_notice[$child_notices[$i]]["typdoc"]];
                         if ($icon) {
                             $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$memo_notice[$child_notices[$i]]["niveau_biblio"]], $msg["info_bulle_icon"]);
                             $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$memo_notice[$child_notices[$i]]["typdoc"]], $info_bulle_icon);
                             $html_icon = "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . $info_bulle_icon . "' title='" . $info_bulle_icon . "'/>";
                         } else {
                             $html_icon = "";
                         }
                         $affichage .= "<br /><table><tr><td width='3%'><li style='list-style-type: none;'>" . $html_icon . "</td><td width='87%'><a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $memo_notice[$child_notices[$i]]["header_without_doclink"] . "</a></td><td>" . $child_notice->notice_header_doclink . "</td></tr></table></li>";
                         $bool = true;
                     } else {
                         if (!$memo_notice[$child_notices[$i]]["niveau_biblio"]) {
                             if ($this->seule) {
                                 $header_only = 0;
                             } else {
                                 $header_only = 1;
                             }
                             if ($opac_notice_affichage_class) {
                                 $child_notice = new $opac_notice_affichage_class($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             } else {
                                 $child_notice = new notice_affichage($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             }
                             if ($child_notice->notice->niveau_biblio != 'b' || $child_notice->notice->niveau_biblio == 'b' && $this->notice->niveau_biblio != "s") {
                                 $child_notice->antiloop = $this->antiloop;
                                 $child_notice->do_header();
                                 if ($this->seule) {
                                     $child_notice->do_isbd();
                                     $child_notice->do_public();
                                     if ($this->double_ou_simple == 2) {
                                         $child_notice->genere_double(1, $this->premier);
                                     }
                                     $child_notice->genere_simple(1, $this->premier);
                                     $child_notice->result = $onglet_perso->insert_onglets($child_notices[$i], $child_notice->result);
                                     $affichage .= $child_notice->result;
                                 } else {
                                     $child_notice->visu_expl = 0;
                                     $child_notice->visu_explnum = 0;
                                     $icon = $icon_doc[$child_notice->notice->niveau_biblio . $child_notice->notice->typdoc];
                                     if ($icon) {
                                         $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$child_notice->notice->niveau_biblio], $msg["info_bulle_icon"]);
                                         $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$child_notice->notice->typdoc], $info_bulle_icon);
                                         $html_icon = "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . $info_bulle_icon . "' title='" . $info_bulle_icon . "'/>";
                                     } else {
                                         $html_icon = "";
                                     }
                                     $affichage .= "<br /><table><tr><td width='3%'><li style='list-style-type: none;'>" . $html_icon . "</td><td width='87%'><a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $child_notice->notice_header . "</a></td><td>" . $child_notice->notice_header_doclink . "</td></tr></table></li>";
                                 }
                                 $bool = true;
                             }
                         }
                     }
                 }
             }
             if ($bool) {
                 $aff_childs .= $affichage;
             }
             if ($this->seule) {
             } else {
                 $aff_childs .= "</ul>";
             }
         }
         $this->notice_childs = $aff_childs . "<br />";
     } else {
         $this->notice_childs = "";
     }
     return $this->notice_childs;
 }
Ejemplo n.º 3
0
 function construit_contenu_HTML($use_limit = 1)
 {
     global $dbh;
     global $msg;
     global $opac_url_base;
     global $liens_opac;
     $url_base_opac = $opac_url_base . "index.php?database=" . DATA_BASE . "&lvl=notice_display&id=";
     if ($this->nb_notices_diff && $use_limit) {
         $limitation = " LIMIT {$this->nb_notices_diff} ";
     }
     $requete = "select num_notice from bannette_contenu, notices where num_bannette='" . $this->id_bannette . "' and notice_id=num_notice order by index_serie, tnvol, index_sew {$limitation} ";
     $resultat = pmb_mysql_query($requete, $dbh);
     // paramétrage :
     $environement["short"] = 6;
     $environement["ex"] = 0;
     $environement["exnum"] = 0;
     if ($this->nb_notices_diff >= $this->nb_notices || !$this->nb_notices_diff) {
         $nb_envoyees = $this->nb_notices;
     } else {
         $nb_envoyees = $this->nb_notices_diff;
     }
     $resultat_aff .= "<hr />";
     $resultat_aff .= sprintf($msg["dsi_diff_n_notices"], $nb_envoyees, $this->nb_notices);
     $resultat_aff .= "<hr />";
     while ($r = pmb_mysql_fetch_object($resultat)) {
         // afin de ne pas afficher les liens pour réservation de doc dans le mail :
         global $opac_resa;
         $opac_resa = 0;
         $depliable = 0;
         $notice = new notice_affichage($r->num_notice, $liens_opac);
         $notice->do_header();
         $notice->do_isbd();
         $notice->genere_simple($depliable, 'ISBD');
         $resultat_aff .= "<a href='" . $url_base_opac . $r->num_notice . "'><b>" . $notice->notice_header . "</b></a><br /><br />\r\n";
         $resultat_aff .= $notice->notice_isbd;
         $resultat_aff .= "<hr />\r\n";
     }
     if ($this->typeexport) {
         $this->export_contenu = cree_export_notices($this->liste_id_notice, start_export::get_id_by_path($this->typeexport), 1);
     }
     return $resultat_aff;
 }
 function genere_notice_childs()
 {
     global $msg, $opac_notice_affichage_class;
     global $memo_notice;
     global $relation_typedown;
     /* début modif */
     //Je ne veux que les liens vers les notices liées, pas de notices dépliables.
     $this->seule = 0;
     /* fin modif */
     $onglet_perso = new notice_onglets();
     $this->antiloop[$this->notice_id] = true;
     //Notices liées
     if ($this->notice_childs) {
         return $this->notice_childs;
     }
     if (count($this->childs) && !$this->to_print) {
         if ($this->seule) {
             $affichage = "";
         } else {
             $affichage = "<a href='" . str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice) . "&seule=1'>" . $msg[voir_contenu_detail] . "</a>";
         }
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         $affichage .= "<br />";
         while (list($rel_type, $child_notices) = each($this->childs)) {
             /* début modif */
             $affichage = "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $relation_typedown->table[$rel_type] . " :</span></td>\n";
             if ($this->seule) {
             } else {
                 $affichage .= "<td>";
             }
             /* fin modif */
             $bool = false;
             for ($i = 0; $i < count($child_notices) && ($i < 100 || $this->seule); $i++) {
                 if (!$this->antiloop[$child_notices[$i]]) {
                     //if(!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"]!='b' && $memo_notice[$child_notices[$i]]["header"]) {
                     if (!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"] != 'b' && $memo_notice[$child_notices[$i]]["header_without_doclink"]) {
                         //$affichage.="<li><a href='".str_replace("!!id!!",$child_notices[$i],$this->lien_rech_notice)."'>".$memo_notice[$child_notices[$i]]["header"]."</a></li>";
                         $affichage .= "<a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $memo_notice[$child_notices[$i]]["header_without_doclink"] . "</a><br/>";
                         $bool = true;
                     } else {
                         if (!$memo_notice[$child_notices[$i]]["niveau_biblio"]) {
                             if ($this->seule) {
                                 $header_only = 0;
                             } else {
                                 $header_only = 1;
                             }
                             if ($opac_notice_affichage_class) {
                                 $child_notice = new $opac_notice_affichage_class($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             } else {
                                 $child_notice = new notice_affichage($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             }
                             if ($child_notice->notice->niveau_biblio != 'b' || $child_notice->notice->niveau_biblio == 'b' && $this->notice->niveau_biblio != "s") {
                                 $child_notice->antiloop = $this->antiloop;
                                 $child_notice->do_header();
                                 if ($this->seule) {
                                     $child_notice->do_isbd();
                                     $child_notice->do_public();
                                     if ($this->double_ou_simple == 2) {
                                         $child_notice->genere_double(1, $this->premier);
                                     }
                                     $child_notice->genere_simple(1, $this->premier);
                                     $child_notice->result = $onglet_perso->insert_onglets($child_notices[$i], $child_notice->result);
                                     $affichage .= $child_notice->result;
                                 } else {
                                     $child_notice->visu_expl = 0;
                                     $child_notice->visu_explnum = 0;
                                     /* début modif */
                                     $affichage .= "<a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $child_notice->notice_header . "</a><br/>";
                                     /* fin modif */
                                 }
                                 $bool = true;
                             }
                         }
                     }
                 }
             }
             if ($bool) {
                 $aff_childs .= $affichage;
             }
             if ($bool && count($child_notices) > 100 && !$this->seule) {
                 $aff_childs .= "<br />";
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "<a href='" . str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice) . "&seule=1'>";
                 }
                 $aff_childs .= sprintf($msg["see_all_childs"], 20, count($child_notices), count($child_notices) - 20);
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "</a>";
                 }
             }
             /* début modif */
             if ($this->seule) {
             } else {
                 $aff_childs .= "</td>\n</tr>\n";
             }
             /* fin modif */
         }
         $this->notice_childs = $aff_childs . "<br />";
     } else {
         $this->notice_childs = "";
     }
     return $this->notice_childs;
 }