True, "nonavbar" => True, "currentapp" => "home", "noapi" => True); include("./inc/functions.inc.php"); include("../header.inc.php"); // Authorize the user to use setup app and load the database // Does not return unless user is authorized if (!auth()){ Header("Location: index.php"); exit; } loaddb(); /* Guessing default paths. */ $current_config["files_dir"] = ereg_replace("/setup","/files",dirname($SCRIPT_FILENAME)); if (is_dir("/tmp")){ $current_config["temp_dir"] = "/tmp"; }else{ $current_config["temp_dir"] = "/path/to/temp/dir"; } if ($submit) { @$db->query("delete from config"); while ($newsetting = each($newsettings)) { if ($newsetting[0] == "nntp_server") { $db->query("select config_value FROM config WHERE config_name='nntp_server'"); if ($db->num_rows()) { $db->next_record(); if ($db->f("config_value") <> $newsetting[1]) { $db->query("DELETE FROM newsgroups"); $db->query("DELETE FROM users_newsgroups"); } } } $db->query("insert into config (config_name, config_value) values ('" . addslashes($newsetting[0]) . "','" . addslashes($newsetting[1]) . "')"); } if ($newsettings["auth_type"] == "ldap") { Header("Location: ldap.php"); exit; } else { //echo "