array( "name" => "Graph Template", "title_sql" => "select name from graph_templates where id=|id|", "dropdown_sql" => "select id,name from graph_templates order by name" ), "data_template" => array( "name" => "Data Template", "title_sql" => "select name from data_template where id=|id|", "dropdown_sql" => "select id,name from data_template order by name" ), "host_template" => array( "name" => "Host Template", "title_sql" => "select name from host_template where id=|id|", "dropdown_sql" => "select id,name from host_template order by name" ), "data_query" => array( "name" => "Data Query", "title_sql" => "select name from snmp_query where id=|id|", "dropdown_sql" => "select id,name from snmp_query order by name" ) ); switch ($_REQUEST["action"]) { case 'save': form_save(); break; default: include_once("./include/top_header.php"); export(); include_once("./include/bottom_footer.php"); break; } /* -------------------------- The Save Function -------------------------- */ function form_save() { global $export_types; if (isset($_POST["save_component_export"])) { $xml_data = get_item_xml($_POST["export_type"], $_POST["export_item_id"], (((isset($_POST["include_deps"]) ? $_POST["include_deps"] : "") == "") ? false : true)); if ($_POST["output_format"] == "1") { include_once("./include/top_header.php"); print "
" . htmlspecialchars($xml_data) . " |