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

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="newBean" class="MyFly.Bean.newBean" scope="request"/>
  4. <jsp:useBean id="newBeans" class="MyFly.Bean.newBeans" scope="request"/>
  5. <%@ include file ="top.jsp" %>
  6. <%
  7.     String index=request.getParameter("index");
  8. if(index==null){
  9. out.println("<Script language=JavaScript>alert('您访问的页面不存在');JavaScript:history.back();</Script>");
  10. }
  11. %>
  12. <HTML><HEAD><TITLE>-星海图书网-</TITLE>
  13. <META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
  14. href="image/buyok_shop.css" type=text/css 
  15. rel=stylesheet><LINK href="image/table.css" type=text/css 
  16. rel=stylesheet><LINK href="image/buyok_shop.css" 
  17. type=text/css rel=stylesheet>
  18. <STYLE type=text/css>BODY {
  19. MARGIN: 0px
  20. }
  21. .STYLE1 {
  22. COLOR: #ff3300
  23. }
  24. .STYLE2 {
  25. COLOR: #ff0000
  26. }
  27. </STYLE>
  28. <%!
  29.  StringBuffer convert(StringBuffer sour){
  30. for(int i=0;i<sour.length();i++){
  31. if(sour.substring(i,i+1).equals("n")){
  32. sour.delete(i,i+1);
  33. sour.insert(i,"</p><p>");
  34. }
  35. }
  36. return sour;
  37. }
  38. %>
  39. <META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
  40. <BODY>
  41. <CENTER>
  42. <TABLE class=grayline cellSpacing=0 cellPadding=0 width=760 align=center 
  43. bgColor=#ffffff border=0>
  44.   <TBODY>
  45.   <TR>
  46.       <TD vAlign=top align=left height=55><IMG height=55 src="image/yzdt1.gif" width=255></TD>
  47.                         
  48.   </TR>
  49.   <TR>
  50.     <TD vAlign=top align=left width=210 bgColor=#fafafa>
  51.  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
  52. border=0>
  53.                           <TBODY>
  54.    <% 
  55.     int num=1;
  56.     newBeans.getQuery("-1");
  57. for(int i=0; i<newBeans.getItems(); i++)
  58. {
  59.                          %>
  60.                             <TR> 
  61.                               <TD width=22 height=25> <DIV align=center><IMG height=11 
  62.                               src="image/3.gif" width=10 
  63.                               align=absMiddle></DIV></TD>
  64.                               <TD width=178><a href="news.jsp?index=<%=newBeans.getNewID(i)%>"><%=newBeans.getTopic(i)%></a></TD>
  65.                             </TR>
  66.                            
  67.         <%
  68. }
  69. %>
  70.                           </TBODY>
  71.           </TABLE>                
  72.              
  73.       </TD>
  74.     <TD class=left vAlign=top align=middle width=550 bgColor=#fdfdfd>
  75.       <TABLE cellSpacing=2 cellPadding=2 width="100%" align=center border=0>
  76.         <TBODY>
  77.         <TR>
  78.           <TD align=right width=24 height=30><IMG height=11 
  79.             src="image/jt_2.gif" width=11></TD>
  80.           <TD width=510>当前位置:<A 
  81.             href="default.jsp">首页</A> &gt; <A 
  82.             href="#">新闻动态</A> &gt; 
  83.         浏览新闻</TD>
  84.         </TR>
  85.         <TR>
  86.           <TD align=middle background="image/bgline.gif" 
  87.           colSpan=2 height=1></TD></TR></TBODY></TABLE>
  88.       <TABLE cellSpacing=0 cellPadding=1 width="95%" align=center 
  89.       bgColor=#ffffff border=0>
  90.         <TBODY>
  91.         <TR align=center>
  92.           <TD><B><FONT color=#ff6600>
  93.     <%
  94. if(newBean.getNew(Integer.parseInt(index)))
  95. {
  96.   %>
  97.             <DIV style="FONT-SIZE: 15pt; LINE-HEIGHT: 250%"> <%=newBean.getTopic()%></DIV>
  98.           </FONT></B></TD></TR>
  99.         <TR>
  100.           <TD align=middle><FONT color=#448697><IMG 
  101.             src="image/xie.gif" border=0>出处:<%=newBean.getOrigin()%>&nbsp; 
  102.             发布日期:&nbsp;【<%=newBean.getAppendTime()%>】 </FONT></TD>
  103.         </TR>
  104.         <TR>
  105.           <TD height=25></TD></TR>
  106.         <TR>
  107.           <TD vAlign=center bgColor=#ffffff>
  108.             <DIV   style="LINE-HEIGHT: 180%">
  109.           <%=convert(new StringBuffer(newBean.getContent()))%> 
  110.                           <%
  111. }
  112. %></DIV></TD></TR></TBODY></TABLE><BR><BR></TD></TR></TBODY></TABLE>
  113. <%@ include file ="foot.jsp" %>
  114. </CENTER></BODY></HTML>