tuibook.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:21k
源码类别:
Applet
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <jsp:useBean id="productinfoBeans" class="MyFly.Bean.productinfoBeans" scope="request"/>
- <jsp:useBean id="productisnew" class="MyFly.Bean.productisnew" scope="request"/>
- <jsp:useBean id="useclassBeans" class="MyFly.Bean.useclassBeans" scope="request"/>
- <jsp:useBean id="productinfoBean" class="MyFly.Bean.productinfoBean" scope="request"/>
- <jsp:useBean id="characterclassBeans" class="MyFly.Bean.characterclassBeans" scope="request"/>
- <jsp:useBean id="characterclassBean" class="MyFly.Bean.characterclassBean" scope="request"/>
- <script language="javascript" src="js/showimg.js"></script>
- <%@ include file="top.jsp" %>
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.net.*" errorPage="" %>
- <%
- String pageNum=request.getParameter("pageNum");
- //System.out.print(pageNum);
- String pageSize="12";
- productinfoBeans.setPageSize(Integer.parseInt(pageSize));
- productinfoBeans.setPageNum(pageNum);
- productinfoBeans.setProType("tuijian");
- productinfoBeans.init1();
- productinfoBeans.getQueryTuijian(); //精品推荐
- int num=productinfoBeans.getItems();
- int pageCount=productinfoBeans.getPageCount();
- %>
- <%
- int d_count=characterclassBean.getcount();
- %>
- <SCRIPT language=javascript id=clientEventHandlersJS>
- <!--
- var number=<%=d_count%>;
- function LMYC() {
- var lbmc;
- //var treePic;
- for (i=1;i<=number;i++) {
- lbmc = eval('LM' + i);
- //treePic = eval('treePic'+i);
- //treePic.src = 'images/file.gif';
- lbmc.style.display = 'none';
- }
- }
- function ShowFLT(i) {
- lbmc = eval('LM' + i);
- //treePic = eval('treePic' + i)
- if (lbmc.style.display == 'none') {
- LMYC();
- //treePic.src = 'images/nofile.gif';
- lbmc.style.display = '';
- }
- else {
- //treePic.src = 'images/file.gif';
- lbmc.style.display = 'none';
- }
- }
- //-->
- </SCRIPT>
- <HTML><HEAD><TITLE>-精品推荐-</TITLE>
- <META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
- href="image/buyok_shop.css" type=text/css rel=stylesheet>
- <STYLE type=text/css>
- .pic1 {
- MARGIN-TOP: -135px; MARGIN-LEFT: 0px
- }
- .pic2 {
- PADDING-TOP: 6px
- }
- .red1 {
- COLOR: #ff0000
- }
- </STYLE>
- <LINK href="image/table.css" type=text/css rel=stylesheet><LINK
- href="image/buyok_shop.css" type=text/css rel=stylesheet>
- <STYLE type=text/css>
- BODY {
- MARGIN: 0px
- }
- .STYLE1 {
- COLOR: #ff3300
- }
- .STYLE2 {
- COLOR: #ff0000
- }
- .lei1 { FONT-SIZE: 13px
- }
- </STYLE>
- </HEAD>
- <BODY>
- <CENTER>
- <STYLE type=text/css>BODY {
- FONT-SIZE: 12px
- }
- TD {
- FONT-SIZE: 12px
- }
- TH {
- FONT-SIZE: 12px
- }
- BODY {
- MARGIN: 0px
- }
- </STYLE>
- <LINK href="image/buyok_shop.css" type=text/css rel=stylesheet>
- <TABLE class=grayline cellSpacing=0 cellPadding=0 width=760 align=center
- bgColor=#ffffff border=0>
- <TBODY>
- <TR>
- <TD vAlign=top width=210 bgColor=#fafafa>
- <SCRIPT language=JavaScript>
- function checkform(){
- if (document.loginbox.name.value.length ==0){
- alert("出错了,您没有填写用户名。");
- document.loginbox.name.focus();
- return false;
- }
- if (document.loginbox.password.value.length==0){
- alert("出错了,您没有填写密码。");
- document.loginbox.password.focus();
- return false;
- }
- if (document.loginbox.yzm.value.length==0){
- alert("出错了,您没有填写验证码。");
- document.loginbox.yzm.focus();
- return false;
- }
- return true;
- }
- </SCRIPT>
- <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
- <TBODY>
- <TR>
- <TD vAlign=center align=middle>
- <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
- <TR>
- <TD vAlign=center align=middle>
- <TABLE cellSpacing=0 cellPadding=0 width=190 align=center
- border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left width=190 height=52><IMG
- height=51 alt=登陆
- src="image/login_top.gif"
- width=190></TD>
- </TR>
- <TR>
- <TD height=11><IMG height=14 alt=1
- src="image/login_1.gif"
- width=190></TD>
- </TR>
- <TR>
- <TD vAlign=top align=left
- background=image/login_bg.gif height=7>
- <TABLE height=87 cellSpacing=0 cellPadding=0
- width="100%" border=0>
- <%
- String userid=(String)session.getAttribute("userid");
- String goods_num=String.valueOf((Integer)session.getAttribute("goods_num"));
- String goods_price=String.valueOf((Float)session.getAttribute("goods_price"));
- if(userid==null)
- {
- %>
- <FORM name=loginbox onsubmit="return checkform();"
- action=check_login.jsp method=post>
- <TBODY>
- <TR>
- <TD vAlign=top align=left height=16>
- <TABLE height=72 cellSpacing=2 cellPadding=0
- width="100%" border=0>
- <TBODY>
- <TR>
- <TD align=right width="31%">用户名:</TD>
- <TD width="45%" height=22><INPUT
- style="BORDER-RIGHT: #ece2d2 1px solid; BORDER-TOP: #ece2d2 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ece2d2 1px solid; COLOR: #666666; BORDER-BOTTOM: #ece2d2 1px solid; FONT-FAMILY: verdana"
- alt=请填写要登陆的用户名 maxLength=16 size=10
- name=name></TD>
- <TD vAlign=top align=left width="24%"
- rowSpan=3><INPUT type=image
- src="image/login.gif"
- name=imageField></TD>
- </TR>
- <TR>
- <TD align=right>密 码:</TD>
- <TD height=22><input
- style="BORDER-RIGHT: #ece2d2 1px solid; BORDER-TOP: #ece2d2 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ece2d2 1px solid; COLOR: #666666; BORDER-BOTTOM: #ece2d2 1px solid; FONT-FAMILY: verdana"
- type=password alt=请填写正确的密码 maxlength=16 size=10
- name=password>
- <INPUT type=hidden value=ok
- name=login></TD>
- </TR>
- <TR>
- <TD align=right>验证码:</TD>
- <TD vAlign=center height=22><div align="right">
- <input
- style="BORDER-RIGHT: #ece2d2 1px solid; BORDER-TOP: #ece2d2 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ece2d2 1px solid; COLOR: #666666; BORDER-BOTTOM: #ece2d2 1px solid; FONT-FAMILY: verdana"
- alt=请根据右边的图片填写验证码 maxlength=4 size=4 name=yzm>
- <img src="checkCode/image.jsp" width="38" height="21" border=0></div></td>
- <TR>
- <TD align=middle width=95><IMG height=5 alt=4
- src="image/login_bt.gif" width=5> <A href="reginfo.jsp">注 册</A></TD>
- <TD align=middle width=95 colspan="2"><IMG height=5 alt=3
- src="image/login_bt.gif" width=5> <A
- href="UserCenter/findstep1.jsp">找回密码</A></TD>
- </TR>
- </TBODY>
- </TABLE></TD>
- </TR>
- </form>
- <TD height=13><IMG height=13 alt=2
- src="image/login_2.gif"
- width=190></TD>
- </TR>
- </TABLE>
- <TR>
- <%
- }
- else
- {
- String name=(String)session.getAttribute("name");
- // System.out.print(goods_num);
- if(goods_price=="null")
- {
- goods_price="0";
- }
- if(goods_num=="null")
- {
- goods_num="0";
- }
- /// if(goods_price==0)
- //{
- // goods_price=0;
- // }
- %>
- <TABLE height=16 cellSpacing=0 cellPadding=0
- width="100%" border=0>
- <TBODY>
- <TR>
- <TD vAlign="middle" align="center"
- background="image/login_bg.gif"
- height=25><%=name%>,您的购物车中有 <FONT color=red> <%=goods_num%></FONT> 件图书</TD>
- </TR>
- <TR>
- <TD vAlign=center align=middle
- background=image/login_bg.gif
- height=25>总计货款: <FONT color=red><%=goods_price%></FONT> 元</TD>
- </TR>
- <TR>
- <TD vAlign=center align=middle
- background=image/login_bg.gif
- height=25><A
- href="UserCenter/usermanage.jsp"><FONT
- color=red><U
- title=进入会员中心>会员中心</U></FONT></A> <SPAN
- style="CURSOR: hand"
- onclick="window.open('shopcar/cartlist.jsp','blank_','scrollbars=yes,resizable=no,width=650,height=450')"><FONT
- color=red><U title=查看购物车>购 物 车</U></FONT></SPAN></TD>
- </TR>
- <TR>
- <TD height=13><IMG height=13 alt=2
- src="image/login_2.gif"
- width=190></TD>
- </TR>
- </TBODY>
- </TABLE>
- <%}%>
- </TBODY>
- </TABLE></TD>
- </TR>
- </TABLE></TD></TR></TABLE>
- <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
- <TBODY>
- <TR>
- <TD>
- <TABLE height="100%" cellSpacing=0 cellPadding=0 width=200
- align=left border=0>
- <TBODY>
- <TR>
- <TD width=206 height=31><IMG height=50
- src="image/lei.gif" width=200></TD></TR>
- <TR>
- <TD vAlign=top align=middle height=240>
- <TABLE height=226 cellSpacing=0 cellPadding=0 width=190
- align=center background=image/leftlist_bg.jpg
- border=0><TBODY>
- <TR>
- <TD vAlign=top align=middle
- background=image/leftlist_bg.jpg bgColor=#ebebeb
- height=189><TABLE cellSpacing=0 cellPadding=0 width="88%"
- bgColor=#fafafa border=0>
- <TBODY>
- <TR>
- <TD background=image/erbook.com.htm
- height=11>
- <TABLE height=9 cellSpacing=0 cellPadding=0
- width="100%" align=center border=0>
- <TBODY>
- <TR>
- <TD bgColor=#ffffff></TD>
- </TR>
- </TBODY>
- </TABLE></TD>
- </TR>
- <%
- characterclassBeans.getQuery("-1");
- for(int i_c=0; i_c<characterclassBeans.getItems(); i_c++)//第一层循环读出大类
- {
- %>
- <TR>
- <TD style="PADDING-LEFT: 20px"
- background=image/erbook.com.htm
- height=23><IMG height=9
- src="image/bit05.gif" width=8
- align=absMiddle> <A class=lei1
- onclick=javascript:ShowFLT(<%=(i_c+1)%>)
- href="javascript:void(null)"><%=characterclassBeans.getCharacterName(i_c)%></A> </TD>
- </TR>
- <TR id=LM<%=(i_c+1)%> style="DISPLAY: none">
- <TD>
- <TABLE cellSpacing=2 cellPadding=0 width="100%"
- border=0>
- <TBODY>
- <%
- int j_u=characterclassBeans.getCharacterID(i_c);
- int num1=useclassBeans.getQuerycha(j_u);
- for(int i_q=0; i_q<num1; i_q++)
- {
- %>
- <TR>
- <TD style="PADDING-LEFT: 40px" height=23> <IMG height=7 src="image/bit06.gif" width=8 align=absMiddle> <A href="prosort.jsp?proType=<%=java.net.URLEncoder.encode(useclassBeans.getUseclassName(i_q),"utf-8")%>
- &pageNum=1&proNum=<%=useclassBeans.getUseclassID(i_q)%>" target=_blank><%=useclassBeans.getUseclassName(i_q)%></A> </TD>
- </TR>
- <%}
- %>
- </TBODY>
- </TABLE></TD>
- </TR>
- <%}
- %>
- <TR id=LM18 style="DISPLAY: none">
- <TD> </TD>
- </TR>
- </TBODY>
- </TABLE></TD>
- </TR></TBODY></TABLE><IMG
- height=9 src="image/leftlist_bottom.gif"
- width=190></TD></TR></TBODY></TABLE></TD></TR>
- <TR>
- <TD>
- <TABLE cellSpacing=0 cellPadding=0 width=200 align=left border=0>
- <TBODY>
- <TR>
- <TD><IMG height=73 src="image/help.gif"
- width=200></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
- <TD width=1 bgColor=#cccccc></TD>
- <TD class=left vAlign=top align=left width=550 bgColor=#ffffff>
- <TABLE cellSpacing=0 cellPadding=0 width=550 bgColor=#fefefe border=0>
- <TBODY>
- <TR>
- <TD><IMG height=201 src="image/jpbook.jpg"
- width=550></TD>
- </TR>
- <TR>
- <TD>
- <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD vAlign=center align=middle width=20 height=20><IMG
- height=11 src="image/jt_2.gif" width=11></TD>
- <TD height=20>当前位置:<A
- href="http://www.erbook.com.cn/default.asp">首页</A> >
- 精品推荐</TD>
- </TR></TBODY></TABLE></TD></TR>
- <TR>
- <TD background=image/bgline.gif height=1></TD></TR>
- <TR>
- <TD vAlign=top align=left width=550>
- <DIV align=center>
- <TABLE>
- <TBODY>
- <%
- int x = (num%3 == 0)? num/3 : num/3+1;
- for(int i=0;i<x;i++)
- {
- %>
- <TR>
- <%
- for(int j=0;j<3;j++)
- {
- if(3*i+j == num)
- {
- break;
- }
- %>
- <TD>
- <DIV></DIV>
- <CENTER>
- <TABLE cellSpacing=0 cellPadding=0 width=170 align=center
- bgColor=#cccccc border=0>
- <TBODY>
- <TR>
- <TD vAlign=center align=middle bgColor=#ffffff
- height=130><TABLE height=136 cellSpacing=0 cellPadding=0
- width=116 border=0>
- <TBODY>
- <TR>
- <TD vAlign=center align=middle
- background=image/bg.jpg>
- <a href="listbook.jsp?proNum=<%=productinfoBeans.getProductID(3*i+j).replace('#', ',')%>">
- <%
- String proNum1=productinfoBeans.getProductID(3*i+j);
- String proNum2=proNum1.replace(',','#');
- productinfoBean.getNew(proNum2);
- String num1=productinfoBeans.getProductID(i).replace('#', '1');
- %>
- <img src="product_image/<%=productinfoBeans.getMinPicture(3*i+j)%>" onMouseOver="showBigImg('<%=productinfoBean.getMaxPicture()%>',<%=num%>,event);" onMouseOut="mouseout('<%=productinfoBeans.getMinPicture(3*i+j)%>',event)" width="93" height="112" border="0"></a></TD></TR></TBODY></TABLE></TD></TR>
- <TR>
- <TD vAlign=center align=middle bgColor=#ffffff
- height=36><TABLE height=60 cellSpacing=0 cellPadding=0
- width="100%" align=center border=0>
- <TBODY>
- <TR>
- <TD vAlign=center align=middle colSpan=3
- height=20><TABLE cellSpacing=0 cellPadding=0
- width=120 align=center border=0>
- <TBODY>
- <TR>
- <TD><a href="listbook.jsp?proNum=<%=productinfoBeans.getProductID(3*i+j).replace('#', ',')%>">
- <DIV class=font_blu
- align=center><FONT
- color=red><%=productinfoBeans.getProductName(3*i+j)%></FONT></DIV>
- </A></TD></TR></TBODY></TABLE></TD></TR>
- <TR>
- <TD align=right width=59 height=36><A
- href="listbook.jsp?proNum=<%=productinfoBeans.getProductID(3*i+j).replace('#', ',')%>"
- target=_blank><IMG height=17
- src="image/xx.gif" width=40
- border=0></A></TD>
- <TD width=5><IMG height=28
- src="image/line3.gif" width=1></TD>
- <TD vAlign=top align=right width=101>
- <TABLE height=0 cellSpacing=0 cellPadding=0
- width="99%" align=right border=0>
- <TBODY>
- <TR>
- <TD vAlign=center height=10>原
- 价:¥<%=productinfoBeans.getMarketPrice(3*i+j)%></TD>
- </TR>
- <TR>
- <TD vAlign=center height=10>会员价:<SPAN
- class=red1>¥<FONT
- color=red><%=productinfoBeans.getPreferPrice(3*i+j)%></FONT></SPAN></TD>
- </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER>
- </TD>
- <%}%>
- </tr>
- <%}%></TBODY></TABLE>
- <TABLE cellSpacing=1 cellPadding=2 width="100%" align=center
- bgColor=#ffffff border=0></TABLE></DIV></TD></TR></TBODY></TABLE>
- <table width="544" align="center">
- <tr>
- <TD height=10>
- <HR id=hr width="100%" SIZE=1>
- </TD></TR>
- <tr>
- <td height="23" align="center"> <div align="right"><a href="tuibook.jsp?pageNum=1">首页</a>
- <%
- if(Integer.parseInt(pageNum) > 1)
- {
- %>
- <a href="tuibook.jsp?pageNum=<%=Integer.parseInt(pageNum)-1%>">上一页</a>
- <%
- }
- %>
- <%
- if(Integer.parseInt(pageNum) < pageCount)
- {
- %>
- <a href="tuibook.jsp?pageNum=<%=Integer.parseInt(pageNum)+1%>">下一页</a>
- <%
- }
- %>
- <a href="tuibook.jsp?pageNum=<%=pageCount%>">尾页</a> 页次:<STRONG><FONT
- color=red><%=Integer.parseInt(pageNum)%></FONT>/<%=pageCount%></STRONG>页 </div></td>
- </tr></table></TD></TR></TBODY></TABLE>
- <%@ include file ="foot.jsp"%>
- </CENTER>
- </BODY></HTML>