	{literal}
<script language="javascript">
  function uncheckAll(form1,status)  //不选
{
	var elements = form1.getElementsByTagName('input');		//获取input标签
	for(var i=0; i<elements.length; i++)					//根据标签的长度执行循环
	{
		if(elements[i].type == 'checkbox')					//判断对象中元素的类型，如果类型为checkbox
		{
		  if(elements[i].checked==true){					//判断当checked的值为true时
			elements[i].checked=false;						//为checked赋值为false
		  }
		}
	}	
}

function checkAll(form1,status)		//全选
{
	var elements = form1.getElementsByTagName('input');
	for(var i=0; i<elements.length; i++)
	{
		if(elements[i].type == 'checkbox')
		{
		  if(elements[i].checked==false){
			elements[i].checked=true;
		  }


		}
	}	
}
function switchAll(form1,status)			//反选
{
	var elements = form1.getElementsByTagName('input');
	for(var i=0; i<elements.length; i++)
	{
		if(elements[i].type == 'checkbox')
		{
		  if(elements[i].checked==true){
			elements[i].checked=false;
		  }else if(elements[i].checked==false){
			elements[i].checked=true;

			}
		}
	}	
} 
</script>
{/literal}
</head>
<body>
<div id="page">
		<div id="content">
			<div class="post">
				<h2 class="title"><a href="#">查看文章 </a></h2>
				<div style="clear: both;">&nbsp;</div>
				<div class="entry">
 <form method="POST" action="delManyNews.php" name="form1" id="form1">
<table border="1">
<tr>
<td width="4%">选项</td>
<td>ID</td>
<td>标题</td>
<td>添加时间</td>
<td>相关操作</td>
</tr>
{section name=n loop=$row}
 <tr>
<td><input type="checkbox" name="check[]" id="check[]" value="{$row[n].newsId}"/></td>
<td>{$row[n].newsId}</td>
<td>{$row[n].title}</td>
<td>{$row[n].addtime}</td>
<td><a href="../show.php?newsId={$row[n].newsId}" target="_blank">查看</a>&nbsp;<a href="admin.php?act=editNews&newsId={$row[n].newsId}">修改</a>&nbsp;
<a href="admin.php?act=delOneNews&newsId={$row[n].newsId}">删除</a></td>
</tr>
{/section}
</table>
<br>
<div align="center">
<a href="#"><span onclick="checkAll(form1,status)">全选</span></a>
<a href="#"<span onclick="switchAll(form1,status)">反选</span></a>
<a href="#"><span onclick="uncheckAll(form1,status)">不选</span></a>
<input type="submit" name="del" id="del" value="删除"/>
<br>
<br>
{$pageBar}
</div>
</form>
				</div>
			</div>
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->