📄 index.jsp
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import ="java.util.Vector,com.bcxy.ip.IPLocalizer,com.bcxy.util.StringUtil"%>
<%@ include file="INC/const.jsp"%>
<%
stats="论坛首页";
SkinUtil.checkUserStats(request,response,stats);
%>
<%@ include file="INC/theme.jsp"%>
<br>
<TABLE border=0 width=<%=tableWidth%> align=center><TBODY>
<TR>
<TD><a href="<%=hostURL%>" target=_blank><img border=0 src="<%=forumLogo%>"></a>
</TD>
<td width="50%" align=center><%=ads1%>
</td>
<TD Align=right><img src=pic/time.gif> <a href=toplist.jsp?orders=2>新进来宾</a>
<img src=pic/newtopic.gif> <a href=queryResult.jsp?sType=3>查看新贴</a><br>
<img src=pic/userlist1.gif> <a href=toplist.jsp?orders=7>用户列表</a>
<img src=pic/top1.gif> <a href=toplist.jsp?orders=1>发贴排行</a>
</td>
</tr>
<tr>
<td colspan=3 align=right><br>
今日贴数:<font color=red><b><%=todayNum%></b></font>
| 主题总数:<b><%=topicNum%></b> | 帖子总数:<b><%=bbsNum%></b>
| 会员总数:<B><%=userNum%></B> | 欢迎新会员:<a href=javascript:openUser('<%=lastUser%>')><font color=<%=alertFontColor%>><%=lastUser%></font></a>
</TD>
</TR></TBODY>
</TABLE>
<table cellspacing=0 border=0 width=<%=tableWidth%> bgcolor="<%=tableBackColor%>" align=center><tr><td height=1></td></tr></table>
<table cellpadding=6 cellspacing=0 width=<%=tableWidth%> align=center bordercolor=<%=tableBackColor%> border=1>
<TR><TD bgColor="<%=tableBodyColor%>" colSpan=8>
<IMG align=absMiddle src=pic/gb.gif> 论坛消息广播:
<%
try{
Vector forumNewsVector = ForumNewsManager.getForumNewsVector(forumID);
out.println("<marquee width=400 onmouseover=this.stop() onmouseout=this.start()>");
for(int f=0; f<forumNewsVector.size(); f++){
ForumNews forumNews = (ForumNews)forumNewsVector.get(f);
out.println("("+(f+1)+")<b><a href=announcements.jsp?forumID="+forumNews.getBoardid()+" target=_blank alt='"+forumNews.getTitle()+"'>"+forumNews.getTitle()+"</a></b> ("+forumNews.getAddTime()+") " );
}
out.println("</marquee>");
}catch(ForumNewsNotFoundException e){
out.println("<b><a href=announcements.jsp?forumID=0 target=_blank alt='当前没有公告'>当前没有公告</a></b>("+NDate+")");
}
%>
</TD></TR></table>
<table cellpadding=6 cellspacing=0 width=<%=tableWidth%> align=center bordercolor=<%=tableBackColor%> border=1>
<TR bgColor="<%=tableTitleColor%>">
<TD vAlign=center noWrap align=middle width="31%"><B><FONT COLOR="<%=tableFontColor%>">最新帖子</FONT></B> </TD>
<TD vAlign=center noWrap align=middle width="31%"><B><FONT COLOR="<%=tableFontColor%>">最新精华</FONT></B> </TD>
<TD vAlign=center noWrap align=middle width="31%"><B><FONT COLOR="<%=tableFontColor%>">最新固顶</FONT></B> </TD>
</TR>
<tr>
<td valign=top >
<%
int row = 6;
try{
Vector newTopics = Forum.getAllTopics(1,row,1);
if(newTopics.isEmpty()){
throw new Exception("暂时没有最新帖子!");
}
for( i=0; i<newTopics.size(); i++){
ForumTopic newTopic = (ForumTopic)newTopics.get(i);
out.println("<img src=images/dot2.gif> <a href='dispbbs.jsp?forumID="+newTopic.getForumID()+
"&rootID="+newTopic.getRootID()+"&announceID="+newTopic.getAnnounceID()+"'>"+
StringUtil.substring(newTopic.getTopic(),20)+"...</a><br>");
}
}catch(Exception e){
out.print(e.getMessage());
}
%>
</td>
<td valign=top>
<%
try{
Vector newTopics = Forum.getAllTopics(1,row,3);
if(newTopics.isEmpty()){
throw new Exception("暂时没有精华帖子!");
}
for( i=0; i<newTopics.size(); i++){
ForumTopic newTopic = (ForumTopic)newTopics.get(i);
out.println("<img src=images/dot2.gif> <a href='dispbbs.jsp?forumID="+newTopic.getForumID()+
"&rootID="+newTopic.getRootID()+"&announceID="+newTopic.getAnnounceID()+"'>"+
StringUtil.substring(newTopic.getTopic(),20)+"...</a><br>");
}
}catch(Exception e){
out.print(e.getMessage());
}
%>
</td>
<td valign=top >
<%
try{
Vector newTopics = Forum.getAllTopics(1,row,2);
if(newTopics.isEmpty()){
throw new Exception("暂时没有固顶帖子!");
}
for( i=0; i<newTopics.size(); i++){
ForumTopic newTopic = (ForumTopic)newTopics.get(i);
out.println("<img src=images/dot2.gif> <a href='dispbbs.jsp?forumID="+newTopic.getForumID()+
"&rootID="+newTopic.getRootID()+"&announceID="+newTopic.getAnnounceID()+"'>"+
StringUtil.substring(newTopic.getTopic(),20)+"...</a><br>");
}
}catch(Exception e){
out.print(e.getMessage());
}
%>
</td>
</tr>
</table>
<%=brTable%>
<table cellspacing=0 border=0 width=<%=tableWidth%> bgcolor="<%=tableBackColor%>" align=center><tr><td height=1></td></tr></table>
<table cellpadding=6 cellspacing=0 width=<%=tableWidth%> align=center bordercolor=<%=tableBackColor%> border=1>
<TR bgColor="<%=tableTitleColor%>">
<TD width=26><B><FONT COLOR="<%=tableFontColor%>">状态</font></b></TD>
<TD vAlign=center ><B><FONT COLOR="<%=tableFontColor%>">论坛名称</FONT></B></TD>
<TD vAlign=center align=middle width=80><B><FONT COLOR="<%=tableFontColor%>">版主</FONT></B></TD>
<TD vAlign=center noWrap align=middle width=38><B><FONT COLOR="<%=tableFontColor%>">主题</FONT></B> </TD>
<TD vAlign=center noWrap align=middle width=38><B><FONT COLOR="<%=tableFontColor%>">贴子</FONT></B> </TD>
<TD vAlign=center noWrap align=middle width=200><B><FONT COLOR="<%=tableFontColor%>">最后发表</FONT></B> </TD>
</TR></table>
<%
try{
Vector gateWayVector=GateWayFactory.getGateWays();
for( i=0;i<gateWayVector.size();i++){
GateWay gateWay=(GateWay)gateWayVector.get(i);
int gateWayID=gateWay.getGateWayID();
String gateWayName=gateWay.getGateWayName();
out.println("<table cellpadding=6 cellspacing=0 width=" + tableWidth + " align=center bordercolor=\""+tableBackColor+"\" border=1>"+
"<TR><TD bgColor=\""+tableBodyColor+"\" colSpan=7><B>"+gateWayName+"</B></TD></TR>");
try{
Vector forumVector=ForumFactory.getForums(gateWayID);
for(int j=0;j<forumVector.size();j++){
Forum theForum=(Forum)forumVector.get(j);
out.println("<TR><TD vAlign=top align=middle width=26 bgColor=\""+aTableBodyColor+"\">");
out.println(theForum.getForumIMG(lastLogin));
out.println("</TD><TD vAlign=top width=* bgColor=\""+tableBodyColor+"\"> ");
if (!theForum.getIndexIMG().equals("")){
out.println("<img src="+theForum.getIndexIMG()+" align=\"left\">");
}
out.println(" <a href=\"list.jsp?forumID="+theForum.getForumID()+"\">『<font color=#000066>"+theForum.getForumType()+"</font>』</a>");
out.println(" <a href=\"elist.jsp?forumID="+theForum.getForumID()+"\"><img src=pic/fastmarrow.gif border=0 alt=查看论坛精华></a>"+
" <a href=\"vote.jsp?forumID="+theForum.getForumID()+"\"><img src=pic/fastpoll.gif border=0 alt=在此论坛发新投票></a>"+
" <a href=\"announce.jsp?forumID="+theForum.getForumID()+"\"><img src=pic/fastpost.gif border=0 alt=在此论坛发新帖></a>"+
" <span alt=\"今日新帖\">( " + theForum.getTodayNum() + " )</span><br><br>");
out.println("<img src=\"images/boardinfo.gif\"> " + theForum.getReadMe());
//
out.println("</TD><TD vAlign=center align=middle bgColor=\""+aTableBodyColor+"\" width=80>");
String masterName=theForum.getForumMaster();
if(masterName==null||"".equals(masterName)){
out.println("暂缺");
}else{
String [] masterNames=theForum.getForumMaster().split("\\|");
masterName="<select name=bz onchange=\"if(this.options[this.selectedIndex].value!='') openScript('dispuser.jsp?name='+this.options[this.selectedIndex].value,350,300)\"><option value=''>论坛版主</option>";
//
for(int k=0;k<masterNames.length;k++){
masterName=masterName+"<option value="+masterNames[k]+">"+masterNames[k]+"</option>" ;
}
out.println(masterName+"</select>");
}
out.println("</TD>"+
"<TD vAlign=center noWrap align=middle width=38 bgColor=\""+tableBodyColor+"\">"+theForum.getLastTopicNum()+"</TD>"+
"<TD vAlign=center noWrap align=middle width=38 bgColor=\""+tableBodyColor+"\">"+theForum.getLastBbsNum()+"</TD>"+
"<TD noWrap width=200 bgColor=\""+aTableBodyColor+"\">");
if (theForum.getLastTopic()!=null&&!"".equals(theForum.getLastTopic())){
out.println("<font color=#000066>主题:</font><a href='dispbbs.jsp?forumID="+theForum.getForumID()+"&rootID="+theForum.getLastRootID()+"&announceID="+theForum.getLastRootID()+"'>"+theForum.getLastTopic()+"</a><br>");
out.println("<font color=#000066>最后发表:</font><a href=javascript:openScript('dispuser.jsp?name="+theForum.getLastPostUser()+"',350,300)>"+theForum.getLastPostUser()+"</a> <IMG border=0 src=pic/lastpost.gif><br>"+theForum.getLastPostTime());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -