<?php
/**
* @author moufer<moufer@163.com>
* @copyright www.modoer.com
* @version $Id inc_common.php 2 2008-09-18 11:51 $
*/
define('MOD_FLAG', 'exchange');
define('MOD_ROOT', dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR);

require_once(dirname(MOD_ROOT).DIRECTORY_SEPARATOR.'./include/common.inc.php');
require_once(MOD_ROOT.'./include/fun_common.php');

$MOD = array();
$MOD = read_cache(MUDDER_ROOT.'data/cachefiles/cache_'.MOD_FLAG.'_config.php');
if(empty($MOD)) {
    if(isset($_modules[MOD_FLAG])) {
        cache_module(MOD_FLAG);
        $MOD = read_cache(MUDDER_ROOT.'data/cachefiles/cache_'.MOD_FLAG.'_config.php');
    }
    if(empty($MOD)) {
        echo '模块未安装。';
        exit();
    }
} elseif($MOD['disable']) {
    redirect('本模块已禁用。');
}
?>