public function get_indexed_notices()
 {
     return $this->concept->get_indexed_notices();
 }
 public function set_vedette_element_from_database()
 {
     $concept = new skos_concept($this->get_db_id());
     $this->isbd = $concept->get_display_label();
 }
 /**
  * Retourne l'affichage de la liste des autorités indexées avec le concept
  * @param skos_concept $concept
  * @return string
  */
 public static function get_authorities_indexed_with_concept($concept)
 {
     global $msg, $liens_opac, $charset;
     $indexed_authorities = $concept->get_indexed_authorities();
     foreach ($indexed_authorities as $type => $authorities) {
         foreach ($authorities as $authority) {
             switch ($type) {
                 case 'author':
                     if (!isset($datas['authorities']['author'])) {
                         $datas['authorities']['author'] = array('type_name' => $msg['isbd_author'], 'elements' => array());
                     }
                     $datas['authorities']['author']['elements'][] = array('label' => $authority->isbd_entry, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_auteur']));
                     break;
                 case 'category':
                     if (!isset($datas['authorities']['category'])) {
                         $datas['authorities']['category'] = array('type_name' => $msg['isbd_categories'], 'elements' => array());
                     }
                     $datas['authorities']['category']['elements'][] = array('label' => $authority->libelle, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_categ']));
                     break;
                 case 'publisher':
                     if (!isset($datas['authorities']['publisher'])) {
                         $datas['authorities']['publisher'] = array('type_name' => $msg['isbd_editeur'], 'elements' => array());
                     }
                     $datas['authorities']['publisher']['elements'][] = array('label' => $authority->display, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_editeur']));
                     break;
                 case 'collection':
                     if (!isset($datas['authorities']['collection'])) {
                         $datas['authorities']['collection'] = array('type_name' => $msg['isbd_collection'], 'elements' => array());
                     }
                     $datas['authorities']['collection']['elements'][] = array('label' => $authority->isbd_entry, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_collection']));
                     break;
                 case 'subcollection':
                     if (!isset($datas['authorities']['subcollection'])) {
                         $datas['authorities']['subcollection'] = array('type_name' => $msg['isbd_subcollection'], 'elements' => array());
                     }
                     $datas['authorities']['subcollection']['elements'][] = array('label' => $authority->name, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_subcollection']));
                     break;
                 case 'serie':
                     if (!isset($datas['authorities']['serie'])) {
                         $datas['authorities']['serie'] = array('type_name' => $msg['isbd_serie'], 'elements' => array());
                     }
                     $datas['authorities']['serie']['elements'][] = array('label' => $authority->name, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_serie']));
                     break;
                 case 'titre_uniforme':
                     if (!isset($datas['authorities']['titre_uniforme'])) {
                         $datas['authorities']['titre_uniforme'] = array('type_name' => $msg['isbd_titre_uniforme'], 'elements' => array());
                     }
                     $datas['authorities']['titre_uniforme']['elements'][] = array('label' => $authority->name, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_titre_uniforme']));
                     break;
                 case 'indexint':
                     if (!isset($datas['authorities']['indexint'])) {
                         $datas['authorities']['indexint'] = array('type_name' => $msg['isbd_indexint'], 'elements' => array());
                     }
                     $label = "";
                     if ($authority->name_pclass) {
                         $label .= "[" . $authority->name_pclass . "] ";
                     }
                     $label .= $authority->name;
                     if ($authority->comment) {
                         $label .= " - " . $authority->comment;
                     }
                     $datas['authorities']['indexint']['elements'][] = array('label' => $label, 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_indexint']));
                     break;
                 case 'expl':
                     break;
                 case 'explnum':
                     break;
                 case 'authperso':
                     $authority_name = $charset != 'utf-8' ? utf8_decode($authority->info['authperso']['name']) : $authority->info['authperso']['name'];
                     if (!isset($datas['authorities'][$authority_name])) {
                         $datas['authorities'][$authority_name] = array('type_name' => $authority_name, 'elements' => array());
                     }
                     $datas['authorities'][$authority_name]['elements'][] = array('label' => $authority->get_isbd(), 'link' => str_replace("!!id!!", $authority->id, $liens_opac['lien_rech_authperso']));
                     break;
             }
         }
     }
     return self::render($datas, "skos_view_concept_authorities_indexed_with_concept");
 }
Esempio n. 4
0
                     $r1 = $msg['titre_uniforme_search'];
                     $ourTu->do_isbd();
                     $r = $r1 . " '" . $ourTu->tu_isbd . "'";
                     break;
                 case "publisher_see":
                     $ourPub = new publisher($_SESSION["last_module_search"]["search_id"]);
                     $r1 = $msg['publisher_search'];
                     $r = $r1 . " '" . $ourPub->isbd_entry . "'";
                     break;
                 case "serie_see":
                     $ourSerie = new serie($_SESSION["last_module_search"]["search_id"]);
                     $r1 = $msg['serie_query'];
                     $r = $r1 . " '" . $ourSerie->name . "'";
                     break;
                 case "concept_see":
                     $ourConcept = new skos_concept($_SESSION["last_module_search"]["search_id"]);
                     $r1 = $msg['skos_concept'];
                     $r = $r1 . " '" . $ourConcept->get_display_label() . "'";
                     break;
                 case "authperso_see":
                     $ourAuth = new authperso_authority($_SESSION["last_module_search"]["search_id"]);
                     $r1 = $ourAuth->info['authperso']['name'];
                     $r = $r1 . " '" . $ourAuth->info['isbd'] . "'";
                     break;
             }
             $_SESSION["human_query" . $n] = $r;
             $_SESSION["search_type" . $n] = "module";
         }
         $_SESSION["new_last_query"] = $_SESSION["nb_queries"];
     }
 }
Esempio n. 5
0
                $r = pmb_mysql_query($requete, $dbh);
                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>";
}
Esempio n. 6
0
 function getdata()
 {
     global $dbh, $msg;
     global $aut_table_name_list;
     $this->aut_table_name = $aut_table_name_list[$this->aut_table];
     $this->aut_list = array();
     $rqt = "select * from aut_link where (aut_link_from='" . $this->aut_table . "'\tand aut_link_from_num='" . $this->id . "' )\n\t\tor ( aut_link_to='" . $this->aut_table . "' and aut_link_to_num='" . $this->id . "' and aut_link_reciproc=1 )\n\t\torder by aut_link_type ";
     $aut_res = pmb_mysql_query($rqt, $dbh);
     $i = 0;
     while ($row = pmb_mysql_fetch_object($aut_res)) {
         $i++;
         $this->aut_list[$i]['to'] = $row->aut_link_to;
         $this->aut_list[$i]['to_num'] = $row->aut_link_to_num;
         $this->aut_list[$i]['type'] = $row->aut_link_type;
         $this->aut_list[$i]['reciproc'] = $row->aut_link_reciproc;
         $this->aut_list[$i]['comment'] = $row->aut_link_comment;
         if ($this->aut_table == $row->aut_link_to and $this->id == $row->aut_link_to_num) {
             $this->aut_list[$i]['flag_reciproc'] = 1;
             $this->aut_list[$i]['to'] = $row->aut_link_from;
             $this->aut_list[$i]['to_num'] = $row->aut_link_from_num;
         } else {
             $this->aut_list[$i]['flag_reciproc'] = 0;
         }
         switch ($this->aut_list[$i]['to']) {
             case AUT_TABLE_AUTHORS:
                 $auteur = new auteur($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $auteur->isbd_entry;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_author'], $auteur->isbd_entry);
                 break;
             case AUT_TABLE_CATEG:
                 $categ = new category($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $categ->libelle;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_categ'], $categ->libelle);
                 break;
             case AUT_TABLE_PUBLISHERS:
                 $ed = new publisher($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $ed->isbd_entry;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_publisher'], $ed->isbd_entry);
                 break;
             case AUT_TABLE_COLLECTIONS:
                 $subcollection = new collection($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $subcollection->isbd_entry;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_coll'], $subcollection->isbd_entry);
                 break;
             case AUT_TABLE_SUB_COLLECTIONS:
                 $collection = new subcollection($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $collection->isbd_entry;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_subcoll'], $collection->isbd_entry);
                 break;
             case AUT_TABLE_SERIES:
                 $serie = new serie($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $serie->name;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_serie'], $serie->name);
                 break;
             case AUT_TABLE_TITRES_UNIFORMES:
                 $tu = new titre_uniforme($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $tu->name;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_tu'], $tu->name);
                 break;
             case AUT_TABLE_INDEXINT:
                 $indexint = new indexint($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $indexint->display;
                 $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_indexint'], $indexint->display);
                 break;
             case AUT_TABLE_CONCEPT:
                 $concept = new skos_concept($this->aut_list[$i]['to_num']);
                 $this->aut_list[$i]['isbd_entry'] = $concept->get_display_label();
                 $this->aut_list[$i]['libelle'] = $concept->get_display_label();
                 break;
             default:
                 if ($this->aut_list[$i]['to'] > 1000) {
                     // authperso
                     $authperso = new authperso($this->aut_list[$i]['to'] - 1000);
                     $isbd = $authperso->get_isbd($this->aut_list[$i]['to_num']);
                     $this->aut_list[$i]['isbd_entry'] = $isbd;
                     $this->aut_list[$i]['libelle'] = "[" . $authperso->info['name'] . "] " . $isbd;
                     $this->aut_list[$i]["url_to_opac"] = $pmb_opac_url . "index.php?lvl=authperso_see&id=" . $this->aut_list[$i]['to_num'];
                 }
                 break;
         }
         if ($this->aut_list[$i]["flag_reciproc"]) {
             $type_relation = new marc_select("relationtype_autup", "f_aut_link_type{$i}", $this->aut_list[$i]['type']);
         } else {
             $type_relation = new marc_select("relationtype_aut", "f_aut_link_type{$i}", $this->aut_list[$i]['type']);
         }
         $this->aut_list[$i]['relation_libelle'] = $type_relation->libelle;
     }
 }
Esempio n. 7
0
    print pmb_bidi("<h3><span>" . $count . " " . $msg['concepts_found'] . " <b>'" . htmlentities(stripslashes($user_query), ENT_QUOTES, $charset) . "'");
    if ($opac_search_other_function) {
        require_once $include_path . "/" . $opac_search_other_function;
        print pmb_bidi(" " . search_other_function_human_query($_SESSION["last_query"]));
    }
    print "</b>";
    print activation_surlignage();
    print "</h3></span>\n";
    if (!$opac_allow_affiliate_search) {
        print "\n\t\t\t\t</div>";
    }
    print "\n\t\t\t\t<div id=\"resultatrech_liste\">\n\t\t\t\t<ul>";
    $searcher = new opac_searcher_autorities_skos_concepts($user_query);
    $concepts = $searcher->get_sorted_result();
    foreach ($concepts as $concept) {
        $concept = new skos_concept($concept);
        print pmb_bidi("<li class='categ_colonne'><font class='notice_fort'><a href='" . str_replace("!!id!!", $concept->get_id(), $liens_opac['lien_rech_concept']) . "&from=search'>" . $concept->get_display_label() . "</a></font></li>\n");
    }
    print "</ul>";
    print "\n\t</div></div>";
    if ($opac_allow_affiliate_search) {
        print $catal_navbar;
    } else {
        print "</div>";
    }
} else {
    if ($tab == "affiliate") {
        //l'onglet source affiliées est actif, il faut son contenu...
        $as = new affiliate_search_concept($user_query, "authorities");
        print $as->getResults();
    }
function get_field_text($n)
{
    $typ_search = $_SESSION["notice_view" . $n]["search_mod"];
    switch ($_SESSION["notice_view" . $n]["search_mod"]) {
        case 'title':
            $valeur_champ = $_SESSION["user_query" . $n];
            $typ_search = "look_TITLE";
            break;
        case 'all':
            $valeur_champ = $_SESSION["user_query" . $n];
            $typ_search = "look_ALL";
            break;
        case 'abstract':
            $valeur_champ = $_SESSION["user_query" . $n];
            $typ_search = "look_ABSTRACT";
            break;
        case 'keyword':
            $valeur_champ = $_SESSION["user_query" . $n];
            $typ_search = "look_KEYWORDS";
            break;
        case 'author_see':
            //Recherche de l'auteur
            $author_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select concat(author_name,', ',author_rejete) from authors where author_id='" . addslashes($author_id) . "'";
            $r_author = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_author)) {
                $valeur_champ = pmb_mysql_result($r_author, 0, 0);
            }
            $typ_search = "look_AUTHOR";
            break;
        case 'categ_see':
            //Recherche de la categorie
            $categ_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select libelle_categorie from categories where num_noeud='" . addslashes($categ_id) . "'";
            $r_cat = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_cat)) {
                $valeur_champ = pmb_mysql_result($r_cat, 0, 0);
            }
            $typ_search = "look_CATEGORY";
            break;
        case 'indexint_see':
            //Recherche de l'indexation
            $indexint_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select indexint_name from indexint where indexint_id='" . addslashes($indexint_id) . "'";
            $r_indexint = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_indexint)) {
                $valeur_champ = pmb_mysql_result($r_indexint, 0, 0);
            }
            $typ_search = "look_INDEXINT";
            break;
        case 'coll_see':
            //Recherche de l'indexation
            $coll_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select collection_name from collections where collection_id='" . addslashes($coll_id) . "'";
            $r_coll = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_coll)) {
                $valeur_champ = pmb_mysql_result($r_coll, 0, 0);
            }
            $typ_search = "look_COLLECTION";
            break;
        case 'publisher_see':
            //Recherche de l'editeur
            $publisher_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select ed_name from publishers where ed_id='" . addslashes($publisher_id) . "'";
            $r_pub = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_pub)) {
                $valeur_champ = pmb_mysql_result($r_pub, 0, 0);
            }
            $typ_search = "look_PUBLISHER";
            break;
        case 'titre_uniforme_see':
            //Recherche de titre uniforme
            $tu_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select tu_name from titres_uniformes where ed_id='" . addslashes($tu_id) . "'";
            $r_tu = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_tu)) {
                $valeur_champ = pmb_mysql_result($r_tu, 0, 0);
            }
            $typ_search = "look_TITRE_UNIFORME";
            break;
        case 'subcoll_see':
            //Recherche de l'editeur
            $subcoll_id = $_SESSION["notice_view" . $n]["search_id"];
            $requete = "select sub_coll_name from sub_collections where sub_coll_id='" . addslashes($subcoll_id) . "'";
            $r_subcoll = pmb_mysql_query($requete);
            if (@pmb_mysql_num_rows($r_subcoll)) {
                $valeur_champ = pmb_mysql_result($r_subcoll, 0, 0);
            }
            $typ_search = "look_SUBCOLLECTION";
            break;
        case 'authperso_see':
            $authpersos = new authpersos();
            $info = $authpersos->get_field_text($_SESSION["notice_view" . $n]["search_id"]);
            $valeur_champ = $info['valeur_champ'];
            $typ_search = $info['typ_search'];
            break;
        case 'concept_see':
            $concept = new skos_concept($_SESSION["notice_view" . $n]["search_id"]);
            $valeur_champ = $concept->get_display_label();
            $typ_search = "look_CONCEPT";
            break;
    }
    return array($valeur_champ, $typ_search);
}