"); if ($i===false) $i=strpos($fcontents,"<".$input_params['NOTICEELEMENT']." "); if ($i!==false) { //on pense ŕ récup le charset du xml if($encoding === ""){ $s=strpos($fcontents,""); if(isset($s) && isset($e)){ $entete = substr($fcontents,$s,$e+2); $rx = "//m"; if (preg_match($rx,$entete, $m)) $encoding = strtoupper($m[1]); } } $i1=strpos($fcontents,""); while ((!feof($fi))&&($i1===false)) { $fcontents.=fread($fi,4096); $i1=strpos($fcontents,""); } if ($i1!==false) { $notice=substr($fcontents,$i,$i1+strlen("")-$i); $requete="insert into import_marc (no_notice, notice, origine, encoding) values($n,'".addslashes($notice)."','$origine','$encoding')"; pmb_mysql_query($requete); $n++; $index[]=$n; $fcontents=substr($fcontents,$i1+strlen("")); $i=false; } } else { if (!feof($fi)) $fcontents.=fread($fi,4096); else break; } } return $index; } } ?>