setDomain(1); $acces_j = $dom_1->getJoin($PMBuserid,4,'notice_id'); } // affichage du header print $sel_header; // traitement en entrée des requêtes utilisateur if ($deb_rech) $f_user_input = $deb_rech ; if($f_user_input=="" && $user_input=="") { $user_input=''; } else { // traitement de la saisie utilisateur if ($user_input) $f_user_input=$user_input; if (($f_user_input)&&(!$user_input)) $user_input=$f_user_input; } function show_results ($dbh, $user_input, $nbr_lignes=0, $page=0, $id = 0) { global $nb_per_page; global $base_url; global $caller; global $msg; global $no_display ; global $charset; global $niveau_biblio,$modele_id,$serial_id; global $acces_j; if($niveau_biblio){ $filtre_notice=" and niveau_biblio='$niveau_biblio' "; } // 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 "; } 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"; } 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"; } } $res = mysql_query($requete_count, $dbh); $nbr_lignes = @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 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 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 group by notice_id order by pert desc, index_sew, code limit $debut,$nb_per_page"; } } $res = @mysql_query($requete, $dbh); while(($notice=mysql_fetch_object($res))) { $notice_entry = ""; if ($notice->serie_name) { $notice_entry .= $notice->serie_name; if ($notice->tnvol) $notice_entry .= ", ".$notice->tnvol; } $notice_entry ? $notice_entry .= '. '.$notice->tit1 : $notice_entry = $notice->tit1; 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"; print pmb_bidi("