⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.jsp

📁 oa rar it is the jsp
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:useBean id="pagination" class="com.accp.oa.dao.imple.PersonDAO"
	scope="session" />

<html>
	<head>

		<title>My JSP 'main.jsp' starting page</title>
		<link href="<%=request.getContextPath()%>/css/style_2.css"
			rel="stylesheet">
		<script type="text/javascript">
			function Jumping()
			{
				 document.form1.submit();
			 	 return ;
			}
			function gotopage(pagenum)
			{
				document.form1.pagenum.value = pagenum;
				document.form1.submit();
			}
		</script>
	</head>

	<body>
		<script type="text/javascript">
	  function myopen(){
	     window.open('<%=request.getContextPath()%>/PersonManager/browepersoninfo.jsp','统计','width=800, height=400');
	  }
	</script>
		<c:if test="${!empty browelist }">
			<%
			out.println("<script language='javascript'>myopen();</script>");
			%>
		</c:if>
		<img border="0" src="<%=request.getContextPath()%>/images/addfav.gif">
		<c:if test="${!empty user_rights}">
			<c:choose>
				<c:when test="${!empty user_rights.id7 }">
					<a
						href="<%=request.getContextPath()%>/servlet/SearchBranchServlet?who=search"
						target="mainName">查询员工</a>
				</c:when>
				<c:otherwise>查询员工
				</c:otherwise>
			</c:choose>
		</c:if>

		<img border="0" src="<%=request.getContextPath()%>/images/addfav.gif">
		<c:if test="${!empty user_rights}">
			<c:choose>
				<c:when test="${!empty user_rights.id4 }">
					<a href="<%=request.getContextPath()%>/servlet/SearchBranchServlet?who=add"
						target="mainName">添加员工</a>
				</c:when>
				<c:otherwise>添加员工
				</c:otherwise>
			</c:choose>
		</c:if>
		&nbsp;&nbsp;
		<img border="0" src="<%=request.getContextPath()%>/images/agent12.gif">
		注:此删除是永久性删除请管理员确认后在执行!!!
		<hr color="#0080c0">
		<table width="100%" border="1" cellspacing="0" cellpadding="0"
				bordercolor="#FFFFFF" bordercolordark="#ffffff"
				bordercolorlight="#EEF2F9">
			<tr bgcolor="#EEF2F9">
				<td align="center" >
					员工编号
				</td>
				<td align="center">
					员工姓名
				</td>
				<td align="center">
					所在部门
				</td>
				<td align="center">
					职务
				</td>
				<td align="center">
					性别
				</td>
				<td align="center">
					学历
				</td>
				<td align="center">
					联系方式
				</td>
				<td align="center">
					操作
				</td>
			</tr>

			<c:if test="${! empty searchlist}">
				<c:forEach items="${searchlist}" var="personbean">
					<tr>
						<td align="center">
							<c:if test="${!empty user_rights}">
								<c:choose>
									<c:when test="${!empty user_rights.id8 }">
										<a
											href="<%=request.getContextPath()%>/BroweServlet?PerID=${personbean.perId }">${personbean.perId}</a>
									</c:when>
									<c:otherwise>${personbean.perId}
				</c:otherwise>
								</c:choose>
							</c:if>

						</td>
						<td align="center">
							${personbean.name}
						</td>
						<td align="center">
							${personbean.branch}
						</td>
						<td align="center">
							${personbean.duty}
						</td>
						<td align="center">
							${personbean.sex}
						</td>
						<td align="center">
							${personbean.diploma}
						</td>
						<td align="center">
							${personbean.tel }
						</td>
						<td align="center">
							<c:if test="${!empty user_rights}">
								<c:choose>
									<c:when test="${!empty user_rights.id5 }">
										<a target="mainName"
											href="<%=request.getContextPath()%>/DisplayUpdatePersonInfoServlet?PerID=${personbean.perId }">修改</a>
									</c:when>
									<c:otherwise>
									修改
				</c:otherwise>
								</c:choose>
							</c:if>
							<c:if test="${!empty user_rights}">
								<c:choose>
									<c:when test="${!empty user_rights.id6 }">
										<a
											href="<%=request.getContextPath()%>/DeletePersonServlet?PerID=${personbean.perId }">
											删除</a>
									</c:when>
									<c:otherwise>
									删除
				</c:otherwise>
								</c:choose>
							</c:if>

						</td>
					</tr>
				</c:forEach>
			</c:if>
		</table>
		<center>
			<form action="<%=request.getContextPath()%>/LoadSearchPersonServlet"
				method="post" name="form1">
				<%
						if (pagination.getTotalpage() != 1) {
						if (pagination.getCurpage() == 1) {
				%>
				首页 上一页
				<%
				} else {
				%>
				<a href="javascript:gotopage(1)" id="s">首页</a>
				<a href="javascript:gotopage(<%=pagination.getCurpage() - 1%>)"
					id="s">上一页</a>
				<%
						}
						if (pagination.getCurpage() == pagination.getTotalpage()) {
				%>
				下一页 尾页
				<%
				} else {
				%>
				<a href="javascript:gotopage(<%=pagination.getCurpage() + 1%>)"
					id="s">下一页</a>
				<a href="javascript:gotopage(<%=pagination.getTotalpage()%>)" id="s">尾页</a>
				<%
				}
				%>
				<select name="pagenum" onchange="Jumping()">
					<%
								for (int i = 1; i <= pagination.getTotalpage(); i++) {

								if (i == pagination.getCurpage()) {
					%>
					<OPTION selected value="<%=i%>">
						<%=i%>
					</OPTION>
					<%
					} else {
					%>
					<OPTION value="<%=i%>">
						<%=i%>
					</OPTION>
					<%
							}
							}
					%>
				</select>
				<%
				}
				%>
				<input type="hidden" value="跳转页面" name="judge">
			</form>
		</center>
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -