<?php
/*
 *		Powered by YiCms 
 *
 *		mailto:yixiao@yicms.cn
 *
 */
class HtmlAction extends Action{
    public function checkUser($level){
		if(empty($_SESSION['aid'])) $this->redirect('/Admin/Index/login');
		if(!empty($level) && !in_array($level,$_SESSION['levels'])) $this->error('您没有此权限!.');
	}
    public function index(){
		$this->checkUser('8_1_1');
		$config = file_get_contents('config/config.inc.php');
		if(preg_match('/\'ISHTML\'=>1/',$config)) $html = 1;
		else $html = 0;
		$this->assign('html',$html);
		$this->display();
	}
	public function clearCache(){
		$this->checkUser('8_1_2');
		clearCache();
		$this->success('清空缓存成功!^_^!');
	}
}
?>