/* +-------------------------------------------------------------------------+ | Copyright (C) 2002 Ian Berry | | | | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU General Public License | | as published by the Free Software Foundation; either version 2 | | of the License, or (at your option) any later version. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | +-------------------------------------------------------------------------+ | cacti: the rrdtool frontend [php-auth, php-tree, php-form] | +-------------------------------------------------------------------------+ | This code is currently maintained and debugged by Ian Berry, any | | questions or comments regarding this code should be directed to: | | - iberry@raxnet.net | +-------------------------------------------------------------------------+ | - raXnet - http://www.raxnet.net/ | +-------------------------------------------------------------------------+ */?> $section = "User Administration"; include ('include/auth.php'); header("Cache-control: no-cache"); include_once ("include/config_settings.php"); include_once ("include/functions.php"); include_once ('include/form.php'); switch ($action) { case 'save': if (sizeof($settings) > 0) { foreach (array_keys($settings) as $setting) { if ($settings[$setting][tab] == $form[tab]) { if ($settings[$setting][method] == "group") { if (sizeof($settings[$setting][items]) > 0) { foreach (array_keys($settings[$setting][items]) as $item) { db_execute("replace into settings (name,value) values ('$item', '$form[$item]')"); } } }else{ db_execute("replace into settings (name,value) values ('$setting', '$form[$setting]')"); } } } } header ("Location: settings.php?tab=$form[tab]"); break; default: include_once ('include/top_header.php'); if (!(isset($args[tab]))) { /* there is no selected tab; select the first one */ $current_tab = array_keys($tabs); $current_tab = $current_tab[0]; }else{ $current_tab = $args[tab]; } start_box("cacti Settings (" . $tabs[$current_tab] . ")", "", ""); ?>
![]()
|
}
}
?>