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


PHP ModuleHandler::displayContent方法代碼示例

本文整理匯總了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 */
開發者ID:einsss,項目名稱:counsel_project,代碼行數:31,代碼來源: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 */
開發者ID:relip,項目名稱:xe-core,代碼行數:31,代碼來源: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;
        }
開發者ID:edccesl,項目名稱:xe-addons,代碼行數:31,代碼來源:download_wanna_reply.addon.php

示例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);
 }
開發者ID:rhymix,項目名稱:rhymix,代碼行數:30,代碼來源:Context.class.php

示例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;
 }
開發者ID:kkkyyy03,項目名稱:coffeemix,代碼行數:40,代碼來源:Context.class.php


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