"; if (is_array($external_notice_to_integer) && count($external_notice_to_integer) ) { foreach($external_notice_to_integer as $external_notice){ //Construction de la notice UNIMARC $infos=entrepot_to_unimarc($external_notice); $biblio_notice =""; if ($infos['notice']) { $z=new z3950_notice("unimarc",$infos['notice'],$infos['source_id']); if($z->bibliographic_level == "a" && $z->hierarchic_level == "2"){ $biblio_notice = "art"; } if($pmb_notice_controle_doublons != 0){ $sign = new notice_doublon(true,$infos['source_id']); $signature = $sign->gen_signature($external_notice); $requete="select signature, niveau_biblio ,niveau_hierar ,notice_id from notices where signature='$signature'"; $result = pmb_mysql_query($requete); if ($dbls=pmb_mysql_num_rows($result)) { //affichage de l'erreur, en passant tous les param postes (serialise) pour l'eventuel forcage require_once("$class_path/mono_display.class.php"); print "
$msg[540]
".$msg["gen_signature_erreur_similaire"]."
"; if($dbls<$nb_per_page_search){ $maxAffiche=$dbls; echo "
".sprintf($msg["gen_signature_erreur_similaire_nb"],$dbls,$dbls)."
"; }else{ $maxAffiche=$nb_per_page_search; echo "
".sprintf($msg["gen_signature_erreur_similaire_nb"],$maxAffiche,$dbls)."
"; } $enCours=1; while($enCours<=$maxAffiche){ $r=pmb_mysql_fetch_object($result); $records = array($r->notice_id); $elements_records_list_ui = new elements_records_list_ui($records, count($records), false); $notice_display = $elements_records_list_ui->get_elements_list(); echo "
$notice_display
"; $enCours++; } continue; } } $z->signature = $signature; if($infos['notice']) $z->notice = $infos['notice']; if($infos['source_id']) $z->source_id = $infos['source_id']; $z->var_to_post(); $ret=$z->insert_in_database(); $id_notice = $ret[1]; $rqt = "select recid from external_count where rid = '$external_notice'"; $res = pmb_mysql_query($rqt); if(pmb_mysql_num_rows($res)) $recid = pmb_mysql_result($res,0,0); $req= "insert into notices_externes set num_notice = '".$id_notice."', recid = '".$recid."'"; pmb_mysql_query($req); if ($ret[0]) { if($z->bull_id && $z->perio_id){ $notice_display=new serial_display($ret[1],6); } else $notice_display=new mono_display($ret[1],6); $retour = "
".(isset($notice_id) ? $msg["notice_connecteur_remplaced_ok"] : $msg["z3950_integr_not_ok"])." ".$notice_display->result."
"; if($z->bull_id && $z->perio_id) $url_view = analysis::get_permalink($ret[1], $z->bull_id); else $url_view = notice::get_permalink($ret[1]); $retour .= "
"; print $retour; } else if ($ret[1]){ if($z->bull_id && $z->perio_id){ $notice_display=new serial_display($ret[1],6); } else $notice_display=new mono_display($ret[1],6); $retour = "
$msg[540]
".($msg["z3950_integr_not_existait"])."

".$notice_display->result."
"; if($z->bull_id && $z->perio_id) $url_view = analysis::get_permalink($ret[1], $z->bull_id); else $url_view = notice::get_permalink($ret[1]); $retour .= "
"; print $retour; } else { $retour = ""; $retour .= form_error_message($msg["connecteurs_cant_integrate_title"], ($ret[1]?$msg["z3950_integr_not_existait"]:$msg["z3950_integr_not_newrate"]), $msg["connecteurs_back_to_list"], "catalog.php?categ=search&mode=7&sub=launch",array("serialized_search"=>$sc->serialize_search())); print $retour; } } } }