<!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="<{$css_root}>images/admincp.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<{$web_url}>include/js/jquery.js"></script>
<script type="text/JavaScript">
<!--
$(function(){
     //全选
     $("#CheckAll").click(function(){
			//所有checkbox跟着全选的checkbox走。
			$('[name=delete]:checkbox').attr("checked", this.checked );
	 });
	 $('[name=delete]:checkbox').click(function(){
				//定义一个临时变量，避免重复使用同一个选择器选择页面中的元素，提升程序效率。
				var $tmp=$('[name=delete]:checkbox');
				//用filter方法筛选出选中的复选框。并直接给CheckedAll赋值。
				$('#CheckAll').attr('checked',$tmp.length==$tmp.filter(':checked').length);

	 });
	 
	 $("#DelAllOk").click(function(){
		var str="";
		$('[name=delete]:checkbox:checked').each(function(){
			str+=$(this).val()+"/";
		})
		$('#DelId').attr("value", str )
	});
});
-->
</script>
</head>
<body>
<div id="append_parent"/>
<div id="cpcontainer" class="container">
  <div class="itemtitle">
    <h3>图片管理</h3>
    <ul class="tab1">
      <li class="current"> <a href="picmanage.php?act=show"> <span>图片列表</span> </a> </li>
      <li> <a href="picmanage.php?act=add"> <span>上传图片</span> </a> </li>
    </ul>
  </div>
  <table id="tips" class="tb tb2">
    <tbody>
      <tr>
        <th class="partition">技巧提示</th>
      </tr>
      <tr>
        <td class="tipsblock"><ul id="tipslis">
            <li>此栏目的删除操作不可恢复，请谨慎操作</li>
            <li>如果需要批量删除，请选择需要删除的文件，然后单击提交</li>
            <li>如果需要删除单个文件，请直接单击该文件后面的删除</li>
          </ul></td>
      </tr>
    </tbody>
  </table>
  <form id="cpform" action="picmanage.php?act=delall" method="post" name="cpform">
  <input type="hidden" name="delid" id="DelId" />
    <table class="tb tb2">
      <tbody>
        <tr class="header">
          <th/>
          <th>图片名</th>
          <th>目录</th>
          <th>上传时间</th>
          <th/>
        </tr>
        <{section name=pic loop=$piclist}>
        <tr class="hover">
          <td class="td25"><input class="checkbox" type="checkbox" value="<{$piclist[pic].id}>" name="delete"/>
          </td>
          <td class="td29"><{$piclist[pic].temname}>
          </td>
          <td><{$piclist[pic].filepath}></td>
          <td class="td24"> <{$piclist[pic].uploadtime}>
          </td>
          <td><a class="act" href="picmanage.php?act=remove&id=<{$piclist[pic].id}>">删除</a> </td>
        </tr>
        <{/section}>
        <tr>
          <td class="td25">全选<input id="CheckAll" class="checkbox" type="checkbox" name="chkall"/></td>
          <td colspan="15"><div class="fixsel">
              <input class="btn" type="submit" id="DelAllOk" value="提交" />
            </div></td>
        </tr>
      </tbody>
    </table>
  </form>
  <{$pages}>
</div>
</body>
</html>
