當前位置: 首頁>>代碼示例>>PHP>>正文


PHP p_master::display方法代碼示例

本文整理匯總了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');
開發者ID:puring0815,項目名稱:OpenKore,代碼行數:31,代碼來源:ucp.php

示例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');
開發者ID:MrAdder,項目名稱:phpbb,代碼行數:31,代碼來源:ucp.php

示例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}" : '';
}
開發者ID:puring0815,項目名稱:OpenKore,代碼行數:31,代碼來源:mcp.php

示例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());
開發者ID:abhinay100,項目名稱:phpbb2_app,代碼行數:30,代碼來源:mcp.php


注:本文中的p_master::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。