📄 displaypeople.jsp
字号:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="to.model.People.*"%>
<%@ page import="java.util.*"%>
<%@ page import="to.model.Login.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>人员列表显示</title>
<style type="text/css">
table{font-size:13px}
<!--
a:link { text-decoration: none;color: black}
a:active { text-decoration:blink;}
a:hover {text-decoration: underline;position: relative; top: 3px; left: 3px; color: red}
a:visited { text-decoration:none;color: black}
-->
</style>
</head>
<body>
<form>
<table cellspacing="1" cellpadding="1" border="0" width="800" align="center">
<%
loginItem li=(loginItem)session.getAttribute("user");
if(li==null)
{
response.sendRedirect("OfficeLogin.jsp");
}
if(!(li.getRoleName().equals("系统管理员")))
{
response.sendRedirect("Error2.jsp");
}
%>
<tr>
<td colspan="7" height="1"><hr/></td>
</tr>
<tr>
<th colspan="6" align="center">已有人员列表</th>
<td colspan="1" align="center" width="156"><font color="Red"><img src="image/arr.gif"/><a href="newPeople.jsp"/>添加新人员</font></td>
</tr>
<tr bgcolor="#006699">
<th width="121" align="center"><font color="White">工作证号</font></th>
<th width="351" align="center"><font color="White">用户姓名</font></th>
<th width="351" align="center"><font color="White">所属单位</font></th>
<th width="351" align="center"><font color="White">所属系所</font></th>
<th width="157" align="center"><font color="White">查看</font></th>
<th width="157" align="center"><font color="White">修改</font></th>
<th width="156" align="center"><font color="White">删除</font></th>
</tr>
<%
PeopleBean pb=new PeopleBean();
Collection c=pb.selectPeople();
Iterator it=c.iterator();
while(it.hasNext())
{
PeopleItem pi=(PeopleItem)it.next();
int peopleid=pi.getPeopleID();
%>
<tr bgcolor="#ddddee">
<td width="121" align="center"><%=pi.getUserName()%></td>
<td width="121" align="center"><%=pi.getPeopleName()%></td>
<td width="121" align="center"><%=pi.getDepartmentName()%></td>
<td width="351" align="center"><%=pi.getCollegeName()%></td>
<td width="157" align="center"><font color="Blue"><img src="image/arr.gif"/><a href="FindPeopleAction.do?id=<%=peopleid%>">查看</a></font></td>
<td width="157" align="center"><font color="Blue"><img src="image/arr.gif"/><a href="EditPeopleAction.do?id=<%=peopleid%>">修改</a></font></td>
<td width="156" align="center"><font color="Blue"><img src="image/arr.gif"/><a href="DeletePeopleAction.do?id=<%=peopleid%>">删除</a></font></td>
</tr>
<%
}
%>
<tr>
<td colspan="7" height="1"><hr/></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -