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

📄 usercenter.jsp

📁 基于JSP的网上花店系统。工作量符合本科毕业设计水准1
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>淳.清凉花坊</title>
<meta name="keywords" content="淳.清凉花坊">
<meta name="description" content="淳.清凉花坊">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/css/css.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.style11 {color: #006633}
.style13 {
	font-size: 12px;
	color: #FFFFFF;
}
.style15 {
	color: #660000;
	font-size: 14px;
	font-weight: bold;
}
.style16 {font-size: 12px}
.style17 {color: #006633; font-size: 12px; }
-->
</style>
</head>
<%! //处理字符串的常用方法
   public String getString(String s) {
            if(s == null)   s = "";
            try{
                 byte a[] = s.getBytes("ISO-8859-1");
                       s = new String(a);
                } 
            catch(Exception e) {  }
            return s;
          }
    %>
<%
      String userid= (String)session.getAttribute("userid");
      String password= (String)session.getAttribute("password");
      userid=getString(userid);
      password=getString(password);

if (session.getValue("userid") == null||"".equals(session.getValue("userid"))){
%>
   <script language="javascript">
	 alert("您还没有登陆!");
	 window.location.href ="login.jsp";

   </script>
<%
   
	 }
  else { 
      Connection con=null;
      Statement sql=null;
      ResultSet rs=null;
      try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }
       catch(ClassNotFoundException event) { }
       try {  
         con=DriverManager.getConnection("jdbc:odbc:sun","sa","");
          sql=con.createStatement();
          String condition="select * from uuser where userid='"+userid+"' and password='"+password+"'";
          rs =sql.executeQuery(condition);
     
       while(rs.next())
		 {
		   String id=rs.getString("userid");
		   String psw=rs.getString("password");
		   session.setAttribute("userid",id);
	       session.setAttribute("password",psw);
		   String realname=rs.getString("username");
		   String sex=rs.getString("sex");
		   String phone=rs.getString("phone");
		   String email=rs.getString("email");
		   int vip=rs.getInt("vip_class");
		   
%>  
  
 
 
 <body bgcolor="#FFFFFF" >

  <table width="858" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="127" align="left" valign="top"><p> </p>
      <p> </p>
      <p> </p>
      <p align="left" class="style15"> <img src="images/6xiang_06.gif" width="29" height="27">会员中心</p>
      <p align="left"><img src="images/arrow_car.gif" width="15" height="15"><span class="style13"><a href="order[1].jsp" class="style11">我的订单记录</a></span></p>
      <p align="left"><img src="images/arrow_car.gif" width="15" height="15"><a href="cart.jsp" class="style11 style16">我的购物车</a></p>
      <p align="left"><img src="images/arrow_car.gif" width="15" height="15"><a href="userinfo.jsp" class="style17">我的注册信息</a></p>
      <p align="left"><img src="images/arrow_car.gif" width="15" height="15"><span class="style11"><a href="modify_info.jsp" class="style17">修改我的资料</a></span></p>
      <p align="left"><img src="images/arrow_car.gif" width="15" height="15"><a href="user_modPsw.jsp" class="style17">修改登陆密码</a></p>
      <p align="left"><img src="images/arrow_car.gif" width="15" height="15"><a href="index.jsp" class="style17">退出会员中心</a> </p>
      <div align="left">
        <table id="Table_06" width="100%" height="274" border="0" cellpadding="0" cellspacing="0">
          <tr> </tr>
          <tr> </tr>
          <tr> </tr>
        </table>
    </div></td>
    <td width="731" align="center" valign="top">
      <table width="100%" height="455" border="0" cellpadding="0" cellspacing="0" id="Table_06">
        		  			
        <tr>
          <td height="455" colspan="3" align="center" valign="top">
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
				   <tr>
				  <td  height="25"> 
					<img src="images/3_img4.jpg" width="112" height="115" align="absmiddle" > 您的位置:<a href="index.jsp">HOME</a> &gt;&gt; 会员中心</td>
				  </tr>
				<tr>
				  <td height="2" bgcolor="#108300"></td>			 
				</tr>			  
		    </table>			 
		    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr>
                <td  height="39" align="center" class="style11" ><span class="style9">			      <%=realname%><%=sex%>,欢迎您!您已成功登录花坊会员中心!</td>             
			  </tr>
				 <tr>
                  <td height="27" class="style4 style16">&nbsp;您的用户名:<font color="red"><%=id%></font></td>
                </tr>
                <tr>
                  <td height="27" class="style4 style16">&nbsp;您的联系电话:<font color="red"><%=phone%></font></td>
                </tr>
                <tr>
                  <td height="24" class="style4 style16">&nbsp;您的会员身份:<font color="red"><%=vip%> </font> (0-普通会员;1-VIP;2-贵宾) </td>
                </tr>
                <tr>
                  <td height="27"> </td>
                </tr>				
                <tr align="center" bgcolor="#EFE7D6">
                  <td height="30" align="center" bgcolor="#EFE7D6" style="background-color: #EFE7D6"><span class="style11">会员优惠信息</span></td>
                </tr>
                <tr>
                  <td height="40"class="style4 style16" >● 注册本站会员购买就可享受优惠价的同时可参加积分,积分多多,优惠多多!</td>
                </tr>
                <tr>
                  <td height="40" class="style4 style16">● <font color="red">问:我如何成为VIP会员</font>? 答:您只要在花坊购物一次,送货完毕后系统会将您自动升为VIP,享受购物9折优惠! </td>
                </tr>
              <tr>
                <td height="40" class="style4 style16"> ● <font color="red">问:我如何成为贵宾会员? </font>答:您只要在花坊购物满<font color="red">¥XXXX</font>,送货完毕后系统会将您自动升为贵宾,享受购物8折优惠! 
				</td>
              </tr>			  
          </table>			 
		    <br>
	      </td>
          
        </tr>
      </table></td>
  </tr>
</table> 
	<%
	
 	      con.close();
		
		}
		
      }
    catch(SQLException e1) { }
	}	
	%>
</body>
</html>

⌨️ 快捷键说明

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