get_subfield_array_array ( "606", "a" ); $info_900=$record->get_subfield("900","a","l","n"); } // fin recup_noticeunimarc_suite function import_new_notice_suite() { global $dbh ; global $notice_id ; global $info_606_a; global $info_900; $ordre_categ = 0; for($i = 0; $i < count ( $info_606_a ); $i ++) { for($j = 0; $j < count ( $info_606_a [$i] ); $j ++) { $descripteur = $info_606_a [$i] [$j]; //Recherche du terme //dans le thesaurus par defaut et dans la langue de l'interface $libelle = addslashes ( $descripteur ); $categ_id = categories::searchLibelle ( $libelle ); if ($categ_id) { $requete = "INSERT INTO notices_categories (notcateg_notice,num_noeud,ordre_categorie) values($notice_id,$categ_id,$ordre_categ)"; pmb_mysql_query( $requete, $dbh ); $ordre_categ ++; } } } 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=pmb_mysql_query($requete); if (pmb_mysql_num_rows($resultat)) { $value=pmb_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=pmb_mysql_query($requete); $max=@pmb_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'])."')"; pmb_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."')"; pmb_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'])."')"; pmb_mysql_query($requete); } } } } }