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


PHP Horde::getTempDir方法代码示例

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


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

示例1: create

 /**
  * @throws Horde_Exception
  */
 public function create(Horde_Injector $injector)
 {
     if (empty($GLOBALS['conf']['timezone']['location'])) {
         throw new Horde_Exception('Timezone database location is not configured');
     }
     return new Horde_Timezone(array('cache' => $injector->getInstance('Horde_Cache'), 'location' => $GLOBALS['conf']['timezone']['location'], 'temp' => Horde::getTempDir()));
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:10,代码来源:Timezone.php

示例2: getViewerConfig

 /**
  * Gets the configuration for a MIME type.
  *
  * @param string $type  The MIME type.
  * @param string $app   The current Horde application.
  *
  * @return array  The driver and a list of configuration parameters.
  */
 public function getViewerConfig($type, $app)
 {
     $config = $this->_getDriver($type, $app);
     $config['driver'] = Horde_String::ucfirst($config['driver']);
     $driver = $config['app'] == 'horde' ? $config['driver'] : $config['app'] . '_Mime_Viewer_' . $config['driver'];
     $params = array_merge($config, array('charset' => 'UTF-8', 'temp_file' => array('Horde', 'getTempFile'), 'text_filter' => array($this->_injector->getInstance('Horde_Core_Factory_TextFilter'), 'filter')));
     switch ($config['driver']) {
         case 'Deb':
         case 'Rpm':
             $params['monospace'] = 'fixed';
             break;
         case 'Html':
             $params['browser'] = $GLOBALS['browser'];
             $params['dns'] = $this->_injector->getInstance('Net_DNS2_Resolver');
             $params['external_callback'] = array('Horde', 'externalUrl');
             break;
         case 'Ooo':
             $params['temp_dir'] = Horde::getTempDir();
             $params['zip'] = Horde_Compress::factory('Zip');
             break;
         case 'Rar':
             $params['monospace'] = 'fixed';
             $params['rar'] = Horde_Compress::factory('Rar');
             break;
         case 'Report':
         case 'Security':
             $params['viewer_callback'] = array($this, 'getViewerCallback');
             break;
         case 'Syntaxhighlighter':
             if ($config['app'] == 'horde') {
                 $driver = 'Horde_Core_Mime_Viewer_Syntaxhighlighter';
             }
             $params['registry'] = $GLOBALS['registry'];
             break;
         case 'Tgz':
             $params['gzip'] = Horde_Compress::factory('Gzip');
             $params['monospace'] = 'fixed';
             $params['tar'] = Horde_Compress::factory('Tar');
             break;
         case 'Tnef':
             $params['tnef'] = Horde_Compress::factory('Tnef');
             break;
         case 'Vcard':
             if ($config['app'] == 'horde') {
                 $driver = 'Horde_Core_Mime_Viewer_Vcard';
             }
             $params['browser'] = $GLOBALS['browser'];
             $params['notification'] = $GLOBALS['notification'];
             $params['prefs'] = $GLOBALS['prefs'];
             $params['registry'] = $GLOBALS['registry'];
             break;
         case 'Zip':
             $params['monospace'] = 'fixed';
             $params['zip'] = Horde_Compress::factory('Zip');
             break;
     }
     return array($this->_getDriverName($driver, 'Horde_Mime_Viewer'), $params);
 }
开发者ID:horde,项目名称:horde,代码行数:66,代码来源:MimeViewer.php

示例3: getResponse

 /**
  * Sends an RPC request to the server and returns the result.
  *
  * @param string $request  The raw request string.
  *
  * @return string  The XML encoded response from the server.
  */
 function getResponse($request)
 {
     $backendparms = array('debug_dir' => Horde::getTempDir() . '/sync', 'debug_files' => true, 'log_level' => 'DEBUG');
     /* Create the backend. */
     $GLOBALS['backend'] = Horde_SyncMl_Backend::factory('Horde', $backendparms);
     /* Handle request. */
     $h = new Horde_SyncMl_ContentHandler();
     $response = $h->process($request, $this->getResponseContentType(), Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/rpc.php', true, -1));
     /* Close the backend. */
     $GLOBALS['backend']->close();
     return $response;
 }
开发者ID:horde,项目名称:horde,代码行数:19,代码来源:Syncml.php

示例4: __construct

 /**
  */
 public function __construct(array $params = array())
 {
     global $injector;
     try {
         $vfs = $injector->getInstance('Horde_Core_Factory_Vfs')->create();
     } catch (Horde_Vfs_Exception $e) {
     }
     if (!isset($vfs) || $vfs instanceof Horde_Vfs_Null) {
         $vfs = new Horde_Vfs_File(array('vfsroot' => Horde::getTempDir()));
     }
     parent::__construct(array_merge($params, array('logger' => $injector->getInstance('Horde_Core_Log_Wrapper'), 'vfs' => $vfs)));
 }
开发者ID:raz0rsdge,项目名称:horde,代码行数:14,代码来源:Vfs.php

示例5: create

 public function create(Horde_Injector $injector)
 {
     if (!class_exists('Net_DNS2_Resolver')) {
         return null;
     }
     if ($tmpdir = Horde::getTempDir()) {
         $config = array('cache_file' => $tmpdir . '/horde_dns.cache', 'cache_size' => 100000, 'cache_type' => 'file');
     } else {
         $config = array();
     }
     $resolver = new Net_DNS2_Resolver($config);
     if (is_readable('/etc/resolv.conf')) {
         try {
             $resolver->setServers('/etc/resolv.conf');
         } catch (Net_DNS2_Exception $e) {
         }
     }
     return $resolver;
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:19,代码来源:Dns.php

示例6: getTempFile

 /**
  * Creates a temporary filename for the lifetime of the script, and
  * (optionally) registers it to be deleted at request shutdown.
  *
  * @param string $prefix   Prefix to make the temporary name more
  *                         recognizable.
  * @param boolean $delete  Delete the file at the end of the request?
  * @param string $dir      Directory to create the temporary file in.
  * @param boolean $secure  If deleting file, should we securely delete the
  *                         file?
  *
  * @return string   Returns the full path-name to the temporary file or
  *                  false if a temporary file could not be created.
  */
 function getTempFile($prefix = 'Horde', $delete = true, $dir = '', $secure = false)
 {
     if (empty($dir) || !is_dir($dir)) {
         $dir = Horde::getTempDir();
     }
     return Util::getTempFile($prefix, $delete, $dir, $secure);
 }
开发者ID:justinlyon,项目名称:scc,代码行数:21,代码来源:Horde.php

示例7: array

 *            the transport class needs. See examples below for further details.
 *            Valid options for 'driver' are:
 *   - ispconfig: ISPConfig SOAP server (only for vacation notices).
 *   - ldap:      LDAP server.
 *   - null:      No backend server (i.e. for script drivers, such as 'imap',
 *                that does not use scripts).
 *   - sql:       Database server (only for vacation notices).
 *   - timsieved: Timsieved (managesieve) server.
 *   - vfs:       Use Horde VFS.
 *
 *   NOTE: By default, the transport driver will use Horde credentials to
 *         authenticate to the backend. If a different username/password is
 *         needed, use the 'transport_auth' hook (see hooks.php) to define
 *         these values.
 */
/* IMAP Example */
$backends['imap'] = array('disabled' => false, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'null', 'params' => array())), 'script' => array(Ingo::RULE_ALL => array('driver' => 'imap', 'params' => array())), 'shares' => false);
/* Maildrop Example */
$backends['maildrop'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'vfs', 'params' => array('hostspec' => 'localhost', 'filename' => '.mailfilter', 'vfstype' => 'ftp', 'port' => 21))), 'script' => array(Ingo::RULE_ALL => array('driver' => 'maildrop', 'params' => array('mailbotargs' => '-N', 'path_style' => 'mbox', 'strip_inbox' => false, 'variables' => array()))), 'shares' => false);
/* Procmail Example */
$backends['procmail'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'vfs', 'params' => array('hostspec' => 'localhost', 'filename' => '.procmailrc', 'vfstype' => 'ftp', 'port' => 21))), 'script' => array(Ingo::RULE_ALL => array('driver' => 'procmail', 'params' => array('path_style' => 'mbox', 'variables' => array()))), 'shares' => false);
/* Sieve Example */
$backends['sieve'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'timsieved', 'params' => array('hostspec' => 'localhost', 'logintype' => 'PLAIN', 'usetls' => true, 'port' => 4190, 'scriptname' => 'ingo', 'debug' => false))), 'script' => array(Ingo::RULE_ALL => array('driver' => 'sieve', 'params' => array('date' => true, 'utf8' => false))), 'shares' => false);
/* sivtest Example */
$backends['sivtest'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'sivtest', 'params' => array('hostspec' => 'localhost', 'logintype' => 'GSSAPI', 'usetls' => true, 'port' => 4190, 'scriptname' => 'ingo', 'command' => '/usr/bin/sivtest', 'socket' => Horde::getTempDir() . '/sivtest.' . uniqid(mt_rand()) . '.sock'))), 'script' => array(Ingo::RULE_ALL => array('driver' => 'sieve', 'params' => array())), 'shares' => false);
/* Sun ONE/JES Example (LDAP/Sieve) */
$backends['ldapsieve'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'ldap', 'params' => array('hostspec' => 'localhost', 'port' => 389, 'version' => 3, 'tls' => true, 'bind_dn' => 'cn=ingo, ou=applications, dc=example, dc=com', 'bind_password' => 'secret', 'script_base' => 'ou=People, dc=example, dc=com', 'script_filter' => '(uid=%u)', 'script_attribute' => 'mailSieveRuleSource'))), 'script' => array(Ingo::RULE_ALL => array('driver' => 'sieve', 'params' => array())));
/* ISPConfig Example */
$backends['ispconfig'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'ispconfig', 'params' => array('soap_uri' => 'http://ispconfig-webinterface.example.com:8080/remote/', 'soap_user' => 'horde', 'soap_pass' => 'secret'))), 'script' => array(Ingo::RULE_ALL => array('driver' => 'ispconfig', 'params' => array())), 'shares' => false);
/* Custom SQL Example */
$backends['customsql'] = array('disabled' => true, 'transport' => array(Ingo::RULE_ALL => array('driver' => 'sql', 'params' => $GLOBALS['conf']['sql'])), 'script' => array(Ingo::RULE_ALL => array('driver' => 'customsql', 'params' => array('vacation_unset' => 'UPDATE vacation SET active = 0 WHERE user = %u', 'vacation_set' => 'REPLACE INTO vacation (active, subject, message, user) VALUES (1, %s, %m, %u)'))), 'shares' => false);
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:backends.php

