get_subfield("900","a","l","n"); } // fin recup_noticeunimarc_suite function import_new_notice_suite() { global $dbh ; global $notice_id ; global $info_900; for($i=0;$iidchamp){ if($perso->type == 'list'){ $requete="select notices_custom_list_value from notices_custom_lists where notices_custom_list_lib='".addslashes($info_900[$i]['a'])."' and notices_custom_champ=$perso->idchamp"; $resultat=mysql_query($requete); if (mysql_num_rows($resultat)) { $value=mysql_result($resultat,0,0); } else { $requete="select max(notices_custom_list_value*1) from notices_custom_lists where notices_custom_champ=$perso->idchamp"; $resultat=mysql_query($requete); $max=@mysql_result($resultat,0,0); $n=$max+1; $requete="insert into notices_custom_lists (notices_custom_champ,notices_custom_list_value,notices_custom_list_lib) values($perso->idchamp,$n,'".addslashes($info_900[$i]['a'])."')"; mysql_query($requete); $value=$n; } $requete="insert into notices_custom_values (notices_custom_champ,notices_custom_origine,notices_custom_".$perso->datatype.") values($perso->idchamp,$notice_id,'".$value."')"; mysql_query($requete); } else { $requete="insert into notices_custom_values (notices_custom_champ,notices_custom_origine,notices_custom_".$perso->datatype.") values($perso->idchamp,$notice_id,'".addslashes($info_900[$i]['a'])."')"; mysql_query($requete); } } } } }