\n"; if (sizeof($tabs) > 0) { foreach (array_keys($tabs) as $tab_short_name) { print " $tabs[$tab_short_name] \n \n"; } } print "\n\n"; html_start_box("Cacti Settings (" . $tabs[$current_tab] . ")", "100%", $colors["header"], "3", "center", ""); $form_array = array(); while (list($field_name, $field_array) = each($settings[$current_tab])) { $form_array += array($field_name => $field_array); if ((isset($field_array["items"])) && (is_array($field_array["items"]))) { while (list($sub_field_name, $sub_field_array) = each($field_array["items"])) { if (config_value_exists($sub_field_name)) { $form_array[$field_name]["items"][$sub_field_name]["form_id"] = 1; } $form_array[$field_name]["items"][$sub_field_name]["value"] = db_fetch_cell("select value from settings where name='$sub_field_name'"); } }else{ if (config_value_exists($field_name)) { $form_array[$field_name]["form_id"] = 1; } $form_array[$field_name]["value"] = db_fetch_cell("select value from settings where name='$field_name'"); } } draw_edit_form( array( "config" => array(), "fields" => $form_array) ); html_end_box(); form_hidden_box("tab", $current_tab, ""); form_save_button("settings.php?tab=$current_tab", "save"); include("./include/bottom_footer.php"); break; } ?>