<?php
define('IN_SMT',true);
define('IN_MYMPS',true);
define('CSCRIPT','news');

require_once dirname(__FILE__)."/include/global.php";
require_once dirname(__FILE__)."/data/config.php";

ifsiteopen();
require_once MYMPS_DATA."/config.db.php";
require_once MYMPS_INC."/db.class.php";
require_once MYMPS_SMARTY."/include.php";

@include MYMPS_DATA.'/caches/plugin.php';
$pluginsettings = $data;
unset($data);
!ifplugin(CSCRIPT) && exit('管理员已禁用或未安装新闻插件...');

$id	= isset($id) ? intval($id) : '';
$catid = isset($catid) ? intval($catid) : '';

if($id) {
	define('CURSCRIPT','news');
} elseif($catid) {
	define('CURSCRIPT','news_list');
} else {
	define('CURSCRIPT','news_index');
}

include MYMPS_ASS.'/'.CURSCRIPT.'.php';

$smarty -> display(mymps_tpl(CURSCRIPT));
is_object($db) && $db->Close();
?>