当前位置: 首页>>代码示例>>PHP>>正文


PHP Jaws_Gadget::filter方法代码示例

本文整理汇总了PHP中Jaws_Gadget::filter方法的典型用法代码示例。如果您正苦于以下问题:PHP Jaws_Gadget::filter方法的具体用法?PHP Jaws_Gadget::filter怎么用?PHP Jaws_Gadget::filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Jaws_Gadget的用法示例。


在下文中一共展示了Jaws_Gadget::filter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SitemapXML

 /**
  * Sitemap XML content
  *
  * @access  public
  * @return  string  XML content
  */
 function SitemapXML()
 {
     header('Content-Type: text/xml; charset=utf-8');
     $model = $this->gadget->model->load('Sitemap');
     $gadget = jaws()->request->fetch('gname', 'get');
     $gadget = Jaws_Gadget::filter($gadget);
     if (empty($gadget)) {
         return $model->GetSitemapXML();
     } else {
         $xml = $model->GetGadgetSitemapXML($gadget);
         if (empty($xml)) {
             return Jaws_HTTPError::Get(404);
         }
         return $xml;
     }
 }
开发者ID:juniortux,项目名称:jaws,代码行数:22,代码来源:Sitemap.php

示例2: header

    require_once 'include/Jaws/Utils.php';
    header('Location: ' . Jaws_Utils::getBaseURL('/') . 'install/index.php');
    exit;
} else {
    require $root . '/config/JawsConfig.php';
}
require_once JAWS_PATH . 'include/Jaws/InitApplication.php';
$IsIndex = false;
$objAction = null;
$IsReqActionStandAlone = false;
// Only registered user can access not global website
$AccessToWebsiteDenied = !$GLOBALS['app']->Session->Logged() && $GLOBALS['app']->Registry->fetch('global_website', 'Settings') == 'false';
// Get forwarded error from webserver
$ReqError = jaws()->request->fetch('http_error', 'get');
if (empty($ReqError) && $GLOBALS['app']->Map->Parse()) {
    $ReqGadget = Jaws_Gadget::filter(jaws()->request->fetch('gadget'));
    $ReqAction = Jaws_Gadget_Action::filter(jaws()->request->fetch('action'));
    if (empty($ReqGadget)) {
        $IsIndex = true;
        $ReqGadget = $GLOBALS['app']->Registry->fetchByUser($GLOBALS['app']->Session->GetAttribute('layout'), 'main_gadget', 'Settings');
    }
    if (!empty($ReqGadget)) {
        if (Jaws_Gadget::IsGadgetEnabled($ReqGadget)) {
            $objAction = Jaws_Gadget::getInstance($ReqGadget)->action->load();
            if (Jaws_Error::IsError($objAction)) {
                Jaws_Error::Fatal("Error loading gadget: {$ReqGadget}");
            }
            if (!$GLOBALS['app']->Session->GetPermission($ReqGadget, 'default')) {
                $ReqError = '403';
            }
            // check referrer host for internal action
开发者ID:Dulciane,项目名称:jaws,代码行数:31,代码来源:index.php

示例3: define

 * @copyright  2005-2015 Jaws Development Group
 * @license    http://www.gnu.org/copyleft/lesser.html
 */
define('JAWS_SCRIPT', 'admin');
define('BASE_SCRIPT', basename(__FILE__));
// Redirect to the installer if JawsConfig can't be found.
$root = dirname(__FILE__);
if (!file_exists($root . '/config/JawsConfig.php')) {
    require_once 'include/Jaws/Utils.php';
    header('Location: ' . Jaws_Utils::getBaseURL('/') . 'install/index.php');
    exit;
} else {
    require $root . '/config/JawsConfig.php';
}
require_once JAWS_PATH . 'include/Jaws/InitApplication.php';
$ReqGadget = Jaws_Gadget::filter(jaws()->request->fetch('gadget', array('post', 'get')));
$ReqAction = Jaws_Gadget_Action::filter(jaws()->request->fetch('action', array('post', 'get')));
if (empty($ReqGadget)) {
    $ReqGadget = 'ControlPanel';
    $ReqAction = '';
}
$httpAuthEnabled = $GLOBALS['app']->Registry->fetch('http_auth', 'Settings') == 'true';
if ($httpAuthEnabled) {
    require_once JAWS_PATH . 'include/Jaws/HTTPAuth.php';
    $httpAuth = new Jaws_HTTPAuth();
}
// Check for login action is requested
if (!$GLOBALS['app']->Session->Logged()) {
    $loginMsg = '';
    if ($ReqGadget == 'ControlPanel' && $ReqAction == 'Login' || $httpAuthEnabled && isset($_SERVER['PHP_AUTH_USER'])) {
        if ($httpAuthEnabled) {
开发者ID:uda,项目名称:jaws,代码行数:31,代码来源:admin.php


注:本文中的Jaws_Gadget::filter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。