"; $r.=""; $requete="select location_libelle,idlocation from docs_location where location_visible_opac=1"; $result = mysql_query($requete, $dbh); if (mysql_numrows($result)){ while (($loc = mysql_fetch_object($result))) { $selected=""; if ($supagro_loc_sel==$loc->idlocation) {$selected="selected=\"selected\"";} $r.= ""; } } $r.=""; $r.="
"; $r.= " "; return $r; } function search_other_function_clause() { global $supagro_loc_sel, $supagro_rev_res; $r=""; //restriction type de notice si revue if ($supagro_rev_res) { //restriction localisation etats de collection pour les revues $r = "select distinct notice_id from notices where niveau_biblio='s' and notices.niveau_hierar='1'"; if ($supagro_loc_sel) { $r.=" and (notices.notice_id in (SELECT distinct id_serial from collections_state where collections_state.location_id='".$supagro_loc_sel."')) "; } else { $r.=" and (notices.notice_id in (SELECT distinct id_serial from collections_state )) "; } } else { //restriction localisation exemplaires if ($supagro_loc_sel) { $r = "select distinct notice_id from notices where notice_id in ("; $r.= "select distinct(expl_notice) from exemplaires where expl_location='".$supagro_loc_sel."' "; $r.= "union "; $r.= "select distinct(bulletin_notice) from exemplaires, bulletins where expl_location='".$supagro_loc_sel."' and expl_bulletin=bulletin_id )"; } } return $r; } function search_other_function_has_values() { global $supagro_loc_sel,$supagro_rev_res; if (($supagro_loc_sel)||($supagro_rev_res)) return true; else return false; } function search_other_function_get_values(){ global $supagro_loc_sel,$supagro_rev_res; return $supagro_loc_sel."---".$supagro_rev_res; } function search_other_function_rec_history($n) { global $supagro_loc_sel,$supagro_rev_res; $_SESSION["supagro_loc_sel".$n]=$supagro_loc_sel; $_SESSION["supagro_rev_res".$n]=$supagro_rev_res; } function search_other_function_get_history($n) { global $supagro_loc_sel,$supagro_rev_res; $supagro_loc_sel=$_SESSION["supagro_loc_sel".$n]; $supagro_rev_res=$_SESSION["supagro_rev_res".$n]; } function search_other_function_human_query($n) { global $dbh; global $supagro_loc_sel,$supagro_rev_res; $r=""; $supagro_loc_sel=$_SESSION["supagro_loc_sel".$n]; $supagro_rev_res=$_SESSION["supagro_rev_res".$n]; if ($supagro_loc_sel) { $r="bibliotheque : "; $requete="select location_libelle from docs_location where idlocation='".$supagro_loc_sel."' limit 1"; $res=mysql_query($requete,$dbh); $r.=@mysql_result($res,0,0); $r.=" "; } if ($supagro_rev_res) { $r.= "localisation revue "; } return $r; } function search_other_function_post_values() { global $supagro_loc_sel,$supagro_rev_res; return "\n"; } ?>