0) { foreach (array_keys($settings) as $setting) { if ($settings[$setting]["tab"] == $_POST["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', '" . (isset($_POST[$item]) ? $_POST[$item] : "") . "')"); } } }else{ db_execute("replace into settings (name,value) values ('$setting', '" . (isset($_POST[$setting]) ? $_POST[$setting] : "") . "')"); } } } } raise_message(1); /* reset local settings cache so the user sees the new settings */ kill_session_var("sess_config_array"); header ("Location: settings.php?tab=" . $_POST["tab"]); break; default: include_once ('include/top_header.php'); /* set the default settings category */ if (!isset($_GET["tab"])) { /* there is no selected tab; select the first one */ $current_tab = array_keys($tabs); $current_tab = $current_tab[0]; }else{ $current_tab = $_GET["tab"]; } /* draw the categories tabs on the top of the page */ print "
| $tabs[$tab_short_name] | \n\n"; } } print " | \n |