acl_get('a_server')) ? "$filename$SID&mode=auth" : ''; $module['GENERAL']['AVATAR_SETTINGS'] = ($auth->acl_get('a_board')) ? "$filename$SID&mode=avatar" : ''; $module['GENERAL']['BOARD_DEFAULTS'] = ($auth->acl_get('a_defaults')) ? "$filename$SID&mode=default" : ''; $module['GENERAL']['BOARD_SETTINGS'] = ($auth->acl_get('a_board')) ? "$filename$SID&mode=setting" : ''; $module['GENERAL']['COOKIE_SETTINGS'] = ($auth->acl_get('a_cookies')) ? "$filename$SID&mode=cookie" : ''; $module['GENERAL']['EMAIL_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=email" : ''; $module['GENERAL']['LOAD_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=load" : ''; $module['GENERAL']['SERVER_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=server" : ''; $module['GENERAL']['MESSAGE_SETTINGS'] = ($auth->acl_get('a_defaults')) ? "$filename$SID&mode=message" : ''; return; } define('IN_PHPBB', 1); // Load default header $phpbb_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require('pagestart.' . $phpEx); // Get mode $mode = request_var('mode', ''); $action = request_var('action', ''); $submit = (isset($_POST['submit'])) ? true : false; // 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 'load': $l_title = 'LOAD_SETTINGS'; $which_auth = 'a_server'; break; case 'auth': $l_title = 'AUTH_SETTINGS'; $which_auth = 'a_server'; break; // case 'karma': // $l_title = 'KARMA_SETTINGS'; // $which_auth = 'a_user'; // break; case 'message': $l_title = 'MESSAGE_SETTINGS'; $which_auth = 'a_defaults'; break; case 'message': $l_title = 'MESSAGE_SETTINGS'; $which_auth = 'a_defaults'; break; default: return; } // Check permissions if (!$auth->acl_get($which_auth)) { trigger_error($user->lang['NO_ADMIN']); } $new = $config; $cfg_array = (isset($_REQUEST['config'])) ? request_var('config', '') : $new; foreach ($cfg_array as $config_name => $config_value) { $new[$config_name] = $config_value; if ($config_name == 'email_function_name') { $new['email_function_name'] = (empty($new['email_function_name']) || !function_exists($new['email_function_name'])) ? 'mail' : str_replace(array('(', ')'), array('', ''), trim($new['email_function_name'])); } if ($submit) { set_config($config_name, $config_value); } } if ($submit) { add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG'); trigger_error($user->lang['CONFIG_UPDATED']); } adm_page_header($user->lang[$l_title]); ?>
lang[$l_title . '_EXPLAIN']; ?>