function read_notice_contenu($cmd) { global $opac_notice_affichage_class, $pmb_logs_activate; $param = unserialize(stripslashes($cmd)); if ($opac_notice_affichage_class == "") { $opac_notice_affichage_class = "notice_affichage"; } $display = new $opac_notice_affichage_class($param['id'], $param['aj_liens'], $param['aj_cart'], $param['aj_to_print'], $param['aj_header_only'], !$param['aj_no_header']); //$display->do_header_without_html(); if ($param['aj_nodocnum']) { $display->docnum_allowed = 0; } $type_aff = $param['aj_type_aff']; switch ($type_aff) { case AFF_ETA_NOTICES_ISBD: $display->do_isbd(); $display->genere_simple(0, 'ISBD'); break; case AFF_ETA_NOTICES_PUBLIC: $display->do_public(); $display->genere_simple(0, 'PUBLIC'); break; case AFF_ETA_NOTICES_BOTH: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'PUBLIC'); break; case AFF_ETA_NOTICES_BOTH_ISBD_FIRST: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'ISBD'); break; default: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'autre'); $flag_no_onglet_perso = 1; break; } $html = $display->result; if (!$flag_no_onglet_perso) { $onglet_perso = new notice_onglets(); $html = $onglet_perso->insert_onglets($param['id'], $html); } if ($param['id'] && $param['datetime'] && $param['token']) { if ($opac_notice_affichage_class::check_token($param['id'], $param['datetime'], $param['token'])) { add_value_session('tab_result_read', $param['id']); if ($pmb_logs_activate) { global $infos_notice, $infos_expl; $infos_notice = $opac_notice_affichage_class::get_infos_notice($param['id']); $infos_expl = $opac_notice_affichage_class::get_infos_expl($param['id']); generate_log(); } } } return $param['id'] . '|*|' . $html; }
function read_notice_contenu($cmd) { global $opac_notice_affichage_class; $param = unserialize(stripslashes($cmd)); if ($opac_notice_affichage_class == "") { $opac_notice_affichage_class = "notice_affichage"; } $display = new $opac_notice_affichage_class($param['id'], $param['aj_liens'], $param['aj_cart'], $param['aj_to_print'], $param['aj_header_only'], !$param['aj_no_header']); //$display->do_header_without_html(); if ($param['aj_nodocnum']) { $display->docnum_allowed = 0; } $type_aff = $param['aj_type_aff']; switch ($type_aff) { case AFF_ETA_NOTICES_ISBD: $display->do_isbd(); $display->genere_simple(0, 'ISBD'); break; case AFF_ETA_NOTICES_PUBLIC: $display->do_public(); $display->genere_simple(0, 'PUBLIC'); break; case AFF_ETA_NOTICES_BOTH: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'PUBLIC'); break; case AFF_ETA_NOTICES_BOTH_ISBD_FIRST: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'ISBD'); break; default: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'autre'); $flag_no_onglet_perso = 1; break; } $html = $display->result; if (!$flag_no_onglet_perso) { $onglet_perso = new notice_onglets(); $html = $onglet_perso->insert_onglets($param['id'], $html); } return $param['id'] . '|*|' . $html; }
$display->genere_double(0, 'PUBLIC'); break; case AFF_ETA_NOTICES_BOTH_ISBD_FIRST: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'ISBD'); break; default: $display->do_isbd(); $display->do_public(); $display->genere_double(0, 'autre'); $flag_no_onglet_perso = 1; break; } $html = $display->result; if (!$flag_no_onglet_perso) { $onglet_perso = new notice_onglets(); $html = $onglet_perso->insert_onglets($param['id'], $html); } if ($param['id'] && $param['datetime'] && $param['token']) { if ($opac_notice_affichage_class::check_token($param['id'], $param['datetime'], $param['token'])) { add_value_session('tab_result_read', $param['id']); if ($pmb_logs_activate) { global $infos_notice, $infos_expl; $infos_notice = $opac_notice_affichage_class::get_infos_notice($param['id']); $infos_expl = $opac_notice_affichage_class::get_infos_expl($param['id']); generate_log(); } } } ajax_http_send_response($html);
function aff_notice($id, $nocart = 0, $gen_header = 1, $use_cache = 0, $mode_aff_notice = "", $depliable = "", $nodocnum = 0, $enrichment = 1, $recherche_ajax_mode = 0, $show_map = 1) { global $liens_opac; global $opac_notices_format; global $opac_notices_depliable; global $opac_cart_allow; global $opac_cart_only_for_subscriber; global $opac_notice_affichage_class; global $opac_notice_enrichment; global $opac_recherche_ajax_mode; global $opac_notices_format_onglets; global $lvl, $search_type_asked; global $record_css_already_included; // Pour pas inclure la css 10 fois global $recordmodes; if ($opac_cart_allow && !$opac_cart_only_for_subscriber || $opac_cart_allow && $_SESSION["user_code"]) { $cart = 1; } else { $cart = 0; } if ($nocart) { $cart = 0; } $id += 0; //Recherche des fonctions d'affichage $entete = ''; if ($recordmodes && $id == -1) { $entete .= $recordmodes->show_mode_selector(); } $f = get_aff_function(); if ($f) { return $entete . $f($id, $cart, $gen_header, $use_cache, $mode_aff_notice, $depliable, $nodocnum, $enrichment, $recherche_ajax_mode, $show_map, $recordmodes); } if ($id > 0) { if ($mode_aff_notice !== "") { $type_aff = $mode_aff_notice; } else { $type_aff = $opac_notices_format; } if ($depliable === "") { $depliable = $opac_notices_depliable; } if ($type_aff != AFF_ETA_NOTICES_TEMPLATE_DJANGO) { $header_only = 0; if ($recherche_ajax_mode && $opac_recherche_ajax_mode) { //Si ajax, on ne charge pas tout $header_only = 1; } $current = new $opac_notice_affichage_class($id, $liens_opac, $cart, 0, $header_only, !$gen_header, $show_map); if ($nodocnum) { $current->docnum_allowed = 0; } if ($gen_header) { $current->do_header(); } if (!$current->visu_notice) { return ""; } } if ($opac_recherche_ajax_mode && $recherche_ajax_mode && $depliable && $type_aff != AFF_ETA_NOTICES_REDUIT && $type_aff != AFF_ETA_NOTICES_TEMPLATE_DJANGO) { $current->genere_ajax($type_aff, 0); $retour_aff .= $current->result; } else { switch ($type_aff) { case AFF_ETA_NOTICES_REDUIT: $retour_aff .= $current->notice_header_with_link . "<br />"; break; case AFF_ETA_NOTICES_ISBD: $current->do_isbd(); $current->genere_simple($depliable, 'ISBD'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_PUBLIC: $current->do_public(); $current->genere_simple($depliable, 'PUBLIC'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_BOTH: $current->do_isbd(); $current->do_public(); $current->genere_double($depliable, 'PUBLIC'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_BOTH_ISBD_FIRST: $current->do_isbd(); $current->do_public(); $current->genere_double($depliable, 'ISBD'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_TEMPLATE_DJANGO: global $include_path; global $opac_notices_format_django_directory; if (!$opac_notices_format_django_directory) { $opac_notices_format_django_directory = "common"; } if (!$record_css_already_included) { if (file_exists($include_path . "/templates/record/" . $opac_notices_format_django_directory . "/styles/style.css")) { $retour_aff .= "<link type='text/css' href='./includes/templates/record/" . $opac_notices_format_django_directory . "/styles/style.css' rel='stylesheet'></link>"; } $record_css_already_included = true; } switch ($lvl) { case 'notice_display': case 'bulletin_display': case 'resa': $retour_aff .= record_display::get_display_extended($id); break; case 'more_result': default: if ($search_type_asked == 'perio_a2z') { $retour_aff .= record_display::get_display_extended($id); } else { $retour_aff .= record_display::get_display_in_result($id); } break; } break; default: $current->do_isbd(); $current->do_public(); $current->genere_double($depliable, 'autre'); $retour_aff .= $current->result; $flag_no_onglet_perso = 1; break; } /* $onglets_title=""; $onglets_content=""; if($opac_notices_format_onglets){ $onglets=explode(",", $opac_notices_format_onglets); foreach($onglets as $id_tpl){ $notice_onglet=new notice_onglet($id_tpl); $onglets_title.=" <li id='onglet_tpl_".$id_tpl."_".$id."' class='isbd_public_inactive'> <a href='#' title=\"".$notice_onglet->get_onglet_header()."\" onclick=\"show_what('tpl_".$id_tpl."_', '$id'); return false;\">".$notice_onglet->get_onglet_header()."</a> </li>"; $onglets_content.=" <div id='div_tpl_".$id_tpl."_".$id."' class='onglet_tpl' style='display:none;'> ".$notice_onglet->get_onglet_content($id)." </div>"; } } $retour_aff=str_replace('<!-- onglets_perso_list -->', $onglets_title, $retour_aff); $retour_aff=str_replace('<!-- onglets_perso_content -->', $onglets_content, $retour_aff); */ if (!$flag_no_onglet_perso) { $onglet_perso = new notice_onglets(); $retour_aff = $onglet_perso->insert_onglets($id, $retour_aff); } if (!$depliable && $opac_notice_enrichment && $enrichment == 1) { $retour_aff .= "<script type='text/javascript'>getEnrichment('{$id}');</script>"; } } } return $entete . $retour_aff; }
function genere_double($depliable = 1, $premier = 'ISBD') { global $msg, $charset; global $cart_aff_case_traitement; global $opac_url_base; global $opac_visionneuse_allow; global $opac_show_social_network; global $icon_doc, $biblio_doc, $tdoc; global $opac_notice_enrichment; global $allow_tag; // l'utilisateur a-t-il le droit d'ajouter un tag global $allow_sugg; // l'utilisateur a-t-il le droit de faire une suggestion global $lvl; // pour savoir qui demande l'affichage global $opac_avis_display_mode; global $flag_no_get_bulletin; global $opac_allow_simili_search; global $opac_draggable; if ($opac_draggable) { $draggable = 'yes'; } else { $draggable = 'no'; } $this->result = ""; if (!$this->notice_id) { return; } $this->premier = $premier; $this->double_ou_simple = 2; $this->notice_childs = $this->genere_notice_childs(); if ($this->cart_allowed) { $title = $this->notice_header; if (!$title) { $title = $this->notice->tit1; } $basket = "<a href=\"cart_info.php?id=" . $this->notice_id . "&header=" . rawurlencode(strip_tags($title)) . "\" target=\"cart_info\" class=\"img_basket\"><img src=\"" . $opac_url_base . "images/basket_small_20x20.gif\" border=\"0\" title=\"" . $msg['notice_title_basket'] . "\" alt=\"" . $msg['notice_title_basket'] . "\" /></a>"; } else { $basket = ""; } //add tags if ($this->tag_allowed == 1 || $this->tag_allowed == 2 && $_SESSION["user_code"] && $allow_tag) { $img_tag .= "<a href='#' onclick=\"open('addtags.php?noticeid={$this->notice_id}','ajouter_un_tag','width=350,height=150,scrollbars=yes,resizable=yes'); return false;\"><img src='" . $opac_url_base . "images/tag.png' align='absmiddle' border='0' title=\"" . $msg['notice_title_tag'] . "\" alt=\"" . $msg['notice_title_tag'] . "\" /></a>"; } //Avis if ($opac_avis_display_mode == 0 && ($this->avis_allowed && $this->avis_allowed != 2 || $_SESSION["user_code"] && $this->avis_allowed == 2)) { $img_tag .= $this->affichage_avis($this->notice_id); } //Suggestions if ($this->sugg_allowed == 2 || $_SESSION["user_code"] && $this->sugg_allowed == 1 && $allow_sugg) { $img_tag .= $this->affichage_suggestion($this->notice_id); } // préparation de la case à cocher pour traitement panier if ($cart_aff_case_traitement) { $case_a_cocher = "<input type='checkbox' value='!!id!!' name='notice[]'/> "; } else { $case_a_cocher = ""; } if ($this->no_header) { $icon = ""; } else { $icon = $icon_doc[$this->notice->niveau_biblio . $this->notice->typdoc]; } if ($opac_notice_enrichment) { $enrichment = new enrichment(); if ($enrichment->active[$this->notice->niveau_biblio . $this->notice->typdoc]) { $source_enrichment = implode(",", $enrichment->active[$this->notice->niveau_biblio . $this->notice->typdoc]); } else { if ($enrichment->active[$this->notice->niveau_biblio]) { $source_enrichment = implode(",", $enrichment->active[$this->notice->niveau_biblio]); } } } if ($opac_allow_simili_search) { $simili_search_script_all = "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\ttab_notices_simili_search_all[tab_notices_simili_search_all.length]=" . $this->notice_id . ";\n\t\t\t\t</script>\n\t\t\t"; } $script_simili_search = $this->get_simili_script(); if ($depliable == 1) { $template = "{$simili_search_script_all}\n\t\t\t\t<div id=\"el!!id!!Parent\" class=\"notice-parent\">\n\t\t\t\t{$case_a_cocher}\n\t \t\t<img class='img_plus' src=\"./getgif.php?nomgif=plus\" name=\"imEx\" id=\"el!!id!!Img\" title=\"" . $msg['expandable_notice'] . "\" border=\"0\" onClick=\"expandBase('el!!id!!', true); {$script_simili_search} return false;\" hspace=\"3\" />"; if ($icon) { $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$this->notice->niveau_biblio], $msg["info_bulle_icon"]); $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$this->notice->typdoc], $info_bulle_icon); $template .= "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . htmlentities($info_bulle_icon, ENT_QUOTES, $charset) . "' title='" . htmlentities($info_bulle_icon, ENT_QUOTES, $charset) . "'/>"; } $template .= "\t\t\n\t\t\t\t<span class=\"notice-heada\" draggable=\"{$draggable}\" dragtype=\"notice\" id=\"drag_noti_!!id!!\">!!heada!!</span>" . $this->notice_header_doclink . "\n\t \t\t<br />\n\t\t\t\t</div>\n\t\t\t\t<div id=\"el!!id!!Child\" class=\"notice-child\" style=\"margin-bottom:6px;display:none;\" " . ($source_enrichment ? "enrichment='" . $source_enrichment . "'" : "") . " " . ($opac_allow_simili_search ? "simili_search='1'" : "") . ">"; } elseif ($depliable == 2) { $template = "{$simili_search_script_all}\n\t\t\t\t<div id=\"el!!id!!Parent\" class=\"notice-parent\">\n\t\t\t\t{$case_a_cocher}<span class=\"notices_depliables\" onClick=\"expandBase('el!!id!!', true); {$script_simili_search} return false;\">\n\t \t\t<img class='img_plus' src=\"./getgif.php?nomgif=plus&optionnel=1\" name=\"imEx\" id=\"el!!id!!Img\" title=\"" . $msg['expandable_notice'] . "\" border=\"0\" hspace=\"3\" />"; if ($icon) { $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$this->notice->niveau_biblio], $msg["info_bulle_icon"]); $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$this->notice->typdoc], $info_bulle_icon); $template .= "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . htmlentities($info_bulle_icon, ENT_QUOTES, $charset) . "' title='" . htmlentities($info_bulle_icon, ENT_QUOTES, $charset) . "'/>"; } $template .= "\t\t\n\t\t\t\t<span class=\"notice-heada\" draggable=\"no\" dragtype=\"notice\" id=\"drag_noti_!!id!!\">!!heada!!</span></span>" . $this->notice_header_doclink . "\n\t \t\t<br />\n\t\t\t\t</div>\n\t\t\t\t<div id=\"el!!id!!Child\" class=\"notice-child\" style=\"margin-bottom:6px;display:none;\" " . ($source_enrichment ? "enrichment='" . $source_enrichment . "'" : "") . " " . ($opac_allow_simili_search ? "simili_search='1'" : "") . ">"; } else { $template = "\n\t\t\t<script type='text/javascript'>\n\t\t\t\tif(param_social_network){\n\t\t\t\t\tcreeAddthis('el" . $this->notice_id . "');\n\t\t\t\t}else{\n\t\t\t\t\twaitingAddthisLoaded('el" . $this->notice_id . "');\n\t\t\t\t}\n\t\t\t</script>\n\t\t\t<div id='el!!id!!Parent' class='parent'>{$case_a_cocher}"; if ($icon) { $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$this->notice->niveau_biblio], $msg["info_bulle_icon"]); $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$this->notice->typdoc], $info_bulle_icon); $template .= "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . htmlentities($info_bulle_icon, ENT_QUOTES, $charset) . "' title='" . htmlentities($info_bulle_icon, ENT_QUOTES, $charset) . "'/>"; } $template .= "<span class=\"notice-heada\" draggable=\"{$draggable}\" dragtype=\"notice\" id=\"drag_noti_!!id!!\">!!heada!!</span>" . $this->notice_header_doclink; } $template .= "!!CONTENU!!\n\t\t\t\t\t!!SUITE!!</div>"; if ($this->notice->niveau_biblio != "b") { $this->permalink = "index.php?lvl=notice_display&id=" . $this->notice_id; } else { $this->permalink = "index.php?lvl=bulletin_display&id=" . $this->bulletin_id; } if ($opac_show_social_network) { if ($this->notice_header_without_html == "") { $this->do_header_without_html(); } $template_in .= "\n\t\t\t<div id='el!!id!!addthis' class='addthis_toolbox addthis_default_style ' \n\t\t\taddthis:url='" . $opac_url_base . "fb.php?title=" . rawurlencode(strip_tags($charset != "utf-8" ? utf8_encode($this->notice_header_without_html) : $this->notice_header_without_html)) . "&url=" . rawurlencode($charset != "utf-8" ? utf8_encode($this->permalink) : $this->permalink) . "'>\n\t\t\t</div>"; } if ($img_tag) { $li_tags = "<li id='tags!!id!!' class='onglet_tags'>{$img_tag}</li>"; } $template_in .= "\n\t\t<ul id='onglets_isbd_public!!id!!' class='onglets_isbd_public'>"; if ($premier == 'ISBD') { if ($basket) { $template_in .= "\n\t\t \t<li id='baskets!!id!!' class='onglet_basket'>{$basket}</li>"; } $template_in .= "\n\t \t\t<li id='onglet_isbd!!id!!' class='isbd_public_active'><a href='#' title=\"" . $msg['ISBD_info'] . "\" onclick=\"show_what('ISBD', '!!id!!'); return false;\">" . $msg['ISBD'] . "</a></li>\n\t \t\t<li id='onglet_public!!id!!' class='isbd_public_inactive'><a href='#' title=\"" . $msg['Public_info'] . "\" onclick=\"show_what('PUBLIC', '!!id!!'); return false;\">" . $msg['Public'] . "</a></li>\n\t\t\t\t<!-- onglets_perso_list -->\n\t \t\t{$li_tags}\n\t\t\t</ul>\n\t\t\t<div class='row'></div>\n\t\t\t<div id='div_isbd!!id!!' style='display:block;'>!!ISBD!!</div>\n\t \t\t<div id='div_public!!id!!' style='display:none;'>!!PUBLIC!!</div>"; $template_in .= "<!-- onglets_perso_content -->"; } elseif ($premier == "autre") { if ($basket) { $template_in .= "\n\t\t \t<li id='baskets!!id!!' class='onglet_basket'>{$basket}</li>"; } $onglet_perso = new notice_onglets(); $template_in .= $onglet_perso->build_onglets($this->notice_id, $li_tags); } else { if ($basket) { $template_in .= "\n\t\t \t<li id='baskets!!id!!' class='onglet_basket'>{$basket}</li>"; } $template_in .= "\n\t \t\t\t<li id='onglet_public!!id!!' class='isbd_public_active'><a href='#' title=\"" . $msg['Public_info'] . "\" onclick=\"show_what('PUBLIC', '!!id!!'); return false;\">" . $msg['Public'] . "</a></li>\n\t\t\t\t<li id='onglet_isbd!!id!!' class='isbd_public_inactive'><a href='#' title=\"" . $msg['ISBD_info'] . "\" onclick=\"show_what('ISBD', '!!id!!'); return false;\">" . $msg['ISBD'] . "</a></li>\n\t\t\t\t<!-- onglets_perso_list -->\n\t\t \t{$li_tags}\n\t\t\t</ul>\n\t\t\t<div class='row'></div>\n\t\t\t<div id='div_public!!id!!' style='display:block;'>!!PUBLIC!!</div>\n\t \t\t<div id='div_isbd!!id!!' style='display:none;'>!!ISBD!!</div>"; $template_in .= "<!-- onglets_perso_content -->"; } if ($opac_avis_display_mode == 1 && ($this->avis_allowed && $this->avis_allowed != 2 || $_SESSION["user_code"] && $this->avis_allowed == 2)) { $this->affichage_avis_detail = $this->avis_detail(); } // Serials : différence avec les monographies on affiche [périodique] et [article] devant l'ISBD if ($this->notice->niveau_biblio == 's') { if (!$flag_no_get_bulletin) { if ($this->get_bulletins()) { if ($lvl == "notice_display") { $voir_bulletins = " <a href='#tab_bulletin'><i>" . $msg["see_bull"] . "</i></a>"; } else { $voir_bulletins = " <a href='index.php?lvl=notice_display&id=" . $this->notice_id . "'><i>" . $msg["see_bull"] . "</i></a>"; } } } //si visionneuse active... if ($opac_visionneuse_allow) { if ($test = $this->get_bulletins_docnums()) { $voir_docnum_bulletins = "\n\t\t\t\t\t<a href='#' onclick=\"open_visionneuse(sendToVisionneusePerio" . $this->notice_id . ");return false;\">" . $msg["see_docnum_bull"] . "</a>\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\tfunction sendToVisionneusePerio" . $this->notice_id . "(){\n\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?mode=perio_bulletin&idperio=" . $this->notice_id . "';\n\t\t\t\t\t\t}\n\t\t\t\t\t</script>"; } } if ($this->open_to_search()) { $search_in_serial = " <a href='index.php?lvl=index&search_type_asked=extended_search&search_in_perio={$this->notice_id}'><i>" . $msg["rechercher_in_serial"] . "</i></a>"; } $template_in = str_replace('!!ISBD!!', "<span class='fond-mere'>[" . $msg['isbd_type_perio'] . "]</span>" . $voir_bulletins . $voir_docnum_bulletins . $search_in_serial . " !!ISBD!!", $template_in); $template_in = str_replace('!!PUBLIC!!', "<span class='fond-mere'>[" . $msg['isbd_type_perio'] . "]</span>" . $voir_bulletins . $voir_docnum_bulletins . $search_in_serial . " !!PUBLIC!!", $template_in); } elseif ($this->notice->niveau_biblio == 'a') { $template_in = str_replace('!!ISBD!!', "<span class='fond-article'>[" . $msg['isbd_type_art'] . "]</span> !!ISBD!!", $template_in); $template_in = str_replace('!!PUBLIC!!', "<span class='fond-article'>[" . $msg['isbd_type_art'] . "]</span> !!PUBLIC!!", $template_in); } elseif ($this->notice->niveau_biblio == 'b') { $template_in = str_replace('!!ISBD!!', "<span class='fond-article'>[" . $msg['isbd_type_bul'] . "]</span> !!ISBD!!", $template_in); $template_in = str_replace('!!PUBLIC!!', "<span class='fond-article'>[" . $msg['isbd_type_bul'] . "]</span> !!PUBLIC!!", $template_in); } $template_in .= $this->get_serialcirc_form_actions(); $template_in = str_replace('!!ISBD!!', $this->notice_isbd, $template_in); $template_in = str_replace('!!PUBLIC!!', $this->notice_public, $template_in); $template_in = str_replace('!!id!!', $this->notice_id, $template_in); $this->do_image($template_in, $depliable); $this->result = str_replace('!!id!!', $this->notice_id, $template); if ($this->notice_header_doclink) { $this->result = str_replace('!!heada!!', $this->notice_header_without_doclink, $this->result); } else { $this->result = str_replace('!!heada!!', $this->notice_header, $this->result); } $this->result = str_replace('!!CONTENU!!', $template_in, $this->result); switch ($opac_allow_simili_search) { case "1": $this->affichage_simili_search_head = "\n\t\t\t<div id='expl_voisin_search_" . $this->notice_id . "' class='expl_voisin_search'></div>\n\t\t\t<div id='simili_search_" . $this->notice_id . "' class='simili_search'></div>"; if (!$depliable) { $this->affichage_simili_search_head .= "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t" . $script_simili_search . "\n\t\t\t</script>"; } break; case "2": $this->affichage_simili_search_head = "\n\t\t\t<div id='expl_voisin_search_" . $this->notice_id . "' class='expl_voisin_search'></div>"; if (!$depliable) { $this->affichage_simili_search_head .= "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t" . $script_simili_search . "\n\t\t\t</script>"; } break; case "3": $this->affichage_simili_search_head = "\n\t\t\t<div id='simili_search_" . $this->notice_id . "' class='simili_search'></div>"; if (!$depliable) { $this->affichage_simili_search_head .= "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t" . $script_simili_search . "\n\t\t\t</script>"; } break; } if ($this->affichage_resa_expl || $this->notice_childs || $this->affichage_avis_detail || $this->affichage_simili_search_head) { $this->result = str_replace('!!SUITE!!', $this->notice_childs . $this->affichage_resa_expl . $this->affichage_avis_detail . $this->affichage_simili_search_head, $this->result); } $this->result = str_replace('!!SUITE!!', "", $this->result); }
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; }
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; }
function aff_notice($id, $nocart = 0, $gen_header = 1, $use_cache = 0, $mode_aff_notice = "", $depliable = "", $nodocnum = 0, $enrichment = 1, $recherche_ajax_mode = 0) { global $liens_opac; global $opac_notices_format; global $opac_notices_depliable; global $opac_cart_allow; global $opac_cart_only_for_subscriber; global $opac_notice_affichage_class; global $opac_notice_enrichment; global $opac_recherche_ajax_mode; global $opac_notices_format_onglets; if ($opac_cart_allow && !$opac_cart_only_for_subscriber || $opac_cart_allow && $_SESSION["user_code"]) { $cart = 1; } else { $cart = 0; } if ($nocart) { $cart = 0; } $id += 0; //Recherche des fonctions d'affichage $f = get_aff_function(); if ($f) { return $f($id, $cart); } if ($id > 0) { $header_only = 0; if ($recherche_ajax_mode && $opac_recherche_ajax_mode) { //Si ajax, on ne charge pas tout $header_only = 1; } $current = new $opac_notice_affichage_class($id, $liens_opac, $cart, 0, $header_only, !$gen_header); if ($nodocnum) { $current->docnum_allowed = 0; } if ($depliable === "") { $depliable = $opac_notices_depliable; } if ($gen_header) { $current->do_header(); } if ($mode_aff_notice !== "") { $type_aff = $mode_aff_notice; } else { $type_aff = $opac_notices_format; } if (!$current->visu_notice) { return ""; } if ($opac_recherche_ajax_mode && $recherche_ajax_mode && $depliable && $type_aff != AFF_ETA_NOTICES_REDUIT) { $current->genere_ajax($type_aff, 0); $retour_aff .= $current->result; } else { switch ($type_aff) { case AFF_ETA_NOTICES_REDUIT: $retour_aff .= $current->notice_header_with_link . "<br />"; break; case AFF_ETA_NOTICES_ISBD: $current->do_isbd(); $current->genere_simple($depliable, 'ISBD'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_PUBLIC: $current->do_public(); $current->genere_simple($depliable, 'PUBLIC'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_BOTH: $current->do_isbd(); $current->do_public(); $current->genere_double($depliable, 'PUBLIC'); $retour_aff .= $current->result; break; case AFF_ETA_NOTICES_BOTH_ISBD_FIRST: $current->do_isbd(); $current->do_public(); $current->genere_double($depliable, 'ISBD'); $retour_aff .= $current->result; break; default: $current->do_isbd(); $current->do_public(); $current->genere_double($depliable, 'autre'); $retour_aff .= $current->result; $flag_no_onglet_perso = 1; break; } /* $onglets_title=""; $onglets_content=""; if($opac_notices_format_onglets){ $onglets=explode(",", $opac_notices_format_onglets); foreach($onglets as $id_tpl){ $notice_onglet=new notice_onglet($id_tpl); $onglets_title.=" <li id='onglet_tpl_".$id_tpl."_".$id."' class='isbd_public_inactive'> <a href='#' title=\"".$notice_onglet->get_onglet_header()."\" onclick=\"show_what('tpl_".$id_tpl."_', '$id'); return false;\">".$notice_onglet->get_onglet_header()."</a> </li>"; $onglets_content.=" <div id='div_tpl_".$id_tpl."_".$id."' class='onglet_tpl' style='display:none;'> ".$notice_onglet->get_onglet_content($id)." </div>"; } } $retour_aff=str_replace('<!-- onglets_perso_list -->', $onglets_title, $retour_aff); $retour_aff=str_replace('<!-- onglets_perso_content -->', $onglets_content, $retour_aff); */ if (!$flag_no_onglet_perso) { $onglet_perso = new notice_onglets(); $retour_aff = $onglet_perso->insert_onglets($id, $retour_aff); } if (!$depliable && $opac_notice_enrichment && $enrichment == 1) { $retour_aff .= "<script type='text/javascript'>getEnrichment('{$id}');</script>"; } } } return $retour_aff; }