Beispiel #1
0
            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);
            $psAut = mysql_fetch_object($pseud);
            $psNom = "(" . $msg['see'] . ": " . $psAut->author_name . "," . $psAut->author_rejete . ")";
        }
 function getNoticesResults()
 {
     global $dbh;
     global $begin_result_liste;
     global $opac_notices_depliable;
     global $opac_show_suggest;
     global $opac_resa_popup;
     global $opac_search_results_per_page;
     $nb_per_page_search = $opac_search_results_per_page;
     global $page;
     global $charset;
     global $search;
     global $msg;
     global $affich_tris_result_liste;
     global $count;
     global $add_cart_link;
     if (!$page) {
         $page = 1;
     }
     $start_page = $nb_per_page_search * ($page - 1);
     //Y-a-t-il des champs ?
     if (count($search) == 0) {
         return;
     }
     if (!$this->table_tempo) {
         global $search;
         $this->makeSearch();
     }
     $requete = "select * from " . $this->table_tempo;
     $requete .= " limit " . $start_page . "," . $nb_per_page_search;
     $resultat = pmb_mysql_query($requete, $dbh);
     $this->results = "\n\n\t\t<div id=\"resultatrech_container\">\n\t\t<div id=\"resultatrech_see\">\n\t\t";
     $this->results .= pmb_bidi("<h3>" . $this->getTotalNbResults() . " " . $msg['titles_found'] . " " . $this->external_search->make_human_query() . activation_surlignage() . "</h3>");
     if ($opac_show_suggest) {
         $bt_sugg = "&nbsp;&nbsp;&nbsp;<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>";
         $this->results .= $bt_sugg;
     }
     flush();
     $entrepots_localisations = array();
     $entrepots_localisations_sql = "SELECT * FROM entrepots_localisations ORDER BY loc_visible DESC";
     $res = pmb_mysql_query($entrepots_localisations_sql);
     while ($row = pmb_mysql_fetch_array($res)) {
         $entrepots_localisations[$row["loc_code"]] = array("libelle" => $row["loc_libelle"], "visible" => $row["loc_visible"]);
     }
     if ($opac_notices_depliable) {
         $this->results .= $begin_result_liste;
     }
     $this->results .= $add_cart_link;
     $this->results .= "\t</div>\n\n\t\t<div id=\"resultatrech_liste\">";
     $this->results .= "<blockquote>";
     while ($r = pmb_mysql_fetch_object($resultat)) {
         $this->results .= aff_notice_unimarc($r->notice_id, 0, $entrepots_localisations);
     }
     $this->results .= "</blockquote>";
     $this->results .= "</div>\n\t\t</div>";
     //on a besoin d'un formulaire pour reposter la recherche
     //$this->results.= $this->make_hidden_search_form();
     //gestion de la pagination...
     $nbepages = ceil($this->getTotalNbResults() / $opac_search_results_per_page);
     $url_page = "javascript:document.form_values.page.value=!!page!!; document.form_values.action = \"./index.php?lvl=more_results&tab=affiliate\"; document.form_values.affiliate_page.value=document.form_values.page.value; document.form_values.submit()";
     $action = "javascript:document.form_values.page.value=document.form.page.value; document.form_values.action = \"./index.php?lvl=more_results&tab=affiliate\"; document.form_values.affiliate_page.value=document.form_values.page.value; document.form_values.submit()";
     $this->results .= "<div id='navbar'><hr />\n<center>" . printnavbar($page, $nbepages, $url_page, $action, "catal_pag") . "</center></div>";
     return $this->results;
 }
Beispiel #3
0
if ($opac_allow_affiliate_search) {
    print $search_result_affiliate_lvl2_head;
} else {
    print "\t<div id=\"resultatrech\"><h3>{$msg['resultat_recherche']}</h3>\n\n\t\t<div id=\"resultatrech_container\">\n\t\t<div id=\"resultatrech_see\">";
}
//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 "\n\t<h3><span><b>{$count}</b> {$msg['categs_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></font>";
    print activation_surlignage();
    print "</h3></span>";
    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>";
    $first_clause .= "catdef.libelle_categorie not like '~%' ";
    $aq = new analyse_query(stripslashes($user_query), 0, 0, 1, 0, $opac_stemming_active);
    $members_catdef = $aq->get_query_members('catdef', 'catdef.libelle_categorie', 'catdef.index_categorie', 'catdef.num_noeud');
    $members_catlg = $aq->get_query_members('catlg', 'catlg.libelle_categorie', 'catlg.index_categorie', 'catlg.num_noeud');
    $list_thes = array();
    if ($id_thes == -1) {
        //recherche dans tous les thesaurus
        $list_thes = thesaurus::getThesaurusList();
    } else {
        //recherche dans le thesaurus transmis
Beispiel #4
0
require_once "{$include_path}/javascript/surligner.inc.php";
print $inclure_recherche;
// affichage recherche
require_once $base_path . '/includes/simple_search.inc.php';
$simple_search_content = simple_search_content(stripslashes($user_query), $css);
// template pour un encadré du résultat
require_once $base_path . '/includes/templates/search_result.tpl.php';
if (!$get_query && !($search_type == "extended_search" && $launch_search != 1) && !$mode) {
    //On ne met pas dans l'historique les résultats obtenus en cliquant sur le mot-clé d'une notice
    rec_history();
    $_SESSION["new_last_query"] = $_SESSION["nb_queries"];
}
//Activation surlignage
if ($opac_show_results_first_page) {
    require_once $include_path . "/surlignage.inc.php";
    $activation_surlignage = activation_surlignage();
    $simple_search_content = str_replace("!!surligne!!", $surligne, $simple_search_content);
} else {
    $simple_search_content = str_replace("!!surligne!!", "", $simple_search_content);
}
print pmb_bidi(str_replace('!!user_query!!', '', $simple_search_content));
print pmb_bidi($search_result_header);
print "<div id=\"search_result\" " . (!$mode && $search_type == "simple_search" && $opac_autolevel2 ? "style='display:none'" : "") . ">\n";
// lien pour retour au sommaire
unset($_SESSION['facette']);
if (!$mode) {
    switch ($search_type) {
        case "simple_search":
            print pmb_bidi("<h3><span>{$msg['search_result_for']}<b>" . htmlspecialchars(stripslashes($user_query), ENT_QUOTES, $charset) . "</b></span>{$activation_surlignage}</h3>");
            if ($user_query == "") {
                if ($opac_search_other_function) {