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


PHP Horde_Util::getGet方法代码示例

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


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

示例1: close

 function close($focus = false)
 {
     echo '</form>' . "\n";
     if (Horde_Util::getGet('reply_focus')) {
         echo '<script type="text/javascript">document.getElementById("message_body").focus()</script>';
     }
 }
开发者ID:horde,项目名称:horde,代码行数:7,代码来源:Message.php

示例2: content

 /**
  * Renders this page in content mode.
  *
  * @return string  The page content.
  * @throws Wicked_Exception
  */
 public function content()
 {
     global $wicked;
     $days = (int) Horde_Util::getGet('days', 3);
     $summaries = $wicked->getRecentChanges($days);
     if (count($summaries) < 10) {
         $summaries = $wicked->mostRecent(10);
     }
     $bydate = array();
     $changes = array();
     foreach ($summaries as $page) {
         $page = new Wicked_Page_StandardPage($page);
         $createDate = $page->versionCreated();
         $tm = localtime($createDate, true);
         $createDate = mktime(0, 0, 0, $tm['tm_mon'], $tm['tm_mday'], $tm['tm_year'], $tm['tm_isdst']);
         $version_url = $page->pageUrl()->add('version', $page->version());
         $diff_url = Horde::url('diff.php')->add(array('page' => $page->pageName(), 'v1' => '?', 'v2' => $page->version()));
         $diff_alt = sprintf(_("Show changes for %s"), $page->version());
         $diff_img = Horde::img('diff.png', $diff_alt);
         $pageInfo = array('author' => $page->author(), 'name' => $page->pageName(), 'url' => $page->pageUrl(), 'version' => $page->version(), 'version_url' => $version_url, 'version_alt' => sprintf(_("Show version %s"), $page->version()), 'diff_url' => $diff_url, 'diff_alt' => $diff_alt, 'diff_img' => $diff_img, 'created' => $page->formatVersionCreated(), 'change_log' => $page->changeLog());
         $bydate[$createDate][$page->versionCreated()][$page->version()] = $pageInfo;
     }
     krsort($bydate);
     foreach ($bydate as $bysecond) {
         $day = array();
         krsort($bysecond);
         foreach ($bysecond as $pageList) {
             krsort($pageList);
             $day = array_merge($day, array_values($pageList));
         }
         $changes[] = array('date' => $day[0]['created'], 'pages' => $day);
     }
     return $changes;
 }
开发者ID:horde,项目名称:horde,代码行数:40,代码来源:RecentChanges.php

示例3: menu

 /**
  */
 public function menu($menu)
 {
     $scope = Horde_Util::getGet('scope', 'agora');
     /* Agora Home. */
     $url = Horde::url('forums.php')->add('scope', $scope);
     $menu->add($url, _("_Forums"), 'forums.png', null, null, null, dirname($_SERVER['PHP_SELF']) == $GLOBALS['registry']->get('webroot') && basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
     /* Thread list, if applicable. */
     if (isset($GLOBALS['forum_id'])) {
         $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::url('threads.php')), _("_Threads"), 'threads.png');
         if ($scope == 'agora' && $GLOBALS['registry']->getAuth()) {
             $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::url('messages/edit.php')), _("New Thread"), 'newmessage.png');
         }
     }
     if ($scope == 'agora' && Agora_Driver::hasPermission(Horde_Perms::DELETE, 0, $scope)) {
         $menu->add(Horde::url('editforum.php'), _("_New Forum"), 'newforum.png', null, null, null, Horde_Util::getFormData('agora') ? '__noselection' : null);
     }
     if (Agora_Driver::hasPermission(Horde_Perms::DELETE, 0, $scope)) {
         $url = Horde::url('moderate.php')->add('scope', $scope);
         $menu->add($url, _("_Moderate"), 'moderate.png');
     }
     if ($GLOBALS['registry']->isAdmin()) {
         $menu->add(Horde::url('moderators.php'), _("_Moderators"), 'hot.png');
     }
     $url = Horde::url('search.php')->add('scope', $scope);
     $menu->add($url, _("_Search"), 'search.png');
 }
