本文整理汇总了PHP中p_master::load方法的典型用法代码示例。如果您正苦于以下问题:PHP p_master::load方法的具体用法?PHP p_master::load怎么用?PHP p_master::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类p_master
的用法示例。
在下文中一共展示了p_master::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
$mode = request_var('mode', '');
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}"));
}
示例2: switch
$mode = 'quickmod';
switch ($action) {
case 'lock':
case 'unlock':
case 'lock_post':
case 'unlock_post':
case 'make_sticky':
case 'make_announce':
case 'make_global':
case 'make_normal':
case 'fork':
case 'move':
case 'delete_post':
case 'delete_topic':
case 'trash_topic':
$module->load('mcp', 'main', 'quickmod');
return;
break;
case 'topic_logs':
// Reset start parameter if we jumped from the quickmod dropdown
if (request_var('start', 0)) {
$_REQUEST['start'] = 0;
}
$module->set_active('logs', 'topic_logs');
break;
case 'merge_topic':
$module->set_active('main', 'forum_view');
break;
case 'split':
case 'merge':
$module->set_active('main', 'topic_view');