<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<!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>
<style type="text/css">
td {
text-align: center;
}a {
text-decoration: none;
}#antiAll,#delAll,#cancelAll,#all {
width: 80px;
height: 28px;
line-height: 25px;
margin-left: 100px;
text-align: center;
}
</style> <script>
$(document).ready(function() {
var state = '${state}';
$("#state").val(state); var visitType = '${visitType}';
$("#visitType").val(visitType); /*全选*/
$("#all").click(function() {

$("input[name='checkbox1']").each(function() {
$(this).attr("checked", true);
}); }); /*取消选中*/
$("#cancelAll").click(function() {
$("input[name='checkbox1']").each(function() {
$(this).attr("checked", false);
});
}); /*反向选择*/
$("#antiAll").click(function() {
$("input[name='checkbox1']").each(function() {
$(this).attr("checked", !this.checked);
});
}); });

/*删除选中项*/
function delAll() {
var ret = window.confirm('确认删除吗?记录删除后无法恢复!');
if (ret == true) {
var value = "";
$("input[name='checkbox1']").each(function() {
if ($(this).attr("checked") == "checked") {
value = value + $(this).val() + " ";
}
});
window.location.href = "servlet/ClientServlet?action=deleteById&clientId="
+ value;
}
}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>行程安排</title>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<link type="text/css" rel="stylesheet" href="../css/many.css" /> </head>


<body style="margin: 0px; background-color: #E5E5E5; font-family: 黑体;">
<div
style="width: 828px; height: 750px; background-color: white; margin: 20px auto;">
<div
style="width: 828px; height: 50px; background-color: #F4F7FD; line-height: 45px;">
&nbsp;&nbsp;
<font color="gray" size="+2">员工信息</font>
</div>
<div
style="width: 828px; height: 50px; background-color: white; line-height: 45px;">
<form action="UserServlet?action=userList" name="myForm"
method="post">
<div align="right" style="margin-right: 100px;">
<a href="../addUser.jsp">添加员工</a> 查询条件
<select>
<option>
按姓名查询
</option>
</select>
<input type="text" name="title" />
<input type="submit" value="查询" />
<a href="#">导入员工</a>&nbsp;&nbsp;
<a href="#">导出员工</a>
</div>
</form>
<hr width="880px" /> <pg:pager maxPageItems="1" url="./user_List.jsp">
<table width="800" border="0" align="center">
<tr>
<th>
选择
</th>
<th>
编号
</th>
<th>
姓名
</th>
<th>
手机号码
</th>
<th>
邮箱
</th>
<th>
工作记录
</th>
<th>
操作
</th>
</tr>
<c:forEach var="user" items="${listuser}">
<tr>
<td>
<input type="checkbox" name="checkbox2" id="checkbox2" />
</td>
<td>
${user.userId}
</td>
<td>
${user.userName}
</td>
<td>
${user.telephone}
</td>
<td>
${user.email}
</td>
<td>
<a href="../work_Schedule.html">查看</a>
</td>
<td>
<a
href="UserServlet?action=updateUserInfo&userName=${user.userName }&">[修改]</a><a
href="javascript:if(confirm('确认要删除?'))
             location='UserServlet?action=deluser&&del=${user.userId}'">[删除]</a>
</td>
</tr>
</c:forEach>
</table> <hr width="828px" />
<div align="center">
<pg:index>
<td><pg:first>
<a href="${pageUrl}">第一页</a>
</pg:first></td>
<td><pg:prev>
<a href="${pageUrl}">上一页</a>
</pg:prev></td>
<td colspan="2"><pg:pages>
<a href="${pageUrl}">[${pageNumber}]</a>
</pg:pages></td>
<td><pg:next>
<a href="${pageUrl}">下一页</a>
</pg:next></td>
<td><pg:last>
<a href="${pageUrl}">最后一页</a>
</pg:last></td>
</pg:index>
</div>
</pg:pager>
<hr width="828px" />
<div align="center">
<input type="button" value="全选" id="all" />
<input type="button" value="反选" id="cancelAll" />
<input type="button" value="取消选中" id="antiAll" />
<input type="button" value="删除选中" onclick="return delAll();"
id="delAll" />
</div>
</div>
</div>
</body>
</html>