<?php require_once("admin_public.php");?>
<div class="admin_bread">当前位置：文件搜索</div>
<div class="admin_right">
  <div class="admin_main">
    <form action="result.php" method="post" name="files_form" class="admin_info_form files_form" onsubmit="return check_delbtn(select);">
      <div class="admin_info" id="info_a">
        <h4 class="h1">文件列表</h4>
        <div class="admin_table">
          <table width="100%">
            <thead>
              <tr>
                <td style="width:4%;"><input type="checkbox" name="chkAll" id="chkAll" onclick="return CheckAll(this.form)" title="全选" /></td>
                <td style="width:12%;">文件ID</td>
                <td style="width:32%;">文件名</td>
                <td style="width:4%;">密码</td>
                <td style="width:7%;">文件MIME</td>
                <td style="width:7%;">文件字节</td>
                <td style="width:12%;">上传时间</td>
                <td style="width:12%;">最后下载</td>
                <td style="width:8%;">下载次数</td>
              </tr>
            </thead>

            <?php 
			if($_GET['searchword'])
			{
				$result=search($_GET['searchword']);
				if(count($result)=='0')
				{
					echo "<span>没有搜索到匹配项</span>";
					exit;					
					}
				}
			while($files=mysql_fetch_array($result))
			{
			?>
            <tr>
              <td><input type="checkbox" name="select[]" class="checkbox" value="<?php echo $files['id'];?>" /></td>
              <td><?php echo $files['id'];?></td>
              <td><a href="file_view.php?id=<?php echo $files['id'];?>" title="<?php echo $files['name'];?>"><?php echo $files['name'];?></a></td>
              <td><?php if($files['pro']=='0'){echo "否";}else{echo "是";};?></td>
              <td><?php echo $files['type'];?></td>
              <td><?php echo size_info($files['size']);?></td>
              <td><?php echo date('Y.m.d H:s',$files['up']);?></td>
              <td><?php echo date('Y.m.d H:s',$files['dt']);?></td>
              <td><?php echo $files['down'];?>次</td>
            </tr>
            <?php
			}
			?>
          </table>
        </div>
      </div>
      <div class="page_box">
      <input type="submit" value="删除所选" name="files_del" class="submit_del" onclick="return window.confirm(' 确定删除全部所选吗？');"/>
      <?php echo pages('files.php');?>  
    </div>
    </form >
  </div>
</div>
<?php require_once("admin_footer.php");?>