本文整理汇总了PHP中p_master::display方法的典型用法代码示例。如果您正苦于以下问题:PHP p_master::display方法的具体用法?PHP p_master::display怎么用?PHP p_master::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类p_master
的用法示例。
在下文中一共展示了p_master::display方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
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');
示例2: define
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');
示例3: _module__url
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}" : '';
}
示例4: array
* @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());