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

Applet

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  3. <jsp:useBean id="messageboardBean" class="MyFly.Bean.messageboardBean" scope="request"/>
  4. <jsp:useBean id="messageboardBeans" class="MyFly.Bean.messageboardBeans" scope="request"/>
  5. <jsp:useBean id="useclassBeans" class="MyFly.Bean.useclassBeans" scope="request"/>
  6. <jsp:useBean id="characterclassBeans" class="MyFly.Bean.characterclassBeans" scope="request"/>
  7. <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>星海购书网留言簿</TITLE>
  8. <%@ include file ="top.jsp" %>
  9. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  10. <STYLE type=text/css>BODY {
  11. MARGIN: 0px
  12. }
  13. </STYLE>
  14. <STYLE type=text/css>BODY {
  15. MARGIN: 0px
  16. }
  17. .STYLE1 {
  18. COLOR: #ff3300
  19. }
  20. .STYLE2 {
  21. COLOR: #ff0000
  22. }
  23. </STYLE>
  24. <TABLE class=grayline dataSrc="" cellSpacing=0 cellPadding=0 width=760 
  25. align=center border=0>
  26.   <TBODY>
  27.   <TR>
  28.     <TD vAlign=top align=left width=210 height=409>
  29.       <STYLE type=text/css>TD {
  30. FONT-SIZE: 12px
  31. }
  32. .lei1 {
  33. FONT-SIZE: 13px
  34. }
  35. </STYLE>
  36.       <LINK href="../image/buyok_shop.css" type=text/css rel=stylesheet 
  37.       src="../image/buyok_shop.css">
  38.       <TABLE dataSrc="" height=263 cellSpacing=0 cellPadding=0 width=200 
  39.       align=center border=0>
  40.         <TBODY>
  41.         <TR>
  42.           <TD width=206 height=31><IMG height=50 src="../image/lei.gif" 
  43.             width=200></TD></TR>
  44.         <TR>
  45.           <TD vAlign=top align=middle height=189>
  46.             <TABLE dataSrc="" height=226 cellSpacing=0 cellPadding=0 width=190 
  47.             align=center background=../image/leftlist_bg.jpg border=0 
  48.             src="http://www.erbook.com.cn/images/leftlist_bg.jpg">
  49.               <TBODY>
  50.               <TR>
  51.                 <TD vAlign=top align=middle 
  52.                 background=../image/leftlist_bg.jpg bgColor=#ebebeb 
  53.                 height=189 
  54. src="http://www.erbook.com.cn/images/leftlist_bg.jpg"><TABLE cellSpacing=0 cellPadding=0 width="90%" 
  55.                               border=0>
  56.                   <TBODY>
  57.                     <%
  58.  characterclassBeans.getQuery("-1");
  59.   for(int i_c=0; i_c<characterclassBeans.getItems(); i_c++)//第一层循环读出大类
  60.      {
  61. %>
  62.                     <TR>
  63.                       <TD>
  64.                         <TABLE height=61 cellSpacing=0 cellPadding=0 width="100%" border=0>
  65.                           <TBODY>
  66.                             <TR>
  67.                               <TD height=30>
  68.                                 <DIV align=left><IMG height=9 
  69.                                 src="../image/bit05.gif" width=8> <SPAN class="lei1  STYLE4"><%=characterclassBeans.getCharacterName(i_c)%></SPAN></DIV></TD>
  70.                             </TR>
  71.                             <TR>
  72.                               <TD height="31">
  73.                                 <TABLE cellSpacing=0 cellPadding=0 width="90%" 
  74.                                 align=center border=0>
  75.                                   <TBODY>
  76.                                     <%
  77. int j_u=characterclassBeans.getCharacterID(i_c);
  78. int num1=useclassBeans.getQuerycha(j_u);
  79. int x = (num1%3 == 0)? num1/3 : num1/3+1; //计算显示的行数
  80. if(x!=0) 
  81. {
  82.            for(int i_q=0; i_q<x; i_q++)
  83.            {   %>
  84.                                     <TR>
  85.                                       <%  for(int j_q=0; j_q<3; j_q++)  //没一行显示4条记录
  86.                   {
  87.                       if(3*i_q+j_q == num1)//显示完全
  88.                        {
  89.                                break;
  90.                                         }
  91.  
  92. %>
  93.                                       <TD height=20>
  94.                                         <DIV align=left> <A  href="prosort.jsp?proType=<%=useclassBeans.getUseclassName(3*i_q+j_q)%>
  95. &pageNum=1&proNum=<%=useclassBeans.getUseclassID(3*i_q+j_q)%>"  target=_blank> <%=useclassBeans.getUseclassName(3*i_q+j_q)%></A>|</DIV></TD>
  96.                                       <%}%>
  97.                                     </TR>
  98.                                     <%
  99. }
  100. }
  101. %>
  102.                                   </TBODY>
  103.                               </TABLE></TD>
  104.                             </TR>
  105.                           </TBODY>
  106.                       </TABLE></TD>
  107.                     </TR>
  108.                     <%
  109.    }
  110.    %>
  111.                   </TBODY>
  112.                 </TABLE></TD>
  113.               </TR></TBODY></TABLE><IMG 
  114.             height=9 src="../image/leftlist_bottom.gif" 
  115.         width=190></TD></TR></TBODY></TABLE></TD>
  116.     <TD class=left vAlign=top align=left width=550>
  117.       <TABLE dataSrc="" cellSpacing=0 cellPadding=0 width="100%" border=0>
  118.         <TBODY>
  119.         <TR>
  120.           <TD colSpan=4><IMG height=201 src="../image/top.gif" 
  121.             width=550></TD></TR>
  122.         <TR>
  123.           <TD align=middle width=20 height=20><IMG height=11 
  124.             src="../image/jt_2.gif" width=11></TD>
  125.           <TD width=292>当前位置: <A 
  126.             href="../default.jsp">首页</A> &gt; 留言簿 
  127. &nbsp;</TD>
  128.           <TD align=middle width=138><A 
  129.             href="release.jsp">发表留言</A>&nbsp;&nbsp;            </TD>
  130.         </TR>
  131.         <TR>
  132.           <TD background=../image/bgline.GIF colSpan=4 height=1 
  133.           src="http://www.erbook.com.cn/guest/images/bgline.GIF"></TD></TR>
  134.         <TR>
  135.           <TD vAlign=top align=middle colSpan=4 height=50><BR>
  136.         <%
  137.        int size=4;
  138.            String strNum=request.getParameter("pageNum");
  139.        int cur;
  140.            if(strNum == null || strNum.equals(""))
  141.        {
  142.             cur=1;
  143.        }
  144.        else
  145.        {
  146.                 cur=Integer.parseInt(strNum);//取得要显示的页
  147.         }
  148.          messageboardBeans.init(size);
  149.          int pageNum=messageboardBeans.get_pageCount(); //取得总页数
  150.   
  151.          messageboardBeans.get_pageRow(cur);
  152.   
  153.           for(int i=0; i<messageboardBeans.getItems(); i++)
  154.            {
  155.  %>
  156.             <TABLE dataSrc="" cellSpacing=0 cellPadding=0 width=485 align=center 
  157.             border=0>
  158.               <TBODY>
  159.               <TR>
  160.                 <TD><IMG height=14 src="img/bg_top.jpg" 
  161.                 width=485></TD></TR>
  162.               <TR>
  163.                 <TD vAlign=top align=left background="img/bg_line.jpg "
  164.                 height=118 
  165.                 src="img/bg_line.jpg">
  166.                   <TABLE dataSrc="" cellSpacing=1 cellPadding=0 width=475 
  167.                   align=center border=0>
  168.                     <TBODY>
  169.                     <TR bgColor=#fafafa>
  170.                       <TD vAlign=center align=middle bgColor=#fafafa 
  171.                         height=25><%=messageboardBeans.getName(i)%></TD>
  172.                       <TD vAlign=center align=left bgColor=#fafafa colSpan=2 
  173.                       height=25>留言主题:<%=messageboardBeans.getTitle(i)%></TD></TR>
  174.                     <TR>
  175.                       <TD vAlign=center align=middle rowSpan=2><IMG height=100 
  176.                         src="face/<%=messageboardBeans.getFace(i)%>.gif" width=100></TD>
  177.                       <TD vAlign=top align=left colSpan=2 height=80><FONT 
  178.                         class=new><%=messageboardBeans.getContent(i)%></FONT></TD></TR>
  179.                     <TR>
  180.                       <TD vAlign=bottom align=left width=180 bgColor=#fafafa 
  181.                       height=20><IMG height=24 alt=<%=messageboardBeans.getQq(i)%>
  182.                         src="../image/oicq.gif" width=24> <A 
  183.                         href="mailto:<%=messageboardBeans.getMailbox(i)%>"><IMG 
  184.                         title=给谁说青春不能错发一封信 height=24 
  185.                         src="../image/email.gif" width=24 border=0></A> 
  186.                       </TD>
  187.                       <TD vAlign=center align=middle width=187 bgColor=#fafafa 
  188.                       height=24>发表于:<%=messageboardBeans.getTime(i)%></TD></TR>
  189.                     <TR>
  190.                       <TD colSpan=3>
  191.                         <TABLE dataSrc="" cellSpacing=0 cellPadding=0 
  192.                         width="100%" border=0>
  193.                           <TBODY>
  194.                           <TR bgColor=#fafafa>
  195.                             <TD class=orge align=middle width="22%">版主回复:</TD>
  196.                             <TD class=orge width="78%" bgColor=#fafafa 
  197.                               height=25><%=messageboardBeans.getHuifu(i)%></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
  198.               <TR>
  199.                 <TD><IMG height=14 src="img/bg_bt.jpg" 
  200.                 width=485></TD></TR></TBODY></TABLE>
  201.     <%
  202.    }
  203.    %>
  204.             <TABLE dataSrc="" cellSpacing=5 cellPadding=0 width=550 align=center 
  205.             bgColor=#ffffff border=0>
  206. <tr>
  207. <td height="20">
  208. <div align="right"><a href="indexme.jsp?pageNum=<%=1%>">首页 
  209.             <% 
  210.   if(cur > 1)
  211.   {
  212.   %>
  213.             <a href="indexme.jsp?pageNum=<%=cur-1 %>">上一页</a> &nbsp;
  214.                 <%
  215.   }
  216.   %>
  217.   
  218.                 <%
  219.   if(cur < pageNum)
  220.   {
  221.   %>
  222.             <a href="indexme.jsp?pageNum=<%=cur+1 %>">下一页</a> 
  223.             <%
  224.    }
  225.    %>
  226.             <a href="indexme.jsp?pageNum=<%=pageNum%>">尾页</a>&nbsp;页次: <STRONG><FONT 
  227.                   color=red><%=cur%></FONT>/<%=pageNum%></STRONG>页 &nbsp;<B><%=size%></B>条/页
  228. </div></td>
  229. </tr>
  230.            </TABLE>
  231.           </TD>
  232.         </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  233. <%@ include file ="foot.jsp" %>
  234. </BODY></HTML>