" . htmlspecialchars($xml_data) . ' |
';
bottom_footer();
}elseif ($_POST['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 ($_POST['output_format'] == '3') {
if ($export_errors) {
header('Location: templates_export.php');
}else{
header('Content-type: application/xml');
header('Content-Disposition: attachment; filename=cacti_' . $_POST['export_type'] . '_' . strtolower(clean_up_file_name(db_fetch_cell(str_replace('|id|', $_POST['export_item_id'], $export_types{$_POST['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['export_type'])) {
$_REQUEST['export_type'] = 'graph_template';
}
html_start_box('Export Templates', '100%', '', '3', 'center', '');
?>
|
|
\n";
html_start_box('Available Templates [' . $export_types{$_REQUEST['export_type']}['name'] . ']', '100%', '', '3', 'center', '');
form_alternate_row();?>
to Export
Choose the exact item to export to XML.
|
|
Include Dependencies
Some templates rely on other items in Cacti to function properly. It is highly recommended that you select
this box or the resulting import may fail.
|
|
Output Format
Choose the format to output the resulting XML file in.
|
';
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', $_REQUEST['export_type'], '');
form_hidden_box('save_component_export','1','');
?>
|