<?php
/*
　* @$Id
　* @
　* @Ver: 2.0
　* @Create: 2009-11-18 8:10
　* @Modify: 
　* @Author: CPWEB http://www.cpweb.net.cn
　* @Copyright (C) 2008 www.cpweb.net.cn. All Rights Reserved.
　* @License CPWEB is free software and use is subject to license terms
　*/
class CacheAction extends GlobalAction{
	public function index()
	{	
		$this->assign("cache",array(
			"Admin_App(后台)"=>array("项目运行目录(Runtime)"=>"Admin_App/Runtime","模版缓存目录(Cache)"=>"Admin_App/Runtime/Cache","数据缓存目录(Temp)"=>"Admin_App/Runtime/Temp","数据目录(Data)"=>"Admin_App/Runtime/Data","日志目录(Logs)"=>"Admin_App/Runtime/Logs"),
			"Cpweb_App(前台)"=>array("项目运行目录(Runtime)"=>"Cpweb_App/Runtime","模版缓存目录(Cache)"=>"Cpweb_App/Runtime/Cache","数据缓存目录(Temp)"=>"Cpweb_App/Runtime/Temp","数据目录(Data)"=>"Cpweb_App/Runtime/Data","日志目录(Logs)"=>"Cpweb_App/Runtime/Logs"),
			));
		$this->display();
	}
	public function submit(){
		$dirs = $_POST['id'];
		foreach($dirs as $value){
			cpweb_delete_folder(CPWEB_ROOT.$value);
			$say.= "清理缓存文件夹成功! ".$value."</br>";
		}
		$this->success($say);
	}
}
?>