Verarbeitungsprotokoll:

"; echo "Import-Datei: " . $f_importFile . "

"; $rowToImport = array(); $rowToImport[0] = "bek"; $rowToImport[1] = "mek"; $rowToImport[2] = "hop1"; $rowToImport[3] = "hop2"; $rowToImport[4] = "hop3"; $rowToImport[5] = "dummy"; $rowToImportLen = count($rowToImport); // read file to import $data = importCSV($importPath . $f_importFile); $dataLen = count($data); // loop all rows for ($j = 0; $j < $dataLen; $j++) { // loop for all fields of $fields of the row for ($i = 0; $i < $rowToImportLen; $i++) { ${$rowToImport[$i]} = $data[$j][$i]; } // $logJbId = getFieldValueFromClause("phoenix_log.import","jb_id","imp_id = '" . $f_jb_tourname . "' AND imp_pos = '" . $f_position . "'"); if (true) : $bek = trim($bek); $mek = trim($mek); $hop1 = trim($hop1); $hop2 = trim($hop2); $hop3 = trim($hop3); echo "[" . pad($j,3) . "] " . "BEK=" . $bek . " " . "MEK=" . $mek . " " . "HOP1=" . $hop1 . " " . "HOP2=" . $hop2 . " " . "HOP3=" . $hop3 . "
"; $bek = substr($bek,3); $mek = substr($mek,3); $hop1 = substr($hop1,3); $hop2 = substr($hop2,3); $hop3 = substr($hop3,3); echo "      " . "BEK=" . $bek . " " . "MEK=" . $mek . " " . "HOP1=" . $hop1 . " " . "HOP2=" . $hop2 . " " . "HOP3=" . $hop3 . "
"; echo "      "; if ($bek != "") : $bekId = getFieldValueFromId("articleitem","ati_serialno",$bek,"ati_id"); if ($bekId == "") : echo "BEK=INS "; $bekCountINS++; else : echo "BEK=EXIST "; $bekCountEXIST++; endif; endif; if ($mek != "") : $mekId = getFieldValueFromId("articleitem","ati_serialno",$mek,"ati_id"); if ($mekId == "") : echo "MEK=INS "; $mekCountINS++; else : echo "MEK=EXIST "; $mekCountEXIST++; endif; endif; if ($hop1 != "") : $hop1Id = getFieldValueFromId("articleitem","ati_serialno",$hop1,"ati_id"); if ($hop1Id == "") : echo "HOP1=INS "; $hop1CountINS++; else : echo "HOP1=EXIST "; $hop1CountEXIST++; endif; endif; if ($hop2 != "") : $hop2Id = getFieldValueFromId("articleitem","ati_serialno",$hop2,"ati_id"); if ($hop2Id == "") : echo "HOP2=INS "; $hop2CountINS++; else : echo "HOP2=EXIST "; $hop2CountEXIST++; endif; endif; if ($hop3 != "") : $hop3Id = getFieldValueFromId("articleitem","ati_serialno",$hop3,"ati_id"); if ($hop3Id == "") : echo "HOP3=INS "; $hop3CountINS++; else : echo "HOP3=EXIST "; $hop3CountEXIST++; endif; endif; echo "

"; if ($fire) : if ($bek != "" && $bekId == "") : insertStmt("articleitem", array("at_id", $atIdMappingArr["BEK"], "stk_id", $stkId, "ati_serialno", $bek, "ati_data_04", $currentDate)); endif; if ($mek != "" && $mekId == "") : insertStmt("articleitem", array("at_id", $atIdMappingArr["MEK"], "stk_id", $stkId, "ati_serialno", $mek, "ati_data_04", $currentDate)); endif; if ($hop1 != "" && $hop1Id == "") : insertStmt("articleitem", array("at_id", $atIdMappingArr["HOP1"], "stk_id", $stkId, "ati_serialno", $hop1, "ati_data_04", $currentDate)); endif; if ($hop2 != "" && $hop2Id == "") : insertStmt("articleitem", array("at_id", $atIdMappingArr["HOP2"], "stk_id", $stkId, "ati_serialno", $hop2, "ati_data_04", $currentDate)); endif; if ($hop3 != "" && $hop3Id == "") : insertStmt("articleitem", array("at_id", $atIdMappingArr["HOP3"], "stk_id", $stkId, "ati_serialno", $hop3, "ati_data_04", $currentDate)); endif; endif; endif; } echo "BEK::INS=" . $bekCountINS . "
"; echo "BEK::EXIST=" . $bekCountEXIST . "
"; echo "MEK::INS=" . $mekCountINS . "
"; echo "MEK::EXIST=" . $mekCountEXIST . "
"; echo "HOP1::INS=" . $hop1CountINS . "
"; echo "HOP1::EXIST=" . $hop1CountEXIST . "
"; echo "HOP2::INS=" . $hop2CountINS . "
"; echo "HOP2::EXIST=" . $hop2CountEXIST . "
"; echo "HOP3::INS=" . $hop3CountINS . "
"; echo "HOP3::EXIST=" . $hop3CountEXIST . "
"; echo "
"; $sumExist = $bekCountEXIST + $mekCountEXIST + $hop1CountEXIST + $hop2CountEXIST + $hop3CountEXIST; $sumIns = $bekCountINS + $mekCountINS + $hop1CountINS + $hop2CountINS + $hop3CountINS; echo "SUMME EXISTENTER OBJEKTE: " . $sumExist . "
"; echo "SUMME NEUER OBJEKTE: " . $sumIns . "
"; // Remove import file // $retVal = removeFile($f_importFile, $importPath, $pathSeparator); endif; endif; ?>