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_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; }