if (isset($_REQUEST['save_map']) && $_REQUEST['save_map'] == 'on' && isset($_REQUEST['save_map_as']) && $_REQUEST['save_map_as'] != '') { p("save map"); $serialized_mapping = ''; if ($has_header) { foreach ($col_pos_to_field as $pos => $field_name) { if (isset($firstrow[$pos]) && isset($field_name)) { $header_to_field[$firstrow[$pos]] = $field_name; } } $serialized_mapping = implode_assoc("=", "&", $header_to_field); } else { $serialized_mapping = implode_assoc("=", "&", $col_pos_to_field); } $mapping_file_name = $_REQUEST['save_map_as']; $mapping_file = new ImportMap(); $result = $mapping_file->save_map($current_user->id, $mapping_file_name, $_REQUEST['module'], $has_header, $serialized_mapping); $adb->println("Save map done"); $adb->println($result); } //save map - ends if (isset($_SESSION['totalrows']) && $_SESSION['totalrows'] != '') { $xrows = $_SESSION['totalrows']; } else { $xrows = $datarows; } if (isset($_SESSION['return_field_count'])) { $ret_field_count = $_SESSION['return_field_count']; } if (isset($_SESSION['column_position_to_field'])) { $col_pos_to_field = $_SESSION['column_position_to_field']; }