📄 index.jsp
字号:
<%
/*##################################################################**
**# 项目名称:LyNews『凌云新闻』 #**
**# #**
**# 程序开发: teddy 『星语凌』 #**
**# #**
**# 版权所有: 凌云创作室 (原流星电脑工作室) #**
**# #**
**# 主页地址: http://www.lybbs.com #**
**# http://www.lybbs.net #**
**# 电邮地件: horseye@sina.com #**
**# #**
**##################################################################*/
%>
<%@ include file="include/config.jsp"%>
<%@ page contentType="text/html;charset=GBK"%>
<%
ParameterUtils.setCharacterEncoding(request);
int boardParentID=0;
Factory factory = Factory.getInstance();
BoardFactory boardFactory=factory.getBoardFactory();
NewsFactory newsFactory = factory.getNewsFactory();
NewsConfigFactory newsConfigFactory = factory.getNewsConfigFactory();
Iterator iterator,
iterator1,
boardParentIterator;
News news;
NewsConfig newsConfig;
Board board;
Date date;
String dateString;
//long time = new Date().getTime()-12*60*60*1000;
int boardID=0;
String boardName="";
%>
<%@include file="include/head.jsp"%>
<script language="JavaScript">
brOK=navigator.javaEnabled()?true:false;
ns4=(document.layers)?true:false;
ie4=(document.all)?true:false;
var vmin=4;
var vmax=10;
var vr=4;
var timer1;
var timer2;
var timer3;
</script>
<%
NewsConfig newsAd=newsConfigFactory.getNewsConfig();
int adImageWidth=0,
adImageHeight=0,
adImageWidth2=0,
adImageHeight2=0,
adImageWidth3=0,
adImageHeight3=0,
infoImageWidth=0,
infoImageHeight=0;
String adImageLink="",
adImage=newsAd.getAdImage(),
adImageLink2="",
adImage2=newsAd.getAdImage2(),
adImageLink3="",
adImage3=newsAd.getAdImage3(),
infoImage=newsAd.getInfoImage(),
infoImageLink="",
infoImageAlt="",
marquee=newsAd.getMarquee(),
announcement=newsAd.getAnnouncement();
if(!adImage.equals("")) {
adImageWidth=newsAd.getAdImageWidth();
adImageHeight=newsAd.getAdImageHeight();
adImageLink=newsAd.getAdImageLink();
%>
<%@ include file="include/boardad.jsp"%>
<%
}
if(!adImage2.equals("")) {
adImageWidth2=newsAd.getAdImageWidth2();
adImageHeight2=newsAd.getAdImageHeight2();
adImageLink2=newsAd.getAdImageLink2();
%>
<%@ include file="include/boardad2.jsp"%>
<%
}
if(!adImage3.equals("")) {
adImageWidth3=newsAd.getAdImageWidth3();
adImageHeight3=newsAd.getAdImageHeight3();
adImageLink3=newsAd.getAdImageLink3();
%>
<%@ include file="include/boardad3.jsp"%>
<%
}
%>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
<TR>
<TD height=20> ※您现在的位置:首页 → 栏目列表 </FONT> </TD>
</TR>
</TABLE>
<!--change color from deep to light #FF9966 - #FFCC99 - #FFFFC6-->
<!--three color from deep to light #44672e - #85b866 - #e8fcdb -->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760 style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid">
<TBODY>
<TR>
<TD bgColor=#ffcc99 vAlign=top width=168>
<!--start 1.table-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD colspan=3 align=center><IMG src="images/l21.gif" width=168 height=32></TD>
</TR>
<TR>
<TD> </TD>
<TD bgColor=#ffffc6 width=160>
<form action="search.jsp" method="post">
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD align=center>
<select size='1' name='boardID'>
<option value="0">全部文章</option>
</select>
</td>
</tr>
<tr>
<td align=center><input type='text' name='keyWord' size='10'></td>
</tr>
<tr>
<td> <center>
<INPUT border=0 class=img height=20 name=Submit src="images/searchtable_button.gif" type=image vspace=3>
</center></TD>
</TR>
</TBODY>
</TABLE>
</form></TD>
<TD> </TD>
</TR>
<TR>
<TD colspan=3 align=center><IMG src="images/l51.gif" width=160 height=8></TD>
</TR>
<TR>
<TD height=4 colspan=3></TD>
</TR>
<TR>
<TD colspan=3 align=center><IMG src="images/l31.gif" width=168 height=32></TD>
</TR>
<TR>
<TD> </TD>
<TD bgColor=#ffffc6 width=160> <TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD align="center">
<form action="../lybbs/loginout.jsp" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">用户名: <input name="username" type="text" size="8"></td>
</tr>
<tr>
<td align="center">密 码 : <input name="password" type="password" size="8"></td>
</tr>
<tr>
<td align="center">
<INPUT name=Submit2 type=image class=img src="images/dl.gif" width="52" height=18 vspace="3">
<img src="images/zc.gif" width="52" height="18" vspace="3">
</td>
</tr>
</table>
</form> </TD>
</TR>
</TBODY>
</TABLE></TD>
<TD> </TD>
</TR>
<TR>
<TD height=4 colspan=3 align="center"><img src="images/l51.gif" width="160" height="8"></TD>
</TR>
<TR>
<TD colspan=3 align="center"><img src="images/l81.gif" width=168 height=35></TD>
</TR>
<TR>
<TD> </TD>
<TD bgColor=#ffffc6 width=160> <TABLE border=0 cellPadding=0 cellSpacing=0 width=160>
<TBODY>
<TR>
<TD >
<%
Counter counter = Counter.getMsg();
String today = GetDate.getStringDateShort();
if(today==null)
today = "";
if(!today.equals(counter.getTodayDate())) {
counter.update(today);
}
else {
counter.add();
}
%>
<br>
今日访问量:<FONT color=#ff0000><%=counter.getTodayCount()%></FONT>人<br>
总访问量:<FONT color=#ff0000><%=counter.getCount()%></FONT>人<br>
日最高访问量:<FONT color=#ff0000><%=counter.getMaxCount()%></FONT>人<br>
发生日期:<FONT color=#ff0000><%=counter.getMaxDate()%></FONT>
</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD> </TD>
</TR>
<TR>
<TD height=4 colspan=3 align="center"><img src="images/l51.gif" width="160" height="8"></TD>
</TR>
<TR>
<TD height=4 colspan=3> </TD>
</TR>
</TBODY>
</TABLE>
<!--end 1.table-->
</TD>
<TD vAlign=top>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR><TD height=2></TD></TR>
<TR>
<TD>
<%
if(!marquee.equals(""))
out.println("<MARQUEE height=16 scrollDelay=200>"+marquee+"</MARQUEE>");
%>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<TR>
<TD width=420>
<%
if(!infoImage.equals("")) {
infoImageWidth=newsAd.getInfoImageWidth();
infoImageHeight=newsAd.getInfoImageHeight();
infoImageAlt=newsAd.getInfoImageAlt();
infoImageLink=newsAd.getInfoImageLink();
%>
<%@ include file="include/boardinfo.jsp"%>
<%
}
%>
</TD>
<TD vAlign=top>
<%
if(!announcement.equals("")) {
out.println("<div align=center><b>站务信息公告</b></div>");
out.println("<MARQUEE height=150 scrollDelay=300 direction=up>"+StringUtils.toBR(announcement)+"</MARQUEE>");
}
%>
</TD>
</TR>
</TABLE>
<!--start 2.table-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD vAlign=top width=284>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="95%">
<TBODY>
<%
boardParentID=1;
boardID=4;
boardName=(boardFactory.board(boardID)).getBoardName();
%>
<tr>
<td width=136 valign="bottom"><%=boardName%></td>
<td width=240 align=right class=p2> </td>
<td class=p2>
<a href="list.jsp?boardParentID=<%=boardParentID%>&boardID=<%=boardID%>"><img src="images/moreinfo.gif" width="60" height="17" border="0"></a>
</td>
</tr>
<tr>
<td colspan=3><img src=images/index01.jpg width=280 height=3></td>
</tr>
<TR>
<TD colspan="3">
<%
//查询第1个15条记录。
iterator = newsFactory.list(boardID,1,15);
while(iterator.hasNext()) {
news = (News)iterator.next();
String title = news.getTitle();
String title2 = title;
if(title.length()>13)
title = title.substring(0,13)+"...";
title=StringUtils.toHtml(title);//替换掉html
out.println("<li><a class=f14 href='news/"+ news.getNewsFile() +"' target=_blank title='"+title2+"'>"+ title +"</a>");
date = new Date(news.getDate());
SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm");
dateString = formatter.format(date);
out.println("(<font color=#008000>"+dateString+"</font>)");
out.println("</li>");
}
%>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<TD vAlign=top width=284>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="95%">
<TBODY>
<%
boardParentID=2;
boardID=8;
boardName=(boardFactory.board(boardID)).getBoardName();
%>
<tr>
<td width=136 valign="bottom"><%=boardName%></td>
<td width=240 align=right class=p2> </td>
<td class=p2>
<a href="list.jsp?boardParentID=<%=boardParentID%>&boardID=<%=boardID%>"><img src="images/moreinfo.gif" width="60" height="17" border="0"></a>
</td>
</tr>
<tr>
<td colspan=3><img src=images/index01.jpg width=280 height=3></td>
</tr>
<TR>
<TD colspan="3">
<%
//查询第1个15条记录。
iterator = newsFactory.list(boardID,1,15);
while(iterator.hasNext()) {
news = (News)iterator.next();
String title = news.getTitle();
String title2 = title;
if(title.length()>13)
title = title.substring(0,13)+"...";
title=StringUtils.toHtml(title);//替换掉html
out.println("<li><a class=f14 href='news/"+ news.getNewsFile() +"' target=_blank title='"+title2+"'>"+ title +"</a>");
date = new Date(news.getDate());
SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm");
dateString = formatter.format(date);
out.println("(<font color=#008000>"+dateString+"</font>)");
out.println("</li>");
}
%>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<!--end 2.table-->
</TD>
</TR>
</TBODY>
</TABLE>
<%@include file="include/foot.jsp"%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -