$isEditor = 1; } if ($isEditor) { if ($action == "Save Primary Key") { $statusStr = $duManager->savePrimaryKey($dbpk); } } $duManager->readUploadParameters(); $isLiveData = false; if ($duManager->getCollInfo("managementtype") == 'Live Data') { $isLiveData = true; } //Grab field mapping, if mapping form was submitted if (array_key_exists("sf", $_POST)) { if ($action == "Delete Field Mapping" || $action == "Reset Field Mapping") { $statusStr = $duManager->deleteFieldMap(); } else { //Set field map for occurrences using mapping form $targetFields = $_POST["tf"]; $sourceFields = $_POST["sf"]; $fieldMap = array(); for ($x = 0; $x < count($targetFields); $x++) { if ($targetFields[$x]) { $tField = $targetFields[$x]; if ($tField == 'unmapped') { $tField .= '-' . $x; } $fieldMap[$tField]["field"] = $sourceFields[$x]; } } //Set Source PK