if ($mode == 'login' || $mode == 'logout' || $mode == 'confirm') { define('IN_LOGIN', true); } // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup('ucp'); // Setting a variable to let the style designer know where he is... $template->assign_var('S_IN_UCP', true); $module = new p_master(); $default = false; // Basic "global" modes switch ($mode) { case 'activate': $module->load('ucp', 'activate'); $module->display($user->lang['UCP_ACTIVATE']); redirect(append_sid("{$phpbb_root_path}index.{$phpEx}")); break; case 'resend_act': $module->load('ucp', 'resend'); $module->display($user->lang['UCP_RESEND']); break; case 'sendpassword': $module->load('ucp', 'remind'); $module->display($user->lang['UCP_REMIND']); break; case 'register': if ($user->data['is_registered'] || isset($_REQUEST['not_agreed'])) { redirect(append_sid("{$phpbb_root_path}index.{$phpEx}")); } $module->load('ucp', 'register');
if (in_array($mode, array('login', 'login_link', 'logout', 'confirm', 'sendpassword', 'activate'))) { define('IN_LOGIN', true); } // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup('ucp'); // Setting a variable to let the style designer know where he is... $template->assign_var('S_IN_UCP', true); $module = new p_master(); $default = false; // Basic "global" modes switch ($mode) { case 'activate': $module->load('ucp', 'activate'); $module->display($user->lang['UCP_ACTIVATE']); redirect(append_sid("{$phpbb_root_path}index.{$phpEx}")); break; case 'resend_act': $module->load('ucp', 'resend'); $module->display($user->lang['UCP_RESEND']); break; case 'sendpassword': $module->load('ucp', 'remind'); $module->display($user->lang['UCP_REMIND']); break; case 'register': if ($user->data['is_registered'] || isset($_REQUEST['not_agreed'])) { redirect(append_sid("{$phpbb_root_path}index.{$phpEx}")); } $module->load('ucp', 'register');
if (!$forum_id) { $module->set_display('main', 'forum_view', false); $module->set_display('logs', 'forum_logs', false); } if (!$user_id && $username == '') { $module->set_display('notes', 'user_notes', false); $module->set_display('warn', 'warn_user', false); } // Load and execute the relevant module $module->load_active(); // Assign data to the template engine for the list of modules $module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.{$phpEx}")); // Generate urls for letting the moderation control panel being accessed in different modes $template->assign_vars(array('U_MCP' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=main'), 'U_MCP_FORUM' => $forum_id ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", "i=main&mode=forum_view&f={$forum_id}") : '', 'U_MCP_TOPIC' => $forum_id && $topic_id ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", "i=main&mode=topic_view&t={$topic_id}") : '', 'U_MCP_POST' => $forum_id && $topic_id && $post_id ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", "i=main&mode=post_details&t={$topic_id}&p={$post_id}") : '')); // Generate the page, do not display/query online list $module->display($module->get_page_title(), false); /** * Functions used to generate additional URL paramters */ function _module__url($mode, &$module_row) { return extra_url(); } function _module_notes_url($mode, &$module_row) { if ($mode == 'front') { return ''; } global $user_id; return $user_id ? "&u={$user_id}" : ''; }
* @since 3.1.0-b2 */ $vars = array( 'module', 'mode', 'user_id', 'forum_id', 'topic_id', 'post_id', 'username', 'id', ); extract($phpbb_dispatcher->trigger_event('core.modify_mcp_modules_display_option', compact($vars))); // Load and execute the relevant module $module->load_active(); // Assign data to the template engine for the list of modules $module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx")); // Generate urls for letting the moderation control panel being accessed in different modes $template->assign_vars(array( 'U_MCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main'), 'U_MCP_FORUM' => ($forum_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=forum_view&f=$forum_id") : '', 'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&t=$topic_id") : '', 'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&t=$topic_id&p=$post_id") : '', )); // Generate the page, do not display/query online list $module->display($module->get_page_title());