本文整理汇总了PHP中bx_require_authentication函数的典型用法代码示例。如果您正苦于以下问题:PHP bx_require_authentication函数的具体用法?PHP bx_require_authentication怎么用?PHP bx_require_authentication使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bx_require_authentication函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bx_import
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*
* @defgroup TridentEndAdmin Trident Studio End Admin Pages
* @ingroup TridentStudio
* @{
*/
require_once './../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
bx_import('BxDolLanguages');
bx_require_authentication(true);
$sPage = bx_get('page');
$sPage = $sPage !== false ? bx_process_input($sPage) : '';
$oPage = new BxTemplStudioPolyglot($sPage);
$oPage->init();
$oTemplate = BxDolStudioTemplate::getInstance();
$oTemplate->setPageNameIndex($oPage->getPageIndex());
$oTemplate->setPageHeader($oPage->getPageHeader());
$oTemplate->setPageContent('page_caption_code', $oPage->getPageCaption());
$oTemplate->setPageContent('page_attributes', $oPage->getPageAttributes());
$oTemplate->setPageContent('page_menu_code', $oPage->getPageMenu());
$oTemplate->setPageContent('page_main_code', $oPage->getPageJsCode() . $oPage->getPageCode());
$oTemplate->addCss($oPage->getPageCss());
$oTemplate->addJs($oPage->getPageJs());
$oTemplate->getPageCode();
/** @} */
示例2: bx_alert
$oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
bx_alert('account', 'before_login', 0, 0, array('form' => $oForm));
$oForm->initChecker();
$oForm->setRole(bx_get('role'));
$bLoginSuccess = $oForm->isSubmittedAndValid();
$bAjxMode = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ? true : false;
if ($bAjxMode) {
header('Content-type: text/html; charset=utf-8');
echo $bLoginSuccess ? 'OK' : $oForm->getLoginError();
exit;
} elseif ($bLoginSuccess) {
bx_import('BxDolAccount');
$oAccount = BxDolAccount::getInstance($oForm->getCleanValue('ID'));
$aAccount = bx_login($oAccount->id(), $oForm->getCleanValue('rememberMe') ? true : false);
$sUrlRelocate = $oForm->getCleanValue('relocate');
if (!$sUrlRelocate || 0 != strncmp($sUrlRelocate, BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT))) {
$sUrlRelocate = BX_DOL_ROLE_ADMIN == $oForm->getRole() ? BX_DOL_URL_STUDIO . 'launcher.php' : BX_DOL_URL_ROOT . 'member.php';
}
bx_import('BxDolTemplate');
BxDolTemplate::getInstance()->setPageNameIndex(BX_PAGE_TRANSITION);
BxDolTemplate::getInstance()->setPageHeader(_t('_Please Wait'));
BxDolTemplate::getInstance()->setPageContent('page_main_code', MsgBox(_t('_Please Wait')));
BxDolTemplate::getInstance()->setPageContent('url_relocate', bx_html_attribute($sUrlRelocate, BX_ESCAPE_STR_QUOTE));
BxDolTemplate::getInstance()->getPageCode();
exit;
}
}
bx_require_authentication();
bx_import('BxDolPermalinks');
header('Location: ' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher'));
/** @} */