0) { $_SESSION['import_debug_info'] = $debug_data; } header('Location: templates_import.php?preview=' . $preview_only); } } /* --------------------------- Template Import Functions --------------------------- */ function import() { global $hash_type_names, $fields_template_import; print "
\n"; $display_hideme = false; if ((isset($_SESSION['import_debug_info'])) && (is_array($_SESSION['import_debug_info']))) { import_display_results($_SESSION['import_debug_info'], array(), true, get_filter_request_var('preview')); kill_session_var('import_debug_info'); $display_hideme = true; } html_start_box(__('Import Template'), '100%', true, '3', 'center', ''); $default_profile = db_fetch_cell('SELECT id FROM data_source_profiles WHERE `default`="on"'); if (empty($default_profile)) { $default_profile = db_fetch_cell('SELECT id FROM data_source_profiles ORDER BY id LIMIT 1'); } $fields_template_import['import_data_source_profile']['default'] = $default_profile; draw_edit_form( array( 'config' => array('no_form_tag' => true), 'fields' => $fields_template_import ) ); html_end_box(true, true); form_hidden_box('save_component_import','1',''); form_save_button('', 'import'); ?>