<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="struts-bean.tld" prefix="bean" %>
<%@ taglib uri="struts-html.tld" prefix="html" %>
<%@ taglib uri="struts-logic.tld" prefix="logic" %>
<%@ taglib uri="lybbs.tld" prefix="lybbs" %>
<%@ page import="java.util.*"%>
<%@ page import="net.lybbs.util.*"%>
<%@ page import="net.lybbs.post.bean.IListTopic"%>
<%@ page import="net.lybbs.post.cache.HomePageNewTopicCache"%>
<html:html locale="true">
<STYLE type=text/css>
A:visited,A:active,A:link {
  TEXT-DECORATION: none; Color:#000000
}
A:hover {
  TEXT-DECORATION: underline
}
BODY {
  FONT-SIZE: 12px;
  COLOR:#000000;
  BACKGROUND-COLOR: #FFFFFF;
  SCROLLBAR-ARROW-COLOR: #006699;
  SCROLLBAR-DARKSHADOW-COLOR: #98aab1;
  SCROLLBAR-FACE-COLOR: #dee3e7;
  SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
  SCROLLBAR-3DLIGHT-COLOR: #d1d7dc;
  SCROLLBAR-SHADOW-COLOR: #dee3e7;
  
}
TD {
  FONT-SIZE: 12px; LINE-HEIGHT: 15px
}
TD.catStyle {
  COLOR:#ffffff;
  BACKGROUND-COLOR: #7C96B8;
  
    BACKGROUND-IMAGE: url(skins/default/bg/catbg.gif)
  
}
TD.forumColorOne {
  BACKGROUND-COLOR: #C4D0DF
}
TD.forumColorTwo {
  BACKGROUND-COLOR: #FFFFFF
}
.tableCommonStyle {
  BORDER-RIGHT: 1px solid;
  BORDER-TOP: 1px solid;
  BORDER-LEFT: 1px solid;
  BORDER-BOTTOM: 1px solid;
  WIDTH: 98%;
  BACKGROUND-COLOR: #7C96B8;
}
</STYLE>
<body>
<%
//1: Next is Tag Usage.
out.println("<b>Next is Tag Usage:</b><br>");
%>
<lybbs:typeHomePageNewTopicTag/>


<br><br>
<%
//2: Next is JavaBean Usage.
out.println("<b>Next is JavaBean Usage:</b><br>");
HomePageNewTopicCache instance=HomePageNewTopicCache.getInstance();
IListTopic listTopic;
//New Topic
out.println("New Topic:<br>");
List newTopicList=instance.getNewTopicList();
for(int i=0,m=newTopicList.size();i<m;i++) {
  listTopic=(IListTopic)newTopicList.get(i);
  out.println("<img src='images/dot2.gif'>&nbsp;&nbsp;");
  out.println("<a href='topic.do?forumID=");
  out.println(listTopic.getForumID());
  out.println("&postID=");
  out.println(listTopic.getPostID());
  out.println("'>");
  out.println(listTopic.getTitle());
  out.println("</a><br>");
}
out.println("<br>");

//New JingHua
out.println("New JingHua:<br>");
List newJingHuaList=instance.getNewJingHuaList();
for(int i=0,m=newJingHuaList.size();i<m;i++) {
  listTopic=(IListTopic)newJingHuaList.get(i);
  out.println("<img src='images/dot2.gif'>&nbsp;&nbsp;");
  out.println("<a href='topic.do?forumID=");
  out.println(listTopic.getForumID());
  out.println("&postID=");
  out.println(listTopic.getPostID());
  out.println("'>");
  out.println(listTopic.getTitle());
  out.println("</a><br>");
}
out.println("<br>");

//New Recommend
out.println("New Recommend:<br>");
List newRecommendList=instance.getNewRecommendList();
for(int i=0,m=newRecommendList.size();i<m;i++) {
  listTopic=(IListTopic)newRecommendList.get(i);
  out.println("<img src='images/dot2.gif'>&nbsp;&nbsp;");
  out.println("<a href='topic.do?forumID=");
  out.println(listTopic.getForumID());
  out.println("&postID=");
  out.println(listTopic.getPostID());
  out.println("'>");
  out.println(listTopic.getTitle());
  out.println("</a><br>");
}
%>
</body>
</html:html>