本文整理汇总了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;
}
}
示例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
示例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) {