public function set_vedette_element_from_database()
 {
     $concept = new skos_concept($this->get_db_id());
     $this->isbd = $concept->get_display_label();
 }
 /**
  * Met en forme le libellé d'un concept
  * @param skos_concept $concept
  * @return string
  */
 public static function get_concept($concept)
 {
     $datas = array('label' => $concept->get_display_label());
     return self::render($datas, "skos_view_concept_concept");
 }
 /**
  * Retourne le libellé d'un concept sans mise en forme
  * @param skos_concept $concept
  * @return string
  */
 public static function get_concept_title($concept)
 {
     $datas = array('label' => $concept->get_display_label());
     return $datas['label'];
 }
Beispiel #4
0
                         $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"];
         }
     }
 }
 if ($_SESSION["new_last_query"]) {
 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;
     }
 }
Beispiel #6
0
    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();
    }
    print "\n\t</div>\n\t<div class='row'>&nbsp;</div>";
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);
}