{:tpl head}
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>附件管理</caption>
  <tr>
   <td>
    <strong>管理选项：</strong>
    <a href="?c=attachment&type=all">全部附件</a> |
    <a href="?c=attachment&type=hour">1小时内附件</a> |
	<a href="?c=attachment&type=day">1天内附件</a> |
	<a href="?c=attachment&type=month">1月内附件</a> |
	<a href="?c=attachment&type=fmonth">1月前附件</a> |
	<a href="?c=attachment&type=fyear">1年前附件</a>
   </td>
  </tr>
</table>
<!--{:if $a == 'defaults'}-->
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>管理附件</caption>
 <form name="myform" action="" method="post">
 <input type="hidden" value='' name="selids" />
 <tr align="center">
  <th width="4%"><input name="checkbox" type="checkbox" onclick="checkorno(this, this.form.aids)" /></th>
  <th width="4%">序号</th>
  <th width="15%"><a href="{:$orderurl}&field=filename&order={:$order}">名称</a></th>
  <th><a href="{:$orderurl}&field=filepath&order={:$order}">位置</a></th>
  <th width="4%"><a href="{:$orderurl}&field=fileext&order={:$order}">类型</a></th>
  <th width="6%"><a href="{:$orderurl}&field=filesize&order={:$order}">大小</a></th>
  <th width="8%"><a href="{:$orderurl}&field=module&order={:$order}">模块</a></th>
  <th width="6%"><a href="{:$orderurl}&field=contentid&order={:$order}">链接ID</a></th>
  <th width="6%"><a href="{:$orderurl}&field=isthumb&order={:$order}">缩略图</a></th>
  <th width="10%"><a href="{:$orderurl}&field=uploadtime&order={:$order}">上传时间</a></th>
  <th width="5%">操作</th>
 </tr>
 {:loop $data $k $v}
 <tr align="center">
  <td><input name="aids" type="checkbox" value="{:$v['aid']}" /></td>
  <td>{:Tag::compute($k+$startNo)}</td>
  <td align="left">{:if $v['isimage'] && $v['filesize'] < 1000}<img src="{:$v['filepath']}" />{:/if}{:$v['filename']}</td>
  <td align="left"><a href="{:$v['filepath']}" target="_blank">{:$v['filepath']}</a></td>
  <td>{:$v['fileext']}</td>
  <td>{:$v['filesize']}</td>
  <td>{:$v['module']}</td>
  <td>{:$v['contentid']}</td>
  <td>{:if $v['isthumb']}<a href="{:str_replace('.', '_thumb.', $v['filepath'])}" target="_blank">查看</a>{:else}--{:/if}</td>
  <td>{:Tag::date($v['uploadtime'])}</td>
  <td><a href="?c=attachment&a=del&selids={:$v['aid']}">删除</a></td>
 </tr>
 {:/loop}
 <tr>
  <td height="20" colspan="11" align="center">
   <button name="select1" onclick="selAll(this.form.aids)" type="button">全选</button>
   <button name="select2" onclick="noSelAll(this.form.aids)" type="button">反选</button>
   <button name="submitsc" type="button" onClick="subform(this.form,this.form.aids,'?c=attachment&a=del','确认删除吗？此操作不可恢复。')">删除</button>
  </td>
 </tr>
 </form>
</table>
{:if $pages}<div class="pages">{:$pages}</div>{:/if}
<!--{:/if}-->
{:tpl foot}