示例8: catch

<?php

/**
 * Process an single image (to be called by ajax)
 *
 * Copyright 2008-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 'tabs.php';
/* check if image exists */
$tmp = Horde::getTempDir();
$path = $tmp . '/search_face_' . $registry->getAuth() . Ansel_Faces::getExtension();
if (file_exists($path) !== true) {
    $notification->push(_("You must upload the search photo first"));
    Horde::url('faces/search/image.php')->redirect();
}
$title = _("Create a new face");
$x1 = 0;
$y1 = 0;
$x2 = 0;
$y2 = 0;
try {
    $faces = $faces->getFaces($path);
} catch (Ansel_Exception $e) {
    exit;
}
if (count($faces) > 1) {
开发者ID:raz0rsdge,项目名称:horde,代码行数:31,代码来源:image_define.php

示例9: _init

 /**
  * Global variables defined:
  *   $chora_conf
  *   $sourceroots
  */
 protected function _init()
 {
     global $acts, $conf, $defaultActs, $where, $atdir, $fullname, $sourceroot, $page_output;
     // TODO: If chora isn't fully/properly setup, init() will throw fatal
     // errors. Don't want that if this class is being loaded simply to
     // obtain basic chora application information.
     $initial_app = $GLOBALS['registry']->initialApp == 'chora';
     try {
         $GLOBALS['sourceroots'] = Horde::loadConfiguration('backends.php', 'sourceroots');
     } catch (Horde_Exception $e) {
         $GLOBALS['sourceroots'] = array();
         if (!$initial_app) {
             return;
         }
         $GLOBALS['notification']->push($e);
     }
     $sourceroots = Chora::sourceroots();
     /**
      * Variables we wish to propagate across web pages
      *  ha  = Hide Attic Files
      *  ord = Sort order
      *  sbt = Sort By Type (name, age, author, etc)
      *
      * Obviously, defaults go into $defaultActs :)
      * TODO: defaults of 1 will not get propagated correctly - avsm
      * XXX: Rewrite this propagation code, since it sucks - avsm
      */
     $defaultActs = $acts = array('onb' => 0, 'ord' => Horde_Vcs::SORT_ASCENDING, 'rev' => 0, 'rt' => null, 'sa' => 0, 'sbt' => constant($conf['options']['defaultsort']), 'ws' => 1);
     /* See if any actions have been passed as form variables, and if so,
      * assign them into the acts array. */
     $vars = Horde_Variables::getDefaultVariables();
     foreach (array_keys($acts) as $key) {
         if (isset($vars->{$key})) {
             $acts[$key] = $vars->{$key};
         }
     }
     /* Use the value of the 'rt' form value for the sourceroot. If not
      * present, use the last sourceroot used as the default value if the
      * user has that preference. Otherwise, use default sourceroot. */
     $last_sourceroot = $GLOBALS['prefs']->getValue('last_sourceroot');
     if (is_null($acts['rt'])) {
         if (!empty($last_sourceroot) && !empty($sourceroots[$last_sourceroot]) && is_array($sourceroots[$last_sourceroot])) {
             $acts['rt'] = $last_sourceroot;
         } else {
             foreach ($sourceroots as $key => $val) {
                 if (!isset($acts['rt']) || isset($val['default'])) {
                     $acts['rt'] = $key;
                     break;
                 }
             }
             if (is_null($acts['rt'])) {
                 if ($initial_app) {
                     Chora::fatal(new Chora_Exception(_("No repositories found.")));
                 }
                 return;
             }
         }
     }
     if (!isset($sourceroots[$acts['rt']])) {
         if ($initial_app) {
             Chora::fatal(new Chora_Exception(sprintf(_("The repository with the slug '%s' was not found"), $acts['rt'])));
         }
         return;
     }
     $sourcerootopts = $sourceroots[$acts['rt']];
     $sourceroot = $acts['rt'];
     /* Store last repository viewed */
     if ($acts['rt'] != $last_sourceroot) {
         $GLOBALS['prefs']->setValue('last_sourceroot', $acts['rt']);
     }
     // Cache.
     $cache = empty($conf['caching']) ? null : $GLOBALS['injector']->getInstance('Horde_Cache');
     $GLOBALS['chora_conf'] = array('cvsusers' => $sourcerootopts['location'] . '/' . (isset($sourcerootopts['cvsusers']) ? $sourcerootopts['cvsusers'] : ''), 'introText' => CHORA_BASE . '/config/' . (isset($sourcerootopts['intro']) ? $sourcerootopts['intro'] : ''), 'introTitle' => isset($sourcerootopts['title']) ? $sourcerootopts['title'] : '', 'sourceRootName' => $sourcerootopts['name']);
     $chora_conf =& $GLOBALS['chora_conf'];
     $GLOBALS['VC'] = Horde_Vcs::factory(Horde_String::ucfirst($sourcerootopts['type']), array('cache' => $cache, 'sourceroot' => $sourcerootopts['location'], 'paths' => array_merge($conf['paths'], array('temp' => Horde::getTempDir())), 'username' => isset($sourcerootopts['username']) ? $sourcerootopts['username'] : '', 'password' => isset($sourcerootopts['password']) ? $sourcerootopts['password'] : ''));
     if (!$initial_app) {
         return;
     }
     $where = Horde_Util::getFormData('f', '/');
     /* Location relative to the sourceroot. */
     $where = preg_replace(array('|^/|', '|\\.\\.|'), '', $where);
     $fullname = $sourcerootopts['location'] . (substr($sourcerootopts['location'], -1) == '/' ? '' : '/') . $where;
     if ($sourcerootopts['type'] == 'cvs') {
         $fullname = preg_replace('|/$|', '', $fullname);
         $atdir = @is_dir($fullname);
     } else {
         $atdir = !$where || substr($where, -1) == '/';
     }
     $where = preg_replace('|/$|', '', $where);
     if ($sourcerootopts['type'] == 'cvs' && !@is_dir($sourcerootopts['location'])) {
         Chora::fatal(new Chora_Exception(_("Sourceroot not found. This could be a misconfiguration by the server administrator, or the server could be having temporary problems. Please try again later.")));
     }
     if (Chora::isRestricted($where)) {
         Chora::fatal(new Chora_Exception(sprintf(_("%s: Forbidden by server configuration"), $where)));
     }
//.........这里部分代码省略.........
开发者ID:horde,项目名称:horde,代码行数:101,代码来源:Application.php

示例10: define

 *   dealt with: should be fixed easily by retrieving service using some
 *   regular expression magic.
 *
 * - Limited to 3 messages per session style. This is more serious.
 *
 * - Currently the test case has to start with a slowsync. Maybe we can remove
 *   this restriction and thus allow test cases with "production phones".
 *   An idea to deal with this: make testsync.php work with *any* recorded
 *   sessions:
 *   - change any incoming auth to syncmltest:syncmltest
 *   - identify twowaysync and create fake anchors for that */
require_once 'SyncMl.php';
define('SYNCMLTEST_USERNAME', 'syncmltest');
// Setup default backend parameters:
$syncml_backend_driver = 'Horde';
$syncml_backend_parms = array('debug_dir' => Horde::getTempDir() . '/sync', 'debug_files' => true, 'log_level' => 'DEBUG');
/* Get any options. */
if (!isset($argv)) {
    print_usage();
}
/* Get rid of the first arg which is the script name. */
$this_script = array_shift($argv);
while ($arg = array_shift($argv)) {
    if ($arg == '--help') {
        print_usage();
    } elseif (strstr($arg, '--setup')) {
        $testsetuponly = true;
    } elseif (strstr($arg, '--url')) {
        list(, $url) = explode('=', $arg);
    } elseif (strstr($arg, '--dir')) {
        list(, $dir) = explode('=', $arg);
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:testsync.php

示例11: _content

 /**
  * The content to go in this block.
  *
  * @return string   The content
  */
 function _content()
 {
     if (!@(include_once 'Services/Weather.php')) {
         Horde::logMessage('The weather.com block will not work without Services_Weather from PEAR. Run pear install Services_Weather.', __FILE__, __LINE__, PEAR_LOG_ERR);
         return _("The weather.com block is not available.");
     }
     global $conf;
     $cacheDir = Horde::getTempDir();
     $html = '';
     if (empty($this->_params['location'])) {
         return _("No location is set.");
     }
     $weatherDotCom =& Services_Weather::service("WeatherDotCom");
     $weatherDotCom->setAccountData(isset($conf['weatherdotcom']['partner_id']) ? $conf['weatherdotcom']['partner_id'] : '', isset($conf['weatherdotcom']['license_key']) ? $conf['weatherdotcom']['license_key'] : '');
     if (!$cacheDir) {
         return PEAR::raiseError(_("No temporary directory available for cache."), 'horde.error');
     } else {
         $weatherDotCom->setCache("file", array("cache_dir" => $cacheDir . '/'));
     }
     $weatherDotCom->setDateTimeFormat("m.d.Y", "H:i");
     $weatherDotCom->setUnitsFormat($this->_params['units']);
     $units = $weatherDotCom->getUnitsFormat();
     // If the user entered a zip code for the location, no need to
     // search (weather.com accepts zip codes as location IDs).
     // The location ID should already have been validated in
     // getParams.
     $search = preg_match('/\\b(?:\\d{5}(-\\d{5})?)|(?:[A-Z]{4}\\d{4})\\b/', $this->_params['location'], $matches) ? $matches[0] : $weatherDotCom->searchLocation($this->_params['location']);
     if (is_a($search, 'PEAR_Error')) {
         return $search->getmessage();
     }
     if (is_array($search)) {
         // Several locations returned due to imprecise location parameter
         $html = _("Several locations possible with the parameter: ");
         $html .= $this->_params['location'];
         $html .= "<br/><ul>";
         foreach ($search as $id_weather => $real_location) {
             $html .= "<li>{$real_location} ({$id_weather})</li>\n";
         }
         $html .= "</ul>";
         return $html;
     }
     $location = $weatherDotCom->getLocation($search);
     if (is_a($location, 'PEAR_Error')) {
         return $location->getmessage();
     }
     $weather = $weatherDotCom->getWeather($search);
     if (is_a($weather, 'PEAR_Error')) {
         return $weather->getmessage();
     }
     $forecast = $weatherDotCom->getForecast($search, $this->_params['days']);
     if (is_a($forecast, 'PEAR_Error')) {
         return $forecast->getmessage();
     }
     // Location and local time.
     $html .= "<table width=100%><tr><td class=control>";
     $html .= '<b>' . $location['name'] . '</b>' . ' local time ' . $location['time'];
     $html .= "</b></td></tr></table>";
     // Sunrise/sunset.
     $html .= '<b>' . _("Sunrise: ") . '</b>' . Horde::img('block/sunrise/sunrise.gif', _("Sunrise")) . $location['sunrise'];
     $html .= ' <b>' . _("Sunset: ") . '</b>' . Horde::img('block/sunrise/sunset.gif', _("Sunset")) . $location['sunset'];
     // Temperature.
     $html .= '<br /><b>' . _("Temperature: ") . '</b>';
     $html .= $weather['temperature'] . '&deg;' . String::upper($units['temp']);
     // Dew point.
     $html .= ' <b>' . _("Dew point: ") . '</b>';
     $html .= $weather['dewPoint'] . '&deg;' . String::upper($units['temp']);
     // Feels like temperature.
     $html .= ' <b>' . _("Feels like: ") . '</b>';
     $html .= $weather['feltTemperature'] . '&deg;' . String::upper($units['temp']);
     // Pressure and trend.
     $html .= '<br /><b>' . _("Pressure: ") . '</b>';
     $html .= number_format($weather['pressure'], 2) . ' ' . $units['pres'];
     $html .= _(" and ") . $weather['pressureTrend'];
     // Wind.
     $html .= '<br /><b>' . _("Wind: ") . '</b>';
     if ($weather['windDirection'] == 'VAR') {
         $html .= _("Variable");
     } elseif ($weather['windDirection'] == 'CALM') {
         $html .= _("Calm");
     } else {
         $html .= _("From the ") . $weather['windDirection'];
         $html .= ' (' . $weather['windDegrees'] . ')';
     }
     $html .= _(" at ") . $weather['wind'] . ' ' . $units['wind'];
     // Humidity.
     $html .= '<br /><b>' . _("Humidity: ") . '</b>';
     $html .= $weather['humidity'] . '%';
     // Visibility.
     $html .= ' <b>' . _("Visibility: ") . '</b>';
     $html .= $weather['visibility'] . (is_numeric($weather['visibility']) ? ' ' . $units['vis'] : '');
     // UV index.
     $html .= ' <b>' . _("U.V. index: ") . '</b>';
     $html .= $weather['uvIndex'] . ' - ' . $weather['uvText'];
     // Current condition.
     $html .= '<br /><b>' . _("Current condition: ") . '</b>' . Horde::img('block/weatherdotcom/32x32/' . $weather['conditionIcon'] . '.png', _(String::lower($weather['condition'])), 'align="middle"');
//.........这里部分代码省略.........
开发者ID:Artea,项目名称:freebeer,代码行数:101,代码来源:weatherdotcom.php

示例12: create

 /**
  * Return the Horde_Crypt:: instance.
  *
  * @param string $driver  The driver name.
  * @param array $params   Any parameters needed by the driver.
  *
  * @return Horde_Crypt  The instance.
  * @throws Horde_Exception
  */
 public function create($driver, $params = array())
 {
     global $registry;
     $params = array_merge(array('email_charset' => $registry->getEmailCharset(), 'temp' => Horde::getTempDir()), $params);
     return Horde_Crypt::factory($driver, $params);
 }
开发者ID:horde,项目名称:horde,代码行数:15,代码来源:Crypt.php

示例13: provideHordeBase

 function provideHordeBase()
 {
     return Horde::getTempDir() . '/test_config';
 }
开发者ID:raz0rsdge,项目名称:horde,代码行数:4,代码来源:Scenario.php

示例14: array

    $ftpform->addVariable(_("Username"), 'username', 'text', true, false, null, array('', 20));
    $ftpform->addVariable(_("Password"), 'password', 'password', false);
    if ($ftpform->validate($vars)) {
        $ftpform->getInfo($vars, $info);
        $upload = _uploadFTP($info);
        if ($upload) {
            $notification->push(_("Uploaded all application configuration files to the server."), 'horde.success');
            Horde::url('admin/config/index.php', true)->redirect();
        }
    }
    /* Render the form. */
    Horde::startBuffer();
    $ftpform->renderActive(new Horde_Form_Renderer(), $vars, Horde::url('admin/config/index.php'), 'post');
    $ftpform = Horde::endBuffer();
}
if (file_exists(Horde::getTempDir() . '/horde_configuration_upgrade.php')) {
    /* Action to remove the configuration upgrade PHP script. */
    $url = Horde::url('admin/config/scripts.php')->add('clean', 'tmp');
    $action = _("Remove saved script from server's temporary directory.");
    $actions[] = array('icon' => Horde_Themes_Image::tag('delete.png', array('attr' => array('align' => 'middle'))), 'link' => Horde::link($url) . $action . '</a>');
}
$view = new Horde_View(array('templatePath' => HORDE_TEMPLATES . '/admin/config'));
$view->actions = $actions;
$view->apps = $apps;
$view->config_outdated = $config_outdated;
$view->ftpform = $ftpform;
$view->schema_outdated = $schema_outdated;
$view->version_action = Horde::url('admin/config/index.php');
$view->version_input = Horde_Util::formInput();
$view->versions = !empty($versions);
$page_output->addScriptFile('stripe.js', 'horde');
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:31,代码来源:index.php

示例15: handleMessage


//.........这里部分代码省略.........
                         }
                     }
                     if ($conflict) {
                         if ($action == RM_ACT_MANUAL_IF_CONFLICTS) {
                             //sendITipReply(RM_ITIP_TENTATIVE);
                             Horde::log('Conflict detected; Passing mail through', 'INFO');
                             return true;
                         } else {
                             if ($action == RM_ACT_REJECT_IF_CONFLICTS) {
                                 Horde::log('Conflict detected; rejecting', 'INFO');
                                 return $this->sendITipReply($cn, $id, $itip, RM_ITIP_DECLINE, $organiser, $uid, $is_update);
                             }
                         }
                     }
                 }
             }
             if (is_a($imap_error, 'PEAR_Error')) {
                 Horde::log('Could not access users calendar; rejecting', 'INFO');
                 return $this->sendITipReply($cn, $id, $itip, RM_ITIP_DECLINE, $organiser, $uid, $is_update);
             }
             // At this point there was either no conflict or RM_ACT_ALWAYS_ACCEPT
             // was specified; either way we add the new event & send an 'ACCEPT'
             // iTip reply
             Horde::log(sprintf('Adding event %s', $uid), 'INFO');
             if (!empty($conf['kolab']['filter']['simple_locks'])) {
                 if (!empty($conf['kolab']['filter']['simple_locks_timeout'])) {
                     $timeout = $conf['kolab']['filter']['simple_locks_timeout'];
                 } else {
                     $timeout = 60;
                 }
                 if (!empty($conf['kolab']['filter']['simple_locks_dir'])) {
                     $lockdir = $conf['kolab']['filter']['simple_locks_dir'];
                 } else {
                     $lockdir = Horde::getTempDir() . '/Kolab_Filter_locks';
                     if (!is_dir($lockdir)) {
                         mkdir($lockdir, 0700);
                     }
                 }
                 if (is_dir($lockdir)) {
                     $lockfile = $lockdir . '/' . $resource . '.lock';
                     $counter = 0;
                     while ($counter < $timeout && file_exists($lockfile)) {
                         sleep(1);
                         $counter++;
                     }
                     if ($counter == $timeout) {
                         Horde::log(sprintf('Lock timeout of %s seconds exceeded. Rejecting invitation.', $timeout), 'ERR');
                         return $this->sendITipReply($cn, $id, $itip, RM_ITIP_DECLINE, $organiser, $uid, $is_update);
                     }
                     $result = file_put_contents($lockfile, 'LOCKED');
                     if ($result === false) {
                         Horde::log(sprintf('Failed creating lock file %s.', $lockfile), 'ERR');
                     } else {
                         $this->lockfile = $lockfile;
                     }
                 } else {
                     Horde::log(sprintf('The lock directory %s is missing. Disabled locking.', $lockdir), 'ERR');
                 }
             }
             $itip->setAccepted($resource);
             $result = $data->save($itip->getKolabObject(), $old_uid);
             if (is_a($result, 'PEAR_Error')) {
                 $result->code = OUT_LOG | EX_UNAVAILABLE;
                 return $result;
             }
             if ($outofperiod) {
开发者ID:Gomez,项目名称:horde,代码行数:67,代码来源:Resource.php


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