" ; $ireps_sel_ss_type.=""; $ireps_js_location.="ireps_location_code[$incr] = \"".$row->notices_custom_list_value."\";\n"; $ireps_js_location.="ireps_location_libelle[$incr] = \"".$row->notices_custom_list_lib."\";\n"; $incr++; } } $ireps_sel_ss_type.=""; //Pour la sélection par localisation $q="select idlocation,location_libelle, if(left(location_libelle, 5 )='IREPS',1,2) as o from docs_location where location_visible_opac='1' order by o,cp"; $r=mysql_query($q); $ireps_sel_location=""; //Pour la sélection par public cible $q="select notices_custom_list_value,notices_custom_list_lib from notices_custom_lists where notices_custom_champ='4' order by notices_custom_list_lib"; $r=mysql_query($q); $ireps_sel_public=""; //Pour la sélection par expertise $q="select notices_custom_list_value,notices_custom_list_lib from notices_custom_lists where notices_custom_champ='8' order by notices_custom_list_lib"; $r=mysql_query($q); $ireps_sel_expertise=""; $ireps_js=""; // pour la sélection par plan de classement $entete_indexint['A'] = "Santé publique, promotion de la santé"; $entete_indexint['B'] = "Système sanitaire et social"; $entete_indexint['C'] = "Prise en charge, soins"; $entete_indexint['D'] = "Développement des compétences"; $entete_indexint['E'] = "Violences"; $entete_indexint['F'] = "Accidents"; $entete_indexint['G'] = "Hygiène de vie"; $entete_indexint['H'] = "Environnement et santé"; $entete_indexint['I'] = "Santé et sexualité"; $entete_indexint['J'] = "Conduites addictives"; $entete_indexint['K'] = "Ages et temps de la vie"; $entete_indexint['L'] = "Populations et milieux spécifiques"; $entete_indexint['M'] = "Prévention, dépistage"; $entete_indexint['N'] = "Education du patient"; $entete_indexint['O'] = "Pathologies et problèmes de santé"; $q="select indexint_id, indexint_name, indexint_comment from indexint where num_pclass=1 order by indexint_name"; $r=mysql_query($q); $ireps_sel_indexint=""; $ireps_aff =$ireps_sel_ss_type.$ireps_sel_indexint.$ireps_sel_location; $ireps_aff.="'; $ireps_aff.=$ireps_js; return $ireps_aff; } function search_other_function_clause() { //OK global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; $r=""; $where=""; $from=""; if ($ireps_ss_type) { $from .= " left join notices_custom_values as n_c_v_1 on n_c_v_1.notices_custom_origine=notice_id"; $where.=" and (n_c_v_1.notices_custom_integer='".$ireps_ss_type."' and n_c_v_1.notices_custom_champ='3')"; } if ($ireps_location) { $from .= " left join notices_custom_values as n_c_v_2 on n_c_v_2.notices_custom_origine=notice_id"; $where.=" and n_c_v_2.notices_custom_origine in (select expl_notice from exemplaires where expl_location='".$ireps_location."' "; $where.="UNION select num_notice from bulletins join exemplaires on expl_bulletin=bulletin_id where expl_location='".$ireps_location."' "; $where.="UNION select analysis_notice from analysis join bulletins on analysis_bulletin=bulletin_id join exemplaires on expl_bulletin=bulletin_id where expl_location='".$ireps_location."' "; $where.="UNION select explnum_notice from explnum join explnum_location on num_explnum=explnum_id where num_location='".$ireps_location."' "; $where.=")"; } if ($ireps_public) { $from .= " left join notices_custom_values as n_c_v_3 on n_c_v_3.notices_custom_origine=notice_id"; $where.=" and (n_c_v_3.notices_custom_integer='".$ireps_public."' and n_c_v_3.notices_custom_champ='4')"; } if ($ireps_expertise) { $from .= " left join notices_custom_values as n_c_v_4 on n_c_v_4.notices_custom_origine=notice_id"; $where.=" and (n_c_v_4.notices_custom_small_text='".$ireps_expertise."' and n_c_v_4.notices_custom_champ='8')"; } if ($ireps_indexint) { $where.=" and (indexint='".$ireps_indexint."')"; } if ($ireps_ss_type || $ireps_location || $ireps_public || $ireps_expertise || $ireps_indexint) { $r.="select distinct notice_id from notices $from where 1 $where"; } return $r; } function search_other_function_has_values() { //OK global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; if ($ireps_ss_type || $ireps_location || $ireps_public || $ireps_expertise || $ireps_indexint) return true; else return false; } function search_other_function_get_values(){ global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; return $ireps_ss_type."---".$ireps_location."---".$ireps_public."---".$ireps_expertise."---".$ireps_indexint; } function search_other_function_rec_history($n) { //OK global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; $_SESSION["ireps_ss_type".$n]=$ireps_ss_type; $_SESSION["ireps_location".$n]=$ireps_location; $_SESSION["ireps_public".$n]=$ireps_public; $_SESSION["ireps_expertise".$n]=$ireps_expertise; $_SESSION["ireps_indexint".$n]=$ireps_indexint; } function search_other_function_get_history($n) { //OK global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; $ireps_ss_type=$_SESSION["ireps_ss_type".$n]; $ireps_location=$_SESSION["ireps_location".$n]; $ireps_public=$_SESSION["ireps_public".$n]; $ireps_expertise=$_SESSION["ireps_expertise".$n]; $ireps_indexint=$_SESSION["ireps_indexint".$n]; } function search_other_function_human_query($n) { //OK global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; $ret=""; $ireps_ss_type=$_SESSION["ireps_ss_type".$n]; $ireps_location=$_SESSION["ireps_location".$n]; $ireps_public=$_SESSION["ireps_public".$n]; $ireps_expertise=$_SESSION["ireps_expertise".$n]; $ireps_indexint=$_SESSION["ireps_indexint".$n]; $app=""; if ($ireps_ss_type) { $q="select notices_custom_list_lib from notices_custom_lists where notices_custom_champ='3' and notices_custom_list_value='".$ireps_ss_type."' limit 1 "; $r=mysql_query($q); if (mysql_num_rows($r)) { $app=mysql_result($r,0,0); } } if ($app) $ret.="Sous-type de document : ".$app; $app=""; if ($ireps_location) { $q="select location_libelle from docs_location where idlocation='".$ireps_location."'"; $r=mysql_query($q); if (mysql_num_rows($r)) { $app=mysql_result($r,0,0); } } if($ret && $app) $ret.=", "; if($app) $ret.="Localisation : ".$app; $app=""; if ($ireps_public) { $q="select notices_custom_list_lib from notices_custom_lists where notices_custom_champ='4' and notices_custom_list_value='".$ireps_public."' limit 1 "; $r=mysql_query($q); if (mysql_num_rows($r)) { $app=mysql_result($r,0,0); } } if($ret && $app) $ret.=", "; if($app) $ret.="Public cible : ".$app; $app=""; if ($ireps_expertise) { $q="select notices_custom_list_lib from notices_custom_lists where notices_custom_champ='8' and notices_custom_list_value='".$ireps_expertise."' limit 1 "; $r=mysql_query($q); if (mysql_num_rows($r)) { $app=mysql_result($r,0,0); } } if($ret && $app) $ret.=", "; if($app) $ret.="Outil expertisé : ".$app; $app=""; if ($ireps_indexint) { $q="select indexint_comment from indexint where indexint_id'".$ireps_indexint."' limit 1 "; $r=mysql_query($q); if (mysql_num_rows($r)) { $app=mysql_result($r,0,0); } } if($ret && $app) $ret.=", "; if($app) $ret.="Thématique : ".$app; return $ret; } function search_other_function_post_values() { //OK global $ireps_ss_type,$ireps_location,$ireps_public,$ireps_expertise, $ireps_indexint; $retour ="\n"; $retour.="\n"; $retour.="\n"; $retour.="\n"; $retour.="\n"; return $retour; } ?>