<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>批量删除数据</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style type="text/css">
<!--
body,td,th{
font-size:13px;
}
-->
</style>
<script type='text/javascript'>
function del(){
if(!window.confirm('你是否要删除数据?')){
return false;
}
function chek(){
var leng = 3;
if(leng==undefined){
leng=1;
if(!form1.chk.checked)
document.form1.chk.checked=true;
else
document.form1.chk.checked=false;
}else{
for( var i = 0; i < leng; i++)
{
if(!form1.chk[i].checked)
document.form1.chk[i].checked = true;
else
document.form1.chk[i].checked = false;
}
}
return false;
}
</script><?php
$conn=mysql_connect("localhost","root","123456");
mysql_query("set names gb2312");
mysql_select_db("db_mingrisoft");
?>
</head>
<body>
<center>
<table width="90%" height="108" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td align="center" valign="middle" height="108" background="images/banner.jpg"> </td>
</tr>
<tr>
<td>
<table width="100%" height="30" border="1" cellpadding="0" cellspacing="0" background="link.jpg">
<tr>
<td align="center" valign="middle">
<?php
echo date('Y-m-d')." ".date(l);
?>
</td>
<td align="center" valign="middle"><a href="index1408.php?action=show">浏览目录</a></td>
<td align="center" valign="middle"><a href="#">添加图书</a></td>
<td align="center" valign="middle"><a href="#">简单查询</a></td>
<td align="center" valign="middle"><a href="#">高级查询</a></td>
<td align="center" valign="middle"><a href="#">分组统计</a></td>
<td align="center" valign="middle"><a href="#">退出系统</a></td>
</tr>
</table>
</td></tr></table>
<?php
if(($action==null)or($_GET[action]=="show"))
{
?>
<form name="form1" id="form1" method="post">
<table width="90%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"> </td>
<?php
$sqlstr="select * from tb_mrbook order by id";
$result=mysql_query($sqlstr,$conn);
while($field=mysql_fetch_field($result)){
echo"<td align='center' valign='middle'>$field->name</td>";
}
echo"<td align='center' valign='middle'>操作</td>";
echo "</tr>";
while($row=mysql_fetch_row($result)){
echo "<tr>";
echo "<td aling='center' valign='middle'>";
echo "<input type='checkbox' name='chk[]' value=".$row[0].">";