<?php
/**
 * @version $Id: smarty.inc.php v2.0 $
 * @package PBDigg
 * @copyright Copyright (C) 2007 - 2008 PBDigg.com. All Rights Reserved.
 * @license PBDigg is free software and use is subject to license terms
 */

if (!defined('IN_PBDIGG'))
{
	exit('Access Denied!');
}

require_once(PBDIGG_ROOT.'include/smarty/Smarty.class.php');

//设定模版目录
$templates_dir = PBDIGG_ROOT.'templates/';
$compile_dir = PBDIGG_ROOT.'compile/';
$cache_dir = PBDIGG_ROOT.'cache/';

if(defined('IN_ADMIN'))
{
	$dir = 'admin';
}
else
{
	require_once(PBDIGG_ROOT.'data/style/'.$pb_style.'.php');
	$dir = $_PBSTYLE['tplpath'];
}
$_PBENV['PB_TEMPLATE'] = $dir;
$TPL = new Smarty;									//实例化smarty对象
$TPL->debugging = FALSE;
$TPL->template_dir = $templates_dir.$dir;			//模版
$TPL->compile_dir = $compile_dir.$dir;				//编译
$TPL->cache_dir = $cache_dir.$dir;					//缓存
$TPL->cache_lifetime = 0;							//缓存时间
$TPL->caching = FALSE;
$TPL->left_delimiter = '{#';
$TPL->right_delimiter = '#}';
?>
