news_all.jsp
上传用户:zdly666
上传日期:2022-08-09
资源大小:6511k
文件大小:7k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="conn.jsp"%>
  3. <% 
  4. String condition="select * from manage";
  5. rs=stmt.executeQuery(condition);
  6. rs.next();
  7. %>
  8. <html>
  9. <head>
  10. <link rel="stylesheet" href="style.css" type="text/css">
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <title>新闻删除</title>
  13. <link href="style.css" rel="stylesheet" type="text/css">
  14. <style type="text/css">
  15. <!--
  16. .style1 {font-family: "宋体"}
  17. .style2 {font-size: 9px}
  18. .style3 {color: #9999CC; text-decoration: none; font-family: "宋体";}
  19. .style4 {font-size: 9pt}
  20. .style5 {color: #999999}
  21. .style6 {font-family: "宋体"; color: #999999; }
  22. .style7 {color: #FF0000}
  23. .style8 {font-family: Tahoma}
  24. a.rights:link {
  25. COLOR: #000000;
  26. TEXT-DECORATION: none;
  27. }
  28. a.rights:visited {
  29. COLOR: #000000;
  30. TEXT-DECORATION: none;
  31. }
  32. a.rights:hover {
  33. COLOR: #FF0000;  
  34. TEXT-DECORATION: none;
  35. }
  36. .style9 {
  37. font-size: 9pt;
  38. color: #FF0000;
  39. font-weight: bold;
  40. }
  41. -->
  42. </style>
  43. </head>
  44. <body background="img/beijing.gif" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  45. <table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="tittle0">
  46.   <tr>
  47.     <td width="389" align="center" valign="middle"><img src="img/toplogo11.gif" width="389" height="150"></td>
  48.     <td width="66" background="img/toplogobg.jpg">&nbsp;</td>
  49.     <td width="195"><img src="img/toplogo2.jpg" width="203" height="150"></td>
  50.   </tr>
  51. </table>
  52. <table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="tittle1">
  53.   <tr>
  54.     <td height="26" background="img/bg.gif"><table width="100%" height="15" border="0" cellpadding="0" cellspacing="0">
  55.       <tr align="center">
  56.         <td class="font0"><span class="font0">版主:</span><font color="#006699"><%=rs.getString("adminname")%></font></td>
  57.         <td class="font0"><a href="login.jsp">管理员登陆</a> </td>
  58.         <td class="font0"><a href="Index.jsp" class="font0">个人简介</a>  <a href="add.jsp" class="font0"> </a></td>
  59.         <td class="font0"><a href="add.jsp" class="font0">给我留言</a></td>
  60.         <td class="font0"> <font color="#000099"> <span> <a href="news.jsp" class="font0">新闻系统</a></span><font color="#000099"> </font><font color="#000099"> </font></font></td>
  61.         <td class="font0"><font color="#000099"><a href="Picture1.jsp"  class="font0">个人相册</a></font></td>
  62.       </tr>
  63.     </table></td>
  64.   </tr>
  65. </table>
  66. <p>
  67. </p>
  68. <% 
  69. String condition2="select * from art order by art_id DESC";
  70. rs=stmt.executeQuery(condition2);
  71. int intPageSize; 
  72. int intRowCount; 
  73. int intPageCount; 
  74. int intPage; 
  75. String strPage;
  76. int i;
  77. intPageSize = 8;
  78. strPage = request.getParameter("page");
  79. if(strPage==null){
  80. intPage = 1;
  81. }
  82. else
  83. {
  84. intPage = Integer.parseInt(strPage);
  85. if(intPage<1){ intPage = 1;}
  86. }
  87. rs.last(); 
  88. intRowCount = rs.getRow(); 
  89. intPageCount =(intRowCount+intPageSize-1) / intPageSize;
  90. if(intPage>intPageCount) intPage = intPageCount;
  91. if(intPageCount>0){
  92. rs.absolute((intPage-1) * intPageSize+1); 
  93. i = 0; 
  94. while(i< intPageSize && !rs.isAfterLast())
  95. {
  96. String MessageID=rs.getString("art_id");
  97. String author=rs.getString("author");
  98. String art_content=rs.getString("art_content");
  99. String tel=rs.getString("tel");
  100. String art_headline=rs.getString("art_headline");
  101. %>
  102. <table width="650" border="0" cellspacing="0" cellpadding="0" align="center" style="word-break:break-all">
  103.   <tr> 
  104.     <td width="81" height="10"><img src="img/top1.gif" width="81" height="22"></td>
  105.     <td width="575" background="img/top2.gif">&nbsp;</td>
  106.     <td width="1"><img src="img/top3.gif" width="47" height="22"></td>
  107.   </tr>
  108.   <tr> 
  109.     <td colspan="3" align="center" bgcolor="#FFFFFF" class="tittle2"><table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" background="img/bg.gif" class="tittle3">
  110.         <tr> 
  111.           <td width="9%" align="center"><img src="img/topicnew.gif" width="16" height="18"></td>
  112.           <td width="70%"><span class="style2"><span class="style4"><span class="style7" align="left"><%=author%><span style="font-family: &quot;??&quot;;" #invalid_attr_id="none"></span></span><span class="style3">发表的新闻</span><font color="#000099"><font color="#FF0000">&nbsp;&nbsp;</font></font></span></span></td>
  113.           
  114.           
  115.           <td width="10%"><a href="news_edit.jsp?id=<%=MessageID%>"><img src="img/icon_edit_topic.gif" width="16" height="16" border="0" alt="编辑该留言[只有版主才有的权利]"></a></td>
  116.           <td width="11%"><a href="news_del.jsp?id=<%=MessageID%>"><img src="img/icon_delete_reply.gif" alt="删除该留言[只有版主才有的权利]" width="16" height="16" border="0"></a></td>
  117.         </tr>
  118.         <tr></tr>
  119.       </table>
  120.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  121.         <tr> 
  122.           <td width="100" height="92" align="center" valign="top"> <table width="100%" border="0" cellspacing="3" cellpadding="0">
  123.             <tr>
  124.               <td align="center"><span class="style4">题目:<%=art_headline%></span></td>
  125.             </tr>
  126.             <tr>
  127.               <td align="center"><span class="style4">电话:<%=tel%></span></td>
  128.             </tr>
  129.           </table></td>
  130.           <td width="423"><span class="style4"><%=art_content %></span></td>
  131.         </tr>
  132.         <tr align="center"> 
  133.           <td colspan="2" valign="top"><img src="images/bg_4.gif" width="100%" height="1"></td>
  134.         </tr>
  135.         
  136.       </table></td>
  137.   </tr>
  138. </table>
  139. <table border="0" width="650" cellspacing="0" cellpadding="0" height="7" align="center">
  140.   <tr> 
  141.     <td width="2%" align="center"><img src="img/end1.gif" width="12" height="14"></td>
  142.     <td width="89%" align="center" background="img/end2.gif"></td>
  143.     <td width="9%" align="center"><img src="img/end3.gif" width="65" height="14"></td>
  144.   </tr>
  145.  
  146. </table>
  147. <p> 
  148.   <% 
  149.   
  150. rs.next(); 
  151.    i++; 
  152.   } 
  153.   }
  154. rs.close();
  155. stmt.close(); 
  156. conn.close();
  157. %>
  158. </p>
  159. <p>  
  160. </p>
  161. <table width="650" border="0" align="center" cellpadding="0" cellspacing="1" class="tittle0">
  162.   <tr>
  163.     <td height="28" align="center" background="img/bg.gif" class="font0 style1">当前显示第<span class="style7"> <%=intPage%></span> 页&nbsp;&nbsp; 共 <%=intPageCount%> 页 &nbsp;&nbsp;&nbsp;&nbsp;导航:<a href="news_all.jsp?page=1" class="font0">首页</a>
  164.       <%if(intPage>1){%>
  165.       <a href="news_all.jsp?page=<%=intPage-1%>" class="font0">上一页</a>
  166.       <%}else{%>
  167. 上一页
  168. <%
  169.   }%>
  170.  
  171. <%if(intPage<intPageCount){%>
  172. <a href="news_all.jsp?page=<%=intPage+1%>" class="font0">下一页</a>
  173. <%}else{%>
  174. 下一页
  175. <%
  176.   }%>
  177. <a href="news_all.jsp?page=<%=intPageCount%>" class="font0">尾页</a> </td>
  178.   </tr>
  179. </table>
  180. <table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
  181.   <tr>
  182.     <td align="center"><p class="style4 style8"><a href="http://jorwoo.yeah.net" target="_blank" class="rights">周亚平</a>&nbsp;&nbsp; 版权所有 <br>
  183. 程序设计:周亚平&nbsp;&nbsp; E-mail: <a href="mailto:zhouyaping1986@126.com" class="rights">zhouyaping1986@126.com</a><br>
  184. QQ:153589840</p>    </td>
  185.   </tr>
  186. </table>