<?php
!defined('ADMIN')&&die("<meta http-equiv='refresh' content=0;url='/'>");
if(ADMIN<20)Js_to("没有权限！",URL._1.D.L.D);
FN("title",$title="js文件CSS文件管理器");
_F("top");
$_3=_3=='js'?_3:'css';
$ml=C.D.($_3?$_3:'');
?>
<tt id="tw"></tt>
<fieldset>
<legend><h1><b><var><img src="system/img/left.gif" /></var><dfn class="hide"><img src="system/img/right.gif" /></dfn></b>　<a href="<?php echo URL._1.D._2.D._3?>"><?php echo $title?></a></h1></legend>
<form action="" method="post" class="form" onsubmit="return sm()">
<?php
if(_4){
	$b=_4=='add'?V:file_get_contents($ml.D._4);
?>
<ul>
<tt></tt>
<dt>文件名:</dt><dd><li><input name="a" id="n" value="<?php echo _4=='add'?V:_4?>" class="w9"/></li></dd>
</ul><input type="hidden" name="cgi" value="2" />
<ul>
<tt></tt>
<dt>代码:</dt><dd><li><textarea rows="20" name="b" class="w9"><?php echo GL($b,4);?></textarea></li></dd>
</ul>
<ul>
<tt></tt>
<big><input type="submit" value="保 存 设 置"/></big>
</ul>
<script>
function sm(){
	if($('#n').val()==''){
		tanchuang('文件名不能为空！');tuitan(3);
		return false;
	}
}
</script>
<?php
}else{?>
&nbsp; &nbsp; <b>当前目录:</b> 
<?php
echo pic($_3);
?>　<a href="<?php echo URL._1.D._2.D.($_3=='js'?'css':'js')?>" class="red"><big>⇄</big> 切换到<?php echo $_3=='js'?'css':'js'?>目录</a>　
<a href="<?php echo URL._1.D?>a/js/add">创建js文件</a>　
<a href="<?php echo URL._1.D?>a/css/add">创建css文件</a>
<tt style="height:20px"></tt>
<div class="fieldset"><big>文件列表</big>
<div>
<tt></tt>
<h2 class="red">注意：删除或修改前请先备份，否则数据无法恢复！！！</h2>
<tt></tt>
<?php
$arr=FL($ml,1);
foreach($arr as $v)
	echo '<h3>　<a href="'.URL._1.D._2.D.str_replace(D,'-',str_replace(C.D,'',$v)).'">'.ucwords(str_replace($ml,'',$v)).'</a></h3><tt></tt>';
echo pic(FL($ml));
?>
<tt></tt>
</div></div>
<?php
}?>
</form>
</fieldset>
<?php
_F("end");