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";
}
?>