<?php 
require "../Run.php";
if($admin != 1 && $admin !=2 )
{
	ehtml('权限不足!');
	exit();
}
echo head('模板缓存管理');
$dir = new Dir;
$filename = root_path.'/DdTpl/comdir/'.WAPID.'/';
if($_GET['act'] == 'del')
{
	$dir->delDir($filename);
	echo '<div class="tip">';
	echo '缓存清理成功!';
	echo '</div>';
	echo '<div class="mylink">';
	echo '<a href="?">返回上一页</a>';
	echo '</div>';
	}
else
{
	$arr = $dir -> listDir($filename,'NO');
	$left = '<a href="wap_admin.php?">后台</a>';
	echo topNav('模板缓存管理',$left,' ');
	echo '<div class="content">';
	foreach($arr as $value)
	{
		echo $value."\n<br>\n";
	}
	echo '</div><div class="mylink">';
	echo '<a href="?act=del">[清理模板缓存]</a>';
	echo '</div>';
}

echo footer(1);