<% @ page language = " java " contentType = " text/html;charset=gb2312 " %> <% @ page import = " java.sql.* " %> < jsp:useBean id = " connBean " scope = " page " class = " beans.ConnDB " /> < html > < head > < title > 管理员登录成功 </ title > < link href = " ../css/bg_table.css " rel = " stylesheet " type = " text/css " > </ head > < body > <% String username = (String)session.getAttribute( " username " ); String status = (String)session.getAttribute( " status " ); if (username != null && username.length() > 0 && status.equals( " 管理员 " )) ... { ResultSet rs=connBean.executeQuery("select * from user_info order by grade desc,team desc"); String strPage=(String)request.getParameter("intPage"); if(strPage==null)...{ strPage="0"; } int intPageSize=5;//一页显示的记录数 rs.last(); int intRowCount=rs.getRow();//获得总的行数 int intPageCount=(intRowCount%intPageSize==0)?(intRowCount/intPageSize):(intRowCount/intPageSize+1); int intPage=Integer.parseInt(strPage); //显示当前的页数 if(intPage<1)...{ intPage=1; } else...{ if(((intPage-1)*intPageSize+1)>intRowCount)...{ intPage=intPageCount; } } rs.absolute((intPage-1)*intPageSize+1);//定位到指定的位置%> <div align="center"> <h2>Web兴趣小组成员管理系统</h2> <h3>用户信息管理</h3> <form action="detele_selected.jsp" method="post"> <table width="650" border="1" cellpadding="0" cellspacing="0" class="tr_color" style="border-color:black"> <tr style="line-height:20px;font-weight:bold;background-color:#888888;font-size:13px;color:#FFFFFF"> <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><% for(int i=1;i<=intPageSize;i++)...{ int id=rs.getInt("id");%> <tr> <td align="center"><input type="checkbox" name="isChecked" value="<%=id%>"></td> <td align="center"><%=rs.getString("username")%></td> <td align="center"><%=rs.getString("grade")%></td> <td align="center"><%=rs.getString("team")%></td> <td align="center"><%=rs.getString("tel")%></td> <td align="center"><a href="user_info.jsp?username=<%=rs.getString("username")%>">查看</a></td> <td align="center"><a href="modify_user.jsp?username=<%=rs.getString("username")%>">修改</a></td> </tr><%try...{ if(!rs.next())...{break;} }catch(SQLException ex)...{System.err.println(ex);} // }//try{ //if(rs.next()){continue;} //else{break;}//}catch(Exception e){}}%><tr> <td colspan="7"> <table align="center" class="tr_color" width="600"> <tr> <td align="center"><input type="submit" value="删除所选"></td> <td align="center"><input type="button" value="增加用户" onClick="window.location.href='add_user.jsp'"></td> <td align="center"><input type="button" value="查找用户" onClick="window.location.href='search_user.jsp'"></td> <td align="center"><input type="button" value="审核新用户" onClick="window.location.href('examine_user.jsp')"></td> </tr> </table> </td></tr></table></form> 当前页数:[<%=intPage%>/<%=intPageCount%>] <%if(intPage>1)...{%> <a href="show_manager.jsp?intPage=1">第一页</a> <a href="show_manager.jsp?intPage=<%=intPage-1%>">上一页</a><% } if(intPage<intPageCount)...{%> <a href="show_manager.jsp?intPage=<%=intPage+1%>">下一页</a> <a href="show_manager.jsp?intPage=<%=intPageCount%>">最后一页</a> <% }} else ... { out.println("<script language='javascript'>;alert('您没有相应的权限,请先登录!');window.location.href='index.jsp';</script>"); } %> < a href = " logout.jsp " > 退出系统 </ a > </ div > </ body > </ html >