<?php

/**
 * TBlog TBlog博客系统　BY Tmac PHP MVC framework
 * $Author: zhangwentao $  <zwttmac@qq.com>
 * $Id: index.php 75 2011-12-09 02:19:58Z zhangwentao $
 * http://www.t-mac.org； 
 */
PHP_VERSION < '5.1' && die('Tmac is only available for use with PHP 5.1.0 or later.');

//Tmac执行时间开启
$TMAC_START_TIME = microtime(true);
//The directory in which your application specific resources are located.
define('APPLICATION', 'application');
//The directory in which your var are located.
define('VARROOT', 'var');

//Tmac返回项目文件路径的信息
$tmac_path = dirname(__FILE__); //当前目录
$tmac_base_path = dirname(dirname(__file__)); //上级目录
//Tmac物理根目录
define('TMAC_BASE_PATH', $tmac_path . DIRECTORY_SEPARATOR);
//定义MVC system核心目录
define('TMAC_PATH', TMAC_BASE_PATH . 'Tmac' . DIRECTORY_SEPARATOR);
//定义项目名称和路径
define('APP_NAME', 'www');
define('APP_PATH', TMAC_BASE_PATH . APP_NAME . DIRECTORY_SEPARATOR);
//application目录
define('APPLICATION_ROOT', APP_PATH . APPLICATION . DIRECTORY_SEPARATOR);
//var目录
define('VAR_ROOT', APP_PATH . VARROOT . DIRECTORY_SEPARATOR);
//Webroot Htdocs 网站目录
define('WEB_ROOT', str_replace('\\', '/', dirname(__FILE__) . DIRECTORY_SEPARATOR));

//static url
define('STATIC_URL', 'http://local.tblog/');
//static root
define('STATIC_ROOT', TMAC_BASE_PATH . 'Public' . DIRECTORY_SEPARATOR);
//BASE Public目录
define('BASE', 'Public/');
//BASE_V 前台模板目录
define('BASE_V', 'Public/' . APP_NAME . '/');

//###### add by ZhunaCMS
if (!file_exists(VAR_ROOT . 'Data/install.lock')) {
    header('Location:install/index.php');
    exit;
}
//###### over ZhunaCMS

//加载框架入口文件
require(TMAC_PATH . "TmacPHP.php");

//开启网站进程
new Tmac();
?>