<?php
# Name: PHP版程氏音乐CMS管理系统 v3.0
# Author: 程氏<web@chshcms.com> [QQ:848769359]
# Homepage:http://www.chshcms.cn/
include_once("../../lib/cs_conn.php");
include_once("../../lib/cs_common.php");
include_once("../loginstate.php");

	$d=_CSDJ_ROOT_.CS_Cachename;
	if (is_dir($d)) {
	  	$dh=opendir($d);//打开目录
 		 while (false !== ( $file = readdir ($dh))) {
   			if($file!="." && $file!="..") { 
      			   $fullpath=$d."/".$file;
      			   if(!is_dir($fullpath)) {
         		 	@unlink($fullpath);//删除目录中的所有文件
     			   } 
			}
   		 }
   		 closedir($dh);
	     die(Admin_Error('恭喜您，更新成功！','main.php'));
	}else{
	     die(Admin_Error('抱歉，更新失败！','main.php'));
        }
?>