Ejemplo n.º 1
0
function filehashDB_autoload($className)
{
    include_if_exists(THIS_SCRIPT_PATH . "/classes/{$className}.php");
}
<?php

function include_if_exists($file)
{
    if (file_exists($file)) {
        return include $file;
    }
}
if (!($loader = include_if_exists(__DIR__ . '/../vendor/autoload.php')) && !($loader = include_if_exists(__DIR__ . '/../../../autoload.php'))) {
    die('You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL);
}
Ejemplo n.º 3
0
<?php

/*
 * This file is part of Curator.
 *
 * (c) Marius Schütte <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
function include_if_exists($file)
{
    return file_exists($file) ? include $file : false;
}
if (!include_if_exists(__DIR__ . '/../vendor/autoload.php') && !include_if_exists(__DIR__ . '/../../../autoload.php')) {
    echo 'You must set up the project dependencies using `composer install`' . PHP_EOL;
    exit(1);
}
Ejemplo n.º 4
0
ini_set('include_path', get_include_path() . ':' . dirname(__FILE__));
@(include_once 'Zend/Version.php');
if (!class_exists('Zend_Version', false)) {
    die("Zend Framework not found. Please check the INSTALL File.");
}
chdir("..");
if (!defined('SM_PATH')) {
    define('SM_PATH', '../');
}
include_once dirname(__FILE__) . '/config.php';
include_once dirname(__FILE__) . '/functions.inc.php';
include_if_exists(dirname(__FILE__) . '/../include/validate.php');
if (file_exists(dirname(__FILE__) . '/../include/validate.php')) {
    include_once dirname(__FILE__) . '/include/validate.php';
} else {
    include_if_exists(SM_PATH . 'src/validate.php');
}
include_once SM_PATH . 'functions/page_header.php';
include_once SM_PATH . 'functions/display_messages.php';
include_once SM_PATH . 'functions/imap.php';
include_if_exists(SM_PATH . 'functions/array.php');
if (file_exists(SM_PATH . 'src/load_prefs.php')) {
    include_once SM_PATH . 'src/load_prefs.php';
} else {
    include_if_exists(SM_PATH . 'include/load_prefs.php');
}
// overwrite squirrelmail's content type to utf8...
header("Content-Type: text/html; charset=utf8");
//global $VACCONFMESSAGE;
bindtextdomain('postfixadmin', dirname(__FILE__) . '/postfixadmin/locale');
textdomain('postfixadmin');