memberview.jsp
来自「JSP的网上商城的代码。只是小部分。希望大家能够多看看。一起学习。」· JSP 代码 · 共 123 行
JSP
123 行
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="" %>
<jsp:directive.page import="com.eshop.daoImpl.MemberDaoImpl"/>
<jsp:directive.page import="com.eshop.dto.Member"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
<!--
.STYLE5 {
color: #FF0000;
font-weight: bold;
}
.STYLE8 {color: #CC0000}
.STYLE9 {color: #000066}
.STYLE22 {font-family: "Times New Roman", Times, serif; font-size: 12px; }
#Layer1 {
position:absolute;
left:55px;
top:14px;
width:520px;
height:44px;
z-index:1;
}
.STYLE23 {color: #000000}
body {
background-color: #99FFFF;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>MemberView</title>
</head>
<body>
<%
String admin = (String)session.getAttribute("AdminId");
if(admin != null){
%>
<table width="603" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="82"><a href=GoodsAdd.jsp class="STYLE3" >添加商品</a></td>
<td width="82"><a href=GoodsView.jsp class="STYLE3" >查看商品</a></td>
<td width="82"><a href=MemberView.jsp class="STYLE3" >查看会员</a></td>
<td width="82"><a href=MemberSeach.jsp class="STYLE3" >查找会员</a></td>
<td width="102"><a href=order_list.jsp class="STYLE3" >查看所有订单</a></td>
<td width="121"><a href=orderundo.jsp class="STYLE3" >查看未完成订单</a></td>
<td width="52"><a href=index.jsp class="STYLE3" > 返回</a></td>
</tr>
</table>
<%
}
else{
response.sendRedirect("backlogin.jsp");
}
%>
<%@include file="MemberSeach.jsp" %>
<%
// String admin = (String)session.getAttribute("AdminId");
if(admin != null){
Vector list = new Vector();
MemberDaoImpl mdi = new MemberDaoImpl();
list = mdi.selectAll();
for(int i= 0;i < list.size();i++)
{ Member m = new Member();
m = (Member)list.elementAt(i);
%>
</p>
</p>
<table width="893" border="0" align="center" cellpadding="0" cellspacing="1" bordercolordark="#0000FF" bgcolor="#ECFFFF" >
<!--DWLayoutTable-->
<tr>
<td width="184" height="22" bgcolor="#8CEBF0" ><span class="STYLE22">用户名: <span class="STYLE23"><%=m.getUserName()%></span></span></td>
<td colspan="2" bgcolor="#8CEBF0"><span class="STYLE22">密码: <span class="STYLE23"><%=m.getPasswd()%></span></span></td>
<td width="111" bgcolor="#8CEBF0"><span class="STYLE22">真实姓名: <span class="STYLE8"><%=m.getTrueName()%></span></span></td>
<td colspan="3" bgcolor="#8CEBF0"><span class="STYLE22">邮政编码: <span class="STYLE5"><%=m.getPostcode() %></span></span></td>
</tr>
<tr>
<td height="30" colspan="7" bgcolor="#66FFFF"><p class="STYLE22">地址: <%=m.getAddress() %></p></td>
</tr>
<tr>
<td height="21"><span class="STYLE22">电话: <span class="STYLE9"><%=m.getTel() %></span></span></td>
<td width="223"><span class="STYLE22">电子邮箱:<span class="STYLE8"> <%=m.getEmail() %></span></span></td>
<td width="223"><span class="STYLE22">帐户余额:<span class="STYLE9"><%=m.getMoney() %></span></span></td>
<td width="111"> </td>
<td width="121" valign="top" class="STYLE22"><a href="MemberDel.jsp?id=<%=m.getUserName()%>"> 删除</a></td>
<td width="49"> </td>
</tr>
</table>
<%} %>
<FORM Action="MemberView.jsp" Method="GET">
<p>
<%
int PageSize = 10;
int Page = 1;
int totalPage = 1;
int totalrecord = 0;
if(Page != 1) {
out.print(" <A HREF=MemberView.jsp?Page=1>第一页</A>");
out.print(" <A HREF=MemberView.jsp?Page=" + (Page-1) + ">上一页</A>");
}
if(Page != totalPage) {
out.print(" <A HREF=MemberView.jsp?Page=" + (Page+1) + ">下一页</A>");
out.print(" <A HREF=MemberView.jsp?Page=" + totalPage + ">最后一页</A>");
}
%>
</p>
<p align="center">
<span class="STYLE1">输入页数:</span>
<input TYPE="TEXT" Name="Page" SIZE="3">
<span class="STYLE1">页数:</span><font COLOR="Red"><%=Page%>/<%=totalPage%></font></p>
<p>
</FORM>
<%
}
else{
response.sendRedirect("backlogin.jsp");
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?