Exemple #1
0
 function __construct()
 {
     /* TOP CONTROLLER AND CLASS: */
     //echo count(Registry::getObject('all'));
     foreach (Registry::$_objects as $key => $value) {
         if (!isset($this->{$key})) {
             $this->{$key} = $value;
         }
     }
     $this->settings = Registry::getAllSettings();
     $this->libraries = Registry::getAllLibraries();
     $this->routes = Registry::getAllRoutes();
     //The RegisterData:
     $this->registry = Registry::singleton();
     //URI:
     if (is_object($this->URI)) {
         $this->controller = $this->URI->controller();
         $this->method = $this->URI->method();
         //$this->param = $this->URI->param();
     }
 }
Exemple #2
0
<?php

/**
 * $Horde: horde/services/css.php,v 1.45 2004/02/14 04:02:20 chuck Exp $
 *
 * Copyright 2000-2004 Charles J. Hagenbuch <*****@*****.**>
 *
 * 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/core.php';
$registry =& Registry::singleton(HORDE_SESSION_NONE);
// Figure out if we've been inlined, or called directly.
$send_headers = strstr($_SERVER['PHP_SELF'], 'css.php');
// Set initial $mtime of this script.
$mtime = getlastmod();
if (@file_exists(HORDE_BASE . '/config/conf.php')) {
    require HORDE_BASE . '/config/conf.php';
} else {
    $conf['css']['cached'] = false;
}
$theme = Util::getFormData('theme');
if (Util::getFormData('inherit') !== 'no') {
    if (@file_exists(HORDE_BASE . '/config/html.php')) {
        $file = HORDE_BASE . '/config/html.php';
    } else {
        $file = HORDE_BASE . '/config/html.php.dist';
    }
    if ($conf['css']['cached']) {
        $hmtime = filemtime($file);
Exemple #3
0
 * Chora base inclusion file.
 *
 * $Horde: chora/lib/base.php,v 1.98 2004/02/14 04:02:10 chuck Exp $
 *
 * This file brings in all of the dependencies that every Chora 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', dirname(__FILE__) . '/../..');
}
// Load the Horde Framework core, and set up inclusion paths.
require_once HORDE_BASE . '/lib/core.php';
// Registry
$registry =& Registry::singleton();
if (is_a($pushed = $registry->pushApp('chora', !defined('AUTH_HANDLER')), 'PEAR_Error')) {
    if ($pushed->getCode() == 'permission_denied') {
        Horde::authenticationFailureRedirect();
    }
    Horde::fatal($pushed, __FILE__, __LINE__, false);
}
$conf =& $GLOBALS['conf'];
@define('CHORA_TEMPLATES', $registry->getParam('templates'));
// Notification system.
$notification =& Notification::singleton();
$notification->attach('status');
// Find the base file path of Chora.
@define('CHORA_BASE', dirname(__FILE__) . '/..');
// Horde base libraries.
require_once HORDE_LIBS . 'Horde/Text.php';
Exemple #4
0
<?php

/**
 * $Horde: horde/services/javascript.php,v 1.34 2004/03/03 08:38:18 jan Exp $
 *
 * Copyright 2000-2004 Charles J. Hagenbuch <*****@*****.**>
 *
 * 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/core.php';
$registry =& Registry::singleton(HORDE_SESSION_READONLY);
// Figure out if we've been inlined, or called directly.
$send_headers = strstr($_SERVER['PHP_SELF'], 'javascript.php');
$app = Util::getFormData('app');
$file = Util::getFormData('file');
if (!empty($app) && !empty($file) && strpos($file, '..') === false) {
    $script_file = $registry->getParam('templates', $app) . '/javascript/' . $file;
    if (@file_exists($script_file)) {
        $registry->pushApp($app);
        $script = Util::bufferOutput('require', $script_file);
        if ($send_headers) {
            /* Compress the JS. We need this explicit call since we
             * don't include base.php in this file. */
            Horde::compressOutput();
            $mod_gmt = gmdate('D, d M Y H:i:s', filemtime($script_file)) . ' GMT';
            header('Last-Modified: ' . $mod_gmt);
            header('Cache-Control: public, max-age=86400');
            header('Content-Type: text/javascript');
        }