// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: navigator.inc.php,v 1.39 2015-06-17 13:38:05 jpermanne Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
/*DB commenté car n'affiche rien lors de l'appel à etageres_see si showet non défini
if ($lvl=="etagere_see") 
	$navig.="<td><a href=\"index.php?lvl=etageres_see\" class='etageres_see'><span>".$msg["etageres_see"]."</span></a></td>\n";
*/
//Création de la recherche équivalente à tous les champs si on est en autolevel
//Si le niveau 1 est shunté
if ($opac_autolevel2 && $autolevel1 && !$get_last_query && $user_query) {
    //On fait la recherche tous les champs
    $search_all_fields = new searcher_all_fields(stripslashes($user_query), $map_emprises_query);
    $nb_result = $search_all_fields->get_nb_results();
    if ($nb_result) {
        $count = $nb_result;
        $l_typdoc = implode(",", $search_all_fields->get_typdocs());
        $mode = "tous";
        //définition du formulaire
        $form_lvl1 = "\n\t\t\t<form name=\"search_tous\" action=\"./index.php?lvl=more_results\" method=\"post\">";
        if (function_exists("search_other_function_post_values")) {
            $form_lvl1 .= search_other_function_post_values();
        }
        if (count($map_emprise_query)) {
            foreach ($map_emprises_query as $map_emprise_query) {
                $form_lvl1 .= "\r\n\t\t\t\t<input type=\"hidden\" name=\"map_emprises_query[]\" value=\"{$map_emprise_query}\">";
            }
        }
Exemple #2
0
        } else {
            $cart_[] = $id;
            $message = sprintf($msg["cart_notice_add"], $notice_header);
            change_basket_image($id);
        }
    } else {
        $message = $msg["cart_full"];
    }
} else {
    if ($lvl) {
        switch ($lvl) {
            case "more_results":
                //changement de plan !
                switch ($mode) {
                    case "tous":
                        $searcher = new searcher_all_fields(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 "title":
                    case "titre":
                        $searcher = new searcher_title(stripslashes($user_query));
                        if (!empty($_SESSION["last_sortnotices"])) {
Exemple #3
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: tous.inc.php,v 1.55 2015-04-01 07:23:04 arenou Exp $
// premier niveau de recherche OPAC sur tous
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// inclusion classe pour affichage tous (level 1)
require_once $base_path . '/includes/templates/tous.tpl.php';
require_once $base_path . '/classes/notice.class.php';
require_once $base_path . '/includes/notice_affichage.inc.php';
require_once $class_path . "/searcher.class.php";
$search_all_fields = new searcher_all_fields(stripslashes($user_query), $map_emprises_query);
//$notices = $search_all_fields->get_result();
$nb_result = $search_all_fields->get_nb_results();
$l_typdoc = implode(",", $search_all_fields->get_typdocs());
//définition du formulaire
$form = "\n\t<form name=\"search_tous\" action=\"./index.php?lvl=more_results\" method=\"post\">";
if (function_exists("search_other_function_post_values")) {
    $form .= search_other_function_post_values();
}
if ($map_emprises_query) {
    foreach ($map_emprises_query as $map_emprise_query) {
        $form .= "\n\t\t<input type=\"hidden\" name=\"map_emprises_query[]\" value=\"{$map_emprise_query}\">";
    }
}
$form .= "\n  \t\t<input type=\"hidden\" name=\"mode\" value=\"tous\">\n  \t\t<input type=\"hidden\" name=\"typdoc\" value=\"" . $typdoc . "\">\n  \t\t<input type=\"hidden\" name=\"count\" value=\"" . $nb_result . "\">\n  \t\t<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($user_query), ENT_QUOTES, $charset) . "\">\n  \t\t<input type=\"hidden\" name=\"l_typdoc\" value=\"" . htmlentities($l_typdoc, ENT_QUOTES, $charset) . "\">";
if ($opac_indexation_docnum_allfields) {
Exemple #4
0
            $message = sprintf($msg["cart_notice_exists"], $notice_header);
        } else {
            $cart_[] = $id;
            $message = sprintf($msg["cart_notice_add"], $notice_header);
        }
    } else {
        $message = $msg["cart_full"];
    }
} 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":