<?php if (!defined('APP_PATH')) exit;?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="http://127.0.0.5/Magic/Data/Public/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://127.0.0.5/Magic/Data/Public/js/jquery.js"></script>
<script src="http://127.0.0.5/Data/Public/layer/layer.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/main.js"></script>
</head>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="/">首页</a></li>
		<li><a href="#">系统设置</a></li>
		<li><a href="#">文件管理</a></li>
	</ul>
</div>
<table class="filetable">
    <thead>
    	<tr>
        <th >名称</th>
        <th width="150">修改日期</th>
        <th width="150">大小</th>
        <th width="150">操作</th>
        </tr>    	
    </thead>
    
    <tbody>
    
    	<?php if(!empty($dirs['superior'])){ ?>
		<tr>
			<td height="30" align="left" style="text-indent:20px"><img src="http://127.0.0.5/Magic/Data/Public/images/dir2.gif"><a href="?r=files&path=<?php echo $dirs['superior']['currentpath'];?>/<?php echo $dirs['superior']['name'];?>">上级目录</a></td>
			<td height="30" align="center"></td>
			<td height="30" align="center"></td>
			<td height="30" align="center"></td>
		</tr>
		<?php }?>
		<?php foreach ($dirs['list'] as $vo){?>
		<tr>
			<td height="30" align="left" style="text-indent:20px">
			<img src="http://127.0.0.5/Magic/Data/Public/images/dir.gif"> 
			<a href="?r=files&path=<?php echo $vo['fullpath'];?>"><?php echo $vo['name'];?></a>
			</td>
			<td height="30" align="center"></td>
			<td height="30" align="center"></td>
			<td height="30" align="center"><a href="javascript:" onclick="confirms('目录删除后将无法恢复，<br>请谨慎操作，确认删除？','?r=files-index-del&type=2&path=<?php echo $vo['fullpath'];?>')" >删除</a></td>
		</tr>
		<?php }?>
		<?php foreach ($files as $vo2){?>
		<tr>
			<td height="30" align="left" style="text-indent:20px">
			<img src="http://127.0.0.5/Magic/Data/Public/images/<?php echo $vo2['ext'];?>.gif">
			<?php if($vo2['ext']=='png' || $vo2['ext']=='jpg' || $vo2['ext']=='gif' ||$vo2['ext']=='bmp'){ ?> 
			<a href="javascript:"  onclick="parent.parent.layer.open({area:['500px', '400px'],content:'<img src=<?php echo $vo2['currentpath'];?>/<?php echo $vo2['name'];?>'});"><?php echo $vo2['name'];?></a>
			<?php }else{ ?>
			<a href="?r=files-index-edit&path=<?php echo $vo2['currentpath'];?>&file=<?php echo $vo2['name'];?>"><?php echo $vo2['name'];?></a>
			<?php }?>
			</td>
			<td height="30" align="center"><?php echo $vo2['lastsave'];?></td>
			<td height="30" align="center"><?php echo $vo2['size'];?></td>
			<td height="30" align="center">
			<?php if($vo2['ext']=='png' || $vo2['ext']=='jpg' || $vo2['ext']=='gif' ||$vo2['ext']=='bmp'){ ?>
			<a href="javascript:"  onclick="parent.parent.layer.open({area:['500px', '400px'],content:'<img src=<?php echo $vo2['currentpath'];?>/<?php echo $vo2['name'];?>'});">查看</a>
			<?php }else{ ?>
			<a href="?r=files-index-edit&path=<?php echo $vo2['currentpath'];?>&file=<?php echo $vo2['name'];?>">编辑</a>
			<?php }?> |  
			<a href="javascript:" onclick="confirms('文件删除后将无法恢复，<br>请谨慎操作，确认删除？','?r=files-index-del&type=1&path=<?php echo $vo2['fullpath'];?>')" >删除</a>
			</td>
		</tr>
		<?php }?>
        
    </tbody>
    </table>
</body>
</html>
