<%@page import="com.cn.controller.Manager"%>
<%@ page language="java" import="java.util.*,com.cn.service.News" pageEncoding="utf-8"%><%
String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";%><html><head><title>用户查询</title><link rel="stylesheet" type="text/css" href="<%=basePath%>css/cs.css"><script type="text/javascript" src="<%=basePath%>js/delete.js"></script></head><body> <form action="<%=basePath%>UpdateServlet" method="post"> <TABLE class='cardBody'> <tr> <td class='listTitleMain'>账号查询 <br> </td> <td colspan=3><font color="red"><%String s=( String)request.getAttribute("type"); if(s!=null){ out.print(s); } %></font></td> </tr> <tr> <td class='cardOddlineLabel'>账号</td> <td class='cardOddlineData'><input type=text class="defaultInput" name="account"></td> <td class='cardOddlineLabel'>姓名</td> <td class='cardOddlineData'><input type=text class="defaultInput" name="username"></td> </tr> <tr> <td class='cardFooter' colspan="4"><input type="submit" value="查询"></td> </tr> <% List list = (List) request.getAttribute("Manager"); if (list != null) { %> <tr> </table> </form> <form action="<%=basePath%>UpdateServlet" method="get"> <table class='cardBody'> <tr> <td class='cardOddlineLabel'>Id</td> <td class='cardOddlineLabel'>账号</td> <td class='cardOddlineLabel'>姓名</td> <td class='cardOddlineLabel'>权限</td> <td class='cardOddlineLabel'>修改权限</td> </tr> <% for (int i = 0; i < list.size(); i++) { Manager news = (Manager) list.get(i); %> <tr> <td><%=news.getId()%></td> <td><%=news.getUseraccount()%></td> <td><%=news.getName()%></td> <td> <% String job=news.getType(); String job1[]=new String[2]; job1[Integer.parseInt(job)]="selected"; %> <select name="type"> <option value="0" <%=job1[0] %>>管理员</option> <option value="1" <%=job1[1] %>>普通用户</option> </select> </td> <td> <input type="hidden" value="<%=news.getId() %>" name="id"> <input type="submit" value="修改权限"> </td> </tr> <% } } %> </table> </form></body></html>