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


PHP Util::addParameter方法代码示例

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


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

示例1: header

    }
}
if (Auth::isAuthenticated()) {
    if ($browser->isMobile()) {
        require HORDE_BASE . '/services/portal/mobile.php';
    } else {
        require HORDE_BASE . '/services/portal/index.php';
    }
    exit;
}
$login_screen = $auth->_getLoginScreen();
if (Util::removeParameter($login_screen, array('url', 'nocache')) != Util::removeParameter(Horde::url(Horde::selfUrl(), true), array('url', 'nocache'))) {
    if ($url_param) {
        $login_screen = Util::addParameter($login_screen, 'url', $url_param);
    }
    $login_screen = Util::addParameter($login_screen, 'frameset', Util::getFormData('frameset'));
    header('Location: ' . $login_screen);
    exit;
}
if ($browser->isMobile()) {
    require_once HORDE_LIBS . 'Horde/Mobile.php';
    require HORDE_TEMPLATES . '/login/mobile.inc';
    exit;
}
/* Build the <select> widget containing the available languages. */
if (!$prefs->isLocked('language')) {
    $_SESSION['horde_language'] = NLS::select();
    $langs = '<select name="new_lang" onchange="selectLang()">';
    foreach ($nls['languages'] as $key => $val) {
        $sel = $key == $_SESSION['horde_language'] ? ' selected="selected"' : '';
        $langs .= "<option value=\"{$key}\"{$sel}>{$val}</option>";
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:login.php

示例2: elseif

    require HORDE_TEMPLATES . '/help/index.inc';
} else {
    require HORDE_TEMPLATES . '/common-header.inc';
    if ($show == 'menu') {
        require HORDE_TEMPLATES . '/help/menu.inc';
    } elseif ($show == 'about') {
        require $fileroot . '/lib/version.php';
        eval('$version = "' . ucfirst($module) . ' " . ' . String::upper($module) . '_VERSION;');
        $credits = Util::bufferOutput('include', $fileroot . '/docs/CREDITS');
        $credits = String::convertCharset($credits, 'iso-8859-1', NLS::getCharset());
        require HORDE_TEMPLATES . '/help/about.inc';
    } else {
        require HORDE_TEMPLATES . '/help/header.inc';
        $help = new Help(HELP_SOURCE_FILE, array($help_file, $help_file_fallback));
        if ($show == 'entry' && !empty($topic)) {
            $help->lookup($topic);
            $help->display();
        } else {
            $topics = $help->topics();
            foreach ($topics as $id => $title) {
                $link = Horde::url($registry->getParam('webroot', 'horde') . '/services/help/');
                $link = Util::addParameter($link, array('show' => 'entry', 'module' => $module, 'topic' => $id));
                echo Horde::link($link, '', 'helpitem');
                echo $title . "</a><br />\n";
            }
        }
        $help->cleanup();
        require HORDE_TEMPLATES . '/help/footer.inc';
    }
}
require HORDE_TEMPLATES . '/common-footer.inc';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:index.php

示例3: nocacheUrl

 /**
  * Returns a url with the 'nocache' parameter added, if the browser is
  * buggy and caches old URLs.
  *
  * @param string $url       The URL to modify.
  * @param boolean $encode   Encode the argument separator? (since
  *                          Horde 3.2)
  *
  * @return string  The requested URI.
  */
 function nocacheUrl($url, $encode = true)
 {
     static $rand_num;
     require_once 'Horde/Browser.php';
     $browser =& Browser::singleton();
     /* We may need to set a dummy parameter 'nocache' since some
      * browsers do not always honor the 'no-cache' header. */
     if ($browser->hasQuirk('cache_same_url')) {
         if (!isset($rand_num)) {
             $rand_num = base_convert(microtime(), 10, 36);
         }
         return Util::addParameter($url, 'nocache', $rand_num, $encode);
     } else {
         return $url;
     }
 }
开发者ID:justinlyon,项目名称:scc,代码行数:26,代码来源:Util.php

示例4: _returnToPrefs

/**
 * $Horde: horde/services/portal/rpcsum.php,v 2.19 2004/02/23 01:52:55 jon Exp $
 *
 * Copyright 2001-2004 Jan Schneider <jan@horde.org>
 *
 * See the enclosed file COPYING for license information (LGPL).  If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */
function _returnToPrefs()
{
    $url = Horde::applicationUrl('services/prefs.php', true);
    header('Location: ' . Util::addParameter($url, 'group', 'display'));
    exit;
}
开发者ID:Artea,项目名称:freebeer,代码行数:14,代码来源:rpcsum.php

示例5: elseif

        $url = Util::getFormData('url');
        $initial_app = $prefs->getValue('initial_application');
        if (!empty($url)) {
            $main_page = $url;
        } elseif (!empty($initial_app) && !($GLOBALS['perms']->exists($initial_app) && !$GLOBALS['perms']->hasPermission($initial_app, Auth::getAuth(), PERMS_READ))) {
            $main_page = Horde::url($registry->getInitialPage($initial_app));
        } elseif (isset($registry->applications['horde']['initial_page'])) {
            $main_page = Horde::applicationUrl($registry->applications['horde']['initial_page']);
        } elseif (Auth::getAuth()) {
            $main_page = Horde::applicationUrl('services/portal/');
        } else {
            $main_page = Horde::applicationUrl('login.php');
        }
        if (!Util::getFormData('frameset') && ($conf['menu']['always'] || $conf['menu']['display'] && Auth::getAuth() && $prefs->getValue('show_sidebar'))) {
            if ($browser->hasQuirk('scrollbar_in_way')) {
                $scrollbar = 'yes';
            } else {
                $scrollbar = 'auto';
            }
            $main_page = Util::addParameter($main_page, 'frameset', 1);
            require HORDE_TEMPLATES . '/index/frames_index.inc';
        } else {
            header('Location: ' . $main_page);
            exit;
        }
    }
} else {
    define('HORDE_LIBS', '');
    require HORDE_BASE . '/lib/Test.php';
    Horde_Test::configFilesMissing('Horde', HORDE_BASE, 'prefs.php', array('conf.php' => 'This is the main Horde configuration file. It contains paths and basic items that apply to the core framework and all Horde applications.', 'html.php' => 'This file controls the stylesheet that is used to set colors and fonts for the Horde framework and all applications that do not provide their own settings.', 'mime_drivers.php' => 'This file controls the global set of MIME drivers for the Horde framework, allowing applications to make use of programs such as enscript or mswordview to render content into HTML for viewing in a browser.', 'registry.php' => 'The registry is how Horde applications find out how to talk to each other. You should list any installed Horde applications that you have here.'));
}
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:index.php

示例6: array

}
$form->addVariable(_("Group permissions"), 'g', 'matrix', false, false, null, array($cols, $rows, $matrix, $new_groups));
/* Set form title. */
$form->setTitle(Horde::img('perms.gif') . ' ' . sprintf(_("Edit permissions for '%s'"), $perms->getTitle($permission->getName())));
if ($form->validate($vars)) {
    $form->getInfo($vars, $info);
    /* Collapse the array for default/guest/creator. */
    $info['default'] = isset($info['default'][0]) ? $info['default'][0] : null;
    $info['guest'] = isset($info['guest'][0]) ? $info['guest'][0] : null;
    $info['creator'] = isset($info['creator'][0]) ? $info['creator'][0] : null;
    /* Update and save the permissions. */
    $permission->updatePermissions($info);
    $permission->save();
    $notification->push(sprintf(_("Updated '%s'."), $permission->getShortName()), 'horde.success');
    $url = Horde::applicationUrl('admin/perms/edit.php', true);
    $url = Util::addParameter($url, 'cid', $permission->getId());
    header('Location: ' . $url);
    exit;
}
$title = _("Permissions Administration");
require HORDE_TEMPLATES . '/common-header.inc';
require HORDE_TEMPLATES . '/admin/common-header.inc';
$notification->notify(array('listeners' => 'status'));
/* Render the form. */
$renderer =& new Horde_Form_Renderer();
$form->renderActive($renderer, $vars, 'edit.php', 'post');
echo '<br />';
require_once HORDE_LIBS . 'Horde/Perms/UI.php';
$ui =& new Perms_UI($perms);
$ui->renderTree($cid);
require HORDE_TEMPLATES . '/common-footer.inc';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:edit.php

示例7: dirname

<?php

/**
 * $Horde: horde/services/portal/mobile.php,v 2.12 2004/02/07 17:37:41 jan Exp $
 *
 * Copyright 2002-2004 Chuck Hagenbuch <chuck@horde.org>
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */
@define('HORDE_BASE', dirname(__FILE__) . '/../..');
require_once HORDE_BASE . '/lib/base.php';
require_once HORDE_LIBS . 'Horde/Identity.php';
require_once HORDE_LIBS . 'Horde/Mobile.php';
if (!Auth::getAuth()) {
    header('Location: ' . Util::addParameter(Horde::applicationUrl('login.php', true), 'url', Horde::selfUrl()));
    exit;
}
$identity =& Identity::singleton();
$fullname = $identity->getValue('fullname');
if (empty($fullname)) {
    $fullname = Auth::getAuth();
}
$m =& new Horde_Mobile(_("Welcome"));
$m->add(new Horde_Mobile_text(sprintf(_("Welcome, %s"), $fullname)));
// Messy way of linking to active apps that support mobile
// devices. Should be made more elegant at some point.
if (!empty($registry->applications['mimp']['status']) && $registry->applications['mimp']['status'] != 'inactive') {
    $m->add(new Horde_Mobile_link($registry->getParam('name', 'mimp'), Horde::url($registry->getParam('webroot', 'mimp') . '/'), $registry->getParam('name', 'mimp')));
}
$m->display();
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:mobile.php

示例8: _add

 /**
  * Helper function to determine if given file needs to be output.
  *
  * @private
  */
 function _add($file, $app, $direct, $full = false)
 {
     global $registry;
     if (empty($app)) {
         $app = $registry->getApp();
     }
     // Skip any js files that have since been deprecated.
     if (!empty($this->_ignored[$app]) && in_array($file, $this->_ignored[$app])) {
         return false;
     }
     // Several files will always be the same thing. Don't distinguish
     // between loading them in different $app scopes; always load them
     // from Horde scope.
     if (in_array($file, $this->_fromhorde)) {
         $app = 'horde';
     }
     // Don't include scripts multiple times.
     if (!empty($this->_included[$app][$file])) {
         return false;
     }
     $this->_included[$app][$file] = true;
     // Explicitly check for a directly serve-able version of the script.
     $path = $GLOBALS['registry']->get('fileroot', $app);
     if (!$direct && file_exists($file[0] == '/' ? $path . $file : $registry->get('jsfs', $app) . '/' . $file)) {
         $direct = true;
     }
     if ($direct) {
         if ($file[0] == '/') {
             echo $registry->get('webroot', $app);
             $url = Horde::url($registry->get('webroot', $app) . $file, $full, -1);
         } else {
             $url = Horde::url($registry->get('jsuri', $app) . '/' . $file, $full, -1);
             $path .= '/js/';
         }
     } else {
         $path = $registry->get('templates', $app) . '/javascript/';
         $url = Horde::url(Util::addParameter($registry->get('webroot', 'horde') . '/services/javascript.php', array('file' => $file, 'app' => $app)));
     }
     $out = $this->_files[$app][] = array('f' => $file, 'd' => $direct, 'u' => $url, 'p' => $path);
     return $out;
 }
开发者ID:justinlyon,项目名称:scc,代码行数:46,代码来源:Horde.php

示例9: array

$spacer = '&nbsp;&nbsp;&nbsp;&nbsp;';
$current = Util::getFormData('cid');
$icondir = array('icondir' => $registry->getParam('graphics'));
$group_node = $icondir + array('icon' => 'group.gif');
$add = Horde::applicationUrl('admin/groups.php?actionID=addchild');
$edit = Horde::applicationUrl('admin/groups.php?actionID=edit');
$delete = Horde::applicationUrl('admin/groups.php?actionID=delete');
$edit_img = Horde::img('edit.gif', _("Edit Group"), 'hspace="2"');
$delete_img = Horde::img('delete.gif', _("Delete Group"), 'hspace="2"');
/* Set up the tree. */
$tree =& Horde_Tree::singleton('datatree', 'javascript');
$tree->setOption(array('border' => '0', 'class' => 'item', 'cellpadding' => '0', 'cellspacing' => '0', 'alternate' => true));
foreach ($nodes as $cid => $node) {
    $node_class = $current == $cid ? array('class' => 'selected') : array();
    if ($cid == -1) {
        $add_img = Horde::img('group.gif', _("Add New Group"), 'hspace="2"');
        $add_link = Horde::link(Util::addParameter($add, 'cid', $cid), _("Add New Group")) . $add_img . '</a>';
        $base_node_params = $icondir + array('icon' => 'administration.gif');
        $tree->addNode($cid, null, _("All Groups"), 0, true, $base_node_params + $node_class, array($spacer, $add_link));
    } else {
        $add_img = Horde::img('group.gif', _("Add Child Group"), 'hspace="2"');
        $add_link = Horde::link(Util::addParameter($add, 'cid', $cid), _("Add Child Group")) . $add_img . '</a>';
        $edit_link = Horde::link(Util::addParameter($edit, 'cid', $cid), _("Edit Group")) . $edit_img . '</a>';
        $delete_link = Horde::link(Util::addParameter($delete, 'cid', $cid), _("Delete Group")) . $delete_img . '</a>';
        $parent_id = $groups->_datatree->getParent($node);
        $group_extra = array($spacer, $add_link, $edit_link, $delete_link);
        $tree->addNode($cid, $parent_id, DataTree::getShortName($node), substr_count($node, ':') + 1, false, $group_node + $node_class, $group_extra);
    }
}
$tree->renderTree();
require HORDE_TEMPLATES . '/common-footer.inc';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:groups.php

示例10: downloadUrl

 /**
  * Returns a URL to be used for downloading, that takes into account
  * any special browser quirks (i.e. IE's broken filename handling).
  *
  * @access public
  *
  * @param string $filename        The filename of the download data.
  * @param optional array $params  Any additional parameters needed.
  * @param optional string $url    The URL to alter. If none passed in,
  *                                will use the file 'view.php' located
  *                                in the current module's base directory.
  *
  * @return string  The download URL.
  */
 function downloadUrl($filename, $params = array(), $url = null)
 {
     $horde_url = false;
     if (is_null($url)) {
         global $registry;
         $url = Util::addParameter(Horde::url($registry->getParam('webroot', 'horde') . '/services/download/'), 'module', $registry->getApp());
         $horde_url = true;
     }
     /* Add parameters. */
     if (!is_null($params)) {
         foreach ($params as $key => $val) {
             $url = Util::addParameter($url, $key, $val);
         }
     }
     /* If we are using the default Horde download link, add the filename
        to the end of the URL. Although not necessary for many browsers,
        this should allow every browser to download correctly. */
     if ($horde_url) {
         $url = Util::addParameter($url, 'fn=/' . rawurlencode($filename));
     } elseif ($this->hasQuirk('break_disposition_filename')) {
         /* Some browsers will only obtain the filename correctly if the
            extension is the last argument in the query string and rest
            of the filename appears in the PATH_INFO element. */
         $filename = rawurlencode($filename);
         /* Get the webserver ID. */
         include_once HORDE_BASE . '/lib/Server.php';
         $server = Server::webServerID();
         /* Get the name and extension of the file.  Apache 2 does NOT
            support PATH_INFO information being passed to the PHP module
            by default, so disable that functionality. */
         if ($server != 'apache2') {
             if ($pos = strrpos($filename, '.')) {
                 $name = '/' . preg_replace('/\\./', '%2E', substr($filename, 0, $pos));
                 $ext = substr($filename, $pos);
             } else {
                 $name = '/' . $filename;
                 $ext = '';
             }
             /* Enter the PATH_INFO information. */
             if ($pos = strpos($url, '?')) {
                 $url = substr($url, 0, $pos) . $name . substr($url, $pos);
             } else {
                 $url .= $name;
             }
         }
         /* Append the extension, if it exists. */
         if ($server == 'apache2' || !empty($ext)) {
             $url = Util::addParameter($url, 'fn_ext=/' . $filename);
         }
     }
     return $url;
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:66,代码来源:browser.class.php

示例11: header

        if ($upload) {
            $notification->push(sprintf(_("Uploaded all application setup files to server '%s'."), $info['hostspec']), 'horde.success');
            $url = Horde::applicationUrl('admin/setup/index.php', true);
            header('Location: ' . $url);
            exit;
        }
    }
    /* Render the form. */
    require_once HORDE_LIBS . 'Horde/Form/Renderer.php';
    $renderer =& new Horde_Form_Renderer();
    $ftpform = Util::bufferOutput(array($ftpform, 'renderActive'), $renderer, $vars, 'index.php', 'post');
}
if (file_exists(Horde::getTempDir() . '/horde_setup_upgrade.php')) {
    /* Action to remove the configuration upgrade PHP script. */
    $url = Horde::applicationUrl('admin/setup/scripts.php');
    $url = Util::addParameter($url, 'clean', 'tmp');
    $action = _("Remove saved script from server's temporary directory.");
    $actions[] = Horde::link($url, $action, '', '', '', $action) . $action . '</a>';
}
/* Set up the template. */
$template =& new Horde_Template();
$menu =& new Menu(true, true, true);
$template->set('apps', $apps);
$template->set('actions', $actions, true);
$template->set('ftpform', $ftpform, true);
$template->set('menu', $menu->getMenu());
$template->set('notify', Util::bufferOutput(array($notification, 'notify')));
$title = _("Horde Configuration");
require HORDE_TEMPLATES . '/common-header.inc';
echo $template->fetch(HORDE_TEMPLATES . '/admin/setup/index.html');
require HORDE_TEMPLATES . '/common-footer.inc';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:index.php

