acl_get('a_cookies')) ? "$file$SID&mode=cookie" : ''; $module['General']['Board_defaults'] = ($auth->acl_get('a_defaults')) ? "$file$SID&mode=default" : ''; $module['General']['Board_settings'] = ($auth->acl_get('a_board')) ? "$file$SID&mode=setting" : ''; $module['General']['Avatar_settings'] = ($auth->acl_get('a_board')) ? "$file$SID&mode=avatar" : ''; $module['General']['Email_settings'] = ($auth->acl_get('a_server')) ? "$file$SID&mode=email" : ''; $module['General']['Server_settings'] = ($auth->acl_get('a_server')) ? "$file$SID&mode=server" : ''; $module['General']['Auth_settings'] = ($auth->acl_get('a_server')) ? "$file$SID&mode=auth" : ''; return; } define('IN_PHPBB', 1); // Load default header $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); // Get mode $mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : ''; // Check permissions/set title switch ($mode) { case 'cookie': $l_title = 'Cookie_settings'; $which_auth = 'a_cookies'; break; case 'default': $l_title = 'Board_defaults'; $which_auth = 'a_defaults'; break; case 'avatar': $l_title = 'Avatar_settings'; $which_auth = 'a_board'; break; case 'setting': $l_title = 'Board_settings'; $which_auth = 'a_board'; break; case 'email': $l_title = 'Email_settings'; $which_auth = 'a_server'; break; case 'server': $l_title = 'Server_settings'; $which_auth = 'a_server'; break; case 'auth': $l_title = 'Auth_settings'; $which_auth = 'a_server'; break; default: return; } // Check permissions if (!$auth->acl_get($which_acl)) { trigger_error($user->lang['NO_ADMIN']); } // Pull all config data $sql = "SELECT * FROM " . CONFIG_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = (isset($_POST[$config_name])) ? $_POST[$config_name] : $default_config[$config_name]; if (isset($_POST['submit'])) { $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; $db->sql_query($sql); } } if (isset($_POST['submit'])) { // Re-cache config data config_config($new); add_admin_log('log_' . $mode . '_config'); trigger_error($user->lang['Config_updated']); } page_header($user->lang[$l_title]); ?>
lang[$l_title . '_explain']; ?>