Beispiel #1
0
        $titre = $msg["authors_found"];
        //Enregistrement des stats
        if ($pmb_logs_activate) {
            global $nb_results_tab;
            $nb_results_tab['physiques'] = $count;
        }
        break;
}
//le contenu du catalogue est calculé dans 2 cas  :
// 1- la recherche affiliée n'est pas activée, c'est donc le seul résultat affichable
// 2- la recherche affiliée est active et on demande l'onglet catalog...
if (!$opac_allow_affiliate_search || $opac_allow_affiliate_search && $tab == "catalog") {
    print pmb_bidi("\t<h3><span><b>{$count}</b> {$titre} <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></span>";
    print activation_surlignage() . "</h3>";
    if (!$opac_allow_affiliate_search) {
        print "\n\t\t\t</div>";
    }
    print "\n\t\t\t<div id=\"resultatrech_liste\">\n\t\t\t<ul>";
    if ($type) {
        $restrict_type = " and author_type='{$type}' ";
    }
    $found = mysql_query("select author_id, " . $pert . ",author_type, author_name, author_rejete,author_see from authors {$clause} {$restrict_type} group by author_id {$tri} {$limiter}", $dbh);
    while ($mesAuteurs = mysql_fetch_object($found)) {
        $psNom = "";
        if ($mesAuteurs->author_see) {
            $pseud = mysql_query("select author_name, author_rejete from authors where author_id='" . $mesAuteurs->author_see . "'", $dbh);
function get_human_query_level_two($n)
{
    global $msg;
    global $opac_search_other_function, $opac_indexation_docnum_allfields;
    global $include_path;
    if ($opac_search_other_function) {
        require_once $include_path . "/" . $opac_search_other_function;
    }
    if ($_SESSION["search_type" . $n] == "simple_search") {
        $valeur_champ = "";
        switch ($_SESSION["notice_view" . $n]["search_mod"]) {
            case 'abstract':
                $r1 = $msg["abstract"] . " ";
                break;
            case 'title':
                $r1 = $msg["title_search"] . " ";
                break;
            case 'all':
                $r1 = $msg["global_search"] . " " . ($opac_indexation_docnum_allfields ? "[" . $msg[docnum_search_with] . "] " : '');
                break;
            case 'keyword':
                $r1 = $msg["keyword_search"] . " ";
                break;
            case 'categ_see':
                $categ_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select libelle_categorie from categories where num_noeud=" . $categ_id;
                $r_cat = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_cat)) {
                    $valeur_champ = pmb_mysql_result($r_cat, 0, 0);
                }
                $r1 = $msg["category"] . " ";
                break;
            case 'author_see':
                $author_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select concat(author_name,', ',author_rejete) from authors where author_id=" . $author_id;
                $r_author = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_author)) {
                    $valeur_champ = pmb_mysql_result($r_author, 0, 0);
                }
                $r1 = $msg["author_search"] . " ";
                break;
            case 'indexint_see':
                $indexint_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select indexint_name from indexint where indexint_id=" . $indexint_id;
                $r_indexint = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_indexint)) {
                    $valeur_champ = pmb_mysql_result($r_indexint, 0, 0);
                }
                $r1 = $msg["indexint_search"] . " ";
                break;
            case 'publisher_see':
                $publisher_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select ed_name from publishers where ed_id=" . $publisher_id;
                $r_pub = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_pub)) {
                    $valeur_champ = pmb_mysql_result($r_pub, 0, 0);
                }
                $r1 = $msg["publisher_search"] . " ";
                break;
            case 'titre_uniforme_see':
                $titre_uniforme_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select tu_name from publishers where tu_id=" . $titre_uniforme_id;
                $r_tu = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_tu)) {
                    $valeur_champ = pmb_mysql_result($r_tu, 0, 0);
                }
                $r1 = $msg["titre_uniforme_search"] . " ";
                break;
            case 'coll_see':
                $coll_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select collection_name from collections where collection_id=" . $coll_id;
                $r_coll = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_coll)) {
                    $valeur_champ = pmb_mysql_result($r_coll, 0, 0);
                }
                $r1 = $msg["coll_search"] . " ";
                break;
            case 'subcoll_see':
                $subcoll_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select sub_coll_name from sub_collections where sub_coll_id=" . $subcoll_id;
                $r_subcoll = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_subcoll)) {
                    $valeur_champ = pmb_mysql_result($r_subcoll, 0, 0);
                }
                $r1 = $msg["subcoll_search"] . " ";
                break;
            case 'docnum':
                $r1 = $msg["docnum"];
                break;
            case 'concept_see':
                $concept_id = $_SESSION["notice_view" . $n]["search_id"];
                $requete = "select value from skos_field_global_index where code_champ = 1 and code_ss_champ = 1 and id_item = " . $concept_id;
                $r_concept = pmb_mysql_query($requete);
                if (@pmb_mysql_num_rows($r_concept)) {
                    $valeur_champ = pmb_mysql_result($r_concept, 0, 0);
                }
                $r1 = $msg["skos_concept"] . " ";
                break;
            case 'authperso_see':
                $auth_id = $_SESSION["notice_view" . $n]["search_id"];
                $ourAuth = new authperso_authority($auth_id);
                $r1 = $ourAuth->info['authperso']['name'] . " ";
                $valeur_champ = $ourAuth->info['isbd'];
                break;
        }
        if ($_SESSION["typdoc" . $n]) {
            $doctype = new marc_list('doctype');
            $r2 .= sprintf($msg["simple_search_history_doc_type"], $doctype->table[$_SESSION["typdoc" . $n]]);
        } else {
            $r2 .= $msg["simple_search_history_all_doc_types"];
        }
        if ($opac_search_other_function) {
            $r3 = search_other_function_human_query($n);
            if ($r3) {
                $r2 .= ", " . $r3;
            }
        }
        $r = sprintf($msg["simple_search_history"], !$valeur_champ ? stripslashes($_SESSION["user_query" . $n]) : $valeur_champ, $r1, $r2);
        if ($_SESSION["map_emprises_query" . $n]) {
            $r .= $msg["map_history_emprises"] . implode(" ", $_SESSION["map_emprises_query" . $n]);
        }
    } else {
        $r = get_human_query($n);
    }
    return $r;
}