示例12: header

/**
 * $Horde: horde/services/maintenance.php,v 1.27 2004/01/19 07:09:29 slusarz Exp $
 *
 * Copyright 2001-2004 Michael Slusarz <slusarz@bigworm.colorado.edu>
 * Copyright 2001-2004 Charles J. Hagenbuch <chuck@horde.org>
 * Copyright 2001-2004 Jon Parise <jon@horde.org>
 *
 * See the enclosed file COPYING for license information (LGPL).  If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */
include_once '../lib/base.php';
include_once HORDE_LIBS . 'Horde/Maintenance.php';
/* Make sure there is a user logged in. */
if (!Auth::getAuth()) {
    $url = Horde::url($registry->getParam('webroot', 'horde') . '/login.php', true);
    $url = Util::addParameter($url, 'url', Horde::selfUrl());
    header('Location: ' . $url);
    exit;
}
/* If no 'module' parameter passed in, return error. */
if (!($module = basename(Util::getFormData('module', '')))) {
    Horde::fatal(PEAR::raiseError(_("Do not directly access maintenance.php")), __FILE__, __LINE__);
}
/* Load the module specific maintenance class now. */
if (!($maint =& Maintenance::factory($module))) {
    Horde::fatal(PEAR::raiseError(_("The Maintenance:: class did not load successfully")), __FILE__, __LINE__);
}
/* Have the maintenance module do all necessary processing. */
list($action, $tasks) = $maint->runMaintenancePage();
/* Print top elements of confirmation page. */
require HORDE_TEMPLATES . '/common-header.inc';
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:maintenance.php

示例13: url

 /**
  * Generate a URL that links into Chora.
  *
  * @param string $script  Name of the Chora script to link into
  * @param string $uri     Any PATH_INFO portion that should be included
  * @param array  $args    Key/value pair of any GET parameters to append
  * @param string $anchor  Anchor entity name
  *
  * @return string  The URL, with session information if necessary.
  */
 function url($script, $uri = '', $args = array(), $anchor = '')
 {
     global $conf;
     $arglist = array_merge(Chora::differingVars(), $args);
     $script = $script . '.php';
     if ($conf['options']['use_path_info']) {
         if (substr($uri, 0, 1) != '/') {
             $script .= '/';
         }
         $script .= $uri;
     } else {
         $arglist['f'] = $uri;
     }
     $url = Horde::applicationUrl($script);
     foreach ($arglist as $key => $val) {
         if (!empty($val) || $val === 0) {
             $url = Util::addParameter($url, $key, $val);
         }
     }
     if (!empty($anchor)) {
         $url .= "#{$anchor}";
     }
     return $url;
 }
开发者ID:Artea,项目名称:freebeer,代码行数:34,代码来源:Chora.php


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