📄 index.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="inc/incdb.jsp"%>
<HTML><HEAD><TITLE><%=title%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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="img/index/b-banner.jpg" height="83" width="100%"><IMG SRC="img/index/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="img/index/nav1.jpg">
<TBODY>
<TR>
<TD align=middle width=50><A class=w href="index.jsp">首 页</A></TD>
<% Vector listclass = new Vector();
DispClass dispclass = new DispClass();
listclass = dispclass.allClass();
for(int i=0;i<listclass.size();i++) {
IClass classinfo = (IClass)listclass.elementAt(i); %>
<TD align=middle width=50><A class=w href="list.jsp?id=<%=classinfo.getID()%>"><%=classinfo.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="img/index/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="img/index/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="img/index/l-1.gif"
width=30></TD>
<TD background="img/index/l-2.gif">撰稿人排行</TD>
<TD width=30><IMG height=22 src="img/index/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>
<% Vector listmaster = new Vector();
DispMaster dispmaster = new DispMaster();
listmaster = dispmaster.allMaster();
for(int i=0;i<listmaster.size();i++) {
Master masterinfo = (Master)listmaster.elementAt(i);
if(i>5){continue;}
%>
<%=i+1%>. <%=masterinfo.getUserName()%>
共<%=masterinfo.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="img/index/100.bmp"
width=225><BR>欢迎使用,谢谢!
</TD>
</TR></TBODY></TABLE>
<TABLE border=0 cellPadding=3 width="100%">
<TBODY>
<TR>
<TD>
<% listclass = dispclass.allClass();
for(int i=0;i<listclass.size();i++) {
IClass classinfo = (IClass)listclass.elementAt(i); %>
·<FONT color=#990000>【<A href="list.jsp?id=<%=classinfo.getID()%>"><%=classinfo.getName()%></A>】</FONT><BR>
<% Vector listnews = new Vector();
DispNews dispnews = new DispNews();
dispnews.setRootID(classinfo.getID());
listnews = dispnews.rootidToNews();
dispnews.setRootID(classinfo.getID());
int newsnum=dispnews.newsNum();
//System.out.println("newsnum:"+newsnum);%>
<% for(int j=0;j<listnews.size();j++) {
News newsinfo = (News)listnews.elementAt(j);
if(j>9){continue;}%>
<A href="news.jsp?id=<%=newsinfo.getID()%>" target=_blank
title=<%=newsinfo.getTopic()%>>
<% if(newsinfo.getTopic().length()>30)
out.println(newsinfo.getTopic().substring(0,30)+"...");
else
out.println(newsinfo.getTopic());%></A><FONT
color=#999999><%=newsinfo.getAdddate()%></FONT><BR>
<%}%><TABLE align=right><TR><TD><A HREF="list.jsp?id=<%=classinfo.getID()%>">more...</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="img/index/2002.gif" width=170></TD></TR>
<TR>
<TD bgColor=#333333>
<TABLE border=0 cellPadding=3 width="100%">
<TBODY>
<TR>
<TD>
<% Vector allnews = new Vector();
DispNews dispnews = new DispNews();
allnews = dispnews.allNews();
int maxhit=dispnews.maxHit();
//System.out.println("newsnum:"+newsnum);%>
<% for(int j=0;j<allnews.size();j++) {
News allnewsinfo = (News)allnews.elementAt(j);
if(j>9){continue;}%>
<FONT color=#ffffff>■ <A class=w
href="news.jsp?id=<%=allnewsinfo.getID()%>"
target=_blank title="<%=allnewsinfo.getTopic()%>"><%=allnewsinfo.getTopic()%>
</A></FONT><BR><FONT color=#ffffff>
<%}%>
</FONT><BR></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><IMG height=20 src="img/index/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 + -