".$msg["doc_titre_uniforme_title"].""; // droits d'acces emprunteur/notice $acces_j = ''; if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) { require_once ("$class_path/acces.class.php"); $ac = new acces (); $dom_2 = $ac->setDomain ( 2 ); $acces_j = $dom_2->getJoin ( $_SESSION ['id_empr_session'], 4, 'notice_id' ); } if ($acces_j) { $statut_j = ''; $statut_r = ''; } else { $statut_j = ',notice_statut'; $statut_r = "and statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)" . ($_SESSION ["user_code"] ? " or (notice_visible_opac_abon=1 and notice_visible_opac=1)" : "") . ")"; } if ($_SESSION ["opac_view"] && $_SESSION ["opac_view_query"]) { $opac_view_restrict = " notice_id in (select opac_view_num_notice from opac_view_notices_" . $_SESSION ["opac_view"] . ") "; $statut_r .= " and " . $opac_view_restrict; } // comptage des notices associées if (! $nbr_lignes) { // $requete = "SELECT COUNT(notice_id) FROM notices, notice_statut ,notices_titres_uniformes // where ntu_num_notice=notice_id and ntu_num_tu='$id' and (statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)".($_SESSION["user_code"]?" or (notice_visible_opac_abon=1 and notice_visible_opac=1)":"")."))"; $requete = "SELECT count(notice_id) FROM notices $acces_j $statut_j ,notices_titres_uniformes "; $requete .= "WHERE ntu_num_notice=notice_id and ntu_num_tu='$id' $statut_r "; $res = pmb_mysql_query ( $requete, $dbh ); $nbr_lignes = @pmb_mysql_result ( $res, 0, 0 ); // Recherche des types doc // $requete="select distinct notices.typdoc FROM notices, notice_statut ,notices_titres_uniformes // where ntu_num_notice=notice_id and ntu_num_tu='$id' and (statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)".($_SESSION["user_code"]?" or (notice_visible_opac_abon=1 and notice_visible_opac=1)":"")."))"; $clause = "where ntu_num_notice=notice_id and ntu_num_tu='$id' $statut_r group by notices.typdoc"; if ($opac_visionneuse_allow) { $requete_noti = "select distinct notices.typdoc, count(explnum_id) as nbexplnum from notices left join explnum on explnum_notice = notices.notice_id and explnum_mimetype in ($opac_photo_filtre_mimetype) $acces_j $statut_j ,notices_titres_uniformes $clause"; $requete_bull = "select distinct notices.typdoc, count(explnum_id) as nbexplnum from notices left join bulletins on bulletins.num_notice = notices.notice_id and bulletins.num_notice != 0 left join explnum on explnum_bulletin = bulletin_id and explnum_bulletin != 0 and explnum_mimetype in ($opac_photo_filtre_mimetype) $acces_j $statut_j ,notices_titres_uniformes $clause"; $requete = "select distinct typdoc, sum(nbexplnum) as nbexplnum from ($requete_noti union $requete_bull) as uni group by typdoc"; } else { $requete = "select distinct notices.typdoc FROM notices $acces_j $statut_j ,notices_titres_uniformes $clause"; } $res = pmb_mysql_query ( $requete, $dbh ); $t_typdoc = array (); $nbexplnum_to_photo = 0; if ($res) { while ( ($tpd = pmb_mysql_fetch_object ( $res )) ) { $t_typdoc [] = $tpd->typdoc; $nbexplnum_to_photo += $tpd->nbexplnum; } } $l_typdoc = implode ( ",", $t_typdoc ); } else if ($opac_visionneuse_allow) { $clause = "where ntu_num_notice=notice_id and ntu_num_tu='$id' $statut_r group by notices.typdoc"; $requete_noti = "select distinct notices.typdoc, count(explnum_id) as nbexplnum from notices left join explnum on explnum_notice = notices.notice_id and explnum_mimetype in ($opac_photo_filtre_mimetype) $acces_j $statut_j ,notices_titres_uniformes $clause"; $requete_bull = "select distinct notices.typdoc, count(explnum_id) as nbexplnum from notices left join bulletins on bulletins.num_notice = notices.notice_id and bulletins.num_notice != 0 left join explnum on explnum_bulletin = bulletin_id and explnum_bulletin != 0 and explnum_mimetype in ($opac_photo_filtre_mimetype) $acces_j $statut_j ,notices_titres_uniformes $clause"; $requete = "select distinct typdoc, sum(nbexplnum) as nbexplnum from ($requete_noti union $requete_bull) as uni group by typdoc"; $nbexplnum_to_photo = 0; $res = pmb_mysql_query ( $requete, $dbh ); if ($res) { while ( ($tpd = pmb_mysql_fetch_object ( $res )) ) { $nbexplnum_to_photo += $tpd->nbexplnum; } } } // pour la DSI if ($nbr_lignes && $opac_allow_bannette_priv && $allow_dsi_priv && ($_SESSION ['abon_cree_bannette_priv'] == 1 || $opac_allow_bannette_priv == 2)) { $recordslist .= " "; } // Ouverture du div resultatrech_liste $recordslist .= "
"; if (! $page) $page = 1; $debut = ($page - 1) * $opac_nb_aut_rec_per_page; if ($nbr_lignes) { // on lance la vraie requête // $requete = "SELECT notice_id FROM notices, notice_statut ,notices_titres_uniformes // WHERE ntu_num_notice=notice_id and ntu_num_tu='$id' and (statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)".($_SESSION["user_code"]?" or (notice_visible_opac_abon=1 and notice_visible_opac=1)":"")."))"; $requete = "SELECT notice_id FROM notices $acces_j $statut_j ,notices_titres_uniformes "; $requete .= "WHERE ntu_num_notice=notice_id and ntu_num_tu='$id' $statut_r "; // gestion du tri if (isset ( $_GET ["sort"] )) { $_SESSION ["last_sortnotices"] = $_GET ["sort"]; } if ($nbr_lignes > $opac_nb_max_tri) { $_SESSION ["last_sortnotices"] = ""; } if ($_SESSION ["last_sortnotices"] != "") { $sort = new sort ( 'notices', 'session' ); $requete = $sort->appliquer_tri ( $_SESSION ["last_sortnotices"], $requete, "notice_id", $debut, $opac_nb_aut_rec_per_page ); } else { $requete .= " LIMIT $debut,$opac_nb_aut_rec_per_page "; } // fin gestion du tri $res = @pmb_mysql_query ( $requete, $dbh ); if ($opac_notices_depliable) $recordslist .= $begin_result_liste; // gestion du tri if ($nbr_lignes <= $opac_nb_max_tri) { $pos = strpos ( $_SERVER ['REQUEST_URI'], "?" ); $pos1 = strpos ( $_SERVER ['REQUEST_URI'], "get" ); if ($pos1 == 0) $pos1 = strlen ( $_SERVER ['REQUEST_URI'] ); else $pos1 = $pos1 - 3; $para = urlencode ( substr ( $_SERVER ['REQUEST_URI'], $pos + 1, $pos1 - $pos + 1 ) ); $para1 = substr ( $_SERVER ['REQUEST_URI'], $pos + 1, $pos1 - $pos + 1 ); $affich_tris_result_liste = str_replace ( "!!page_en_cours!!", $para, $affich_tris_result_liste ); $affich_tris_result_liste = str_replace ( "!!page_en_cours1!!", $para1, $affich_tris_result_liste ); $recordslist .= $affich_tris_result_liste; if ($_SESSION ["last_sortnotices"] != "") { $recordslist .= " " . $msg ['tri_par'] . " " . $sort->descriptionTriParId ( $_SESSION ["last_sortnotices"] ) . " "; } } else $recordslist .= " "; // fin gestion du tri $recordslist .= $add_cart_link; if ($opac_visionneuse_allow && $nbexplnum_to_photo) { $recordslist .= "   " . $link_to_visionneuse; $sendToVisionneuseByGet = str_replace ( "!!mode!!", "titre_uniforme_see", $sendToVisionneuseByGet ); $sendToVisionneuseByGet = str_replace ( "!!idautorite!!", $id, $sendToVisionneuseByGet ); $recordslist .= $sendToVisionneuseByGet; } if ($opac_show_suggest) { $bt_sugg = "   " . $msg [empr_bt_make_sugg] . ""; $recordslist .= $bt_sugg; } // affinage // enregistrement de l'endroit actuel dans la session rec_last_authorities (); // Gestion des alertes à partir de la recherche simple include_once ($include_path . "/alert_see.inc.php"); $recordslist .= $alert_see_mc_values; // affichage $recordslist .= "  " . $msg ["affiner_recherche"] . ""; // fin affinage // Etendre if ($opac_allow_external_search) $recordslist .= "  " . $msg ["connecteurs_external_search_sources"] . ""; // fin etendre $recordslist .= "
\n"; $recordslist .= aff_notice ( - 1 ); $nb = 0; $recherche_ajax_mode = 0; while ( ($obj = pmb_mysql_fetch_object ( $res )) ) { if ($nb ++ > 4) $recherche_ajax_mode = 1; $recordslist .= pmb_bidi ( aff_notice ( $obj->notice_id, 0, 1, 0, "", "", 0, 0, $recherche_ajax_mode ) ); } $recordslist .= aff_notice ( - 2 ); $recordslist .= "
\n"; pmb_mysql_free_result ( $res ); // constitution des liens $nbepages = ceil ( $nbr_lignes / $opac_nb_aut_rec_per_page ); // $recordslist .= "
\n"; $recordslist .= "\n"; } else { $recordslist .= $msg ["no_document_found"]; } $recordslist .= ""; // Fermeture du div resultatrech_liste $context ['authority'] ['recordslist'] = $recordslist; $authority = new authority ( "titre_uniforme", $id ); $authority->render ( $context ); // FACETTES // gestion des facette si active require_once ($base_path . '/classes/facette_search.class.php'); $records = ""; if ($nbr_lignes) { $requete = "SELECT notice_id FROM notices $acces_j $statut_j ,notices_titres_uniformes "; $requete .= "WHERE ntu_num_notice=notice_id and ntu_num_tu='$id' $statut_r "; $facettes_result = pmb_mysql_query ( $requete, $dbh ); while ( $row = pmb_mysql_fetch_object ( $facettes_result ) ) { if ($records) { $records .= ","; } $records .= $row->notice_id; } if (! $opac_facettes_ajax) { $str .= facettes::make_facette ( $records ); } else { $_SESSION ['tab_result'] = $records; $str .= facettes::get_facette_wrapper (); $str .= "
"; $str .= " "; } //Formulaire "FACTICE" pour l'application du comparateur et du filetre multiple... $str.= '
'.facette_search_compare::form_write_facette_compare().'
'; } }