jsp_project_/store//store/WebRoot/MyStore

<%@ page language="java" import="java.util.*,conn.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>登陆</title>
   
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!-- <img src=">-->
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
 <style type="text/css">
  .loginH1
{
  font-family:"新宋体";
  font-size:20px;
  color:#000000;
  font-weight: bold;
}
.loginText
{
    font-family:"新宋体";
 font-size:14px;
 color:#000000;
 font-weight: bold;
}
.cp
{
    font-family:"新宋体";
 font-size:10px;
 color:#000000;
 font-weight: bold;
}
.userIn
{
    font-family:"新宋体";
 font-size:16px;
 color:#000000;
}
.inputText
{
   text-align:center;
   font:"新宋体";
   font-size:14px;
   font-weight:bolder;
   width:120px;
   height:35px
}

#user {
 position:absolute;
 left:161px;
 top:109px;
 width:55px;
 height:41px;
 z-index:1;
}
#Layer1 {
 position:absolute;
 left:246px;
 top:164px;
 width:84px;
 height:35px;
 z-index:2;
}
#Layer2 {
 position:absolute;
 left:261px;
 top:165px;
 width:58px;
 height:31px;
 z-index:2;
}
a
{
    font:Arial, Helvetica, sans-serif;
 font-size:16px;
 font-weight:bold;
 color:#FF0000;
 text-decoration:none 
}
a:hover
{
   font:Arial, Helvetica, sans-serif;
 font-size:16px;
 font-weight:bold;
 color:#FFFF00;
 text-decoration:none 
}
.welcom
{
    font:Arial, Helvetica, sans-serif;
 font-size:16px;
 font-weight:bold;
 color:#ffffcc;
 

</style>

</head>

<body onContextMenu="return false">
<table width="105%" height="130%" border="0" cellpadding="0" cellspacing="0" style="position:absolute; left:0; top:0">
  <tr>
    <td height="112" colspan="2" align="left" valign="bottom"><img src="

file:///D|/project_jsp/Work/Img/logo.jpg" width="180" height="103" /></td>
    <td  width="58%" colspan="2" align="right"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="439" height="112">
        <param name="movie" value="file:///D|/project_jsp/Work/Img/webHeader.swf" />
        <param name="quality" value="high" />
        <embed src="file:///D|/project_jsp/Work/Img/webHeader.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="439" height="112"></embed>
    </object></td>
  </tr>
  <tr>
  <%
     String today =(String) session.getAttribute("date");
     String name =(String)session.getAttribute("UserName");
     session.setAttribute("UserName",name);
     session.setAttribute("date",today);
     if(name==null || name.trim().length()==0)
     {
        response.sendRedirect("ReLogin.jsp");
     }
  %>
    <td  height="25" colspan="4" bgcolor="#CC3300" align="left" class="welcom">今天是<%=today%>,欢迎你,<%=name%></td>
  </tr>
 
  <tr>
    <td width="14%" bgcolor="#3399CC" valign='top' align='left' class="loginText" >
    <br><a href="ModifyUserInfo.jsp"  >修改资料</a><br>
    <br><a href="cart.jsp" >购物车</a>
    <br>
    <HR size=3 width=100%>
    <br>
    <%
       ConnectionDatabase con1 = new ConnectionDatabase();
       Vector vmsg = con1.getQueryDate("select count(*) from PersonMsg where Pname ='"+name+"'  and Type = '0' ");
       String NewMsgCount = ((Vector)vmsg.get(0)).get(0).toString();
    %>
    <br>
    <a href="Pmsg.jsp">我的消息</a>(<%=NewMsgCount %>)
    <br>
    <br><a href="Order.jsp">我的定单</a>
    <br>
    <HR size=3 width=100%>
    <br>我选购的物品
    <%  
     String pageN = request.getParameter("offset");
    if(pageN==null)
     {
     pageN="0";
    }
  
     if(request.getParameter("pid")!=null)
      {
         
          if(session.getAttribute("P")!=null)
          {
              ArrayList a =(ArrayList) session.getAttribute("P");
              if(!a.contains(request.getParameter("pid").substring(0,7)))
              {
              a.add(request.getParameter("pid").substring(0,7));;
              }
              pageN = request.getParameter("pid").substring(7);
              session.setAttribute("P",a);
          }else
          {
             ArrayList a =new ArrayList();            
             a.add(request.getParameter("pid").substring(0,7));
             pageN = request.getParameter("pid").substring(7);
             session.setAttribute("P",a);
          }
      }
      if(session.getAttribute("P")!=null)
      {
           out.print("<br>");
           ArrayList a = (ArrayList) session.getAttribute("P");
           for(int i =0; i <a.size();i++)
           {        
              out.print(a.get(i)+"<br>");
           } 
      }
     
  %>
  
  </td>
   <td height="100%" colspan="3"  align="left" valign="top" bgcolor="#66CCFF">
   <%
      
       ConnectionDatabase con = new ConnectionDatabase();
       Vector tableContent =con.getPage("SELECT PID,PName,Price FROM production",request,pageN);
       out.print("<table align='center' width='100%' height='100%' border=0>");
       int row=0;
       int rowCount=tableContent.size();
       for(int i=0; i < 3;i++)
       {
          out.print("<tr>");
          for(int j=0;j<4;j++)
          {
             out.print("<td align='center' class='cp'>");
             if(row<rowCount)
             {
               Vector v=(Vector)tableContent.get(row);
                row++;
                out.print("<img src='file:///D|/project_jsp/Work/Img/nonePicture.gif' width='100' height='100' /><br>");
                out.print(v.get(1)+"<br>");
                out.print("编号:"+v.get(0)+"<br>");
                out.print("价格:"+v.get(2)+"<br>");
                String fileP = request.getRequestURI();
                String str="";
                str = v.get(0)+pageN;
                    
                out.print("<a href='"+fileP+"?pid="+str+"'>装入购物车</a>");
             }
             out.print("</td>");
          }
           out.print("</tr>");
       }
       out.print("<tr>");
       out.print("<td colspan=4>");
       out.print("<p align='center'><br>");
       out.print(con.pageLenged(Integer.parseInt(pageN)));
       out.print("</p>");
       out.print("</td>");
       out.print("</tr>");
       out.print("</table>");
      
   %>   </td>
  </tr>
  <tr>
   <td  height="13" colspan="4" bgcolor="#CC3300">&nbsp;</td>
  </tr>
 
</table>

</body>
</html>
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值