} } if (strlen($strError) <= 0) { if ($CUR_FILE_POS > 0 && is_set($_SESSION, $CUR_LOAD_SESS_ID) && is_set($_SESSION[$CUR_LOAD_SESS_ID], "LOAD_SCHEME")) { parse_str($_SESSION[$CUR_LOAD_SESS_ID]["LOAD_SCHEME"]); $STEP = 4; } } if (strlen($strError) > 0) { $STEP = 1; } //*****************************************************************// } if ($STEP > 2) { //*****************************************************************// $csvFile = new CAssocData(); $csvFile->LoadFile($io->GetPhysicalName($_SERVER["DOCUMENT_ROOT"] . $DATA_FILE_NAME)); if ($fields_type != "F" && $fields_type != "R") { $strError .= GetMessage("IBLOCK_ADM_IMP_NO_FILE_FORMAT") . "<br>"; } $arDataFileFields = array(); if (strlen($strError) <= 0) { $fields_type = $fields_type == "F" ? "F" : "R"; $csvFile->SetFieldsType($fields_type); if ($fields_type == "R") { $first_names_r = $first_names_r == "Y" ? "Y" : "N"; $csvFile->SetFirstHeader($first_names_r == "Y" ? true : false); $delimiter_r_char = ""; switch ($delimiter_r) { case "TAB": $delimiter_r_char = "\t";