Location: PHPKode > projects > mailqui > mailqui/config.inc.php
<?php
/**
 * The contents of this file are subject to the Guara. You may not use
 * this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.gnu.org/licenses/gpl.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * mailqui config.inc.php
 * Initial Configurations, load some functions, set path and start session
 *
 * @version Revision: 19 - 20/11/2006
 * @author Andreas Hansen <hide@address.com>, IdeiaLivre - Software Livre como Estrategia
 * @package mailqui.config
 *
 **/

/**
 * Instantiate ConfigMagik Class, and load mailqui.ini
 **/
if ( file_exists( "mailqui.ini" ) ) {
	require_once ( "lib/configMagik.class" );
	$config = new ConfigMagik ( 'mailqui.ini', true, true );
	$config->SYNCHRONIZE = false;
}

/**
 * GENERAL
 * Default settings differ, we need some of these, so force the matter.
 * Can be overridden here if actually necessary.
 */
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
ini_set('magic_quotes_runtime', '0');
ini_set('arg_separator.output', '&');

/**
 * Load generic functions file
 **/
require_once ( "lib/genFunctions.inc.php" );

/**
 * Get name list of mailServers
 **/
if ( file_exists( "mailqui.ini" ) ) $default["mailServers"] = getMailServers();

/**
 * PATHS
 * If not defined, define it.
 */
if (!defined('ROOT_DIR')) {
    $rootLoc = realpath(dirname(__FILE__) . '/');
    define('ROOT_DIR', $rootLoc . "/");
}
if (!defined('INCLUDE_DIR')) {
    define('INCLUDE_DIR', ROOT_DIR . '/lib');
}
if (!defined('OUTPUT_DIR')) {
    define('OUTPUT_DIR', ROOT_DIR . '/output');
}
if (!defined('ROOT_URL')) {
    define('ROOT_URL', guessRootUrl());
}

/** Startup Session **/
session_start();

/** Load Language File **/
if ( !defined( $default["lang-hash"] ) ) {
	if ( file_exists( "mailqui.ini" ) ) {
		$default["lang-hash"] = readLanguageFile( $config->get( 'Language', 'global' ) );
	} else {
		$default["lang-hash"] = readLanguageFile( "en" );
	}
}

/** Instantiate Xajax library **/
require_once( INCLUDE_DIR . "/xajax/xajax.inc.php");
$xajax = new xajax();
?>
Return current item: mailqui