// Have they authenticated (again) as an admin for this session?if (!isset($user->data['session_admin']) || !$user->data['session_admin']){ login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);}

// Is user any type of admin? No, then stop here, each script needs to// check specific permissions but this is a catchallif (!$auth->acl_get('a_')){ trigger_error('NO_ADMIN');}

// We define the admin variables now, because the user is now able to use the admin related features...define('IN_ADMIN', true);$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';

// the acp template is never stored in the database$user->theme['template_storedb'] = false;

// Instantiate new module$module = new p_master();

// Instantiate module system and generate list of available modules$module->list_modules('acp');

// Select the active module$module->set_active($module_id, $mode);

// Assign data to the template engine for the list of modules// We do this before loading the active module for correct menu display in trigger_error$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));

/*** Going through a config array and validate values, writing errors to $error. The validation method accepts parameters separated by ':' for string and int.* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.*/function validate_config_vars($config_vars, &$cfg_array, &$error){ global $phpbb_root_path, $user; $type = 0; $min = 1; $max = 2;

/*** Checks whatever or not a variable is OK for use in the Database* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'* param mixed $error The error array*/function validate_range($value_ary, &$error){ global $user;