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

Applet

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML><HEAD><TITLE></TITLE>
  3. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.io.*,java.util.*" errorPage="" %>
  4. <jsp:useBean id="productinfoBean" class="MyFly.Bean.productinfoBean" scope="request"/>
  5. <jsp:useBean id="productvoteBean" class="MyFly.Bean.productvoteBean" scope="request"/>
  6. <jsp:useBean id="productremarkBeans" class="MyFly.Bean.productremarkBeans" scope="request"/>
  7. <jsp:useBean id="useclassBeans" class="MyFly.Bean.useclassBeans" scope="request"/>
  8. <jsp:useBean id="characterclassBeans" class="MyFly.Bean.characterclassBeans" scope="request"/>
  9. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  10. <%@ include file ="top.jsp" %>
  11. <%
  12.   request.setCharacterEncoding("gb2312");
  13. %>
  14. <%!
  15.  StringBuffer convert(StringBuffer sour){
  16. for(int i=0;i<sour.length();i++){
  17. if(sour.substring(i,i+1).equals("n")){
  18. sour.delete(i,i+1);
  19. sour.insert(i,"</p><p>");
  20. }
  21. }
  22. return sour;
  23. }
  24. %>
  25. <%!
  26.    String fun(String str)
  27.    {
  28.       try
  29.   {
  30.       return new String(str.getBytes("ISO8859_1"));
  31.   }
  32.   catch(Exception e)
  33.   {
  34.      return "";
  35.   }
  36.    }
  37. %>
  38. <%
  39.     String proType=fun(request.getParameter("proType"));
  40. String proNum=request.getParameter("proNum").replace(',', '#');
  41. productinfoBean.getNew(proNum);//传递的值
  42. %>
  43. <script language="javascript">
  44. function openScript(url,name, width, height){
  45. var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
  46. }
  47. </script>
  48. <LINK href="image/buyok_shop.css" type=text/css rel=stylesheet>
  49. <LINK href="image/table.css" type=text/css rel=stylesheet>
  50. <META content="MSHTML 6.00.2900.3086" name=GENERATOR>
  51. </HEAD>
  52. <BODY>
  53. <TABLE class=grayline cellSpacing=0 cellPadding=0 width=762 align=center 
  54. bgColor=#ffffff border=0>
  55.   <TR>
  56.     <TD vAlign=top align="center" width=200 bgColor=#fafafa>
  57.       <SCRIPT language=JavaScript>
  58. function checkform(){
  59. if (document.loginbox.name.value.length ==0){
  60. alert("出错了,您没有填写用户名。");
  61. document.loginbox.name.focus();
  62. return false;
  63. }
  64. if (document.loginbox.password.value.length==0){
  65. alert("出错了,您没有填写密码。");
  66. document.loginbox.password.focus();
  67. return false;
  68. }
  69. if (document.loginbox.yzm.value.length==0){
  70. alert("出错了,您没有填写验证码。");
  71. document.loginbox.yzm.focus();
  72. return false;
  73. }
  74. return true;
  75. }
  76. </SCRIPT>
  77.       <STYLE type=text/css>BODY {
  78. FONT-SIZE: 12px
  79. }
  80. TD {
  81. FONT-SIZE: 12px
  82. }
  83. TH {
  84. FONT-SIZE: 12px
  85. }
  86. BODY {
  87. MARGIN: 0px
  88. }
  89. </STYLE>
  90.       <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
  91.         <TBODY>
  92.         <TR>
  93.           <TD vAlign=center align=middle>
  94.             <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
  95.               <TR>
  96.                 <TD vAlign=center align=middle>
  97.                   <TABLE cellSpacing=0 cellPadding=0 width=190 align=center 
  98.                   border=0>
  99.                     <TBODY>
  100.                       <TR>
  101.                         <TD vAlign=top align=left width=190 height=52><IMG 
  102.                         height=51 alt=登陆 
  103.                         src="image/login_top.gif" 
  104.                     width=190></TD>
  105.                       </TR>
  106.                       <TR>
  107.                         <TD height=11><IMG height=14 alt=1 
  108.                         src="image/login_1.gif" 
  109. width=190></TD>
  110.                       </TR>
  111.                       <TR>
  112.                         <TD vAlign=top align=left 
  113.                       background=image/login_bg.gif height=7>
  114.                           <TABLE height=87 cellSpacing=0 cellPadding=0 
  115.                         width="100%" border=0>     
  116.  <%
  117.  String userid=(String)session.getAttribute("userid");
  118.  String goods_num=String.valueOf((Integer)session.getAttribute("goods_num"));
  119.      String goods_price=String.valueOf((Float)session.getAttribute("goods_price"));
  120.  if(userid==null)
  121. {
  122. %>
  123.                             <FORM name=loginbox onsubmit="return checkform();" 
  124.                           action=check_login.jsp method=post>
  125.                               <TBODY>
  126.                                 <TR>
  127.                                   <TD vAlign=top align=left height=16>
  128.                               
  129.                                     <TABLE height=72 cellSpacing=2 cellPadding=0 
  130.                               width="100%" border=0>
  131.                                       <TBODY>
  132.                                         <TR>
  133.                                           <TD align=right width="31%">用户名:</TD>
  134.                                           <TD width="45%" height=22><INPUT 
  135.                                 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" 
  136.                                 alt=请填写要登陆的用户名 maxLength=16 size=10 
  137.                                 name=name></TD>
  138.                                           <TD vAlign=top align=left width="24%" 
  139.                                 rowSpan=3><INPUT type=image 
  140.                                 src="image/login.gif" 
  141.                                 name=imageField></TD>
  142.                                         </TR>
  143.                                         <TR>
  144.                                           <TD align=right>密 &nbsp;码:</TD>
  145.                                           <TD height=22><input 
  146.                                 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" 
  147.                                 type=password alt=请填写正确的密码 maxlength=16 size=10 
  148.                                 name=password>
  149.                                               <INPUT type=hidden value=ok 
  150.                                 name=login></TD>
  151.                                         </TR>
  152.                                         <TR>
  153.                                           <TD align=right>验证码:</TD>
  154.                                           <TD vAlign=center height=22><div align="right">
  155.                                               <input 
  156.                                 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" 
  157.                                 alt=请根据右边的图片填写验证码 maxlength=4 size=4 name=yzm>
  158.                                               <img src="checkCode/image.jsp" width="38" height="21" border=0></div></td>
  159.                                         <TR>
  160.                                           <TD align=middle width=95><IMG height=5 alt=4 
  161.                               src="image/login_bt.gif" width=5> <A href="reginfo.jsp">注 册</A></TD>
  162.                                           <TD align=middle width=95 colspan="2"><IMG height=5 alt=3 
  163.                               src="image/login_bt.gif" width=5> <A 
  164.                               href="UserCenter/findstep1.jsp">找回密码</A></TD>
  165.                                         </TR>
  166.                                       </TBODY>
  167.                                   </TABLE></TD>
  168.                                 </TR>
  169.                                         </form>
  170.                             <TD height=13><IMG height=13 alt=2 
  171.                         src="image/login_2.gif" 
  172.                     width=190></TD>
  173.                             </TR>
  174.                           </TABLE>
  175.                       <TR>
  176.                         <%
  177. }
  178. else
  179. {
  180.    String name=(String)session.getAttribute("name");
  181.    
  182.   // System.out.print(goods_num);
  183.    if(goods_price=="null")
  184.    {
  185.    goods_price="0";
  186.   
  187.    } 
  188.     if(goods_num=="null")
  189.    {
  190.    goods_num="0";
  191.   
  192.    }
  193.  /// if(goods_price==0)
  194.  //{
  195.     // goods_price=0;
  196. // }
  197. %>
  198.                         <TABLE height=16 cellSpacing=0 cellPadding=0 
  199.                         width="100%" border=0>
  200.                           <TBODY>
  201.                             <TR>
  202.                               <TD vAlign="middle" align="center"
  203.                             background="image/login_bg.gif" 
  204.                             height=25><%=name%>,您的购物车中有 <FONT color=red> <%=goods_num%></FONT> 件图书</TD>
  205.                             </TR>
  206.                             <TR>
  207.                               <TD vAlign=center align=middle 
  208.                             background=image/login_bg.gif 
  209.                             height=25>总计货款: <FONT color=red><%=goods_price%></FONT> 元</TD>
  210.                             </TR>
  211.                             <TR>
  212.                               <TD vAlign=center align=middle 
  213.                             background=image/login_bg.gif 
  214.                             height=25><A 
  215.                               href="UserCenter/usermanage.jsp"><FONT 
  216.                               color=red><U 
  217.                               title=进入会员中心>会员中心</U></FONT></A>&nbsp;&nbsp;<SPAN 
  218.                               style="CURSOR: hand" 
  219.                               onclick="window.open('shopcar/cartlist.jsp','blank_','scrollbars=yes,resizable=no,width=650,height=450')"><FONT 
  220.                               color=red><U title=查看购物车>购 物 车</U></FONT></SPAN></TD>
  221.                             </TR>
  222.                             <TR>
  223.                               <TD height=13><IMG height=13 alt=2 
  224.                               src="image/login_2.gif" 
  225.                             width=190></TD>
  226.                             </TR>
  227.                           </TBODY>
  228.                         </TABLE>
  229.                         <%}%>
  230.                                 </TBODY>
  231.                 </TABLE></TD>
  232.               </TR>
  233.             </TABLE></TD></TR></TBODY></TABLE>
  234.       <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
  235.         <TBODY>
  236.         <TR>
  237.           <TD>
  238.             <TABLE height="100%" cellSpacing=0 cellPadding=0 width=200 
  239.             align=left border=0>
  240.               <TBODY>
  241.               <TR>
  242.                 <TD width=206 height=31><IMG height=50 
  243.                   src="image/lei.gif" width=200></TD></TR>
  244.               <TR>
  245.                 <TD vAlign=top align=middle height=600>
  246.                   <TABLE height=226 cellSpacing=0 cellPadding=0 width=190 
  247.                   align=center background=image/leftlist_bg.jpg border=0>
  248.                     <TBODY>
  249.                     <TR>
  250.                       <TD vAlign=top align=middle 
  251.                       background=image/leftlist_bg.jpg bgColor=#ebebeb 
  252.                       height=189><TABLE cellSpacing=0 cellPadding=0 width="90%" 
  253.                               border=0>
  254.                         <TBODY>
  255.                           <%
  256.  characterclassBeans.getQuery("-1");
  257.   for(int i_c=0; i_c<characterclassBeans.getItems(); i_c++)//第一层循环读出大类
  258.      {
  259. %>
  260.                           <TR>
  261.                             <TD>
  262.                               <TABLE height=61 cellSpacing=0 cellPadding=0 width="100%" border=0>
  263.                                 <TBODY>
  264.                                   <TR>
  265.                                     <TD height=30>
  266.                                       <DIV align=left><IMG height=9 
  267.                                 src="image/bit05.gif" width=8> <SPAN class="lei1  STYLE4"><%=characterclassBeans.getCharacterName(i_c)%></SPAN></DIV></TD>
  268.                                   </TR>
  269.                                   <TR>
  270.                                     <TD height="31">
  271.                                       <TABLE cellSpacing=0 cellPadding=0 width="90%" 
  272.                                 align=center border=0>
  273.                                         <TBODY>
  274.                                           <%
  275. int j_u=characterclassBeans.getCharacterID(i_c);
  276. int num1=useclassBeans.getQuerycha(j_u);
  277. int x = (num1%3 == 0)? num1/3 : num1/3+1; //计算显示的行数
  278. if(x!=0) 
  279. {
  280.            for(int i_q=0; i_q<x; i_q++)
  281.            {   %>
  282.                                           <TR>
  283.                                             <%  for(int j_q=0; j_q<3; j_q++)  //没一行显示4条记录
  284.                   {
  285.                       if(3*i_q+j_q == num1)//显示完全
  286.                        {
  287.                                break;
  288.                                         }
  289.  
  290. %>
  291.                                             <TD height=20>
  292.                                               <DIV align=left> <A  href="prosort.jsp?proType=<%=java.net.URLEncoder.encode(useclassBeans.getUseclassName(3*i_q+j_q),"utf-8")%>
  293. &pageNum=1&proNum=<%=useclassBeans.getUseclassID(3*i_q+j_q)%>"  target=_blank> <%=useclassBeans.getUseclassName(3*i_q+j_q)%></A>|</DIV></TD>
  294.                                             <%}%>
  295.                                           </TR>
  296.                                           <%
  297. }
  298. }
  299. %>
  300.                                         </TBODY>
  301.                                     </TABLE></TD>
  302.                                   </TR>
  303.                                 </TBODY>
  304.                             </TABLE></TD>
  305.                           </TR>
  306.                           <% 
  307.    }
  308.    %>
  309.                         </TBODY>
  310.                       </TABLE></TD>
  311.                     </TR></TBODY></TABLE><IMG 
  312.                   height=9 src="image/leftlist_bottom.gif" 
  313.               width=190></TD></TR></TBODY></TABLE></TD></TR>
  314.         <TR>
  315.           <TD>
  316.             <TABLE cellSpacing=0 cellPadding=0 width=200 align=left border=0>
  317.               <TBODY>
  318.               <TR>
  319.                 <TD><IMG height=73 src="image/help.gif" 
  320.               width=200></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
  321.     <TD class=left vAlign=top align=left width=560>
  322.       <TABLE cellSpacing=0 cellPadding=0 width=559 align=center border=0>
  323.         <TBODY>
  324.         <TR>
  325.           <TD width="559" height=4 align=middle vAlign=top><IMG height=201 
  326.             src="image/book_list.jpg" width=550></TD></TR>
  327.         <TR>
  328.           <TD vAlign=center align=left height=20>&nbsp;&nbsp;&nbsp;<IMG 
  329.             height=11 src="image/jt_2.gif" width=11> 目前位置:<A 
  330.             href="default.jsp">首页</A> &gt; 查看<SPAN 
  331.             class=red1>《<%=productinfoBean.getProductName()%>》</SPAN>详细资料</TD></TR>
  332.         <TR>
  333.           <TD background=image/bgline.gif height=1></TD></TR>
  334.         <TR>
  335.           <TD height="301" align=middle vAlign=top>
  336.             <TABLE cellSpacing=0 cellPadding=0 width=550 align=center 
  337.               border=0><TBODY>
  338.               <TR>
  339.                 <TD vAlign=top align=left height=85>
  340.                   <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  341.                     <TBODY>
  342.                     <TR>
  343.                       <TD width=220 height="310" align=right vAlign=center>
  344.                         <TABLE cellSpacing=0 cellPadding=0 width="100%" 
  345. border=0>
  346.                           <TBODY>
  347.                           <TR>
  348.                             <TD vAlign=top align=left>
  349.                               <TABLE height=230 cellSpacing=0 cellPadding=0 
  350.                               width=196 align=center border=0>
  351.                                 <TBODY>
  352.                                 <TR>
  353.                                 <TD vAlign=center align=middle width=196 
  354.                                 background="image/list_bg.jpg"><IMG class=4l 
  355.                                 height=170 alt=红颜露水 
  356.                                 src="product_image/<%=productinfoBean.getMaxPicture()%>" width=130 
  357.                                 border=0> 
  358.                         </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  359.                         <TABLE cellSpacing=7 cellPadding=0 width="95%" 
  360.                         align=right border=0>
  361.                           <TBODY>
  362.                           <TR>
  363.                             <TD vAlign=center 
  364.                               align=right>&nbsp;原价:¥<%=productinfoBean.getMarketPrice()%>&nbsp;&nbsp;会员价:<SPAN 
  365.                               class=red1>¥<%=productinfoBean.getPreferPrice()%><A 
  366.                           class=font></A></SPAN></TD></TR></TBODY></TABLE></TD>
  367.                       <TD vAlign=top align=left width=340>
  368.                         <TABLE cellSpacing=2 cellPadding=0 width="100%" 
  369. border=0>
  370.                           <TBODY>
  371.                           <TR>
  372.                             <TD><IMG height=36 src="image/list_xx.jpg" 
  373.                               width=248></TD></TR></TBODY></TABLE>
  374.                         <TABLE cellSpacing=0 cellPadding=0 width="100%" 
  375. border=0>
  376.                           <TBODY>
  377.                           <TR>
  378.                             <TD>
  379.                               <TABLE cellSpacing=2 cellPadding=0 width="100%" 
  380.                               align=left border=0>
  381.                                 <TBODY>
  382.                                 <TR vAlign=center align=left>
  383.                                 <TD width=11 height=16><IMG height=11 
  384.                                 src="image/jt_3.gif" width=11></TD>
  385.                                 <TD width=75 height=16>【书&nbsp; 名】</TD>
  386.                                 <TD width=237 height=16><%=productinfoBean.getProductName()%> </TD></TR>
  387.                                 <TR>
  388.                                 <TD colSpan=3 height=1>
  389.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  390.                                 width="100%" align=left border=0>
  391.                                 <TBODY>
  392.                                 <TR>
  393.                                 <TD 
  394.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  395.  <TR vAlign=center align=left>
  396.                                 <TD height=16><IMG height=11 
  397.                                 src="image/jt_3.gif" width=11></TD>
  398.                                 <TD height=16>【条形号码】</TD>
  399.                                 <TD height=16><%=proNum%> </TD></TR>
  400.                                 <TR>
  401.                                 <TD colSpan=3 height=1>
  402.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  403.                                 width="100%" align=left border=0>
  404.                                 <TBODY>
  405.                                 <TR>
  406.                                 <TD 
  407.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  408.                                 <TR vAlign=center align=left>
  409.                                 <TD height=16><IMG height=11 
  410.                                 src="image/jt_3.gif" width=11></TD>
  411.                                 <TD height=16>【作 &nbsp;者】</TD>
  412.                                 <TD height=16><%=productinfoBean.getAuthor()%> </TD></TR>
  413.                                 <TR>
  414.                                 <TD colSpan=3 height=1>
  415.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  416.                                 width="100%" align=left border=0>
  417.                                 <TBODY>
  418.                                 <TR>
  419.                                 <TD 
  420.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  421.                                 <TR vAlign=center align=left>
  422.                                 <TD height=16><IMG height=11 
  423.                                 src="image/jt_3.gif" width=11></TD>
  424.                                 <TD height=16>【上架日期】</TD>
  425.                                 <TD height=16><%=productinfoBean.getShangData()%></TD></TR>
  426.                                 <TR>
  427.                                 <TD colSpan=3 height=1>
  428.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  429.                                 width="100%" align=left border=0>
  430.                                 <TBODY>
  431.                                 <TR>
  432.                                 <TD 
  433.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  434.                                 <TR vAlign=center align=left>
  435.                                 <TD height=16><IMG height=11 
  436.                                 src="image/jt_3.gif" width=11></TD>
  437.                                 <TD height=16>【出版社】</TD>
  438.                                 <TD height=16><%=productinfoBean.getPublish()%></TD></TR>
  439.                                 <TR>
  440.                                 <TD colSpan=3 height=1>
  441.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  442.                                 width="100%" align=left border=0>
  443.                                 <TBODY>
  444.                                 <TR>
  445.                                 <TD 
  446.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  447.                                
  448.                               
  449.                                 <TR vAlign=center align=left>
  450.                                 <TD height=16><IMG height=11 
  451.                                 src="image/jt_3.gif" width=11></TD>
  452.                                 <TD height=16>【所属类别】</TD>
  453.                                 <TD height=16><%=productinfoBean.getUseclassID()%> </TD></TR>
  454.                                 <TR>
  455.                                 <TD colSpan=3 height=1>
  456.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  457.                                 width="100%" align=left border=0>
  458.                                 <TBODY>
  459.                              </TBODY></TABLE></TD></TR>
  460.                               <TR>
  461.                                 <TD colSpan=3 height=1>
  462.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  463.                                 width="100%" align=left border=0>
  464.                                 <TBODY>
  465.                                 <TR>
  466.                                 <TD 
  467.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  468.                                 <TR>
  469.                                 <TD height=16><IMG height=11 
  470.                                 src="image/jt_3.gif" width=11></TD>
  471.                                 <TD height=16>【图书库存】</TD>
  472.                                 <TD height=16><SPAN 
  473.                                 class=red1><STRONG><%=productinfoBean.getStorage()%></STRONG></SPAN> </TD></TR>
  474. <TR>
  475.                                 <TD colSpan=3 height=1>
  476.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  477.                                 width="100%" align=left border=0>
  478.                                 <TBODY>
  479.                                 <TR>
  480.                                 <TD 
  481.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  482. <TR vAlign=center align=left>
  483.                                 <TD width=11 height=16><IMG height=11 
  484.                                 src="image/jt_3.gif" width=11></TD>
  485.                                 <TD width=75 height=16>【书&nbsp; 名】</TD>
  486.                                 <TD width=237 height=16><%=productinfoBean.getProductName()%> </TD></TR>
  487.                                 <TR>
  488.                                 <TD colSpan=3 height=1>
  489.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  490.                                 width="100%" align=left border=0>
  491.                                 <TBODY>
  492.                                 <TR>
  493.                                 <TD 
  494.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  495.  <TR vAlign=center align=left>
  496.                                 <TD width=11 height=16><IMG height=11 src="image/jt_3.gif" width=11></TD>
  497.                                 
  498.                                 <TD height=16><input onClick="showSub('vote')" type=button value=我要投票 name=Submit3></TD>
  499.                                 <TD height=16><input onClick="showSub('comment')" type=button value=我要评论 name=Submit32>
  500.                                   <input onClick="showSub('view')" type=button value=查看评论 name=Submit322> </TD>
  501.  </TR>
  502.                                 <TR>
  503.                                 <TD colSpan=3 height=1>
  504.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  505.                                 width="100%" align=left border=0>
  506.                                 <TBODY>
  507.                                 <TR>
  508.                                 <TD 
  509.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR>
  510.                                 <TR>
  511.                                 <TD colSpan=3 height=1>
  512.                                 <TABLE height=1 cellSpacing=0 cellPadding=0 
  513.                                 width="100%" align=left border=0>
  514.                                 <TBODY>
  515.                                 <TR>
  516.                                 <TD 
  517.                                 background=image/line.gif></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  518.                         <TABLE cellSpacing=5 cellPadding=0 width="100%" 
  519. border=0>
  520.                           <TBODY>
  521.                           <TR>
  522.                             <TD vAlign="middle" align="center"><span style="CURSOR: hand" onClick="openScript('purchasecart.jsp?bookid=<%= proNum %>','pur',650,300);"><img src="image/buynow.gif" alt=千寻万觅,要的就是她 width="106" height="40" border=0></span> 
  523.   <SPAN style="CURSOR: hand" 
  524.                               onclick="openScript('UserCenter/collection.jsp?bookid=<%= proNum %>','collection',650,300);">&nbsp;<IMG src="image/favnow.gif" 
  525.                               alt=好东东,收藏起来先  width="104" height="39" 
  526.                               border=0></SPAN> 
  527.                   </TD>
  528.                           </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
  529.             
  530.             </TBODY></TABLE></TD></TR></TBODY></TABLE>
  531.       <TABLE id=vote style="MARGIN-TOP: 5px" cellSpacing=0 cellPadding=0 
  532.       width="101%" align=center border=0 background="bgColor=#fbfdf7">
  533.         <TBODY>
  534.           <TR>
  535.             <TD width="43%" height="84" style="LINE-HEIGHT: 28px">
  536.               <FORM name=form1 action="productvote.jsp?proType=<%=proType%>&proNum=<%=proNum.replace('#', ',')%>" 
  537.             method=post>
  538.                 您对该产品的评价:<BR>
  539.                 <INPUT type=radio value="best" name="productvote">
  540.           非常满意
  541.           <INPUT type=radio value="good" name="productvote">
  542.           比较满意 <BR>
  543.           <INPUT 
  544.             type=radio value="middle" name="productvote">
  545.           一般满意
  546.           <INPUT type=radio value="bad"
  547.             name="productvote">
  548.           不满意
  549.           <input type=submit value="投 票" name=Submit>
  550.           <BR>
  551.               </FORM></TD>
  552.             <TD width="57%">
  553.               <DIV align=right>
  554.                 <table width="100%"  border="0" cellspacing="0">
  555.                   <tr>
  556.                     <td width="20%">&nbsp;</td>
  557.                     <td width="80%"><%
  558.     
  559.     int good;
  560. int best;
  561. int middle;
  562. int bad;
  563. int total_p;
  564.    if(productvoteBean.getNew(proNum))
  565.    {
  566.        best=productvoteBean.getGood();
  567.        good=productvoteBean.getBest();
  568.    middle=productvoteBean.getMiddle();
  569.    bad=productvoteBean.getBad();
  570.    total_p=good+middle+bad+best;
  571. }
  572. else
  573. {
  574.     good=0;
  575. middle=0;
  576. bad=0;
  577. best=0;
  578. total_p=0;
  579. }
  580. %></td>
  581.                   </tr>
  582.                  
  583.                   <tr>
  584.                     <td height="15">投票结果:</td>
  585.                     <td>已经有 <font color="#FF0000"><%=total_p%> </font>位 客人 投票</td>
  586.                   </tr>
  587.                 </table> 
  588.                  <table width="100%" height="39"  border="0" cellspacing="0">
  589.                                             <tr>
  590.                                            
  591.                                               <td width="23%" height="39">非常满意<font color="#FF0000"><%=best%></font></td>
  592.                                               <td width="24%">比较满意<font color="#FF0000"><%=good%></font></td>
  593.                                               <td width="21%">一般满意<font color="#FF0000"><%=middle%></font></td>
  594.                                               <td width="32%">不满意<font color="#FF0000"><%=bad%></font></td>
  595.                                             </tr>
  596.                 </table>
  597.               </DIV></TD>
  598.           </TR>
  599.         </TBODY>
  600.       </TABLE>      
  601.   
  602.       <TABLE class=px12b2 id=comment style="MARGIN-TOP: 5px" cellSpacing=1 
  603.       cellPadding=2 width="92%" align=center bgColor=#bbd798 border=0>
  604.         <TBODY>
  605.           <TR>
  606.             <TD bgColor=#fbfdf7>
  607.               <FORM name=form2 onsubmit="return check()" 
  608.             action=productremark.jsp?proType=<%=proType%>&proNum=<%=proNum.replace('#', ',')%>  method=post>
  609.                 您的留言:<BR>
  610.                 留言标题:
  611.                 <INPUT 
  612.             class=inputStyleCopy size=30 name=title>
  613.                 <BR>
  614.                 留言内容:
  615.                 <TEXTAREA class=inputStyleCopy name=content rows=5 cols=70></TEXTAREA>
  616.                 <BR>
  617.                 <INPUT type=submit value="发 表" name=Submit2>
  618.           留言字数不超过200个
  619.             </FORM></TD>
  620.           </TR>
  621.         </TBODY>
  622.       </TABLE>
  623.       <TABLE class=px12b2 id=view style="MARGIN-TOP: 5px" cellSpacing=1 
  624.       cellPadding=2 width="92%" align=center bgColor=#fbfdf7 border=0>
  625.         <TBODY>
  626.     <%
  627.      productremarkBeans.getQuery("5",proNum);
  628.  if(productremarkBeans.getItems() > 0)
  629.  {
  630.      for(int i=0; i<productremarkBeans.getItems(); i++)
  631.  {
  632.     out.println("<tr><td>&nbsp;</td><td height="25">"+"<font color=red>标题:</font>"+" "+convert(new StringBuffer(productremarkBeans.getTitle(i)))+"<br>"+"<font color=blue>内容:</font>"+" "+convert(new StringBuffer(productremarkBeans.getContent(i)))+"</td></tr>");
  633.  }
  634.  }
  635.  else
  636.  {
  637.       out.println("<tr><td>&nbsp;</td><td height="25">"+"<font color=red>暂时还没有该产品的用户评论</font>"+"</td></tr>");
  638.   }
  639.  %>
  640.         </TBODY>
  641.       </TABLE>
  642.       <TABLE class=px12b2 style="MARGIN-TOP: 5px" height=106 cellSpacing=1 
  643.       cellPadding=2 width="99%" align=center bgColor=#bbd798 border=0>
  644.         <TBODY>
  645.                      <%
  646.        StringBuffer str=new StringBuffer(productinfoBean.getIntroduce());
  647.                                    str=convert(str);
  648. %>
  649.           <TR>
  650.             <TD bgColor=#fbfdf7><%=str%>
  651.             </TD>
  652.           </TR>
  653.         </TBODY>
  654.   </TABLE>     </TD></TR><td height="2"></TBODY></TABLE>
  655. <LINK 
  656. href="image/buyok_shop.css" type=text/css rel=stylesheet>
  657. <STYLE type=text/css>BODY {
  658. MARGIN: 0px
  659. }
  660. </STYLE>
  661. <%@ include file ="foot.jsp" %>
  662. </BODY></HTML>
  663. <SCRIPT language=javascript>
  664. var vote=document.getElementById("vote");
  665. var comment=document.getElementById("comment");
  666. var view=document.getElementById("view");
  667. vote.style.display="none";
  668. comment.style.display="none";
  669. view.style.display="none";
  670. function showSub(str){
  671. vote.style.display="block";
  672. comment.style.display="block";
  673. view.style.display="block";
  674. if(str=="vote"){
  675. comment.style.display="none";
  676. view.style.display="none";
  677. }
  678. if(str=="comment"){
  679. vote.style.display="none";
  680. view.style.display="none";
  681. }
  682. if(str=="view"){
  683. vote.style.display="none";
  684. comment.style.display="none";
  685. }
  686. }
  687. function check(){
  688. if(document.form2.title.value==""||document.form2.content.value==""){
  689. alert("信息不完整");
  690. return false;
  691. }
  692. if(document.form2.content.value.length>100){
  693. alert("字数过多");
  694. return false;
  695. }
  696. }
  697. </SCRIPT>