Template Export Output", "98%", $colors["header"], "3", "center", ""); print "
" . htmlspecialchars($xml_data) . "
"; end_box(); include_once("./include/bottom_footer.php"); }elseif ($_POST["output_format"] == "2") { header("Content-type: application/xml"); print $xml_data; }elseif ($_POST["output_format"] == "3") { header("Content-type: text/plain"); print $xml_data; } } } /* --------------------------- Template Export Functions --------------------------- */ function export() { global $colors; $export_types = array( "graph_template" => array( "name" => "Graph Template", "dropdown_sql" => "select id,name from graph_templates order by name" ), "data_template" => array( "name" => "Data Template", "dropdown_sql" => "select id,name from data_template order by name" ), "host_template" => array( "name" => "Host Template", "dropdown_sql" => "select id,name from host_template order by name" ), "data_query" => array( "name" => "Data Query", "dropdown_sql" => "select id,name from snmp_query order by name" ) ); /* 'graph_template' should be the default */ if (!isset($_REQUEST["export_type"])) { $_REQUEST["export_type"] = "graph_template"; } ?>
">
What would you like to export? 
Export Template [" . $export_types{$_REQUEST["export_type"]}["name"] . "]", "98%", $colors["header"], "3", "center", ""); form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],0); ?> 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", "1", "2", "Output to the Browser (raw XML)","1",true); print "
"; form_radio_button("output_format", "1", "3", "Save File Locally","1",true); ?>