开发者ID:raz0rsdge,项目名称:horde,代码行数:28,代码来源:Application.php

示例4: setAgoraId

 /**
  * Creates the Agora id.
  *
  * @return string  If passed with the $url parameter, returns a completed
  *                 url with the agora_id tacked on at the end, otherwise
  *                 returns the simple agora_id.
  */
 function setAgoraId($forum_id, $message_id, $url = '', $scope = null, $encode = false)
 {
     $agora_id = $forum_id . '.' . $message_id;
     if (!empty($url)) {
         if ($scope) {
             $url = Horde::url($url)->add('scope', $scope)->setRaw(!$encode);
         } else {
             $url = Horde::url($url)->add('scope', Horde_Util::getGet('scope', 'agora'))->setRaw(!$encode);
         }
         return $url->add('agora', $agora_id);
     }
     return $agora_id;
 }
开发者ID:raz0rsdge,项目名称:horde,代码行数:20,代码来源:Agora.php

示例5: getProfile

 /**
  * Get user profile
  *
  * @param string $user   Username
  */
 public function getProfile($user = null)
 {
     static $profiles;
     if ($user == null) {
         $user = $GLOBALS['registry']->getAuth();
     }
     if (empty($user)) {
         return PEAR::raiseError(sprintf(_("User \"%s\" does not exists."), $user));
     }
     if (isset($profiles[$user])) {
         return $profiles[$user];
     }
     $profile = $GLOBALS['cache']->get('folksProfile' . $user, $GLOBALS['conf']['cache']['default_lifetime']);
     if ($profile || $GLOBALS['registry']->isAdmin() && Horde_Util::getGet('debug')) {
         $profile = unserialize($profile);
     } else {
         // Load profile
         $profile = $this->_getProfile($user);
         if ($profile instanceof PEAR_Error) {
             return $profile;
         }
         // Filter description
         $filters = array('text2html', 'bbcode', 'highlightquotes', 'emoticons');
         $filters_params = array(array('parselevel' => Horde_Text_Filter_Text2html::MICRO), array(), array(), array());
         if (($hasBBcode = strpos($profile['user_description'], '[')) !== false && strpos($profile['user_description'], '[/', $hasBBcode) !== false) {
             $filters_params[0]['parselevel'] = Horde_Text_Filter_Text2html::NOHTML;
         }
         $profile['user_description'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter(trim($profile['user_description']), $filters, $filters_params);
         // Get user last external data
         foreach ($profile as $key => $value) {
             if (substr($key, 0, 6) != 'count_') {
                 continue;
             }
             $service = substr($key, 6);
             if ($GLOBALS['conf']['services']['countcron']) {
                 if (empty($value)) {
                     continue;
                 }
             } else {
                 try {
                     $profile['count_' . $service] = Horde::callHook('countService', array($service, $user), 'folks');
                 } catch (Horde_Exception_HookNotSet $e) {
                 }
                 if (empty($profile['count_' . $service])) {
                     continue;
                 }
             }
             try {
                 $profile['count_' . $service . '_list'] = Horde::callHook('getService', array($service, $user), 'folks');
             } catch (Horde_Exception_HookNotSet $e) {
             }
             if (empty($profile['count_' . $service . '_list'])) {
                 $profile['count_' . $service] = 0;
             }
         }
         // Cache profile
         // cache profile
         $GLOBALS['cache']->set('folksProfile' . $user, serialize($profile));
     }
     $profiles[$user] = $profile;
     return $profile;
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:67,代码来源:Driver.php

示例6: array

/**
 * Copyright 2005-2015 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Ben Klang <ben@alkaloid.net>
 */
require_once __DIR__ . '/lib/Application.php';
$beatnik = Horde_Registry::appInit('beatnik');
require_once BEATNIK_BASE . '/lib/Forms/EditRecord.php';
$domains = array();
if (Horde_Util::getGet('domain') == 'current') {
    $url = Horde::url('viewzone.php');
    $domains[] = $_SESSION['beatnik']['curdomain'];
} elseif (Horde_Util::getGet('domain') == 'all') {
    $url = Horde::url('listzones.php');
    foreach (Beatnik::needCommit() as $domain) {
        $domains[] = $beatnik->driver->getDomain($domain);
    }
}
foreach ($domains as $domain) {
    $_SESSION['beatnik']['curdomain'] = $domain;
    $vars = new Horde_Variables();
    $vars->set('rectype', 'soa');
    foreach ($domain as $field => $value) {
        $vars->set($field, $value);
    }
    $vars->set('serial', Beatnik::incrementSerial($domain['serial']));
    $form = new EditRecord($vars);
    $form->useToken(false);
开发者ID:raz0rsdge,项目名称:horde,代码行数:31,代码来源:commit.php

示例7: define

/**
 * Copyright Obala d.o.o. (www.obala.si)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Duck <duck@obala.net>
 * @package Folks
 */
define('FOLKS_BASE', __DIR__ . '/..');
require_once FOLKS_BASE . '/lib/base.php';
require_once FOLKS_BASE . '/lib/Forms/Activity.php';
require_once 'tabs.php';
$title = _("Activity");
$activity_scope = Horde_Util::getGet('activity_scope');
$activity_date = Horde_Util::getGet('activity_date');
if ($activity_scope && $activity_date) {
    $result = $folks_driver->deleteActivity($activity_scope, $activity_date);
    if ($result instanceof PEAR_Error) {
        $notification->push($result);
    } else {
        $notification->push(_("Activity successfully deleted"), 'horde.success');
        Horde::url('edit/activity.php')->redirect();
    }
}
$form = new Folks_Activity_Form($vars, _("What are you doing right now?"), 'long');
if ($form->validate()) {
    $result = $form->execute();
    if ($result instanceof PEAR_Error) {
        $notification->push($result);
    } else {
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:activity.php

示例8: switch

/* Driver specific tasks that require Horde environment. */
switch ($serverType) {
    case 'ActiveSync':
        // Check if AS is enabled. Note that we can't check the user perms for it
        // here since the user is not yet logged into horde at this point.
        if (empty($conf['activesync']['enabled'])) {
            exit;
        }
        $params['server'] = $injector->getInstance('Horde_ActiveSyncServer');
        $params['requireAuthorization'] = true;
        break;
    case 'Soap':
        $serverVars = $request->getServerVars();
        if (!$serverVars['REQUEST_METHOD'] || $serverVars['REQUEST_METHOD'] != 'POST') {
            $params['requireAuthorization'] = false;
            $input = Horde_Util::getGet('wsdl') === null ? 'disco' : 'wsdl';
        }
        break;
}
/* Load the RPC backend based on $serverType. */
try {
    $server = Horde_Rpc::factory($serverType, $request, $params);
} catch (Horde_Rpc_Exception $e) {
    Horde::log($e, 'ERR');
    header('HTTP/1.1 501 Not Implemented');
    exit;
}
// Let the backend check authentication. By default, we look for HTTP
// basic authentication against Horde, but backends can override this
// as needed. Must reset the authentication argument since we delegate
// auth to the RPC server.
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:rpc.php

示例9: Horde_Prefs_CategoryManager

 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Ben Klang <ben@alkaloid.net>
 */
require_once __DIR__ . '/lib/Application.php';
$beatnik = Horde_Registry::appInit('beatnik');
// Unset the current domain since we are generating a zone list
$_SESSION['beatnik']['curdomain'] = null;
// Set up categories
$cManager = new Horde_Prefs_CategoryManager();
$categories = $cManager->get();
$colors = $cManager->colors();
$fgcolors = $cManager->fgColors();
// Page results
// Check for and store the current page in the session
$page = Horde_Util::getGet('page', $_SESSION['beatnik']['curpage']);
$_SESSION['beatnik']['curpage'] = $page;
// Create the Pager UI
$pager_vars = Horde_Variables::getDefaultVariables();
$pager_vars->set('page', $page);
$perpage = $prefs->getValue('domains_perpage');
$pager = new Horde_Core_Ui_Pager('page', $pager_vars, array('num' => count($beatnik->domains), 'url' => 'listzones.php', 'page_count' => 10, 'perpage' => $perpage));
// Limit the domain list to the current page
$domains = array_slice($beatnik->domains, $page * $perpage, $perpage);
// Hide fields that the user does not want to see
$fields = Beatnik::getRecFields('soa');
foreach ($fields as $field_id => $field) {
    if ($field['type'] == 'hidden' || $field['infoset'] != 'basic' && !$_SESSION['beatnik']['expertmode']) {
        unset($fields[$field_id]);
    }
}
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:listzones.php

示例10: sprintf

/**
 * The Agora script to display a list of forums.
 *
 * Copyright 2003-2015 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Duck  <duck@oabla.net>
 */
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('agora');
/* Default to agora and current user if is not an admin. */
$scope = Horde_Util::getGet('scope', 'agora');
$owner = $registry->isAdmin() ? Horde_Util::getGet('owner', $registry->getAuth()) : $registry->getAuth();
/* Get the sorting. */
$sort_by = Agora::getSortBy('threads');
$sort_dir = Agora::getSortDir('threads');
$page_output->header();
$notification->notify(array('listeners' => 'status'));
echo '<h1>' . sprintf(_("Last posts in forums owned by %s"), $owner) . '</h1>';
foreach ($registry->listApps() as $scope) {
    if ($scope == 'agora' || $registry->hasMethod('hasComments', $scope) && $registry->callByPackage($scope, 'hasComments') === true) {
        $scope_name = $registry->get('name', $scope);
        $forums = $injector->getInstance('Agora_Factory_Driver')->create($scope);
        $threads = $forums->getThreadsByForumOwner($owner, 0, false, $sort_by, $sort_dir, false, 0, 5);
        echo '<h1 class="header">' . $scope_name . '</h1>';
        if ($threads instanceof PEAR_Error) {
            echo $threads->getMessage();
        } elseif (empty($threads)) {
开发者ID:raz0rsdge,项目名称:horde,代码行数:30,代码来源:owner.php

示例11: list

Horde_Registry::appInit('agora');
/* Set up the messages object. */
list($forum_id, $message_id, $scope) = Agora::getAgoraId();
$messages = $injector->getInstance('Agora_Factory_Driver')->create($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
    $notification->push($messages->getMessage(), 'horde.warning');
    Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
    $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
    Horde::url('forums.php', true)->redirect();
}
/* Check if we must show bodies */
if (($view_bodies = Horde_Util::getGet('bodies')) !== null) {
    $prefs->setValue('thread_view_bodies', $view_bodies);
} else {
    $view_bodies = $prefs->getValue('thread_view_bodies');
}
/* Get view settings. */
$sort_by = $view_bodies == 1 ? 'message_thread' : Agora::getSortBy('thread');
$sort_dir = Agora::getSortDir('thread');
$forum = $messages->getForum();
$title = $forum['forum_name'] . ' :: ' . $message['message_subject'];
$thread_page = Horde_Util::getFormData('thread_page');
/* Count = replies + opening thread */
$thread_count = $messages->countThreads($message['message_thread']);
if ($thread_count instanceof PEAR_Error) {
    $notification->push(sprintf(_("Could not open the message. %s"), $thread_count->getMessage()), 'horde.warning');
    $thread_count = 0;
开发者ID:raz0rsdge,项目名称:horde,代码行数:31,代码来源:index.php

示例12:

<?php

/**
 * Process an single image (to be called by ajax)
 *
 * Copyright 2008-2014 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Duck <duck@obala.net>
 */
require_once __DIR__ . '/../../lib/Application.php';
Horde_Registry::appInit('ansel');
$thumb = Horde_Util::getGet('thumb');
$tmp = Horde::getTempDir();
$path = $tmp . '/search_face_' . ($thumb ? 'thumb_' : '') . $registry->getAuth() . Ansel_Faces::getExtension();
header('Content-type: image/' . $conf['image']['type']);
readfile($path);
开发者ID:jubinpatel,项目名称:horde,代码行数:19,代码来源:img.php

示例13: elseif

<?php

/**
 * Process an single image (to be called by ajax)
 *
 * Copyright 2008-2016 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Duck <duck@obala.net>
 */
require_once 'tabs.php';
$page = Horde_Util::getFormData('page', 0);
$perpage = $prefs->getValue('facesperpage');
$owner = Horde_Util::getGet('owner', $GLOBALS['registry']->getAuth());
if (!$owner) {
    $title = _("From system galleries");
} elseif ($owner == $GLOBALS['registry']->getAuth()) {
    $title = _("From my galleries");
} else {
    $title = sprintf(_("From galleries of %s"), $owner);
}
try {
    $count = $faces->countOwnerFaces($owner);
    $results = $faces->ownerFaces($owner, $page * $perpage, $perpage);
} catch (Ansel_Exception $e) {
    $notification->push($e->getMessage(), 'horde.err');
    $results = array();
    $count = 0;
}
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:owner.php

示例14: setcookie

    setcookie('folks_login_user', '', $_SERVER['REQUEST_TIME'] - 1000, $conf['cookie']['path'], $conf['cookie']['domain']);
    setcookie('folks_login_code', '', $_SERVER['REQUEST_TIME'] - 1000, $conf['cookie']['path'], $conf['cookie']['domain']);
    $folks_driver->deleteOnlineUser($GLOBALS['registry']->getAuth());
    @session_destroy();
    if (!empty($_GET['redirect'])) {
        header('Location: ' . $_GET['redirect']);
    } else {
        $page = $registry->getInitialPage('folks');
        header('Location: ' . (empty($page) ? '/' : $page));
    }
    exit;
}
/*
 * Special login for apps (gollem, imp)?
 */
if ($conf['login']['prelogin'] && $GLOBALS['registry']->getAuth() && ($app = Horde_Util::getGet('app'))) {
    Horde::callHook('prelogin', array($app), 'folks');
}
/*
 * Login parameters
 */
$url_param = Horde_Util::getFormData('url');
$login_url = $registry->getServiceLink('login', 'folks')->add('url', $url_param);
/*
 * We are already logged in?
 */
if ($registry->isAuthenticated()) {
    if (empty($url_param)) {
        $url_param = Folks::getUrlFor('user', $GLOBALS['registry']->getAuth());
    }
    header('Location: ' . $url_param);
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:login.php

示例15: array

/**
 * Copyright 2007-2015 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Duck <duck@obala.net>
 */
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('agora', array('authentication' => 'none'));
// Detect forum id
$scope = Horde_Util::getGet('scope', 'agora');
$forum_id = Horde_Util::getGet('forum_id');
if ($scope != 'agora') {
    if (($forum_name = Horde_Util::getGet('forum_name')) !== null) {
        $threads = $injector->getInstance('Agora_Factory_Driver')->create($scope);
        $forum_id = $threads->getForumId($forum_name);
        if ($forum_id instanceof PEAR_Error || empty($forum_id)) {
            die($forum_id);
        }
    } elseif ($forum_id !== null) {
        $threads = $injector->getInstance('Agora_Factory_Driver')->create($scope, $forum_id);
        if ($threads instanceof PEAR_Error) {
            die($threads);
        }
        $forum_array = $threads->getForum();
        $forum_name = $forum_array['forum_name'];
    }
}
$cache_key = 'agora_rss_' . $scope . '_' . $forum_id;
开发者ID:raz0rsdge,项目名称:horde,代码行数:30,代码来源:threads.php


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