📄 index.jsp
字号:
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="include.jsp"%>
<HTML>
<HEAD>
<TITLE><%=title%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<LINK href="css/css.css" rel=stylesheet type=text/css>
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 text=#000000 topMargin=0>
<script Language="JavaScript">
<!--
function isspacestring(mystring)
{ var istring=mystring;
var temp,i,strlen;
temp=true;
strlen=istring.length;
for (i=0;i<strlen;i++)
{
if ((istring.substring(i,i+1)!=" ")&(temp))
{ temp=false; }
}
return temp;
}
function firstisspace(mystring)
{ var istring=mystring;
var temp,i,strlen;
temp=false;
if (istring.substring(0,1)==" ")
{ temp=true; }
return temp;
}
function check_input(theForm)
{
if ((theForm.content.value == "")|(firstisspace(theForm.content.value)))
{
alert("请输入查询的条件.不能以空格开头");
theForm.content.focus();
return (false);
}
if ((theForm.content.value == "")|(isspacestring(theForm.content.value)))
{
alert("请输入查询的条件.");
theForm.content.focus();
return (false);
}
}
//-->
</script>
<CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=81 width=776>
<TBODY>
<TR>
<TD width=776>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD background="images/b-banner.jpg" height="83" width="100%"><IMG
SRC="images/ban.jpg" WIDTH="340" HEIGHT="83" BORDER="0"></TD>
</TR>
<TR>
<TD height=23>
<TABLE border=0 cellPadding=0 cellSpacing=0 class=font-12
height="100%" width="100%" background="images/nav1.jpg">
<TBODY>
<TR>
<TD align=middle width=50><A class=w href="index.jsp">首 页</A></TD>
<%CategoryMgr categoryMgr = new CategoryMgr();
Collection c = categoryMgr.getAll();
Iterator iterator = c.iterator();
while (iterator.hasNext()) {
Category category = (Category) iterator.next();
%>
<TD align=middle width=50><A class=w
href="list.jsp?id=<%=category.getId()%>"><%=category.getName()%></A></TD>
<%}%>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=26 width=776>
<TBODY>
<TR>
<TD background="images/nav.jpg" vAlign=center>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0
style="FONT-SIZE: 12px" width="100%">
<FORM action="search.jsp" method=post name=form1
onsubmit="return check_input(this)">
<TBODY>
<TR>
<TD align=middle vAlign=center width=170><SCRIPT
language=JavaScript>
today=new Date(); function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
var d=new initArray("<font color=RED>星期日</font>","星期一","星期二","星期三","星期四","星期五","<font color=GREEN>星期六</font></font>"); document.write(today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日"," ",d[today.getDay()+1]);
</SCRIPT></TD>
<TD align=middle width=322> </TD>
<TD align=middle width=284>本站搜索: <INPUT name=content size=16
style="FONT-SIZE: 12px"><input name=Submit type=submit value=GO></TD>
</TR>
</FORM>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=776>
<TBODY>
<TR>
<TD bgColor=#999999> 你现在的位置:>> <A href="index.jsp">首页</A></TD>
<TD width=180><IMG border=0 height=22 src="images/code-top.gif"
width=180></TD>
</TR>
</TBODY>
</TABLE>
<TABLE border=0 cellPadding=3 cellSpacing=0 width=776>
<TBODY>
<TR bgColor=#996633>
<TD colSpan=4 height=5></TD>
</TR>
<TR>
<TD align=middle bgColor=#eeeeee rowSpan=2 vAlign=top width=150>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD width=30><IMG height=22 src="images/l-1.gif" width=30></TD>
<TD background="images/l-2.gif">撰稿人排行</TD>
<TD width=30><IMG height=22 src="images/l-3.gif" width=45></TD>
</TR>
</TBODY>
</TABLE>
<TABLE bgColor=#000000 border=0 cellPadding=5 cellSpacing=1
width="100%">
<TBODY>
<TR>
<TD bgColor=#eeeeee>
<%MasterMgr masterMgr = new MasterMgr();
c.removeAll(c);
c = masterMgr.getAllByTotalDesc();
iterator = c.iterator();
int i=0;
while (iterator.hasNext()) {
Master master = (Master) iterator.next();
i++;
if(i>5) continue;
%> <%=i%>. <%=master.getUsername()%>
共<%=master.getTotal()%>篇新闻<BR><%}%>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<TD align=middle rowSpan=2 vAlign=top>
<TABLE border=0 cellPadding=3 width="100%">
<TBODY>
<TR>
<TD width="50%" align=center><IMG height=109
src="images/welcome.jpg" width=225><BR>欢迎使用,谢谢! </TD>
</TR>
</TBODY>
</TABLE>
<TABLE border=0 cellPadding=3 width="100%">
<TBODY>
<TR>
<TD>
<%c.removeAll(c);
c = categoryMgr.getAll();
iterator = c.iterator();
while (iterator.hasNext()) {
Category category = (Category) iterator.next();
%>
·<FONT color=#990000>【<A
href="list.jsp?id=<%=category.getId()%>"><%=category.getName()%></A>】</FONT><BR>
<%NewsMgr newsMgr=new NewsMgr();
Collection c2 = newsMgr.getAllByCategory(category.getId());
Iterator iterator2 = c2.iterator();
int j=1;
while (iterator2.hasNext()) {
News news = (News) iterator2.next();
if (j > 9) continue;
j++;
%> <A href="news.jsp?id=<%=news.getId()%>"
target=_blank title=<%=news.getTopic()%>> <%if (news.getTopic().length() > 30)
out.println(news.getTopic().substring(0, 30)
+ "...");
else
out.println(news.getTopic());%></A><FONT color=#999999><%=news.getStrPublishtime()%></FONT><BR>
<%}%>
<TABLE align=right>
<TR>
<TD><A HREF="list.jsp?id=<%=category.getId()%>">更多...</A></TD>
</TR>
</TABLE>
<BR><%}%>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<TD align=middle bgColor=#996633 rowSpan=2 vAlign=top width=180>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=170>
<TBODY>
<TR>
<TD><IMG height=20 src="images/2002.gif" width=170></TD>
</TR>
<TR>
<TD bgColor=#333333>
<TABLE border=0 cellPadding=3 width="100%">
<TBODY>
<TR>
<TD><%NewsMgr newsMgr=new NewsMgr();
Collection c2 = newsMgr.getAllByHitsDesc();
Iterator iterator2 = c2.iterator();
int j=1;
while (iterator2.hasNext()) {
News news = (News) iterator2.next();
if (j > 9) continue;
j++;
%> <FONT color=#ffffff>■ <A class=w href="news.jsp?id=<%=news.getId()%>"
target=_blank title=<%=news.getTopic()%>> <%if (news.getTopic().length() > 30)
out.println(news.getTopic().substring(0, 30)
+ "...");
else
out.println(news.getTopic());%></A></FONT><BR><FONT color=#ffffff> <%}%> </FONT><BR>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR>
<TD><IMG height=20 src="images/2001.gif" width=170></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE bgColor=#eeeeee border=0 height=108 width=776>
<TBODY>
<TR>
<TD align=middle><%@ include file="foot.jsp"%></TD>
</TR>
</TBODY>
</TABLE>
</CENTER>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -