本文整理汇总了PHP中ModuleHandler::displayContent方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleHandler::displayContent方法的具体用法?PHP ModuleHandler::displayContent怎么用?PHP ModuleHandler::displayContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleHandler
的用法示例。
在下文中一共展示了ModuleHandler::displayContent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
* @brief Declare constants for generic use and for checking to avoid a direct call from the Web
**/
define('__XE__', TRUE);
/**
* @brief Include the necessary configuration files
**/
require dirname(__FILE__) . '/config/config.inc.php';
/**
* @brief Initialize by creating Context object
* Set all Request Argument/Environment variables
**/
$oContext = Context::getInstance();
$oContext->init();
/**
* @brief If default_url is set and it is different from the current url, attempt to redirect for SSO authentication and then process the module
**/
if ($oContext->checkSSO()) {
$oModuleHandler = new ModuleHandler();
try {
if ($oModuleHandler->init()) {
$oModuleHandler->displayContent($oModuleHandler->procModule());
}
} catch (Exception $e) {
htmlHeader();
echo Context::getLang($e->getMessage());
htmlFooter();
}
}
$oContext->close();
/* End of file index.php */
/* Location: ./index.php */
示例2: dirname
*
**/
/**
* @brief Declare constants for generic use and for checking to avoid a direct call from the Web
**/
define('__XE__', TRUE);
define('__ZBXE__', TRUE);
// deprecated : __ZBXE__ will be removed. Use __XE__ instead.
/**
* @brief Include the necessary configuration files
**/
require dirname(__FILE__) . '/config/config.inc.php';
/**
* @brief Initialize by creating Context object
* Set all Request Argument/Environment variables
**/
$oContext =& Context::getInstance();
$oContext->init();
/**
* @brief If default_url is set and it is different from the current url, attempt to redirect for SSO authentication and then process the module
**/
if ($oContext->checkSSO()) {
$oModuleHandler = new ModuleHandler();
if ($oModuleHandler->init()) {
$oModule =& $oModuleHandler->procModule();
$oModuleHandler->displayContent($oModule);
}
}
$oContext->close();
/* End of file index.php */
/* Location: ./index.php */
示例3: ModuleHandler
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @file exchange_content.addon.php
* @brief Addon for change content matched pattern's
* @author [NAVER](http://www.navercorp.com) (<developers@xpressengine.com)
*/
if (!defined('__XE__')) {
exit;
}
if ($called_position == "before_display_content") {
}
if ($called_position == "before_module_proc" && Context::get('download_wanna_reply') != "") {
Context::loadLang(_XE_PATH_ . 'addons/download_wanna_reply/lang');
$oModuleHandler = new ModuleHandler();
$oModuleHandler->error = Context::getLang('msg_download_wanna_reply');
$oModuleHandler->displayContent($this);
Context::close();
exit;
}
if ($called_position == "after_module_proc") {
$oDocument = Context::get('oDocument');
// 글이 없는 경우 처리하지 않음
if (!$oDocument) {
return;
}
$logged_info = Context::get('logged_info');
if ($logged_info) {
// 본인이 작성한 글은 다운로드 가능
if ($logged_info->member_srl == $oDocument->variables['member_srl']) {
return;
}
示例4: displayErrorPage
/**
* Display a generic error page and exit.
*
* @param string $title
* @param string $message
* @return void
*/
public static function displayErrorPage($title = 'Error', $message = '', $status = 500)
{
// Change current directory to the Rhymix installation path.
chdir(\RX_BASEDIR);
// Set the title.
self::setBrowserTitle(self::getSiteTitle());
self::addBrowserTitle($title);
// Set the message.
$oMessageObject = getView('message');
$oMessageObject->setError(-1);
if ($status != 200) {
$oMessageObject->setHttpStatusCode($status);
}
if (in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON', 'JS_CALLBACK'))) {
$oMessageObject->setMessage(trim($title . "\n\n" . $message));
} else {
$oMessageObject->setMessage($title);
$oMessageObject->dispMessage($message);
}
// Display the message.
$oModuleHandler = new ModuleHandler();
$oModuleHandler->displayContent($oMessageObject);
}
示例5: enforceSiteLock
/**
* Enforce site lock.
*/
private static function enforceSiteLock()
{
// Allow if the current user is logged in as administrator, or trying to log in.
$logged_info = self::get('logged_info');
if ($logged_info && $logged_info->is_admin === 'Y') {
return;
} elseif (in_array(self::get('act'), array('procMemberLogin', 'dispMemberLogout'))) {
return;
}
// Allow if the current user is in the list of allowed IPs.
$allowed_list = config('lock.allow');
foreach ($allowed_list as $allowed_ip) {
if (Rhymix\Framework\IpFilter::inRange(RX_CLIENT_IP, $allowed_ip)) {
return;
}
}
// Set headers and constants for backward compatibility.
header('HTTP/1.1 503 Service Unavailable');
define('_XE_SITELOCK_', TRUE);
define('_XE_SITELOCK_TITLE_', config('lock.title') ?: self::getLang('admin.sitelock_in_use'));
define('_XE_SITELOCK_MESSAGE_', config('lock.message'));
unset($_SESSION['XE_VALIDATOR_RETURN_URL']);
// Load the sitelock template.
if (FileHandler::exists(RX_BASEDIR . 'common/tpl/sitelock.user.html')) {
include RX_BASEDIR . 'common/tpl/sitelock.user.html';
} else {
self::setBrowserTitle(self::getSiteTitle());
$oMessageObject = getView('message');
$oMessageObject->setHttpStatusCode(503);
$oMessageObject->setError(-1);
$oMessageObject->setMessage(_XE_SITELOCK_TITLE_);
$oMessageObject->dispMessage();
$oModuleHandler = new ModuleHandler();
$oModuleHandler->displayContent($oMessageObject);
}
exit;
}