Example #1
0
    $f = explode(".", $file_in);
    if (count($f) > 1) {
        unset($f[count($f) - 1]);
    }
    $file_out = implode(".", $f) . "." . $output_params['SUFFIX'] . "~";
    $fo = fopen("{$base_path}/temp/" . $file_out, "w+");
    //Ouverture du fichier d'origine
    $fi = fopen("{$base_path}/temp/" . $file_in, "r");
    //Récupération du nombre de notices et enregistrement dans la base de données des notices
    $index = _get_n_notices_($fi, "{$base_path}/temp/" . $file_in, $input_params, $origine);
    if (count($index) == 0) {
        error_message_history($msg["ie_empty_file"], sprintf($msg["ie_empty_file_detail"], $import_type_l), 1);
        exit;
    }
    //Entête
    @fwrite($fo, _get_header_($output_params));
    fclose($fo);
    //Vidage de la table de log
    //mysql_query("delete from error_log where error_origin='convert.log'");
}
function convert_notice($notice, $encoding)
{
    global $step;
    global $param_path;
    global $n_errors;
    global $message_convert;
    global $n_current;
    global $z;
    for ($i = 0; $i < count($step); $i++) {
        $s = $step[$i];
        //si on a un encodage sur la notice, on le rajoute aux parametres
Example #2
0
 function get_header()
 {
     global $output_params;
     return _get_header_($output_params);
 }