📄 userlist.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tb.log.model.po.Dept"%>
<%@page import="com.tb.log.model.po.Pro"%>
<%@page import="com.tb.log.model.po.User"%>
<%@page import="com.tb.log.util.pages.PageBean"%>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<script language="JavaScript" src="js/Date.js"></script>
<title>My JSP 'loglist.jsp' starting page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<STYLE type=text/css>
BODY {
FONT-SIZE: 12px;
FONT-FAMILY: 宋体;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
}
A {
FONT: 12px 宋体; COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #428eff
}
TD {
FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: 宋体
}
TH {
FONT-WEIGHT: bold; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(images/admin_bg_1.gif); COLOR: white; BACKGROUND-COLOR: #4455aa
}
.tableBorder {
BORDER-RIGHT: #6595d6 1px solid; BORDER-TOP: #6595d6 1px solid; BORDER-LEFT: #6595d6 1px solid; BORDER-BOTTOM: #6595d6 1px solid; BACKGROUND-COLOR: #BAD6EE}
INPUT {
FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: Tahoma,Verdana,宋体
}
SELECT {
FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: Tahoma,Verdana,宋体
}
.div_navi {
background-image: url(left.files/pic90.gif);
width: 1025px;
font-size: 14px;
font-weight: normal;
position: absolute;
height: 30px;
text-align: left;
line-height: 30px;
}
TEXTAREA {
FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: Tahoma,Verdana,宋体
}
.STYLE3 {
font-size: 18px;
}
.div_body {
font-family: "宋体";
font-size: 16px;
font-weight: normal;
color: #FFFFFF;
background-color: #FFFFFF;
position: absolute;
height: auto;
width: 90%;
left: 34px;
top: 85px;
text-align: center;
}
.div_body_table {
height: 100%;
width: 100%;
border: 1px solid #003366;
}
.table {
font-family: "宋体";
font-size: 18px;
text-align: center;
height:auto;
width:100%;
border:1px;
background:#CCCCCC;
}
.STYLE4 {font-size: 18}
.submit_text {
height: 100%;
width: 100%;
}
.div_find {
height: 38px;
width: 90%;
position: absolute;
font-size: 16px;
top: 45px;
vertical-align: middle;
left: 34px;
}
.div_find_table {
height: 100%;
width: 100%;
}
</STYLE>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<script type="text/javascript">
function submitByPage(n){
//alert(n);
document.getElementById('page').value=n;
document.getElementById('form1').submit();
}
</script>
<BODY bottomMargin=0 gcolor="#EEF4FF" gColor=#ddeeff >
<!--<table width="101%" height="30" border=0 align=center cellPadding=0 cellSpacing=0 >
<TBODY>
<TR>
<TD width="100%" vAlign=top background="left.files/pic90.gif" ><span class="STYLE3" ><br> 当前位置:用户管理>>用户列表</span></TD>
</TR></TBODY></table>-->
<div class="div_navi"> 当前位置:日志管理>>我的日志</div>
<div class="div_find ">
<form method="post" action="user.do?type=query" id="form1" name="form1">
<!-- 该表单用于模糊查询及条件查询 -->
<table bgcolor="#D6DFF7" class="div_find_table">
<tr>
<td width="92">
<span class="STYLE5">请选择查询条件:</span> </td>
<td width="244">
部门
<select id="supper_id" name="supper_id">
<option value="">--选择班级--</option>
<% String supper_id = "";
supper_id = (String)request.getAttribute("supper_id");
List sdept=(List)request.getAttribute("sdeptName");
Dept sdb =null;
for(int i=0;i<sdept.size();i++){
sdb = (Dept)sdept.get(i);
if(Integer.toString(sdb.getDept_id()).equals(supper_id)){
%>
<option value="<%=sdb.getDept_id() %>" selected="selected"><%=sdb.getDept_name() %></option>
<%}else{ %>
<option value="<%=sdb.getDept_id() %>" ><%=sdb.getDept_name() %></option>
<%}} %>
</select>
<select id="dept_name" name="dept_name">
<option value="">--选择小组--</option>
<% String dept_name = "";
dept_name = (String)request.getAttribute("dept_name");
List udept=(List)request.getAttribute("deptName");
Dept udb = null;
for(int i=0;i<udept.size();i++){
udb = (Dept)udept.get(i);
if(udb.getDept_name().equals(dept_name)){
%>
<option value="<%=udb.getDept_name() %>" selected="selected"><%=udb.getDept_name() %></option>
<%} else{%>
<option value="<%=udb.getDept_name() %>"><%=udb.getDept_name() %></option>
<%}} %>
</select>
</td>
<td width="181">
项目
<select id="pro_name" name="pro_name">
<option value="">--选择项目--</option>
<%String pro_name = "";
pro_name = (String)request.getAttribute("pro_name");
List proList = (List)request.getAttribute("proList");
Pro proName = null;
for(int i=0;i<proList.size();i++){
proName = (Pro)proList.get(i);
if(proName.getPro_name().equals(pro_name)){
%>
<option value="<%=proName.getPro_name() %>" selected="selected"><%=proName.getPro_name() %></option>
<%} else{%>
<option value="<%=proName.getPro_name() %>" ><%=proName.getPro_name() %></option>
<%}} %>
</select>
</td>
<td width="148">
职位
<select id="grade" name="grade">
<option value="">--选择职位--</option>
<%
String sGrade = "";
sGrade = (String)request.getAttribute("grade");
String[] grade = new String[4];
grade[0] = "管理员";
grade[1] = "班长";
grade[2] = "组长";
grade[3] = "组员";
for(int i=0;i<grade.length;i++){
if(grade[i].equals(sGrade)){
%>
<option value="<%=grade[i] %>" selected="selected"><%=grade[i] %></option>
<%}else{ %>
<option value="<%=grade[i] %>"><%=grade[i] %></option>
<%}} %>
</select>
</td>
<td width="155">
姓名
<input name="user_name" type="text" size="15" value="${uName }">
</td>
<td width="91">
<span class="STYLE5">
<label>
<input type="hidden" value="${pg.currentPage }" id="page" name="page">
<input type="submit" value="搜索">
</label> </span>
</td>
</tr>
</table>
</form>
</div>
<div class="div_body">
<table width="100%" border="1" align="right" cellspacing="" bgcolor="#CCCCCC" class="table">
<tr>
<td height="40" colspan="8" align="center" bgcolor="#D6DFF7" >
<p align="center" class="STYLE3" >用户列表</p></td>
</tr>
<tr>
<td height="36" bgcolor="#799AE1" width="11%" ><p >学号</p></td>
<td bgcolor="#799AE1" width="12%"><p >姓名</p></td>
<td bgcolor="#799AE1" width="14%"><p >所属部门</p></td>
<td bgcolor="#799AE1" width="11%">职位</td>
<td bgcolor="#799AE1" width="24%"><p >负责项目</p></td>
<td bgcolor="#799AE1" width="13%"><p >当前状态</p></td>
<!--td bgcolor="#799AE1" width="12%"><p >日志完成情况</p></td-->
<td bgcolor="#799AE1"><p >相关操作</p></td>
</tr>
<% List userList= (List)request.getAttribute("userList");
User user= null;
Dept dept = null;
List userProList = null;
Pro pro = null;
for(int i=0;i<userList.size();i=i+3){
user = (User)userList.get(i);
dept = (Dept)userList.get(i+1);
userProList = (List)userList.get(i+2);
%>
<tr>
<td width="9%" height="36" bgcolor="#FFFFFF"><%=user.getStu_id() %></td>
<td bgcolor="#FFFFFF"><%=user.getUser_name() %></td>
<td bgcolor="#FFFFFF"><%=dept.getDept_name() %></td>
<td bgcolor="#FFFFFF"><%=user.getGrade() %></td>
<td bgcolor="#FFFFFF">
<% for(int j=0;j<userProList.size();j++){
pro = (Pro)userProList.get(j);
out.print(pro.getPro_name()+" ");
}
%>
</td>
<td bgcolor="#FFFFFF"><%=dept.getDept_state() %></td>
<td bgcolor="#FFFFFF"><p >
<a href="user.do?type=getEditInfo&user_id=<%=user.getUser_id() %>&dept_id=<%=user.getDeptid() %> ">修改</a>/
<a href="log.do?type=checklog&page=1&user_name=<%=user.getUser_name() %>">审核</a>
</p></td>
</tr>
<%} %>
<tr>
<%PageBean pg = (PageBean) request.getAttribute("pg");%>
<td height="38" colspan="8" bgcolor="#D6DFF7">
<div align="right">
当前第${pg.currentPage }页/总共${pg.totalPages}页 共${pg.totalResults}条记录
<a href="javascript:void(-1)" onClick="submitByPage(1)" >首页</a>
<%if (pg.hasPreviousPage()) {%>
<a href="javascript:void(-1)" onClick="submitByPage(${pg.currentPage-1 })">上一页</a>
<%}if (pg.hasNextPage()){%>
<a href="javascript:void(-1)" onClick="submitByPage(${pg.currentPage+1 })">下一页</a>
<%}%>
<a href="javascript:void(-1)" onClick="submitByPage(${pg.totalPages})">尾页</a>
到第
<select name="currentPage" id="currentPage" onChange="nextPage()">
<c:forEach var="i" begin="0" end="${pg.totalPages}">
<c:choose>
<c:when test="${pg.currentPage==i}">
<option value="${i}" selected>${i}</option></c:when>
<c:otherwise>
<option value="${i}">${i}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
页
</div>
</td>
</tr>
</table>
</div>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -