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


PHP Horde_Util::nonInputVar方法代码示例

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


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

示例1: array

/**
 * Horde redirection script.
 *
 * Copyright 1999-2016 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL-2). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl.
 *
 * @author   Chuck Hagenbuch <chuck@horde.org>
 * @category Horde
 * @license  http://www.horde.org/licenses/lgpl LGPL-2
 * @package  Horde
 */
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('horde', array('authentication' => 'none', 'nologintasks' => true));
$main_page = Horde_Util::nonInputVar('horde_login_url', Horde_Util::getFormData('url'));
// Break up the requested URL in $main_page and run some sanity checks
// on it to prevent phishing and XSS attacks. If any of the checks
// fail, $main_page will be set to null.
if (!empty($main_page)) {
    // Mute errors in case of unparseable URLs
    $req = @parse_url($main_page);
    // We assume that any valid redirect URL will be in the same
    // cookie domain. This helps prevent rogue off-site Horde installs
    // from mimicking the real server.
    if (isset($req['host'])) {
        $qcookiedom = preg_quote($conf['cookie']['domain']);
        if (!preg_match('/' . $qcookiedom . '$/', $req['host'])) {
            $main_page = null;
        }
    }
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:index.php

示例2: strtotime

$index = Horde_Util::getFormData('index');
// Make sure we have a valid date set.
$date = Horde_Util::getFormData('date');
if (!empty($date) && !is_numeric($date)) {
    $date = strtotime($date);
}
// Set default page title and date format.
$title = _("Today's Comics");
$date_format = 'D, d M Y H:i:s T';
// Figure out how many days of history we keep.
$daystokeep = 90;
if (!empty($conf['backend']['daystokeep'])) {
    $daystokeep = $conf['backend']['daystokeep'];
}
// Get/guess the current action ID.
$actionID = Horde_Util::getFormData('actionID', Horde_Util::nonInputVar('actionID'));
if (is_null($actionID)) {
    if (empty($date) && empty($index)) {
        $actionID = 'main';
    } elseif (empty($date) && !empty($index)) {
        $actionID = 'comic';
    } elseif (!empty($date) && empty($index)) {
        $actionID = 'day';
    } else {
        $actionID = 'image';
    }
}
if (empty($date)) {
    $date = mktime(0, 0, 0);
}
// If we're not displaying a raw image, require the common
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:comics.php

示例3: session_write_close

        exit;
    }
}
// Should we redirect when we're done?
$redirect = Horde_Util::getFormData('redirect');
$action = Horde_Util::getFormData('action');
// No more notifications after this point, so close the session so we
// don't lock other pages - if redirecting, we are only fetching one comic
// and would like a notification on success/failure.
if (empty($redirect)) {
    session_write_close();
}
// Proceed once we're sure we're authorized.
// $mode is either set from the cli.backend.* scripts as an array of modes
// or passed in as a single mode from the form variable.
$mode = Horde_Util::nonInputVar('mode', Horde_Util::getFormData('mode', array('menu')));
if (!is_array($mode)) {
    $mode = array($mode);
}
$time = mktime(0, 0, 0);
$t = getdate($time);
if (!empty($conf['backend']['daystokeep'])) {
    $daystokeep = $conf['backend']['daystokeep'];
    $oldest = mktime(0, 0, 0, $t['mon'], $t['mday'] - $daystokeep, $t['year']);
} else {
    $daystokeep = 90;
    $oldest = null;
}
$expired = mktime(0, 0, 0, $t['mon'], $t['mday'] - ($daystokeep + 1), $t['year']);
if (in_array('sums', $mode)) {
    $klutz_driver->rebuildSums();
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:backend.php

示例4: array

/**
 * Script to handle requests for html delivery of stories.
 *
 * Copyright 2004-2016 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file LICENSE for license information (BSD). If you did not
 * did not receive this file, see http://cvs.horde.org/co.php/jonah/LICENSE.
 *
 * @author Jan Schneider <jan@horde.org>
 */
require_once __DIR__ . '/lib/Application.php';
$jonah = Horde_Registry::appInit('jonah', array('authentication' => 'none', 'session_control' => 'readonly'));
$jonah = Horde_Registry::appInit('jonah');
$templates = Horde::loadConfiguration('templates.php', 'templates', 'jonah');
/* Get the id and format of the feed to display. */
$criteria = Horde_Util::nonInputVar('criteria');
if (empty($criteria['channel_format'])) {
    // Select the default channel format
    $criteria['channel_format'] = key($templates);
}
$options = array();
foreach ($templates as $key => $info) {
    $options[] = '<option value="' . $key . '"' . ($key == $criteria['channel_format'] ? ' selected="selected"' : '') . '>' . $info['name'] . '</option>';
}
if (empty($criteria['channel_id']) && !empty($criteria['feed'])) {
    $criteria['channel_id'] = $GLOBALS['injector']->getInstance('Jonah_Driver')->getChannelId($criteria['feed']);
}
if (empty($criteria['channel_id'])) {
    $notification->push(_("No valid feed name or ID requested."), 'horde.error');
} else {
    $stories = $GLOBALS['injector']->getInstance('Jonah_Driver')->getStories($criteria);
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:feed.php

示例5: define

/**
 * Folks base application file.
 *
 *
 * This file brings in all of the dependencies that every Folks script will
 * need, and sets up objects that all scripts use.
 */
// Check for a prior definition of HORDE_BASE (perhaps by an auto_prepend_file
// definition for site customization).
if (!defined('HORDE_BASE')) {
    define('HORDE_BASE', __DIR__ . '/../..');
}
// Load the Horde Framework core, and set up inclusion paths and autoloading.
require_once HORDE_BASE . '/lib/core.php';
// Registry.
$registry = new Horde_Registry();
$registry->pushApp('folks', array('check_perms' => Horde_Util::nonInputVar('folks_authentication') != 'none'));
$conf =& $GLOBALS['conf'];
// Define the base file path of Folks.
if (!defined('FOLKS_BASE')) {
    define('FOLKS_BASE', __DIR__ . '/..');
}
$GLOBALS['folks_driver'] = Folks_Driver::factory();
// Cache
$GLOBALS['cache'] = $injector->getInstance('Horde_Cache');
// Update user online status
$GLOBALS['folks_driver']->updateOnlineStatus();
// Start output compression.
if (!Horde_Util::nonInputVar('no_compress')) {
}
开发者ID:jubinpatel,项目名称:horde,代码行数:30,代码来源:base.php


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