⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acp_board.php

📁 这些都是我以前学习是用到的源码
💻 PHP
📖 第 1 页 / 共 3 页
字号:
						'load_cpf_viewprofile'	=> array('lang' => 'LOAD_CPF_VIEWPROFILE',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),						'load_cpf_viewtopic'	=> array('lang' => 'LOAD_CPF_VIEWTOPIC',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),					)				);			break;			case 'auth':				$display_vars = array(					'title'	=> 'ACP_AUTH_SETTINGS',					'vars'	=> array(						'legend1'		=> 'ACP_AUTH_SETTINGS',						'auth_method'	=> array('lang' => 'AUTH_METHOD',	'validate' => 'string',	'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)					)				);			break;			case 'server':				$display_vars = array(					'title'	=> 'ACP_SERVER_SETTINGS',					'vars'	=> array(						'legend1'				=> 'ACP_SERVER_SETTINGS',						'send_encoding'			=> array('lang' => 'SEND_ENCODING',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'gzip_compress'			=> array('lang' => 'ENABLE_GZIP',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),						'legend2'				=> 'PATH_SETTINGS',						'smilies_path'			=> array('lang' => 'SMILIES_PATH',		'validate' => 'rpath',	'type' => 'text:20:255', 'explain' => true),						'icons_path'			=> array('lang' => 'ICONS_PATH',		'validate' => 'rpath',	'type' => 'text:20:255', 'explain' => true),						'upload_icons_path'		=> array('lang' => 'UPLOAD_ICONS_PATH',	'validate' => 'rpath',	'type' => 'text:20:255', 'explain' => true),						'ranks_path'			=> array('lang' => 'RANKS_PATH',		'validate' => 'rpath',	'type' => 'text:20:255', 'explain' => true),						'legend3'				=> 'SERVER_URL_SETTINGS',						'force_server_vars'		=> array('lang' => 'FORCE_SERVER_VARS',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'server_protocol'		=> array('lang' => 'SERVER_PROTOCOL',	'validate' => 'string',	'type' => 'text:10:10', 'explain' => true),						'server_name'			=> array('lang' => 'SERVER_NAME',		'validate' => 'string',	'type' => 'text:40:255', 'explain' => true),						'server_port'			=> array('lang' => 'SERVER_PORT',		'validate' => 'int',	'type' => 'text:5:5', 'explain' => true),					)				);			break;			case 'security':				$display_vars = array(					'title'	=> 'ACP_SECURITY_SETTINGS',					'vars'	=> array(						'legend1'				=> 'ACP_SECURITY_SETTINGS',						'allow_autologin'		=> array('lang' => 'ALLOW_AUTOLOGIN',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'max_autologin_time'	=> array('lang' => 'AUTOLOGIN_LENGTH',		'validate' => 'int',	'type' => 'text:5:5', 'explain' => true),						'ip_check'				=> array('lang' => 'IP_VALID',				'validate' => 'int',	'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),						'browser_check'			=> array('lang' => 'BROWSER_VALID',			'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'check_dnsbl'			=> array('lang' => 'CHECK_DNSBL',			'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'email_check_mx'		=> array('lang' => 'EMAIL_CHECK_MX',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'pass_complex'			=> array('lang' => 'PASSWORD_TYPE',			'validate' => 'string',	'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),						'chg_passforce'			=> array('lang' => 'FORCE_PASS_CHANGE',		'validate' => 'int',	'type' => 'text:3:3', 'explain' => true),						'max_login_attempts'	=> array('lang' => 'MAX_LOGIN_ATTEMPTS',	'validate' => 'int',	'type' => 'text:3:3', 'explain' => true),						'tpl_allow_php'			=> array('lang' => 'TPL_ALLOW_PHP',			'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),					)				);			break;			case 'email':				$display_vars = array(					'title'	=> 'ACP_EMAIL_SETTINGS',					'vars'	=> array(						'legend1'				=> 'GENERAL_SETTINGS',						'email_enable'			=> array('lang' => 'ENABLE_EMAIL',			'validate' => 'bool',	'type' => 'radio:enabled_disabled', 'explain' => true),						'board_email_form'		=> array('lang' => 'BOARD_EMAIL_FORM',		'validate' => 'bool',	'type' => 'radio:enabled_disabled', 'explain' => true),						'email_function_name'	=> array('lang' => 'EMAIL_FUNCTION_NAME',	'validate' => 'string',	'type' => 'text:20:50', 'explain' => true),						'email_package_size'	=> array('lang' => 'EMAIL_PACKAGE_SIZE',	'validate' => 'int',	'type' => 'text:5:5', 'explain' => true),						'board_contact'			=> array('lang' => 'CONTACT_EMAIL',			'validate' => 'string',	'type' => 'text:25:100', 'explain' => true),						'board_email'			=> array('lang' => 'ADMIN_EMAIL',			'validate' => 'string',	'type' => 'text:25:100', 'explain' => true),						'board_email_sig'		=> array('lang' => 'EMAIL_SIG',				'validate' => 'string',	'type' => 'textarea:5:30', 'explain' => true),						'board_hide_emails'		=> array('lang' => 'BOARD_HIDE_EMAILS',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'legend2'				=> 'SMTP_SETTINGS',						'smtp_delivery'			=> array('lang' => 'USE_SMTP',				'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),						'smtp_host'				=> array('lang' => 'SMTP_SERVER',			'validate' => 'string',	'type' => 'text:25:50', 'explain' => false),						'smtp_port'				=> array('lang' => 'SMTP_PORT',				'validate' => 'int',	'type' => 'text:4:5', 'explain' => true),						'smtp_auth_method'		=> array('lang' => 'SMTP_AUTH_METHOD',		'validate' => 'string',	'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),						'smtp_username'			=> array('lang' => 'SMTP_USERNAME',			'validate' => 'string',	'type' => 'text:25:255', 'explain' => true),						'smtp_password'			=> array('lang' => 'SMTP_PASSWORD',			'validate' => 'string',	'type' => 'password:25:255', 'explain' => true)					)				);			break;			default:				trigger_error('NO_MODE', E_USER_ERROR);			break;		}		if (isset($display_vars['lang']))		{			$user->add_lang($display_vars['lang']);		}		$this->new_config = $config;		$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;		$error = array();		// We validate the complete config if whished		validate_config_vars($display_vars['vars'], $cfg_array, $error);		// Do not write values if there is an error		if (sizeof($error))		{			$submit = false;		}		// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...		foreach ($display_vars['vars'] as $config_name => $null)		{			if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)			{				continue;			}			if ($config_name == 'auth_method')			{				continue;			}			$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];			if ($config_name == 'email_function_name')			{				$this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));				$this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];				$config_value = $this->new_config['email_function_name'];			}			if ($submit)			{				set_config($config_name, $config_value);			}		}		if ($mode == 'auth')		{			// Retrieve a list of auth plugins and check their config values			$auth_plugins = array();			$dp = opendir($phpbb_root_path . 'includes/auth');			while (($file = readdir($dp)) !== false)			{				if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))				{					$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);				}			}			sort($auth_plugins);			$updated_auth_settings = false;			$old_auth_config = array();			foreach ($auth_plugins as $method)			{				if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))				{					include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);					$method = 'acp_' . $method;					if (function_exists($method))					{						if ($fields = $method($this->new_config))						{							// Check if we need to create config fields for this plugin and save config when submit was pressed							foreach ($fields['config'] as $field)							{								if (!isset($config[$field]))								{									set_config($field, '');								}								if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)								{									continue;								}								$old_auth_config[$field] = $this->new_config[$field];								$config_value = $cfg_array[$field];								$this->new_config[$field] = $config_value;								if ($submit)								{									$updated_auth_settings = true;									set_config($field, $config_value);								}							}						}						unset($fields);					}				}			}			if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))			{				$method = $cfg_array['auth_method'];				if ($method && in_array($method, $auth_plugins))				{					include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);					$method = 'init_' . $method;					if (function_exists($method))					{						if ($error = $method())						{							foreach ($old_auth_config as $config_name => $config_value)							{								set_config($config_name, $config_value);							}							trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);						}					}					set_config('auth_method', $cfg_array['auth_method']);				}				else				{					trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);				}			}		}		if ($submit)		{			add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));			trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));		}		$this->tpl_name = 'acp_board';		$this->page_title = $display_vars['title'];		$template->assign_vars(array(			'L_TITLE'			=> $user->lang[$display_vars['title']],			'L_TITLE_EXPLAIN'	=> $user->lang[$display_vars['title'] . '_EXPLAIN'],			'S_ERROR'			=> (sizeof($error)) ? true : false,			'ERROR_MSG'			=> implode('<br />', $error),			'U_ACTION'			=> $this->u_action)		);		// Output relevant page		foreach ($display_vars['vars'] as $config_key => $vars)		{			if (!is_array($vars) && strpos($config_key, 'legend') === false)			{				continue;			}			if (strpos($config_key, 'legend') !== false)			{				$template->assign_block_vars('options', array(					'S_LEGEND'		=> true,					'LEGEND'		=> (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)				);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -