gen_signature($item);
}
$z->signature = $signature;
if($infos['notice']) $z->notice = $infos['notice'];
if($infos['source_id']) $z->source_id = $infos['source_id'];
$ret=$z->insert_in_database(true);
//on conserve la trace de l'origine de la notice...
$id_notice = $ret[1];
$rqt = "select recid from external_count where rid = '$item'";
$res = mysql_query($rqt);
if(mysql_num_rows($res)) $recid = mysql_result($res,0,0);
$req= "insert into notices_externes set num_notice = '".$id_notice."', recid = '".$recid."'";
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 = "./catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=$z->bull_id&art_to_show=$ret[1]";
else $url_view = "./catalog.php?categ=isbd&id=".$ret[1];
$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 = "./catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=$z->bull_id&art_to_show=$ret[1]";
else $url_view = "./catalog.php?categ=isbd&id=".$ret[1];
$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"=>$serialize_search));
}
$result = array(
'id'=>$item,
'html'=>($charset != "utf-8" ? utf8_encode($retour) : $retour)
);
ajax_http_send_response($result);