/**
  * Retourne l'affichage de la liste des notices indexées avec le concept
  * @param skos_concept $concept
  * @return string
  */
 public static function get_notices_indexed_with_concept($concept)
 {
     global $page;
     global $opac_nb_aut_rec_per_page, $opac_notices_depliable, $opac_allow_bannette_priv, $opac_nb_max_tri;
     global $allow_dsi_priv;
     global $begin_result_liste, $affich_tris_result_liste, $add_cart_link;
     global $include_path, $class_path, $base_path, $msg;
     global $opac_visionneuse_allow, $nbexplnum_to_photo, $link_to_visionneuse;
     global $opac_show_suggest, $opac_resa_popup;
     global $opac_allow_external_search;
     global $from;
     $indexed_notices = $concept->get_indexed_notices();
     if (!$page) {
         $page = 1;
     }
     $debut = ($page - 1) * $opac_nb_aut_rec_per_page;
     if ($nbr_lignes = count($indexed_notices)) {
         // pour la DSI
         if ($nbr_lignes && $opac_allow_bannette_priv && $allow_dsi_priv && ($_SESSION['abon_cree_bannette_priv'] == 1 || $opac_allow_bannette_priv == 2)) {
             print "<input type='button' class='bouton' name='dsi_priv' value=\"{$msg['dsi_bt_bannette_priv']}\" onClick=\"document.mc_values.action='./empr.php?lvl=bannette_creer'; document.mc_values.submit();\"><span class=\"espaceResultSearch\">&nbsp;</span>";
         }
         if ($opac_notices_depliable) {
             $content .= $begin_result_liste;
         }
         //gestion du tri
         if (isset($_GET["sort"])) {
             $_SESSION["last_sortnotices"] = $_GET["sort"];
         }
         if ($nbr_lignes > $opac_nb_max_tri) {
             $_SESSION["last_sortnotices"] = "";
             $content .= "<span class=\"espaceResultSearch\">&nbsp;</span>";
         } else {
             $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);
             $content .= $affich_tris_result_liste;
             if ($_SESSION["last_sortnotices"] != "") {
                 require_once $class_path . "/sort.class.php";
                 $sort = new sort('notices', 'session');
                 $content .= "<span class='sort'>" . $msg['tri_par'] . " " . $sort->descriptionTriParId($_SESSION["last_sortnotices"]) . "<span class=\"espaceResultSearch\">&nbsp;</span></span>";
             }
         }
         //fin gestion du tri
         $content .= $add_cart_link;
         if ($opac_visionneuse_allow && $nbexplnum_to_photo) {
             $content .= "<span class=\"espaceResultSearch\">&nbsp;&nbsp;&nbsp;</span>" . $link_to_visionneuse;
             $sendToVisionneuseByGet = str_replace("!!mode!!", "concept_see", $sendToVisionneuseByGet);
             $sendToVisionneuseByGet = str_replace("!!idautorite!!", $concept->get_id(), $sendToVisionneuseByGet);
             $content .= $sendToVisionneuseByGet;
         }
         if ($opac_show_suggest) {
             $bt_sugg = "<span class=\"espaceResultSearch\">&nbsp;&nbsp;&nbsp;</span><span class=\"search_bt_sugg\"><a href=# ";
             if ($opac_resa_popup) {
                 $bt_sugg .= " onClick=\"w=window.open('./do_resa.php?lvl=make_sugg&oresa=popup','doresa','scrollbars=yes,width=600,height=600,menubar=0,resizable=yes'); w.focus(); return false;\"";
             } else {
                 $bt_sugg .= "onClick=\"document.location='./do_resa.php?lvl=make_sugg&oresa=popup' \" ";
             }
             $bt_sugg .= " title='" . $msg["empr_bt_make_sugg"] . "' >" . $msg['empr_bt_make_sugg'] . "</a></span>";
             $content .= $bt_sugg;
         }
         rec_last_authorities();
         //affinage
         if ($main) {
             // Gestion des alertes à partir de la recherche simple
             include_once $include_path . "/alert_see.inc.php";
             $content .= $alert_see_mc_values;
             //affichage
             $content .= "<span class=\"espaceResultSearch\">&nbsp;&nbsp;</span><span class=\"affiner_recherche\"><a href='" . $base_path . "/index.php?search_type_asked=extended_search&mode_aff=aff_module' title='" . $msg["affiner_recherche"] . "'>" . $msg["affiner_recherche"] . "</a></span>";
             //Etendre
             if ($opac_allow_external_search) {
                 $content .= "<span class=\"espaceResultSearch\">&nbsp;&nbsp;</span><span class=\"search_bt_external\"><a href='" . $base_path . "/index.php?search_type_asked=external_search&mode_aff=aff_module&external_type=simple' title='" . $msg["connecteurs_external_search_sources"] . "'>" . $msg["connecteurs_external_search_sources"] . "</a></span>";
             }
             //fin etendre
         } else {
             // Gestion des alertes à partir de la recherche simple
             include_once $include_path . "/alert_see.inc.php";
             $content .= $alert_see_mc_values;
             //affichage
             $content .= "<span class=\"espaceResultSearch\">&nbsp;&nbsp;</span><span class=\"affiner_recherche\"><a href='{$base_path}/index.php?search_type_asked=extended_search&mode_aff=aff_" . ($from == "search" ? "simple_search" : "module") . "' title='" . $msg["affiner_recherche"] . "'>" . $msg["affiner_recherche"] . "</a></span>";
             //Etendre
             if ($opac_allow_external_search) {
                 $content .= "<span class=\"espaceResultSearch\">&nbsp;&nbsp;</span><span class=\"search_bt_external\"><a href='{$base_path}/index.php?search_type_asked=external_search&mode_aff=aff_simple_search' title='" . $msg["connecteurs_external_search_sources"] . "'>" . $msg["connecteurs_external_search_sources"] . "</a></span>";
             }
             //fin etendre
         }
         //fin affinage
         foreach ($indexed_notices as $notice_id) {
             $content .= aff_notice($notice_id, 0, 1, 0, "", "", 0, 0, $recherche_ajax_mode);
         }
     }
     return $content;
 }
 public function get_indexed_notices()
 {
     return $this->concept->get_indexed_notices();
 }
예제 #3
0
                if (pmb_mysql_num_rows($r)) {
                    $tab_notices = array();
                    while ($row = pmb_mysql_fetch_object($r)) {
                        $tab_notices[] = $row->notice_id;
                    }
                    $notices = implode(',', $tab_notices);
                    $fr = new filter_results($notices);
                    $notices = $fr->get_results();
                }
                add_notices_to_cart($notices);
                break;
            case "concept_see":
                require_once $class_path . "/skos/skos_concept.class.php";
                $notices = '';
                $concept = new skos_concept($id);
                $notices = implode(",", $concept->get_indexed_notices());
                $fr = new filter_results($notices);
                $notices = $fr->get_results();
                add_notices_to_cart($notices);
                break;
        }
    } else {
        $message = "";
    }
}
if (!count($cart_)) {
    echo $msg["cart_empty"];
} else {
    echo $message . " <a href='#' onClick=\"parent.document.location='index.php?lvl=show_cart'; return false;\">" . sprintf($msg["cart_contents"], count($cart_)) . "</a>";
}
$_SESSION["cart"] = $cart_;