Exemple #1
0
 print pmb_bidi("<h3><span><b>{$count}</b> {$msg['abstract_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>\n";
 //gestion du tri
 if (isset($_GET["sort"])) {
     $_SESSION["last_sortnotices"] = $_GET["sort"];
 }
 if ($count > $opac_nb_max_tri) {
     $_SESSION["last_sortnotices"] = "";
 }
 $searcher = new searcher_abstract(stripslashes($user_query));
 if ($opac_visionneuse_allow) {
     $nbexplnum_to_photo = $searcher->get_nb_explnums();
 }
 if ($count) {
     if (isset($_SESSION["last_sortnotices"]) && $_SESSION["last_sortnotices"] !== "") {
         $notices = $searcher->get_sorted_result($_SESSION["last_sortnotices"], $debut, $opac_search_results_per_page);
     } else {
         $notices = $searcher->get_sorted_result("default", $debut, $opac_search_results_per_page);
     }
 }
 if (!$opac_allow_affiliate_search) {
     print "\n\t\t\t</div>";
 }
 print "\n\t\t\t<div id=\"resultatrech_liste\">";
 if ($opac_notices_depliable) {
Exemple #2
0
     break;
 case "keyword":
     $searcher = new searcher_keywords(stripslashes($user_query));
     if (!empty($_SESSION["last_sortnotices"])) {
         $cart_sort = $_SESSION["last_sortnotices"];
     } else {
         $cart_sort = "default";
     }
     $notices = $searcher->get_sorted_cart_result($cart_sort, 0, $opac_max_cart_items);
     if (count($notices)) {
         $notices = implode(",", $notices);
     }
     add_notices_to_cart($notices);
     break;
 case "abstract":
     $searcher = new searcher_abstract(stripslashes($user_query));
     if (!empty($_SESSION["last_sortnotices"])) {
         $cart_sort = $_SESSION["last_sortnotices"];
     } else {
         $cart_sort = "default";
     }
     $notices = $searcher->get_sorted_cart_result($cart_sort, 0, $opac_max_cart_items);
     if (count($notices)) {
         $notices = implode(",", $notices);
     }
     add_notices_to_cart($notices);
     break;
 case "extended":
     $searcher = new searcher_extended(stripslashes($user_query));
     if (!empty($_SESSION["last_sortnotices"])) {
         $cart_sort = $_SESSION["last_sortnotices"];
Exemple #3
0
     $notices = $searcher->get_result();
     add_notices_to_cart($notices);
     break;
 case "title":
 case "titre":
     $searcher = new searcher_title(stripslashes($user_query));
     $notices = $searcher->get_result();
     add_notices_to_cart($notices);
     break;
 case "keyword":
     $searcher = new searcher_keywords(stripslashes($user_query));
     $notices = $searcher->get_result();
     add_notices_to_cart($notices);
     break;
 case "abstract":
     $searcher = new searcher_abstract(stripslashes($user_query));
     $notices = $searcher->get_result();
     add_notices_to_cart($notices);
     break;
 case "extended":
     $es = new search();
     $table = $es->make_search();
     $notices = '';
     $q = "select distinct notice_id from {$table} ";
     $res = mysql_query($q, $dbh);
     if (mysql_num_rows($res)) {
         while ($row = mysql_fetch_object($res)) {
             if ($notices != "") {
                 $notices .= ",";
             }
             $notices .= $row->notice_id;
 function search_abstracts()
 {
     global $typdoc, $dbh, $charset;
     $searcher_abstract = new searcher_abstract(stripslashes($this->user_query));
     $notices = $searcher_abstract->get_result();
     $nb_result_abstract = $searcher_abstract->get_nb_results();
     $l_typdoc = implode(",", $searcher_abstract->get_typdocs());
     if ($nb_result_abstract) {
         //définition du formulaire
         $form = "<form name=\"search_abstract\" action=\"./index.php?lvl=more_results\" method=\"post\">";
         if (function_exists("search_other_function_post_values")) {
             $form .= search_other_function_post_values();
         }
         $form .= "<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($this->user_query), ENT_QUOTES, $charset) . "\">\n\t\t\t\t<input type=\"hidden\" name=\"mode\" value=\"abstract\">\n\t\t\t\t<input type=\"hidden\" name=\"search_type_asked\" value=\"simple_search\">\n\t\t\t\t<input type=\"hidden\" name=\"typdoc\" value=\"" . $typdoc . "\">\n\t\t\t\t<input type=\"hidden\" name=\"count\" value=\"" . $nb_result_abstract . "\">\n\t\t\t  \t<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($this->user_query), ENT_QUOTES, $charset) . "\">\n\t\t\t  \t<input type=\"hidden\" name=\"l_typdoc\" value=\"" . htmlentities($l_typdoc, ENT_QUOTES, $charset) . "\">\n\t\t\t  \t</form>";
         $_SESSION["level1"]["abstract"]["form"] = $form;
         $_SESSION["level1"]["abstract"]["count"] = $nb_result_abstract;
     }
     return $nb_result_abstract;
 }
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: abstract.inc.php,v 1.41 2013-10-30 15:00:54 dgoron Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// premier niveau de recherche OPAC sur résumé/notes
require_once $class_path . "/searcher.class.php";
if ($opac_search_other_function) {
    require_once $include_path . "/" . $opac_search_other_function;
}
$searcher_abstract = new searcher_abstract(stripslashes($user_query));
$notices = $searcher_abstract->get_result();
$nb_result_abstract = $searcher_abstract->get_nb_results();
$l_typdoc = implode(",", $searcher_abstract->get_typdocs());
//définition du formulaire
$form = "<form name=\"search_abstract\" action=\"./index.php?lvl=more_results\" method=\"post\">";
if (function_exists("search_other_function_post_values")) {
    $form .= search_other_function_post_values();
}
$form .= "<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($user_query), ENT_QUOTES, $charset) . "\">\n\t<input type=\"hidden\" name=\"mode\" value=\"abstract\"> \n\t<input type=\"hidden\" name=\"typdoc\" value=\"" . $typdoc . "\">\n\t<input type=\"hidden\" name=\"count\" value=\"" . $nb_result_abstract . "\">\n  \t<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($user_query), ENT_QUOTES, $charset) . "\">\n  \t<input type=\"hidden\" name=\"l_typdoc\" value=\"" . htmlentities($l_typdoc, ENT_QUOTES, $charset) . "\">\n  \t</form>";
if ($opac_allow_affiliate_search) {
    $search_result_affiliate_all = str_replace("!!mode!!", "abstract", $search_result_affiliate_lvl1);
    $search_result_affiliate_all = str_replace("!!search_type!!", "notices", $search_result_affiliate_all);
    $search_result_affiliate_all = str_replace("!!label!!", $msg['abstract'], $search_result_affiliate_all);
    $search_result_affiliate_all = str_replace("!!nb_result!!", $nb_result_abstract, $search_result_affiliate_all);
    if ($nb_result_abstract) {
        $link = "<a href='#' onclick=\"document.search_abstract.action = './index.php?lvl=more_results&tab=catalog'; document.search_abstract.submit();return false;\">" . $msg['suite'] . "&nbsp;<img src='./images/search.gif' border='0' align='absmiddle'/></a>";