📄 user.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*" %>
<jsp:useBean id="data" scope="page" class="shop.data.conn" />
<%
String admin=(String)session.getValue("admin");
if(admin=="" || admin==null)
{%>
<script language="javascript">
alert("请登陆后再执行管理操作");
self.location="index.jsp";
</script>
<%}else{
String sql="select * from admin where admin='"+admin+"'";
ResultSet rs=data.executeQuery(sql);
if(!rs.next())
{%>
<script language="javascript">
alert("对不起,无此管理员帐号");
history.back();
</script>
<%}}%>
<style type="text/css">
<!-- @import url(../images/css.css); -->
</style>
<%
String id=request.getParameter("id");
String sql="select * from manager where name='"+id+"'";
ResultSet rs=data.executeQuery(sql);
if(rs.next())
{
String sex=rs.getString("sex");
String realname=rs.getString("realname");
String email=rs.getString("email");
String address=rs.getString("address");
String tel=rs.getString("tel");
String brith=rs.getString("brith");
String IDcard=rs.getString("IDcard");
String zipcode=rs.getString("zipcode");
String rate=rs.getString("rate");
if(rate.equals("0"))
{ rate="普通用户"; }
if(rate.equals("1"))
{ rate="VIP用户"; }
int whetherShop=rs.getInt("whetherShop");
int preordainShop=rs.getInt("preordainShop");
String regTime=rs.getString("regTime").substring(0,16);
String mode=rs.getString("mode");
%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#CCCCCC">
<td height="30" colspan="2" bgcolor="3969A5"><div align="center"><font color="#FFFFFF">用户信息</font></div></td>
</tr>
<tr bgcolor="#F2F2F2">
<td colspan="2" bgcolor="#F2F2F2"> <table width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="20" colspan="2"></td>
</tr>
<tr>
<td height="20" width="150"> <div align="center">用户名称:</div></td>
<td width="350"> <font color="#FF0000"><%=id%></font></td>
</tr>
<tr>
<td height="20"> <div align="center">性别;</div></td>
<td width="350"><%=sex%></td>
</tr>
<tr>
<td height="20"> <div align="center">真实姓名:</div></td>
<td width="350"><%=realname%></td>
</tr>
<tr>
<td height="20"> <div align="center">电子邮件:</div></td>
<td width="350"><a href="mailto:<%=email%>"><%=email%></a></td>
</tr>
<tr>
<td height="20"> <div align="center">家庭住址:</div></td>
<td width="350"><%=address%></td>
</tr>
<tr>
<td height="20"> <div align="center">联系电话:</div></td>
<td width="350"><%=tel%></td>
</tr>
<tr>
<td height="20"> <div align="center">出生日期:</div></td>
<td width="350"><%=brith%></td>
</tr>
<tr>
<td height="20"> <div align="center">身份证号码:</div></td>
<td width="350"><%=IDcard%></td>
</tr>
<tr>
<td height="20"> <div align="center">邮政编码:</div></td>
<td width="350"><%=zipcode%></td>
</tr>
<tr>
<td height="20"> <div align="center">用户级别:</div></td>
<td width="350"> <font color="#FF0000"><%=rate%></font></td>
</tr>
<tr>
<td height="20"> <div align="center">是否已购物:</div></td>
<td width="350"> 该用户在本商场共购物<font color="#FF0000"><%=whetherShop%></font>件(单)</td>
</tr>
<tr>
<td height="20"> <div align="center">是否有预定:</div></td>
<td width="350">该用户在本商场共预定商品<font color="#FF0000"><%=preordainShop%></font>件(单)</td>
</tr>
<tr>
<td height="20"><div align="center">注册日期:</div></td>
<td> <%=regTime%></td>
</tr>
<tr>
<td height="20"><div align="center">交易方式: </div></td>
<td><%=mode%></td>
</tr>
<tr>
<td height="15" colspan="2"> </td>
</tr>
<tr>
<td height="20" colspan="2"> <div align="center">
<input type="submit" name="regedit" value=" 关 闭 " onClick="javascript:window.close()" style="background-color:#ECECEC; border-style:1; font-size: 11; color: #000000; font-family: arial, verdana, geneva">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#CCCCCC">
<td height="30" colspan="2" bgcolor="3969A5"></td>
</tr>
</table>
<%}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -