tuibook.jsp
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:21k
源码类别:

Applet

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <jsp:useBean id="productinfoBeans" class="MyFly.Bean.productinfoBeans" scope="request"/>
  3. <jsp:useBean id="productisnew"  class="MyFly.Bean.productisnew" scope="request"/>
  4. <jsp:useBean id="useclassBeans" class="MyFly.Bean.useclassBeans" scope="request"/>
  5. <jsp:useBean id="productinfoBean" class="MyFly.Bean.productinfoBean" scope="request"/>
  6. <jsp:useBean id="characterclassBeans" class="MyFly.Bean.characterclassBeans" scope="request"/>
  7. <jsp:useBean id="characterclassBean" class="MyFly.Bean.characterclassBean" scope="request"/>
  8. <script language="javascript" src="js/showimg.js"></script>
  9. <%@ include file="top.jsp" %>
  10. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.net.*" errorPage="" %>
  11. <% 
  12.  String pageNum=request.getParameter("pageNum");
  13.  //System.out.print(pageNum);
  14.  String pageSize="12";
  15.  productinfoBeans.setPageSize(Integer.parseInt(pageSize));
  16.  productinfoBeans.setPageNum(pageNum);
  17.  productinfoBeans.setProType("tuijian");
  18.  productinfoBeans.init1();
  19.  
  20.  productinfoBeans.getQueryTuijian(); //精品推荐
  21.  int num=productinfoBeans.getItems();
  22.  int pageCount=productinfoBeans.getPageCount();
  23.  %>
  24.  <%
  25. int d_count=characterclassBean.getcount();
  26. %>
  27.  <SCRIPT language=javascript id=clientEventHandlersJS>
  28. <!--
  29. var number=<%=d_count%>;
  30. function LMYC() {
  31. var lbmc;
  32. //var treePic;
  33.     for (i=1;i<=number;i++) {
  34.         lbmc = eval('LM' + i);
  35.         //treePic = eval('treePic'+i);
  36.         //treePic.src = 'images/file.gif';
  37.         lbmc.style.display = 'none';
  38.     }
  39. }
  40.  
  41. function ShowFLT(i) {
  42.     lbmc = eval('LM' + i);
  43.     //treePic = eval('treePic' + i)
  44.     if (lbmc.style.display == 'none') {
  45.         LMYC();
  46.         //treePic.src = 'images/nofile.gif';
  47.         lbmc.style.display = '';
  48.     }
  49.     else {
  50.         //treePic.src = 'images/file.gif';
  51.         lbmc.style.display = 'none';
  52.     }
  53. }
  54. //-->
  55.       </SCRIPT>
  56. <HTML><HEAD><TITLE>-精品推荐-</TITLE>
  57. <META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
  58. href="image/buyok_shop.css" type=text/css rel=stylesheet>
  59. <STYLE type=text/css>
  60. .pic1 {
  61. MARGIN-TOP: -135px; MARGIN-LEFT: 0px
  62. }
  63. .pic2 {
  64. PADDING-TOP: 6px
  65. }
  66. .red1 {
  67. COLOR: #ff0000
  68. }
  69. </STYLE>
  70. <LINK href="image/table.css" type=text/css rel=stylesheet><LINK 
  71. href="image/buyok_shop.css" type=text/css rel=stylesheet>
  72. <STYLE type=text/css>
  73. BODY {
  74. MARGIN: 0px
  75. }
  76. .STYLE1 {
  77. COLOR: #ff3300
  78. }
  79. .STYLE2 {
  80. COLOR: #ff0000
  81. }
  82. .lei1 { FONT-SIZE: 13px
  83. }
  84. </STYLE>
  85. </HEAD>
  86. <BODY>
  87. <CENTER>
  88. <STYLE type=text/css>BODY {
  89. FONT-SIZE: 12px
  90. }
  91. TD {
  92. FONT-SIZE: 12px
  93. }
  94. TH {
  95. FONT-SIZE: 12px
  96. }
  97. BODY {
  98. MARGIN: 0px
  99. }
  100. </STYLE>
  101. <LINK href="image/buyok_shop.css" type=text/css rel=stylesheet>
  102. <TABLE class=grayline cellSpacing=0 cellPadding=0 width=760 align=center 
  103. bgColor=#ffffff border=0>
  104.   <TBODY>
  105.   <TR>
  106.     <TD vAlign=top width=210 bgColor=#fafafa>
  107.       <SCRIPT language=JavaScript>
  108. function checkform(){
  109. if (document.loginbox.name.value.length ==0){
  110. alert("出错了,您没有填写用户名。");
  111. document.loginbox.name.focus();
  112. return false;
  113. }
  114. if (document.loginbox.password.value.length==0){
  115. alert("出错了,您没有填写密码。");
  116. document.loginbox.password.focus();
  117. return false;
  118. }
  119. if (document.loginbox.yzm.value.length==0){
  120. alert("出错了,您没有填写验证码。");
  121. document.loginbox.yzm.focus();
  122. return false;
  123. }
  124. return true;
  125. }
  126. </SCRIPT>
  127.       <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
  128.         <TBODY>
  129.         <TR>
  130.           <TD vAlign=center align=middle>
  131.             <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
  132.               <TR>
  133.                 <TD vAlign=center align=middle>
  134.                   <TABLE cellSpacing=0 cellPadding=0 width=190 align=center 
  135.                   border=0>
  136.                     <TBODY>
  137.                       <TR>
  138.                         <TD vAlign=top align=left width=190 height=52><IMG 
  139.                         height=51 alt=登陆 
  140.                         src="image/login_top.gif" 
  141.                     width=190></TD>
  142.                       </TR>
  143.                       <TR>
  144.                         <TD height=11><IMG height=14 alt=1 
  145.                         src="image/login_1.gif" 
  146. width=190></TD>
  147.                       </TR>
  148.                       <TR>
  149.                         <TD vAlign=top align=left 
  150.                       background=image/login_bg.gif height=7>
  151.                           <TABLE height=87 cellSpacing=0 cellPadding=0 
  152.                         width="100%" border=0>        
  153.  <%
  154.  String userid=(String)session.getAttribute("userid");
  155.  String goods_num=String.valueOf((Integer)session.getAttribute("goods_num"));
  156.      String goods_price=String.valueOf((Float)session.getAttribute("goods_price"));
  157.  if(userid==null)
  158. {
  159. %>
  160.                             <FORM name=loginbox onsubmit="return checkform();" 
  161.                           action=check_login.jsp method=post>
  162.                               <TBODY>
  163.                                 <TR>
  164.                                   <TD vAlign=top align=left height=16>
  165.                            
  166.                                     <TABLE height=72 cellSpacing=2 cellPadding=0 
  167.                               width="100%" border=0>
  168.                                       <TBODY>
  169.                                         <TR>
  170.                                           <TD align=right width="31%">用户名:</TD>
  171.                                           <TD width="45%" height=22><INPUT 
  172.                                 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" 
  173.                                 alt=请填写要登陆的用户名 maxLength=16 size=10 
  174.                                 name=name></TD>
  175.                                           <TD vAlign=top align=left width="24%" 
  176.                                 rowSpan=3><INPUT type=image 
  177.                                 src="image/login.gif" 
  178.                                 name=imageField></TD>
  179.                                         </TR>
  180.                                         <TR>
  181.                                           <TD align=right>密 &nbsp;码:</TD>
  182.                                           <TD height=22><input 
  183.                                 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" 
  184.                                 type=password alt=请填写正确的密码 maxlength=16 size=10 
  185.                                 name=password>
  186.                                               <INPUT type=hidden value=ok 
  187.                                 name=login></TD>
  188.                                         </TR>
  189.                                         <TR>
  190.                                           <TD align=right>验证码:</TD>
  191.                                           <TD vAlign=center height=22><div align="right">
  192.                                               <input 
  193.                                 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" 
  194.                                 alt=请根据右边的图片填写验证码 maxlength=4 size=4 name=yzm>
  195.                                               <img src="checkCode/image.jsp" width="38" height="21" border=0></div></td>
  196.                                         <TR>
  197.                                           <TD align=middle width=95><IMG height=5 alt=4 
  198.                               src="image/login_bt.gif" width=5> <A href="reginfo.jsp">注 册</A></TD>
  199.                                           <TD align=middle width=95 colspan="2"><IMG height=5 alt=3 
  200.                               src="image/login_bt.gif" width=5> <A 
  201.                               href="UserCenter/findstep1.jsp">找回密码</A></TD>
  202.                                         </TR>
  203.                                       </TBODY>
  204.                                   </TABLE></TD>
  205.                                 </TR>
  206.                                         </form>
  207.                             <TD height=13><IMG height=13 alt=2 
  208.                         src="image/login_2.gif" 
  209.                     width=190></TD>
  210.                             </TR>
  211.                           </TABLE>
  212.                       <TR>
  213.                         <%
  214. }
  215. else
  216. {
  217.    String name=(String)session.getAttribute("name");
  218.    
  219.   // System.out.print(goods_num);
  220.    if(goods_price=="null")
  221.    {
  222.    goods_price="0";
  223.   
  224.    } 
  225.     if(goods_num=="null")
  226.    {
  227.    goods_num="0";
  228.   
  229.    }
  230.  /// if(goods_price==0)
  231.  //{
  232.     // goods_price=0;
  233. // }
  234. %>
  235.                         <TABLE height=16 cellSpacing=0 cellPadding=0 
  236.                         width="100%" border=0>
  237.                           <TBODY>
  238.                             <TR>
  239.                               <TD vAlign="middle" align="center"
  240.                             background="image/login_bg.gif" 
  241.                             height=25><%=name%>,您的购物车中有 <FONT color=red> <%=goods_num%></FONT> 件图书</TD>
  242.                             </TR>
  243.                             <TR>
  244.                               <TD vAlign=center align=middle 
  245.                             background=image/login_bg.gif 
  246.                             height=25>总计货款: <FONT color=red><%=goods_price%></FONT> 元</TD>
  247.                             </TR>
  248.                             <TR>
  249.                               <TD vAlign=center align=middle 
  250.                             background=image/login_bg.gif 
  251.                             height=25><A 
  252.                               href="UserCenter/usermanage.jsp"><FONT 
  253.                               color=red><U 
  254.                               title=进入会员中心>会员中心</U></FONT></A>&nbsp;&nbsp;<SPAN 
  255.                               style="CURSOR: hand" 
  256.                               onclick="window.open('shopcar/cartlist.jsp','blank_','scrollbars=yes,resizable=no,width=650,height=450')"><FONT 
  257.                               color=red><U title=查看购物车>购 物 车</U></FONT></SPAN></TD>
  258.                             </TR>
  259.                             <TR>
  260.                               <TD height=13><IMG height=13 alt=2 
  261.                               src="image/login_2.gif" 
  262.                             width=190></TD>
  263.                             </TR>
  264.                           </TBODY>
  265.                         </TABLE>
  266.                         <%}%>
  267.                                 </TBODY>
  268.                 </TABLE></TD>
  269.               </TR>
  270.             </TABLE></TD></TR></TABLE>
  271.       <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
  272.         <TBODY>
  273.         <TR>
  274.           <TD>
  275.             <TABLE height="100%" cellSpacing=0 cellPadding=0 width=200 
  276.             align=left border=0>
  277.               <TBODY>
  278.               <TR>
  279.                 <TD width=206 height=31><IMG height=50 
  280.                   src="image/lei.gif" width=200></TD></TR>
  281.               <TR>
  282.                 <TD vAlign=top align=middle height=240>
  283.                   <TABLE height=226 cellSpacing=0 cellPadding=0 width=190 
  284.                   align=center background=image/leftlist_bg.jpg 
  285.                     border=0><TBODY>
  286.                     <TR>
  287.                       <TD vAlign=top align=middle 
  288.                       background=image/leftlist_bg.jpg bgColor=#ebebeb 
  289.                       height=189><TABLE cellSpacing=0 cellPadding=0 width="88%" 
  290.                         bgColor=#fafafa border=0>
  291.                         <TBODY>
  292.                           <TR>
  293.                             <TD background=image/erbook.com.htm 
  294.                             height=11>
  295.                               <TABLE height=9 cellSpacing=0 cellPadding=0 
  296.                               width="100%" align=center border=0>
  297.                                 <TBODY>
  298.                                   <TR>
  299.                                     <TD   bgColor=#ffffff></TD>
  300.                                   </TR>
  301.                                 </TBODY>
  302.                             </TABLE></TD>
  303.                           </TR>
  304.                           <%
  305.  characterclassBeans.getQuery("-1");
  306. for(int i_c=0; i_c<characterclassBeans.getItems(); i_c++)//第一层循环读出大类
  307.     {
  308.   
  309. %>
  310.                           <TR>
  311.                             <TD style="PADDING-LEFT: 20px" 
  312.                             background=image/erbook.com.htm 
  313.                               height=23><IMG height=9 
  314.                               src="image/bit05.gif" width=8 
  315.                               align=absMiddle> <A class=lei1 
  316.                               onclick=javascript:ShowFLT(<%=(i_c+1)%>) 
  317.                               href="javascript:void(null)"><%=characterclassBeans.getCharacterName(i_c)%></A> </TD>
  318.                           </TR>
  319.                           <TR id=LM<%=(i_c+1)%> style="DISPLAY: none">
  320.                             <TD>
  321.                               <TABLE cellSpacing=2 cellPadding=0 width="100%" 
  322.                               border=0>
  323.                                 <TBODY>
  324.                                   <%
  325. int j_u=characterclassBeans.getCharacterID(i_c);
  326. int num1=useclassBeans.getQuerycha(j_u);
  327.  for(int i_q=0; i_q<num1; i_q++)
  328.  {
  329. %>
  330.                                   <TR>
  331.                                     <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")%>
  332. &pageNum=1&proNum=<%=useclassBeans.getUseclassID(i_q)%>"  target=_blank><%=useclassBeans.getUseclassName(i_q)%></A> </TD>
  333.                                   </TR>
  334.                                   <%}
  335. %>
  336.                                 </TBODY>
  337.                             </TABLE></TD>
  338.                           </TR>
  339.                           <%}
  340. %>
  341.                           <TR id=LM18 style="DISPLAY: none">
  342.                             <TD>&nbsp; </TD>
  343.                           </TR>
  344.                         </TBODY>
  345.                       </TABLE></TD>
  346.                     </TR></TBODY></TABLE><IMG 
  347.                   height=9 src="image/leftlist_bottom.gif" 
  348.               width=190></TD></TR></TBODY></TABLE></TD></TR>
  349.         <TR>
  350.           <TD>
  351.             <TABLE cellSpacing=0 cellPadding=0 width=200 align=left border=0>
  352.               <TBODY>
  353.               <TR>
  354.                 <TD><IMG height=73 src="image/help.gif" 
  355.               width=200></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
  356.     <TD width=1 bgColor=#cccccc></TD>
  357.     <TD class=left vAlign=top align=left width=550 bgColor=#ffffff>
  358.       <TABLE cellSpacing=0 cellPadding=0 width=550 bgColor=#fefefe border=0>
  359.         <TBODY>
  360.         <TR>
  361.           <TD><IMG height=201 src="image/jpbook.jpg" 
  362.         width=550></TD>
  363.         </TR>
  364.         <TR>
  365.           <TD>
  366.             <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  367.               <TBODY>
  368.               <TR>
  369.                 <TD vAlign=center align=middle width=20 height=20><IMG 
  370.                   height=11 src="image/jt_2.gif" width=11></TD>
  371.                 <TD height=20>当前位置:<A 
  372.                   href="http://www.erbook.com.cn/default.asp">首页</A> &gt; 
  373.               精品推荐</TD>
  374.               </TR></TBODY></TABLE></TD></TR>
  375.         <TR>
  376.           <TD background=image/bgline.gif height=1></TD></TR>
  377.         <TR>
  378.           <TD vAlign=top align=left width=550>
  379.             <DIV align=center>
  380.             <TABLE>
  381.               <TBODY>
  382.     
  383. <%   
  384.  int x = (num%3 == 0)? num/3 : num/3+1;
  385. for(int i=0;i<x;i++)
  386. {
  387. %> 
  388.               <TR>
  389.   <%
  390.      for(int j=0;j<3;j++)     
  391.   {
  392.    if(3*i+j == num)
  393.      {
  394.           break;
  395.      }
  396.       %>
  397.   
  398.   
  399.                 <TD>
  400.                   <DIV></DIV>
  401.                   <CENTER>
  402.                   <TABLE cellSpacing=0 cellPadding=0 width=170 align=center 
  403.                   bgColor=#cccccc border=0>
  404.                     <TBODY>
  405.                     <TR>
  406.                       <TD vAlign=center align=middle bgColor=#ffffff 
  407.                         height=130><TABLE height=136 cellSpacing=0 cellPadding=0 
  408.                         width=116 border=0>
  409.                           <TBODY>
  410.                           <TR>
  411.                             <TD vAlign=center align=middle 
  412.                             background=image/bg.jpg>
  413. <a href="listbook.jsp?proNum=<%=productinfoBeans.getProductID(3*i+j).replace('#', ',')%>">
  414.   <%  
  415.   String proNum1=productinfoBeans.getProductID(3*i+j);
  416.   String proNum2=proNum1.replace(',','#');
  417.     productinfoBean.getNew(proNum2);
  418. String num1=productinfoBeans.getProductID(i).replace('#', '1');
  419. %>
  420. <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>
  421.                     <TR>
  422.                       <TD vAlign=center align=middle bgColor=#ffffff 
  423.                         height=36><TABLE height=60 cellSpacing=0 cellPadding=0 
  424.                         width="100%" align=center border=0>
  425.                           <TBODY>
  426.                           <TR>
  427.                             <TD vAlign=center align=middle colSpan=3 
  428.                               height=20><TABLE cellSpacing=0 cellPadding=0 
  429.                               width=120 align=center border=0>
  430.                                 <TBODY>
  431.                                 <TR>
  432.                                 <TD><a href="listbook.jsp?proNum=<%=productinfoBeans.getProductID(3*i+j).replace('#', ',')%>">
  433.                                 <DIV class=font_blu 
  434.                                 align=center><FONT 
  435.                                 color=red><%=productinfoBeans.getProductName(3*i+j)%></FONT></DIV>
  436.                                 </A></TD></TR></TBODY></TABLE></TD></TR>
  437.                           <TR>
  438.                             <TD align=right width=59 height=36><A 
  439.                               href="listbook.jsp?proNum=<%=productinfoBeans.getProductID(3*i+j).replace('#', ',')%>" 
  440.                               target=_blank><IMG height=17 
  441.                               src="image/xx.gif" width=40 
  442. border=0></A></TD>
  443.                             <TD width=5><IMG height=28 
  444.                               src="image/line3.gif" width=1></TD>
  445.                             <TD vAlign=top align=right width=101>
  446.                               <TABLE height=0 cellSpacing=0 cellPadding=0 
  447.                               width="99%" align=right border=0>
  448.                                 <TBODY>
  449.                                 <TR>
  450.                                 <TD vAlign=center height=10>原 
  451.                                 &nbsp;价:¥<%=productinfoBeans.getMarketPrice(3*i+j)%></TD>
  452.                                 </TR>
  453.                                 <TR>
  454.                                 <TD vAlign=center height=10>会员价:<SPAN 
  455.                                 class=red1>¥<FONT 
  456.                                 color=red><%=productinfoBeans.getPreferPrice(3*i+j)%></FONT></SPAN></TD>
  457.                                 </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER>
  458.   </TD>
  459.   <%}%>
  460.     </tr>
  461.                                 <%}%></TBODY></TABLE>
  462.             <TABLE cellSpacing=1 cellPadding=2 width="100%" align=center 
  463.             bgColor=#ffffff border=0></TABLE></DIV></TD></TR></TBODY></TABLE>
  464.       <table width="544" align="center">
  465.         <tr>
  466.   <TD height=10>
  467.             <HR id=hr width="100%" SIZE=1>
  468.           </TD></TR>
  469.            <tr>
  470.                
  471.                    <td height="23" align="center">                      <div align="right"><a href="tuibook.jsp?pageNum=1">首页</a>
  472.                                    <% 
  473. if(Integer.parseInt(pageNum) > 1)
  474.    {
  475. %>
  476.                                    <a href="tuibook.jsp?pageNum=<%=Integer.parseInt(pageNum)-1%>">上一页</a> &nbsp;
  477.                                    <%
  478. }
  479. %>
  480.                                    <% 
  481. if(Integer.parseInt(pageNum) < pageCount)
  482.    {
  483. %>
  484.                                    <a href="tuibook.jsp?pageNum=<%=Integer.parseInt(pageNum)+1%>">下一页</a> &nbsp;
  485.                                    <%
  486. }
  487. %>
  488.                                    <a href="tuibook.jsp?pageNum=<%=pageCount%>">尾页</a> 页次:<STRONG><FONT 
  489.                   color=red><%=Integer.parseInt(pageNum)%></FONT>/<%=pageCount%></STRONG>页 &nbsp;&nbsp;</div></td>
  490.   </tr></table></TD></TR></TBODY></TABLE>
  491.   <%@ include file ="foot.jsp"%>
  492. </CENTER>
  493. </BODY></HTML>