📄 list_news.jsp
字号:
<%@ include file = "config.jsp" %>
<%@ page import="java.util.*,cwcNews.*"%>
<%@ page contentType="text/html;charset=GBK"%>
<jsp:useBean id="managerNews" scope="page" class="cwcNews.managerNews"/>
<jsp:useBean id="handle" scope="page" class="cwcNews.handle"/>
<%
Hashtable resultHashtable = new Hashtable();
resultHashtable = managerNews.PrintAllNews(request,10,20,"list_news.jsp",tb_news_info,tb_news_type);
%>
<html>
<head>
<title>cWc新闻系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="thestyle.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.line1234 {
border: 1px solid #999999;
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<table width="758" height="18" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td width="100%" bgcolor="#FFFFFF">
<table width="100%" height="0" border="0" cellpadding="2" cellspacing="0">
<tr bgcolor="#00CCFF">
<td width="82%" height="19" valign="top">※<%=handle.getString(request,"type_name")%></td>
<td width="18%" align="center" valign="top">资讯总量:<%=resultHashtable.get("RecordCount")%></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<%
Vector newsBeanVector = (Vector)resultHashtable.get("newsBeanVector");
for (int i=0; i<newsBeanVector.size(); i++) {
newsBean newsBean = (newsBean)newsBeanVector.elementAt(i);
%>
<tr bgcolor=eeeeee>
<td width=82%>·<a href=<%=htmlFolder + newsBean.getHtmlFileName()%>><%=newsBean.getTopic()%></a></td>
<td width=18%><%=newsBean.getDateTime()%></td>
</tr>
<%
}
%>
</table></td>
</tr>
</table>
<br>
<table width="758" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td width="1009" align="center" valign="middle" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle">
<%
Hashtable navigationInfoHashtable = (Hashtable)resultHashtable.get("navigationInfoHashtable");
String type_name = (String)navigationInfoHashtable.get("type_name");
int pagecount = Integer.parseInt(navigationInfoHashtable.get("pagecount")+"");
int page_inside = Integer.parseInt(navigationInfoHashtable.get("page_inside")+"");
int pagecount2 = Integer.parseInt(navigationInfoHashtable.get("pagecount2")+"");
int t_pagecount = Integer.parseInt(navigationInfoHashtable.get("t_pagecount")+"");
int nextpage = Integer.parseInt(navigationInfoHashtable.get("nextpage")+"");
int prevpage = Integer.parseInt(navigationInfoHashtable.get("prevpage")+"");
int page2 = Integer.parseInt(navigationInfoHashtable.get("page2")+"");
int pagesize = Integer.parseInt(navigationInfoHashtable.get("pagesize")+"");
out.println("<SELECT onchange=\"var jmpURL1=this.options[this.selectedIndex].value; if(jmpURL1!='') {self.location=jmpURL1;} else {this.selectedIndex=0;}\" size=1 name=select>");
out.println("<option value=''>选择翻页</option>");
int j;
for (int i=0; i<pagecount; i++) {
j = i + 1;
out.println("<option value=?CurrentPage=" + i + "&type_name=" + type_name + ">第 " + j + " 页</option>");
}
out.println("</select>");
%>
</td>
<td align="center" valign="middle">
<%
out.println("每页行数:" + pagesize);
%>
</td>
<td align="center" valign="middle">
<%
out.println("当前页:" + page2 + "/" + pagecount);
%>
</td>
<td align="center" valign="middle" style='font-family:Webdings'>
<%
if (pagecount != 0) out.println("<a href=?CurrentPage=0&type_name=" + type_name + ">7</a> ");
else out.println("7 ");
if (page_inside != 0) out.println("<a href=?CurrentPage=" + prevpage + "&type_name=" + type_name + ">3</a>");
else out.println("3");
if (page_inside != pagecount2 && pagecount != 0) out.println(" <a href=?CurrentPage=" + nextpage + "&type_name=" + type_name + ">4</a> ");
else out.println(" 4 ");
if (pagecount != 0) out.println("<a href=?CurrentPage=" + t_pagecount + "&type_name=" + type_name + ">8</a>");
else out.println("8");
%>
</td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle"><a href="test.jsp">返回</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle">精彩出品 城市<font color="#FF0000" face="Arial, Helvetica, sans-serif"><em>WebClub</em></font><br>
任何问题,请联系QQ:<font color="#0000FF">1594846</font>或<a href="mailto:webmaster@503room.com"><font color="#0000FF">webmaster@503room.com</font></a></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -