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

📄 userlist.jsp

📁 《JSP通用模块及典型系统开发实例导航》源代码
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GB2312"
	pageEncoding="GB2312"%>
<%@ page import="java.util.Collection,java.util.Iterator"%>
<%@ page import="com.wxpn.tutorial.ec.bean.ECMember"%>
<%@ include file="../include/header.jsp"%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=760 align="center">
	<TBODY>
		<tr>
			<td align="left" height=25><%if (session.getAttribute("username") != null) {
				out.println(session.getAttribute("username"));
			}%> 当前位置:<a href="../index.jsp">首页</a> -&gt; 成员服务</td>
			<td align="right"><%@ include file="../include/date.jsp"%></td>
		</tr>
		<TR bgColor=#3399ff>
			<TD height=1 colspan="2"><IMG height=1 src="images/spacer.gif"
				width=16></TD>
		</TR>
		<tr>
			<td height=10 colspan="2"><IMG height=1 src="images/spacer.gif"
				width=16></td>
		</tr>
	</TBODY>
</TABLE>

<table align="center" border="0" width="760" cellspacing="0"
	cellpadding="0" height="355">
	<tr>
		<td width="150" height="355" valign="top"><%@ include
			file="../include/top_banner.jsp"%></td>
		<td width="10" height="100%"></td>
		<td width="1" height="100%" bgcolor="#3399ff"></td>
		<td width="10" height="100%"></td>
		<td width="589" height="331" valign="top" background="images/bg1.gif">
		<table border="0" width="100%" cellspacing="1" cellpadding="1">
			<tr>
				<td width="100%" colspan="5" bgcolor="#3399ff">&nbsp;<font
					color="#ffffff">成员列表</font></td>
			</tr>
			<tr>
				<td width="10%" bgcolor="#FCFCFC">用户名</td>
				<td width="10%" bgcolor="#FCFCFC">真实姓名</td>
				<td width="15%" bgcolor="#FCFCFC">邮件地址</td>
				<td width="15%" bgcolor="#FCFCFC">性别</td>
				<td width="15%" bgcolor="#FCFCFC">所在省份</td>
			</tr>
			<%if (request.getAttribute("c") == null) {

			%>
			<tr>
				<td width="" 75%"" colspan=5 bgcolor="#FCFCFC" align=center>还没有任何用户。</td>
			</tr>
			<%} else {
				Collection c = (Collection) request.getAttribute("c");
				if (c == null) {

				%>
			<tr>
				<td width="" colspan=5 bgcolor="#FCFCFC" align=center>还没有任何用户。</td>
			</tr>
			<%} else {
					int totalPageNum = ((Integer) (request
							.getAttribute("totalPageNum"))).intValue();
					int currentPage = 1;
					if (request.getParameter("page") != null) {
						currentPage = Integer.parseInt(request
								.getParameter("page"));
					}
					Iterator iterator = c.iterator();
					while (iterator.hasNext()) {
						ECMember member = (ECMember) iterator.next();

						%>
			<tr>
				<td width="10%" bgcolor="#FCFCFC"><a
					href="ShowUserServlet?id=<%=member.getId()%>"><%=member.getUsername()%></a></td>
				<td width="15%" bgcolor="#FCFCFC"><%=member.getRealname()%></td>
				<td width="15%" bgcolor="#FCFCFC"><%=member.getEmail()%></td>
				<td width="5%" bgcolor="#FCFCFC"><%=member.getStrGender()%></td>
				<td width="15%" bgcolor="#FCFCFC"><%=member.getProvince()%></td>
			</tr>
			<%}%>
			<form name="form1" method="get">
			<tr>
				<td width="" colspan=5 align=right bgcolor="#EFEFEF"><%for (int i = 1; i <= totalPageNum; i++) {%>
				<a href="UserListServlet?page=<%=i %>">[<%=i%>]</a> <%}

				%>共[<%=request.getAttribute("totalPageNum") %>]页
				<input type="text" size="2"
					name="page" value=""><input type="submit" name="go" value="Go">
				</td>
			</tr>
			</form>
			<%}
			}

		%>
			<tr>
				<td colspan="2" align="right">&nbsp;</td>

			</tr>

		</table>


		</td>
	</tr>
</table>
<%@ include file="../include/footer.jsp"%>

⌨️ 快捷键说明

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