<table class="widefat" cellspacing="0" style="width:700px">
  <thead>
    <tr>
      <th>文件名称</th>
      <th>文件类型</th>
      <th>文件大小</th>
      <th>修改日期</th>
    </tr>
  </thead>
  <tfoot>
  </tfoot>
  <tbody>
<?php if($pre_path)
{
?>
    <tr>
      <td colspan="4" align="left">
        <img src="{tpl_path}images/file/Back.gif" /> <a href="javascript:ReloadFileDialog('<?php echo $pre_path;?>')" style="color:#FF0000">返回上层文件夹</a>        </td>
    </tr>
<?php
}
?>
    <?php foreach($file_list as $f_item)
	  {
	  if(isset($f_item['folder_path']))
	  {
	  ?>
    <tr>
      <td><img src="{tpl_path}images/file/folder.gif" /> <a href="javascript:ReloadFileDialog('<?php echo $f_item['folder_path'];?>')"><?php echo $f_item['folder_name'];?></a></td>
      <td>文件夹</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <?php 
	  }
	  else
	  {
	  ?>
    <tr>
      <td>
      <?php 
	  $img_ext=array('.jpg','.jpeg','.gif','.jpe','.png','.bmp');
	  if(!in_array(strtolower(strstr($f_item['name'],'.')),$img_ext))
	  {
	  ?>
      <img src="{tpl_path}images/file/<?php echo $f_item['file_icon'];?>" />
      <?php
	  }
	  else
	  {
	  ?>
      <img src="{tpl_path}images/loading.gif" rel="<?php echo get_real_path($f_item['relative_path'].$f_item['name']);?>" class="ajax_jq_pic_loading" border="0" />
      <?php
	  }
	  ?>
       <a href="#" onclick="GetFilePath(this)" rel="<?php echo $f_item['relative_path'].$f_item['name'];?>" ><?php echo $f_item['name'];?></a></td>
      <td><?php echo $f_item['mime'];?></td>
      <td><?php echo byte_format($f_item['size']);?></td>
      <td><?php echo date("Y-m-d",$f_item['date']);?></td>
    </tr>
    <?php
	  	}
	  }
	  ?>
  </tbody>
</table>
