⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 article.jsp

📁 Struts+Spring+Hibernate开发的BBS,功能很强大很完善
💻 JSP
📖 第 1 页 / 共 2 页
字号:
                        <p><font color="#FF0000"><strong>热门软件</strong></font><br>
                          <a href="http://www.jdon.com/jive.htm"  class="a04">Jive(J道版)<br>
                          源代码下载</a></p>
                        <p><br>
                          <a href="http://www.jdon.com/jive"><img src="http://www.jdon.com/images/luntan.gif" width="58" height="24" border="0"></a><br>
                          <a href="http://www.jdon.com/mypaint/bqrj.htm"><img src="http://www.jdon.com/images/bqz.gif" width="58" height="24" border="0"></a>
                        </p>
                        <P>&nbsp;</P>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
          <td valign="top">
            <table width="100%" border="0" cellspacing="3" cellpadding="3">
              <tr>
                <td><!-- #BeginEditable "main" -->


<%	// There are messages, so iterate and print them out
    String bgcolor = "";
    int row = 1;
	boolean rootDisplayed = false;
    int lastMessageDepth = 0;
	int maxnumReplies=10;
	while (messages.hasNext() || !rootDisplayed) {
		ForumMessage message = null;
		if (!rootDisplayed) {
			message = rootMessage;
			rootDisplayed = true;
		}
		else {
			message = (ForumMessage)messages.next();
		}
        // Get the tree depth for this message. This tells us how far to indent
        // it.
		int messageDepth = treeWalker.getMessageDepth(message);
        // Message moderation:
        // For each of the message, get its moderation value. If it's less
        // than the minimum moderation value for the thread, don't display it.
        int messageMinModValue = message.getModerationValue();
        // Only display this message if this message's moderation value meets
        // or exceeds the minimum moderation value.
        if (messageMinModValue >= minModValue) {
            if (messageDepth <= lastMessageDepth+1) {
                lastMessageDepth = messageDepth;

        		boolean isRootMessage = (message.getID() == rootMessage.getID());
        		User author = message.getUser();
                if (row++%2 == 1) {
                    bgcolor = JiveGlobals.getJiveProperty("skin.default.tableRowColor1");
                }
                else {
                    bgcolor = JiveGlobals.getJiveProperty("skin.default.tableRowColor2");
                }
                // Check to see if there is an extended property for name & email
                // since the gateway feature imports names and emails as extended
                // props.
                String nameAndEmail = null;
                if (author == null) {
                    String name = message.getProperty("name");
                    String email = message.getProperty("email");
                    nameAndEmail = myEnv.du.getNameAndEmailDisplay(name, email);
                }

                String body = message.getBody();
                if (hilite) {
                    String[] queryWords = StringUtils.toLowerCaseWordArray(searchWords);
                    body = StringUtils.highlightWords(body, queryWords, "<font style='background-color:#ffff00'><b>", "</b></font>");
                }
%>

<a name="<%= message.getID() %>"></a>
<%  if (isRootMessage) { %>
<table  cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr><td>


                <h3 align="center"><%= message.getSubject() %></h3>
                <%        String userStatus = author.getProperty("status");
        String authorName = author.getName();
%>
                <p align="center">
                <a href="profile.jsp?user=<%= author.getID() %>" title="<%= (authorName!=null)?authorName:"" %>">
                <b><%= author.getUsername() %></b></a> http://www.jdon.com <%= SkinUtils.formatDate(request,response,pageUser,message.getCreationDate()) %>
                <a href="post.jsp?forum=<%= forumID %>&thread=<%= threadID %>&message=<%= message.getID() %>&reply=true"
                     ><img src="images/reply.gif" width="17" height="17" alt="回复此消息" hspace="3" border="0"
                     ></a>
                 <font >
                <a href="post.jsp?forum=<%= forumID %>&thread=<%= threadID %>&message=<%= message.getID() %>&reply=true"
                 title="回复此消息">回复</a>
                </font>
                </p>
                  <p><%= body %></p>
</td></tr></table>
<%  } else { // if not rootMessage %>
<%
if (maxnumReplies<=0){
%>
<p align="right"><a href="thread.jsp?forum=<%= forumID %>&thread=<%= threadID %>" target="_blank">更多讨论..</a></p>
<%
 return;

}else{
maxnumReplies--;
%>
<table bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.tableBorderColor") %>"
 cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td width="1%" bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.bgColor") %>"
        ></td>
	<td width="99%">
    <table bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.tableBorderColor") %>"
     cellpadding="4" cellspacing="1" border="0" width="100%">
    <tr bgcolor="<%= bgcolor %>">
        <td width="98%">
        <font size="-1" face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
        color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
        <b><%= message.getSubject() %></b>
        </font>
		</td>
        <td width="1%" nowrap>
        <font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
        color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
        发表时间: <%= SkinUtils.formatDate(request,response,pageUser,message.getCreationDate()) %>
        </font>
        </td>

        <td width="1%" nowrap align="center">
            <table cellpadding="2" cellspacing="0" border="0">
            <tr>
                <td><a href="post.jsp?forum=<%= forumID %>&thread=<%= threadID %>&message=<%= message.getID() %>&reply=true"
                     ><img src="images/reply.gif" width="17" height="17" alt="回复此消息" hspace="3" border="0"
                     ></a></td>
                <td>
                <font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
                <a href="post.jsp?forum=<%= forumID %>&thread=<%= threadID %>&message=<%= message.getID() %>&reply=true"
                 title="回复此消息">回复</a>
                </font>
                </td>
            </tr>
            </table>
        </td>
    </tr>
    <tr bgcolor="<%= bgcolor %>">
        <td colspan="3" valign="top">
        <font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
         color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
        发表人:
        <%  if (author == null) { %>
            <%  if (nameAndEmail != null) { %>
                <i>客人: <%= nameAndEmail %></i>
            <%  } else { %>
                <i>客人</i>
            <%  } %>
            </font>
        <%  } else { %>
            <a href="profile.jsp?user=<%= author.getID() %>"><b><%= author.getUsername() %></b></a>
        </font>
        &nbsp;&nbsp;
        <font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
         color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
        发表文章: <%= userManager.userMessageCount(author) %>
        /
        <%  String location = author.getProperty("jiveLocation");
            if (location != null) { %>
        来  自: <%= location %> /
        <%  } %>
        注册时间: <%= myEnv.shortDateFormatter.format(author.getCreationDate()) %>
        </font>
        <%  } %>
        </td>
    </tr>
    <tr bgcolor="<%= bgcolor %>">
        <td colspan="3" valign="top">
        <font size="-1" face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
         color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
        <%= body %>
        </font><p>
        </td>
    </tr>
    </table>
</td></tr>
</table>
<%} %>

<%  } // end if (messageDepth <= lastMessageDepth+1) %>
<br>
<%  } // end if moderation value is high enough %>

<%  } // end if rootMessage %>

<%  } // end of while %>


                  <!-- #EndEditable --></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
<!-- #EndTemplate --></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -