<?php
define('ISDVBBS', true);

include_once 'global.php';

head();
	
if ( strpos($sysinfo['flag'],'56,') === false ){
	show_msg($lang['readme_tit'],$lang['error.str1'],0,'','','','');
	exit;
}

$dirName= '../cache/static';
delStaticDir($dirName);

function delStaticDir($dirName){
	echo '<br><br><br><br>';
	if(empty($dirName)) {
		echo "文件夹不存在";
		return;
	}
	if(file_exists($dirName)) {
		$dir = dir($dirName);
		while($file = $dir->read()) {
			if($file != '.' && $file != '..') {
				if(is_dir($dirName.'/'.$file)) {
					delDir($dirName.'/'.$file);
				}
				else {
					unlink($dirName.'/'.$file) or die('File '.$dirName.'/'.$file.' 无法删除!');
				}
			}
		}
	}
	else {
		echo 'Folder "<b>'.$dirName.'</b>" 无法删除.';
	}
}

footer();
?>