news_all.jsp
资源名称:zyp.rar [点击查看]
上传用户:zdly666
上传日期:2022-08-09
资源大小:6511k
文件大小:7k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <%@ include file="conn.jsp"%>
- <%
- String condition="select * from manage";
- rs=stmt.executeQuery(condition);
- rs.next();
- %>
- <html>
- <head>
- <link rel="stylesheet" href="style.css" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>新闻删除</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- <style type="text/css">
- <!--
- .style1 {font-family: "宋体"}
- .style2 {font-size: 9px}
- .style3 {color: #9999CC; text-decoration: none; font-family: "宋体";}
- .style4 {font-size: 9pt}
- .style5 {color: #999999}
- .style6 {font-family: "宋体"; color: #999999; }
- .style7 {color: #FF0000}
- .style8 {font-family: Tahoma}
- a.rights:link {
- COLOR: #000000;
- TEXT-DECORATION: none;
- }
- a.rights:visited {
- COLOR: #000000;
- TEXT-DECORATION: none;
- }
- a.rights:hover {
- COLOR: #FF0000;
- TEXT-DECORATION: none;
- }
- .style9 {
- font-size: 9pt;
- color: #FF0000;
- font-weight: bold;
- }
- -->
- </style>
- </head>
- <body background="img/beijing.gif" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
- <table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="tittle0">
- <tr>
- <td width="389" align="center" valign="middle"><img src="img/toplogo11.gif" width="389" height="150"></td>
- <td width="66" background="img/toplogobg.jpg"> </td>
- <td width="195"><img src="img/toplogo2.jpg" width="203" height="150"></td>
- </tr>
- </table>
- <table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="tittle1">
- <tr>
- <td height="26" background="img/bg.gif"><table width="100%" height="15" border="0" cellpadding="0" cellspacing="0">
- <tr align="center">
- <td class="font0"><span class="font0">版主:</span><font color="#006699"><%=rs.getString("adminname")%></font></td>
- <td class="font0"><a href="login.jsp">管理员登陆</a> </td>
- <td class="font0"><a href="Index.jsp" class="font0">个人简介</a> <a href="add.jsp" class="font0"> </a></td>
- <td class="font0"><a href="add.jsp" class="font0">给我留言</a></td>
- <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>
- <td class="font0"><font color="#000099"><a href="Picture1.jsp" class="font0">个人相册</a></font></td>
- </tr>
- </table></td>
- </tr>
- </table>
- <p>
- </p>
- <%
- String condition2="select * from art order by art_id DESC";
- rs=stmt.executeQuery(condition2);
- int intPageSize;
- int intRowCount;
- int intPageCount;
- int intPage;
- String strPage;
- int i;
- intPageSize = 8;
- strPage = request.getParameter("page");
- if(strPage==null){
- intPage = 1;
- }
- else
- {
- intPage = Integer.parseInt(strPage);
- if(intPage<1){ intPage = 1;}
- }
- rs.last();
- intRowCount = rs.getRow();
- intPageCount =(intRowCount+intPageSize-1) / intPageSize;
- if(intPage>intPageCount) intPage = intPageCount;
- if(intPageCount>0){
- rs.absolute((intPage-1) * intPageSize+1);
- i = 0;
- while(i< intPageSize && !rs.isAfterLast())
- {
- String MessageID=rs.getString("art_id");
- String author=rs.getString("author");
- String art_content=rs.getString("art_content");
- String tel=rs.getString("tel");
- String art_headline=rs.getString("art_headline");
- %>
- <table width="650" border="0" cellspacing="0" cellpadding="0" align="center" style="word-break:break-all">
- <tr>
- <td width="81" height="10"><img src="img/top1.gif" width="81" height="22"></td>
- <td width="575" background="img/top2.gif"> </td>
- <td width="1"><img src="img/top3.gif" width="47" height="22"></td>
- </tr>
- <tr>
- <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">
- <tr>
- <td width="9%" align="center"><img src="img/topicnew.gif" width="16" height="18"></td>
- <td width="70%"><span class="style2"><span class="style4"><span class="style7" align="left"><%=author%><span style="font-family: "??";" #invalid_attr_id="none"></span></span><span class="style3">发表的新闻</span><font color="#000099"><font color="#FF0000"> </font></font></span></span></td>
- <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>
- <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>
- </tr>
- <tr></tr>
- </table>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="100" height="92" align="center" valign="top"> <table width="100%" border="0" cellspacing="3" cellpadding="0">
- <tr>
- <td align="center"><span class="style4">题目:<%=art_headline%></span></td>
- </tr>
- <tr>
- <td align="center"><span class="style4">电话:<%=tel%></span></td>
- </tr>
- </table></td>
- <td width="423"><span class="style4"><%=art_content %></span></td>
- </tr>
- <tr align="center">
- <td colspan="2" valign="top"><img src="images/bg_4.gif" width="100%" height="1"></td>
- </tr>
- </table></td>
- </tr>
- </table>
- <table border="0" width="650" cellspacing="0" cellpadding="0" height="7" align="center">
- <tr>
- <td width="2%" align="center"><img src="img/end1.gif" width="12" height="14"></td>
- <td width="89%" align="center" background="img/end2.gif"></td>
- <td width="9%" align="center"><img src="img/end3.gif" width="65" height="14"></td>
- </tr>
- </table>
- <p>
- <%
- rs.next();
- i++;
- }
- }
- rs.close();
- stmt.close();
- conn.close();
- %>
- </p>
- <p>
- </p>
- <table width="650" border="0" align="center" cellpadding="0" cellspacing="1" class="tittle0">
- <tr>
- <td height="28" align="center" background="img/bg.gif" class="font0 style1">当前显示第<span class="style7"> <%=intPage%></span> 页 共 <%=intPageCount%> 页 导航:<a href="news_all.jsp?page=1" class="font0">首页</a>
- <%if(intPage>1){%>
- <a href="news_all.jsp?page=<%=intPage-1%>" class="font0">上一页</a>
- <%}else{%>
- 上一页
- <%
- }%>
- <%if(intPage<intPageCount){%>
- <a href="news_all.jsp?page=<%=intPage+1%>" class="font0">下一页</a>
- <%}else{%>
- 下一页
- <%
- }%>
- <a href="news_all.jsp?page=<%=intPageCount%>" class="font0">尾页</a> </td>
- </tr>
- </table>
- <table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center"><p class="style4 style8"><a href="http://jorwoo.yeah.net" target="_blank" class="rights">周亚平</a> 版权所有 <br>
- 程序设计:周亚平 E-mail: <a href="mailto:zhouyaping1986@126.com" class="rights">zhouyaping1986@126.com</a><br>
- QQ:153589840</p> </td>
- </tr>
- </table>