예제 #1
0
     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;
         }
예제 #2
0
 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;
 }
예제 #3
0
<?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>";