" . htmlspecialchars($xml_data) . ' |
';
bottom_footer();
}elseif (get_nfilter_request_var('output_format') == '2') {
header('Content-type: application/xml');
if ($export_errors) echo __('WARNING: Export Errors Encountered. Refresh Browser Window for Details!') . "\n";
print $xml_data;
}elseif (get_nfilter_request_var('output_format') == '3') {
if ($export_errors) {
header('Location: templates_export.php');
}else{
header('Content-type: application/xml');
header('Content-Disposition: attachment; filename=cacti_' . get_nfilter_request_var('export_type') . '_' . strtolower(clean_up_file_name(db_fetch_cell(str_replace('|id|', get_nfilter_request_var('export_item_id'), $export_types{get_nfilter_request_var('export_type')}['title_sql'])))) . '.xml');
print $xml_data;
}
}
}
}
/* ---------------------------
Template Export Functions
--------------------------- */
function export() {
global $export_types;
/* 'graph_template' should be the default */
if (!isset_request_var('export_type')) {
set_request_var('export_type', 'graph_template');
}
html_start_box( __('Export Templates'), '100%', '', '3', 'center', '');
?>
|
|
\n";
html_start_box( __('Available Templates [%s]', $export_types{get_nfilter_request_var('export_type')}['name']), '100%', '', '3', 'center', '');
form_alternate_row();?>
|
|
|
|
|
';
form_radio_button('output_format', '3', '2', __('Output to the Browser (raw XML)'),'1',true); print ' ';
form_radio_button('output_format', '3', '3', __('Save File Locally'),'1',true);
form_hidden_box('export_type', get_nfilter_request_var('export_type'), '');
form_hidden_box('save_component_export','1','');
?>
|