function search_title() { global $typdoc; global $charset; $search_title = new searcher_title(stripslashes($this->user_query)); $notices = $search_title->get_result(); $nb_result_titres = $search_title->get_nb_results(); $l_typdoc = implode(",", $search_title->get_typdocs()); $mode = "title"; //définition du formulaire $form = "<form name=\"search_objects\" action=\"./index.php?lvl=more_results\" method=\"post\">"; if (function_exists("search_other_function_post_values")) { $form .= search_other_function_post_values(); } $form .= "\n\t\t \t<input type=\"hidden\" name=\"mode\" value=\"title\">\n\t\t \t<input type=\"hidden\" name=\"search_type_asked\" value=\"simple_search\">\n\t\t \t<input type=\"hidden\" name=\"typdoc\" value=\"" . $typdoc . "\">\n\t\t \t<input type=\"hidden\" name=\"count\" value=\"" . $nb_result_titres . "\">\n\t\t \t<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($this->user_query), ENT_QUOTES, $charset) . "\">\n\t\t \t<input type=\"hidden\" name=\"l_typdoc\" value=\"" . htmlentities($l_typdoc, ENT_QUOTES, $charset) . "\">\n\t\t \t</form>"; if ($nb_result_titres) { $_SESSION["level1"]["title"]["form"] = $form; $_SESSION["level1"]["title"]["count"] = $nb_result_titres; } return $nb_result_titres; }
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: title.inc.php,v 1.40 2013-10-30 15:00:55 dgoron Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } // premier niveau de recherche OPAC sur titre // inclusion classe pour affichage notices (level 1) require_once $base_path . '/includes/templates/notice.tpl.php'; require_once $base_path . '/classes/notice.class.php'; require_once $class_path . "/searcher.class.php"; $search_title = new searcher_title(stripslashes($user_query)); $notices = $search_title->get_result(); $nb_result_titres = $search_title->get_nb_results(); $l_typdoc = implode(",", $search_title->get_typdocs()); //définition du formulaire $form = "<form name=\"search_objects\" action=\"./index.php?lvl=more_results\" method=\"post\">"; if (function_exists("search_other_function_post_values")) { $form .= search_other_function_post_values(); } $form .= "\n \t<input type=\"hidden\" name=\"mode\" value=\"title\">\n \t<input type=\"hidden\" name=\"typdoc\" value=\"" . $typdoc . "\">\n \t<input type=\"hidden\" name=\"count\" value=\"" . $nb_result_titres . "\">\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!!", "title", $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['titles'], $search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!nb_result!!", $nb_result_titres, $search_result_affiliate_all); if ($nb_result_titres) { $link = "<a href='#' onclick=\"document.search_objects.action = './index.php?lvl=more_results&tab=catalog'; document.search_objects.submit();return false;\">" . $msg['suite'] . " <img src='./images/search.gif' border='0' align='absmiddle'/></a>";
} } else { if ($lvl) { switch ($lvl) { case "more_results": //changement de plan ! switch ($mode) { case "tous": $searcher = new searcher_all_fields(stripslashes($user_query)); $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();