📄 viewnewstitle.jsp
字号:
<%@page contentType="text/html; charset=gb2312" errorPage=""%>
<%@page import="java.sql.*,sms.db.*,sms.bean.*,java.util.*"%>
<%
String newsType = request.getParameter("type");
NewsBean newsBean = new NewsBean();
ArrayList aList = newsBean.queryTitle(newsType, -1);
String temp = "";
if(newsType != null && !newsType.equals("")){
if(newsType.equals("1")){
temp = "新闻分类浏览 >>"+"学校公告";
}else if(newsType.equals("2")){
temp = "新闻分类浏览 >>"+"考试信息";
}else if(newsType.equals("3")){
temp = "新闻分类浏览 >>"+"校内新闻";
}else if(newsType.equals("4")){
temp = "新闻分类浏览 >>"+"校外信息";
}
}
%>
<html>
<head>
<title>新闻分类浏览</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {
font-family: "华文行楷";
font-size: 11mm;
color: #6633CC;
}
body {
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>
<body bgcolor="#ffffff">
<table width="100%" border="0" align="center">
<tr>
<td height="65" align="center" bgcolor="#6699CC">
<span class="style1">新闻信息分类浏览</span>
</td>
</tr>
<tr>
<td height="26" bgcolor="#CCCCFF">
<table width="100%" border="0">
<tr>
<td width="52%" height="25"><%=temp%></td>
<td width="12%"><a href="viewNewsTitle.jsp?type=1">学校公告</a></td>
<td width="12%"><a href="viewNewsTitle.jsp?type=2">考试信息</a></td>
<td width="12%"><a href="viewNewsTitle.jsp?type=3">校内新闻</a></td>
<td width="12%"><a href="viewNewsTitle.jsp?type=4">校外信息</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="480" align="center" valign="top" bgcolor="#CCCCCC">
<table width="100%" border="1" bordercolorlight=#C1A4F4 borderColorDark=#ffffff cellPadding=0 cellSpacing=0>
<tr bgcolor="#999999">
<th width="57%" height="25" align="left" scope="col">新闻标题</th>
<th width="16%" scope="col">时间</th>
<th width="13%" scope="col">来源</th>
<th width="14%" scope="col">作者</th>
</tr>
<%
//以下显示新闻标题及其他主要信息
if (aList != null && aList.size() > 0) {
NewsBean newsBean2 = null;
for (int i = 0; i < aList.size(); i++) {
newsBean2 = (NewsBean) aList.get(i);
%>
<tr>
<td height="25" ><a href="viewNewsDetail.jsp?id=<%=newsBean2.getId()%>" target="_blank"><%=newsBean2.getTitle()%></a></td>
<td align="center"><%=newsBean2.getAddTime()%></td>
<td align="center"><%=newsBean2.getQuarry()%></td>
<td align="center"><%=newsBean2.getAuthor()%></td>
</tr>
<%
}
}
%>
</table>
</td>
</tr>
<tr>
<td bgcolor="#6699CC"> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -