<?php
require_once(dirname(__FILE__)."/../inc/common.php");
/*******************************************************************************************
' Software name: DJCMS Content Management System
' Version:3.0
' Web: http://www.djcms.net
' Author: 心情(qq:1130731)
' Copyright (C) 2009-2010 DJCMS官方 版权所有
' 法律申明：DJCMS程序所有代码100%原创、未引入任何网上代码,对一切抄袭行为、坚决严肃追究法律责任
'*******************************************************************************************/
if (newsrunMode=="static"){
	header(getNewsIndexLink());
}else{
	GetNewsIndex();
}

function GetNewsIndex(){
	global $t1;
	$x = DJCMS_TEMPLATE."newsindex.html";
	$cacheName="parsed_news_index";
	if (cacheStart == 1){
		if (djcms::$content = memory('get', $cacheName)) {
        } else {
            parseNewsPart($x);
            memory('set', $cacheName, djcms::$content);
        }
	} else {
		parseNewsPart($x);
	}
	echo replaceStr(djcms::$content,"{djcms:runinfo}",getRunTime($t1)) ;
}

function parseNewsPart($x)
{
	djcms::$content=loadFile($x);
	djcms::parseTopAndFoot();
	djcms::parseSelf();
	djcms::parseGlobal();
	djcms::$content=replaceCurrentTypeId(djcms::$content);
	djcms::parseMenuList("");
	djcms::parseNewsList();
	djcms::parseAreaList();
	djcms::parseVideoList();
	djcms::parseTopicList();
	djcms::parseLinkList();
	djcms::parseIf();
}
?>
