" ; $r.=""; if (mysql_numrows($resultat)) { $incr=0; while (($app = mysql_fetch_object($resultat))) { $selected=""; if ($app->notices_custom_list_value==$chu_dom) { $selected="selected=\"selected\""; } else { $selected=''; } $r.= ""; //$chu_dom_js.="chu_dom_code[$incr] = \"".$app->notices_custom_list_value."\";\n"; //$chu_dom_js.="chu_dom_libelle[$incr] = \"".$app->notices_custom_list_lib."\";\n"; $incr++; } } $r.="\n"; //Type de document professionnel $chu_tdp_js="var chu_tdp_code= new Array();\n var chu_tdp_libelle = new Array();\n"; $requete="select notices_custom_list_value,notices_custom_list_lib from notices_custom_lists where notices_custom_champ='12' order by ordre, notices_custom_list_lib"; $resultat=mysql_query($requete); $r.=""; $chu_js=""; return $r.$chu_js; } function search_other_function_clause() { //doit retourner une requete de selection d'identifiants de notices global $chu_dom,$chu_tdp; $r=''; if($chu_dom && $chu_tdp){ $r.= "select distinct dom.notices_custom_origine as notice_id from notices_custom_values dom JOIN notices_custom_values tdp ON dom.notices_custom_origine=tdp.notices_custom_origine where tdp.notices_custom_champ='12' and tdp.notices_custom_small_text = '".$chu_tdp."' and dom.notices_custom_champ='11' and dom.notices_custom_small_text = '".$chu_dom."' "; }elseif($chu_dom) { $r.= "select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ='11' and notices_custom_small_text = '".$chu_dom."' "; }elseif($chu_tdp){ $r.= "select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ='12' and notices_custom_small_text = '".$chu_tdp."' "; } return $r; } function search_other_function_has_values() { global $chu_dom,$chu_tdp; if ($chu_dom || $chu_tdp) return true; else return false; } function search_other_function_get_values(){ global $chu_dom,$chu_tdp; return $chu_dom."---".$chu_tdp; } function search_other_function_rec_history($n) { global $chu_dom,$chu_tdp; $_SESSION["chu_dom".$n]=$chu_dom; $_SESSION["chu_tdp".$n]=$chu_tdp; } function search_other_function_get_history($n) { global $chu_dom,$chu_tdp; $chu_dom=$_SESSION["chu_dom".$n]; $chu_tdp=$_SESSION["chu_tdp".$n]; } function search_other_function_human_query($n) { global $chu_dom,$chu_tdp; $r1=$r2=""; $chu_dom=$_SESSION["chu_dom".$n]; $chu_tdp=$_SESSION["chu_tdp".$n]; if ($chu_dom) { $app=""; $requete="select notices_custom_list_lib from notices_custom_lists where notices_custom_champ='11' and notices_custom_list_value='".$chu_dom."' limit 1 "; $resultat=mysql_query($requete); if (mysql_num_rows($resultat)) { $res=mysql_fetch_object($resultat); $app=$res->notices_custom_list_lib; } if ($app) $r1="rubrique: ".$app; } if ($chu_tdp) { $app=""; $requete="select notices_custom_list_lib from notices_custom_lists where notices_custom_champ='12' and notices_custom_list_value='".$chu_tdp."' limit 1 "; $resultat=mysql_query($requete); if (mysql_num_rows($resultat)) { $res=mysql_fetch_object($resultat); $app=$res->notices_custom_list_lib; } if ($app) $r2="type de document: ".$app; } if($r1 && $r2){ return $r1.", ".$r2; }elseif($r1){ return $r1; }else{ return $r2; } } function search_other_function_post_values() { global $chu_dom,$chu_tdp; return "\n\n"; } ?>