<?php
class indexAction extends security_normal {
	
	function action(){
		$htmlfn=MICE_DIR.'index'.MICE_HTML_EXT;
		if(MICE_HTML){
			if(file_exists($htmlfn)){
				include_once $htmlfn;
				exit;
			}
		}
		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileIndex');

		$filename = new getTPLFileName(__CLASS__);
		$tpl=$filename->TPLFileName;

		if(MICE_HTML){
			//将内容写入至静态文件
			$content = $smarty->fetch($tpl);
			$fp = fopen($htmlfn, 'w'); 
			fwrite($fp, $content); 
			fclose($fp);
		}

		$smarty->display($tpl);
	}	
}
?>