setDomain(1); $acces_j = $dom_1->getJoin($PMBuserid,4,'notice_id'); } // classe pour la gestion du sélecteur require("./selectors/classes/selector_notice.class.php"); $selector_notice = new selector_notice(stripslashes($user_input)); $selector_notice->proceed(); function show_results($user_input, $nbr_lignes=0, $page=0) { global $nb_per_page; global $base_url; global $caller; global $msg; global $no_display ; global $charset; global $niveau_biblio, $id_restrict,$modele_id,$serial_id; global $acces_j; global $callback; global $typdoc_query; if($niveau_biblio){ $filtre_notice=" and niveau_biblio='$niveau_biblio' "; } else { $filtre_notice=""; } if($typdoc_query){ $filtre_notice_type_doc=" and typdoc='$typdoc_query' "; } else { $filtre_notice_type_doc=""; } // on récupére le nombre de lignes qui vont bien if($user_input=="") { $requete_count = "SELECT COUNT(1) FROM notices "; $requete_count.= $acces_j; $requete_count.= "where notice_id!='".$no_display."' $filtre_notice $filtre_notice_type_doc "; } else { $aq=new analyse_query(stripslashes($user_input)); if ($aq->error) { error_message($msg["searcher_syntax_error"],sprintf($msg["searcher_syntax_error_desc"],$aq->current_car,$aq->input_html,$aq->error_message)); exit; } $members=$aq->get_query_members("notices","index_wew","index_sew","notice_id"); $isbn_verif=traite_code_isbn(stripslashes($user_input)); $suite_rqt=""; if (isISBN($isbn_verif)) { if (strlen($isbn_verif)==13) $suite_rqt=" code like '".formatISBN($isbn_verif,13)."' or code like '".addslashes($isbn_verif)."' "; else $suite_rqt=" code like '".formatISBN($isbn_verif,10)."' or code like '".addslashes($isbn_verif)."' "; $requete_count = "select count(1) from notices "; $requete_count.= $acces_j; $requete_count.= "where ( ".$suite_rqt." ) "; $requete_count.= "and notice_id!='".$no_display."' $filtre_notice $filtre_notice_type_doc "; } else { $requete_count = "select count(1) from notices "; $requete_count.= $acces_j; $requete_count.= "where (".$members["where"]." or code like '".addslashes($isbn_verif)."' ) "; $requete_count.= "and notice_id!='".$no_display."' $filtre_notice $filtre_notice_type_doc "; } } //Si id de notice, c'est prioritaire $id_restrict = (int)$id_restrict; if($id_restrict>0){ $requete_count="SELECT COUNT(1) FROM notices ".$acces_j." WHERE notice_id='$id_restrict' AND notice_id!='".$no_display."'"; } $res = pmb_mysql_query($requete_count, $dbh); $nbr_lignes = @pmb_mysql_result($res, 0, 0); if(!$page) $page=1; $debut =($page-1)*$nb_per_page; if($nbr_lignes) { // on lance la vraie requête if($user_input=="") { $requete = "SELECT notice_id, tit1, serie_name, tnvol, code FROM notices "; $requete.= $acces_j; $requete.= "left join series on serie_id=tparent_id "; $requete.= "where notice_id!='".$no_display."' $filtre_notice $filtre_notice_type_doc ORDER BY index_sew, code LIMIT $debut,$nb_per_page "; } else { $isbn_verif=traite_code_isbn(stripslashes($user_input)); $suite_rqt=""; if (isISBN($isbn_verif)) { if (strlen($isbn_verif)==13) $suite_rqt=" code like '".formatISBN($isbn_verif,13)."' or code like '".addslashes($isbn_verif)."' "; else $suite_rqt=" code like '".formatISBN($isbn_verif,10)."' or code like '".addslashes($isbn_verif)."' "; $requete = "select notice_id, tit1, serie_name, tnvol, code from notices "; $requete.= $acces_j; $requete.= "left join series on serie_id=tparent_id "; $requete.= "where ( ".$suite_rqt." ) "; $requete.= "and notice_id!='".$no_display."' $filtre_notice $filtre_notice_type_doc group by notice_id limit $debut,$nb_per_page"; } else { $requete = "select notice_id, tit1, serie_name, tnvol, code, ".$members["select"]." as pert from notices "; $requete.= $acces_j; $requete.= "left join series on serie_id=tparent_id where (".$members["where"]." or (code like '".addslashes($isbn_verif)."' )) "; $requete.= "and notice_id!='".$no_display."' $filtre_notice $filtre_notice_type_doc group by notice_id order by pert desc, index_sew, code limit $debut,$nb_per_page"; } } //Si id de notice, c'est prioritaire if($id_restrict>0){ $requete="SELECT notice_id, tit1, serie_name, tnvol, code FROM notices ".$acces_j."LEFT JOIN series ON serie_id=tparent_id WHERE notice_id='$id_restrict' AND notice_id!='".$no_display."'"; } $res = @pmb_mysql_query($requete, $dbh); while(($notice=pmb_mysql_fetch_object($res))) { if($niveau_biblio){ $location="./catalog.php?categ=serials&sub=modele&act=copy&modele_id=$modele_id&serial_id=$serial_id&new_serial_id=$notice->notice_id"; $display = new mono_display($notice->notice_id, 0, '', 0, '', '', '',0, 0, 0, 0,"", 0, false, true); print pmb_bidi("