📄 b06d3120c943001c10a7955decf26de8
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page import="hall.products"%>
<%@ page import="hall.orderItem"%>
<jsp:useBean id="serchProduct" class="hall.opProduct" scope="page"></jsp:useBean>
<jsp:useBean id="buyBean" class = "hall.opBasket" scope="page"> </jsp:useBean>
<HTML>
<HEAD>
<TITLE>NWPU Online Shop</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content= 该网站为方便西工大教学职工,出售各类手机产品 name=description>
<META content=西北工业大学网上购物-手机系统 name=keywords>
<LINK href="images/css.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.STYLE5 {font-size: 18px}
.STYLE8 {font-size: 14pt}
.STYLE9 {font-weight: bold}
-->
</style>
</HEAD>
<BODY text=#000000 bgProperties=fixed leftMargin=0 background=images/background.gif topMargin=0 onLoad="MM_preloadImages('IMAGES/skin8/dh-new.gif','IMAGES/skin8/dh-bbs.gif')">
<CENTER>
<TABLE class=grayline cellSpacing=0 cellPadding=0 width=760 align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD background=images/topbggreen.gif colSpan=3
height=20></TD>
</TR>
<TR>
<TD width=207 rowSpan=3><p class="STYLE5"><img src="images/logo2.jpg" width="201" height="168"></p>
<p class="STYLE5"> </p> </TD>
<TD align=right width=16 height=21><IMG height=21
src="images/topsan.gif" width=16 border=0></TD>
<TD width=535>
<TABLE height=21 cellSpacing=0 cellPadding=0
background=images/topbggreen.gif border=0>
<TBODY>
<TR>
<TD align=right width=420 height=21> 购物车 | 收藏箱 | 用户中心 | 网站帮助 | 在线留言 | 退出登陆 </TD>
</TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=center align=right colSpan=2 height=25>
<MARQUEE id=zimu onmouseover=zimu.stop() onmouseout=zimu.start()
scrollDelay=200 align="middle">
<FONT
color=#333333>庆祝香港回归十周年大酬宾!</FONT>
</MARQUEE></TD></TR>
<TR>
<TD vAlign=bottom align=right colSpan=2 height=40><img alt=网站首页
src="images/dh-home1.gif" border=0
name=menu1><img alt=关于我们
src="images/dh-about1.gif" border=0
name=menu2><img alt=新品速递
src="images/dh-new1.gif" border=0
name=menu3><IMG alt=热力推荐
src="images/dh-good1.gif" border=0
name=menu4><IMG alt=热卖排行
src="images/dh-hot1.gif" border=0
name=menu5><IMG alt=特价促销
src="images/dh-tejia1.gif" border=0
name=menu6><IMG alt=留言反馈
src="images/dh-book1.gif" border=0
name=menu8></TD>
</TR></TBODY></TABLE>
<TABLE class=grayline cellSpacing=0 cellPadding=0 width=760 align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD align=middle width=760><a href="http://www.web600.net/"><img
alt=轻松打造属于自己的购物网站 src="images/banner.gif"
width=758 border=0></a></TD>
</TR></TBODY></TABLE>
<p> </p>
<script type=text/javascript><!--
var LastLeftID = "";
function menuFix() {
var obj = document.getElementById("nav").getElementsByTagName("li");
for (var i=0; i<obj.length; i++) {
obj[i].onmouseover=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onMouseDown=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onMouseUp=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onmouseout=function() {
this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
}
}
}
function DoMenu(emid)
{
var obj = document.getElementById(emid);
obj.className = (obj.className.toLowerCase() == "expanded"?"collapsed":"expanded");
if((LastLeftID!="")&&(emid!=LastLeftID)) //关闭上一个Menu
{
document.getElementById(LastLeftID).className = "collapsed";
}
LastLeftID = emid;
}
function GetMenuID()
{
var MenuID="";
var _paramStr = new String(window.location.href);
var _sharpPos = _paramStr.indexOf("#");
if (_sharpPos >= 0 && _sharpPos < _paramStr.length - 1)
{
_paramStr = _paramStr.substring(_sharpPos + 1, _paramStr.length);
}
else
{
_paramStr = "";
}
if (_paramStr.length > 0)
{
var _paramArr = _paramStr.split("&");
if (_paramArr.length>0)
{
var _paramKeyVal = _paramArr[0].split("=");
if (_paramKeyVal.length>0)
{
MenuID = _paramKeyVal[1];
}
}
/*
if (_paramArr.length>0)
{
var _arr = new Array(_paramArr.length);
}
//取所有#后面的,菜单只需用到Menu
//for (var i = 0; i < _paramArr.length; i++)
{
var _paramKeyVal = _paramArr[i].split('=');
if (_paramKeyVal.length>0)
{
_arr[_paramKeyVal[0]] = _paramKeyVal[1];
}
}
*/
}
if(MenuID!="")
{
DoMenu(MenuID)
}
}
GetMenuID(); //*这两个function的顺序要注意一下,不然在Firefox里GetMenuID()不起效果
menuFix();
--></script>
<script language="javascript" src="/Js/End.js" charset="gb2312"></script>
<!-- 网页尾部结束 -->
<td width="20"><p> </p>
<p> </p>
<p> </p>
<TABLE cellSpacing=0 cellPadding=0 width="100%" hight="90" align=center bgColor=#ffffff border=1>
<TBODY>
<TR>
<TD class=index-td11 vAlign=top width=12 height=12><img src="images/index-img_11.gif" width="12" height="12" /></TD>
<TD class=index-td09></TD>
<TD class=index-td12 vAlign=top width=12 height=12><img src="images/index-img_12.gif" width="12" height="12" /></TD>
</TR>
<TR>
<TD class=index-td11></TD>
<TD vAlign=top>
<%
String name = "";
String id[] = session.getValueNames();
for(int i= 0;i<id.length;i++){
if(!id[i].equals("rand")&&!id[i].equals("basket")){
name = (String)session.getValue(id[i]);
}
}
String produItem = request.getParameter("producItem");
int item = Integer.parseInt(produItem);
String num = request.getParameter("dwNum");
int number = Integer.parseInt(num);
out.println(item);
out.println(number);
buyBean.setSession(session);
if(!buyBean.addnew(item,number)){
%>
<p><a href = "buyinfo.jsp?producItem=<%=item %>">添加到数据库失败,请回去重新填写</a></p>
<%
}else{
Vector buy = (Vector) session.getAttribute("basket");
buyBean.getTotalPrice( buy);
float total = buyBean.getAll_price();
out.println(total);
%>
<form name="buyform" method = "post" action="submitbuy.jsp?total=<%=total %>&userid=<%=name %>" >
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 bgcolor="#003300">
<TBODY>
<TR>
<TD
width="91%" height="52"> <strong><BR>
<span class="STYLE8" color="#ffffff"><font color=white>我的购物车</font></span></strong></TD>
</TR>
</TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 >
<TBODY>
<TR>
<TD class=index-font01> </TD>
</TR>
</TBODY></TABLE>
<TABLE class=index-td20 cellSpacing=3 cellPadding=3 width="75%" bgcolor="#9966FF"
border=1>
<TBODY>
<TR>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"><div align="center"><span class="STYLE9"> 商品序列号</span> </div></TD>
<TD width="20%" height="35" style="PADDING-LEFT: 10px"><div align="center"><span class="STYLE9"> 商品名称</span></div></TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"><div align="center"><span class="STYLE9"> 单价</span> </div></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px"><div align="center"><span class="STYLE9"> 数量</span> </div></TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"><div align="center"><span class="STYLE9"> 小记(元)</span> </div></TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"><div align="center"><span class="STYLE9"> 删除</span> </div></TD>
</TR>
<%
double toatl=0;
for(int i=0;i<buy.size();i++) {
serchProduct.showProduct(((orderItem)buy.get(i)).getProItem());
Vector prod =serchProduct.getProducts();
toatl +=((orderItem)buy.get(i)).getQuantity()*(double)((products)prod.get(0)).getPrice();
%>
<TR>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"><%=((orderItem)buy.get(i)).getProItem() %> </TD>
<TD width="20%" height="35" style="PADDING-LEFT: 10px"> <%=((products)prod.get(0)).getProductorName() %></TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"> <%=((products)prod.get(0)).getPrice() %></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px"> <%=((orderItem)buy.get(i)).getQuantity() %></TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"> <%= ((orderItem)buy.get(i)).getQuantity()*(double)((products)prod.get(0)).getPrice() %></TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"><a href = "deletebuy.jsp?producItem=<%=((orderItem)buy.get(i)).getProItem()%>"> 删除</a></TD>
</TR>
<%
}
%>
<TR>
<TD colspan=2 width="15%" height="35" style="PADDING-LEFT: 10px"> <a href = "afterlogin.jsp?userid=<%=name %>">返回主页</a></TD>
<TD width="20%" height="35" style="PADDING-LEFT: 10px"> </TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px">总价: </TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"><%= toatl %> </TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"></TD>
</TR>
<TR>
<TD align = "left" colspan=6 width="15%" height="35" style="PADDING-LEFT: 10px">请填写你的真实地址,以便于我们发货:</TD>
<TD width="20%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"></TD>
</TR>
<TR>
<TD align = "center" colspan=6 width="100%" height="35" style="PADDING-LEFT: 10px"><input size="75" type= "text" name= "address" ></TD>
<TD width="20%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"></TD>
</TR>
<TR>
<TD align = "right" width="100%" height="35" style="PADDING-LEFT: 10px">邮编:</TD>
<TD colspan =5 align = "left" width="20%" height="35" style="PADDING-LEFT: 10px"><input type= "text" name= "mailcode" ></TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"></TD>
</TR>
<TR>
<TD align = "center" colspan=6 width="15%" height="35" style="PADDING-LEFT: 10px"><input type ="submit" value ="购买"></TD>
<TD width="20%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="12%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="13%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="15%" height="35" style="PADDING-LEFT: 10px"></TD>
<TD width="10%" height="35" style="PADDING-LEFT: 10px"></TD>
</TR>
</TBODY></TABLE>
</form>
<%
}
%>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -