📄 index.jsp
字号:
<%
/*##################################################################**
**# 程序名称:LyBBS『凌云论坛』 #**
**# #**
**# 程序开发: teddy 『星语凌』 #**
**# #**
**# 版权所有: 凌云创作室 (原流星电脑工作室) #**
**# #**
**# 主页地址: http://www.lybbs.net #**
**# 电邮地件: horseye@sina.com #**
**# #**
**##################################################################*/
%>
<%@ include file="include/config.jsp"%>
<%@ page contentType="text/html;charset=GBK" %>
<%
int forumID=0,
catalogID=0;
String action="",
tempSTR="";
//取传递变量
ParameterUtils.setCharacterEncoding(request);
action=ParameterUtils.getString(request,"action");
%>
<%@ include file="include/boardprepare.jsp"%>
<%
//首页显示登录位置及是否显示用户生日
forumStatus.getForumConfig();
String showFastLogin=forumStatus.getShowFastLogin(),
dispBorn=forumStatus.getDispBorn();
//更新用户位置
User.setUserPosition(Integer.parseInt(cookieID),0);
//调查用户浏览器
Browser eins=new Browser(request,session);
String userIP=request.getRemoteAddr(),
userOS=eins.getOs(),
userBrowser=eins.getName()+" "+eins.getVersion();
%>
<!--//html from here-->
<%@ include file="include/head.jsp"%>
<body <%=lbbody%>>
<%@ include file="include/userheader.jsp"%>
<%
forumStatus.getAdConfig();
int adImageWidth=0,
adImageHeight=0;
String adImageLink="",
adImage=forumStatus.getAdImage();
if(!adImage.equals("")) {
adImageWidth=forumStatus.getAdImageWidth();
adImageHeight=forumStatus.getAdImageHeight();
adImageLink=forumStatus.getAdImageLink();
%>
<%@ include file="include/boardad.jsp"%>
<%
}
//提示用户的短消息
if(newMsgNumber!=0 && newMsgPop.equals("1"))
out.println("<script>openScript('messanger.jsp?action=show',420,320);</script>");
%>
<p>
<script language="javascript">
function O3(id) {window.open("forum.jsp?forumID="+id);}
function O8(name) {window.open("profile.jsp?action=show&member="+name);}
function O9(id) {window.open("profile.jsp?action=show&memberid="+id);}
</script>
<TABLE cellSpacing=0 cellPadding=0 width=<%=tablewidth%> align=center>
<tr>
<TD width=30%>
<img src="images/<%=boardlogo%>">
</TD>
<TD align=right>
<br><font color=<%=fontcolormisc%>>
<%
forumStatus.getForumStats();
int totalPostsNumber=forumStatus.getTotalPostsNumber(),
totalReplyNumber=forumStatus.getTotalReplyNumber(),
totalAuthorNumber=forumStatus.getTotalAuthorNumber();
String lastAuthorName=forumStatus.getLastAuthorName();
if(totalAuthorNumber==0)
out.println("没有新会员的加入。 <br>");
else {
%>
热烈欢迎新会员 "<a href="profile.jsp?action=show&member=<%=lastAuthorName%>" target=_blank><%=lastAuthorName%></a>" 的加入。 [<a href="memberlist.jsp?a=5" target=_blank>新进会员</a>] <br>
<%
}
%>
共有 <a href="memberlist.jsp?a=3" target=_blank><b><%=totalAuthorNumber%></b></a> 名注册会员、<b><%=totalPostsNumber%></b> 篇帖子。其中 <b><%=totalReplyNumber%></b> 篇回复 <br>
</TD>
</TR>
<TR>
<td align=right colspan=2>
</td>
</TR>
</TABLE>
<br>
<%
//取当前系统时间
ForumDate forumDate=new ForumDate();
String now_date=forumDate.getNow_Date();
String now_time=forumDate.getNow_Time();
%>
<%@ include file="include/announcement.jsp"%>
<table cellspacing=0 width=<%=tablewidth%> bgcolor=<%=tablebordercolor%> align=center><tr><td height=1></td></tr></table>
<%
if(cookieMode.equals("0") && (showFastLogin.equals("top") || showFastLogin.equals("all"))) {
%>
<%@ include file="include/quicklogin.jsp"%>
<%
}
%>
<table cellpadding=6 cellspacing=0 width=<%=tablewidth%> height=28 align=center bordercolor=<%=tablebordercolor%> border=1>
<tr>
<td bgcolor=<%=titlecolor%> width=26 align=center><font color=<%=titlefontcolor%>><b>状态</b></font></td>
<td bgcolor=<%=titlecolor%> width=* align=center><font color=<%=titlefontcolor%>><b>论坛名称</b></font></td>
<td bgcolor=<%=titlecolor%> width=80 align=center><font color=<%=titlefontcolor%>><b>版主</b></font></td>
<td bgcolor=<%=titlecolor%> width=38 align=center><font color=<%=titlefontcolor%>><b>主题</b></font></td>
<td bgcolor=<%=titlecolor%> width=42 align=center><font color=<%=titlefontcolor%>><b>回复</b></font></td>
<td bgcolor=<%=titlecolor%> width=168 align=center><font color=<%=titlefontcolor%>><b>最后更新</b></font></td>
<td bgcolor=<%=titlecolor%> width=26 align=center><font color=<%=titlefontcolor%>><b><a title="将“<%=boardname%>”添加到收藏夹" href="javascript:window.external.addFavorite('<%=boardurl%>', '<%=boardname%>')">收藏</a></b></font></td>
</tr>
</table>
<%
try {
ArrayList catalogList=CatalogFactory.getCatalogFactory();
for(int i = 0; i < catalogList.size(); i ++) {
Catalog catalog = (Catalog)catalogList.get(i);
catalogID = catalog.getCatalogID();
String catalogName=catalog.getCatalogName();
%>
<table cellpadding=6 cellspacing=0 width=<%=tablewidth%> height=24 align=center bordercolor=<%=tablebordercolor%> border=1>
<tr>
<td bgcolor=<%=catback%> <%if(!catbackpic.equals("")) out.print("background=images/"+catbackpic);%> colspan=7 height=24 align=left>
<img src=images/cat1.gif border=0 width=9 height=9> <font color=<%=catfontcolor%>><b><%=catalogName%></b></font>
</td>
</tr>
</table>
<%
ArrayList forumList=ForumFactory.getForumFactory(catalogID);
for(int j=0;j<forumList.size();j++) {
Forum forum=(Forum)forumList.get(j);
forumID=forum.getForumID();
String forumName=forum.getForumName();
String forumDescription=forum.getForumDescription();
String forumStartNewThreads=forum.getForumStartNewThreads();
String forumGraphic=forum.getForumGraphic();
String forumPrivateForum=forum.getForumPrivateForum();
int postsNumber=forum.getPostsNumber();
int replyNumber=forum.getReplyNumber();
String dbicon="";
int forumHaveNewNumber=0;
if(!cookieMode.equals("0")) {
forum.setActiveTime(activeTime);
forumHaveNewNumber=forum.getForumHaveNewNumber();
}
if(forumHaveNewNumber==0) {
if(forumPrivateForum.equals("1"))
dbicon=bm_NoNew;
else if(forumStartNewThreads.equals("yes"))
dbicon=zg_NoNew;
else if(forumStartNewThreads.equals("all"))
dbicon=kf_NoNew;
else if(forumStartNewThreads.equals("follow"))
dbicon=pl_NoNew;
else if(forumStartNewThreads.equals("no"))
dbicon=jh_Pic;
else if(forumStartNewThreads.equals("cert"))
dbicon=rz_NoNew;
}
else {
if(forumPrivateForum.equals("1"))
dbicon=bm_HaveNew;
else if(forumStartNewThreads.equals("yes"))
dbicon=zg_HaveNew;
else if(forumStartNewThreads.equals("all"))
dbicon=kf_HaveNew;
else if(forumStartNewThreads.equals("follow"))
dbicon=pl_HaveNew;
else if(forumStartNewThreads.equals("no"))
dbicon=jh_Pic;
else if(forumStartNewThreads.equals("cert"))
dbicon=rz_HaveNew;
}
%>
<table cellpadding=6 cellspacing=0 width=<%=tablewidth%> height=24 align=center bordercolor=<%=tablebordercolor%> border=1>
<tr>
<td bgcolor=<%=forumcolorone%> align=center width=26>
<img src=images/<%=dbicon%> width=13 height=16 border=0>
</td>
<td bgcolor=<%=forumcolortwo%> valign=top>
<table>
<tr>
<td></td>
<td>
<a href=forum.jsp?forumID=<%=forumID%>><font color=<%=posternamecolor%>><%=forumName%></font></a> <a href=jinghua.jsp?forumID=<%=forumID%>><font color=<%=posternamecolor%>>[精华区]</font></a>
<br><font color=<%=forumfontcolor%>><%=forumDescription%></font>
</td>
</tr>
</table>
</td>
<td bgcolor=<%=forumcolorone%> align=center width=80>
<%
String adminName=forum.getAdminName();
if(adminName.equals(""))
out.println("暂时空缺");
else {
String[] adminNames = adminName.split(",");
for(int k=0;k<adminNames.length;k++) {
out.println("<a href=\"javascript:O8('"+adminNames[k]+"')\" title='论坛版主'><font color="+forumfontcolor+">"+adminNames[k]+"</font></a><br>");
}
}
%>
</td>
<td bgcolor=<%=forumcolortwo%> align=center width=38><font color=<%=forumfontcolor%>><%=postsNumber%></font></td>
<td bgcolor=<%=forumcolortwo%> align=center width=42><font color=<%=forumfontcolor%>><%=replyNumber%></font></td>
<td bgcolor=<%=forumcolorone%> width=168>
<%
if(postsNumber==0)
out.println("<font color="+lastpostfontcolor+"> 没有贴子</font>");
else {
int postsTopic=forum.getPostsTopic();
String postsTitleView=forum.getPostsTitleView();
String postsTitleClue=forum.getPostsTitleClue();
int postsAuthorID=forum.getPostsAuthorID();
String postsAuthorName=forum.getPostsAuthorName();
String postsPostAt=forum.getPostsPostAt();
out.println("<font color="+posternamecolor+"> 主题: </font><a href=topic.jsp?forumID="+forumID+"&topic="+postsTopic+"&replynum=last title=\""+postsTitleView+"\">"+postsTitleClue+"</a><BR>");
out.println("<font color="+posternamecolor+"> 最后发表: </font><a href=\"javascript:O8('"+postsAuthorName+"')\">"+postsAuthorName+"</a> <img src='images/lastpost.gif' width=11 height=10><BR>");
out.println("<font color="+posternamecolor+"> "+postsPostAt+"</font><BR>");
}
%>
</td>
<td bgcolor=<%=forumcolortwo%> align=center width=26>
<span style="CURSOR: hand" onClick="window.external.AddFavorite('<%=boardurl%>forum.jsp?forumID=<%=forumID%>', '<%=boardname%> - <%=forumName%>')">
<IMG SRC="images/fav_add.gif" BORDER="0" width=15 height=15 ALT="将 <%=forumName%> 添加到收藏夹"></span>
</td>
</tr>
</table>
<%
}
}
}
catch(Exception e) {
System.err.println(e.toString());
throw new Exception(e.getMessage());
}
%>
<%
forumID=0;
ForumAlliance forumAlliance=new ForumAlliance();
int forumAllianceNumber=forumAlliance.getForumAllianceNumber();
if(forumAllianceNumber!=0) {
%>
<table><tr height=5></tr></table><br>
<%@ include file="include/allianceforum.jsp"%>
<%
}
%>
<table><tr height=5></tr></table><br>
<%@ include file="include/userstatus.jsp"%>
<table><tr height=5></tr></table><br>
<%@ include file="include/boardstatus.jsp"%>
<%
if(dispview.equals("1")) {
%>
<table><tr height=5></tr></table><br>
<%@ include file="include/boardicon.jsp"%>
<%
}
if(cookieMode.equals("0") && (showFastLogin.equals("bottom") || showFastLogin.equals("all"))) {
%>
<%@ include file="include/quicklogin.jsp"%>
<%
}
%>
<br>
<%@ include file="include/foot.jsp"%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -