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

📄 forum.jsp

📁 论坛系统EasyJForum 是一个基于 Java 技术的免费社区论坛软件系统
💻 JSP
📖 第 1 页 / 共 2 页
字号:
		String lastPostUrl = null;
		boolean hasTopTopics = false;
		String userID = null;
		String nickname = null;
		String lastNickname = null;
		String topicIcon = null;
		int hotTopicPosts = setting.getInt(ForumSetting.DISPLAY, "hotTopicPosts");
		int hotTopicVisits = setting.getPInt(ForumSetting.DISPLAY, "hotTopicVisits", 100);
		String spaceURL = response.encodeURL("uspace.jsp?uid=");
		
		for (int i=0; i<topicList.size(); i++)
		{
			aTopic = (TopicInfo)topicList.get(i);
			if (aTopic.topScope == 'N' && hasTopTopics) {
				hasTopTopics = false;
%>			
</TABLE>
<TABLE cellSpacing=0 cellPadding=0>
  <THEAD class=separation>
  <TR>
    <TD>&nbsp;</TD>
    <TD colSpan=4>版块主题</TD></TR></THEAD>
<%
			}
			sbuf.setLength(0);
			sbuf.append("./topic-").append(aTopic.topicID);
			topicUrl = response.encodeURL(sbuf.toString() + "-1.html");
			lastPostUrl = response.encodeURL(sbuf.toString() + "-999.html");
			
			if (aTopic.isHidePost == 'T')
			{
				userID = "";
				nickname = "匿名";
			}
			else
			{
				userID = aTopic.userID;	
				nickname = (aTopic.nickname==null || aTopic.nickname.length()==0) ? userID : aTopic.nickname;
			}
			lastNickname = 
				(aTopic.lastNickname==null || aTopic.lastNickname.length()==0) ? aTopic.lastPostUser : aTopic.lastNickname;

			if (aTopic.state == 'C')
				topicIcon = "folder_lock.gif";
			else if (Integer.parseInt(aTopic.replies) >= hotTopicPosts)
				topicIcon = "folder_hot.gif";
			else if (Integer.parseInt(aTopic.visits) >= hotTopicVisits)
				topicIcon = "folder_hot.gif";
			else
				topicIcon = "folder_common.gif";
%>	
  <TBODY>
  <TR>
    <TD class=folder><A title=新窗口打开 href='<%= topicUrl %>' target=_blank><IMG src="images/<%= topicIcon %>"></A></TD>
    <TD>
<%
			if (aTopic.isDigest == 'T') {
%>	
		<LABEL><IMG alt="精华" src="images/digest.gif" align="absmiddle">&nbsp;</LABEL>
<%
			}
			if (aTopic.topScope != 'N')
			{
				hasTopTopics = true;
%>	
		<LABEL><IMG alt="<%= aTopic.topScope=='1'?"全局置顶":(aTopic.topScope=='2'?"分区置顶":"本版置顶") %>" 
				src="images/top_<%= aTopic.topScope %>.gif" align="absmiddle">&nbsp;</LABEL> 
<%
			}
			if (isModerator) {
%>
		<input class="checkbox" type="checkbox" name="chkTopicID" value="<%= aTopic.topicID %>"/>
<%
			}
			String highColor = null;
			if (aTopic.highColor != null && aTopic.highColor.length() > 0)
			{
				highColor = " style=\"color:" + aTopic.highColor + "\"";
			}
%>		
		<A href='<%= topicUrl %>'<% if(highColor!=null) out.write(highColor); %>><%= aTopic.title %></A> 
<%
			if (aTopic.attachIcon != null) {
			 	if (aTopic.attachIcon.indexOf('I') >= 0) {
					out.write("<LABEL class=\"pic\">(&nbsp;图&nbsp;)&nbsp;</LABEL>");
				}
			 	else if (aTopic.attachIcon.indexOf('F') >= 0) {
					out.write("<LABEL class=\"pic\">(&nbsp;媒&nbsp;)&nbsp;</LABEL>");
				}
				if (aTopic.attachIcon.indexOf('A') >= 0) {
					out.write("<LABEL class=\"attach\">&nbsp;</LABEL>");
				}
			}
			if (aTopic.reward > 0) {
				out.write("<LABEL class=\"reward\">&nbsp;[&nbsp;积分&nbsp;" + aTopic.reward + "&nbsp;");
				if (aTopic.isSolved == 'T')
					out.write("&nbsp;已解决&nbsp;");
				out.write("]</LABEL>");
			}
%>		
		</TD>
    <TD class=author><CITE><A href="<%= spaceURL %><%= userID %>"><%= nickname.length()==0?"游客":nickname %></A> 
      </CITE><EM><%= aTopic.createTime %></EM></TD>
    <TD class=nums><SPAN><%= aTopic.replies %></SPAN> / <EM><%= aTopic.visits %></EM></TD>
    <TD class=lastpost><EM><A href="<%= lastPostUrl %>"><%= aTopic.lastPostTime %></A></EM>
		<CITE>by <A href="<%= spaceURL %><%= aTopic.lastPostUser %>"><%= lastNickname.length()==0?"游客":lastNickname %></A>
		</CITE>
    </TD></TR></TBODY>
<%		
		}
	} 
	else 
	{
%>
	<tbody><tr><td class=folder>&nbsp;</td><td colspan="4">本版块或指定的范围内尚无主题。</td></tr></tbody>
<%
	}
%>	
</TABLE>
<%
	if (isModerator) {
%>
<div class="management">
	<input type="hidden" name="act"/>
	<label><input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form, 'chkTopicID')"/> 全选</label>
	<% if (userGroup.rights.indexOf(IConstants.PERMIT_DELETE_POST) >= 0) { %>
		<button onclick="doManage('delete');return false;">删除主题</button>&nbsp;
	<% }
	   if (userGroup.rights.indexOf(IConstants.PERMIT_MOVE_POST) >= 0) { %>
		<button onclick="doManage('move');return false;">移动主题</button>&nbsp;
	<% } %>	
	<button onclick="doManage('highlight');return false;">高亮显示</button>&nbsp;
	<% if (userGroup.rights.indexOf(IConstants.PERMIT_CLOSE_POST) >= 0) { %>
		<button onclick="doManage('close');return false;">关闭/打开主题</button>&nbsp;
	<% } %>
	<button onclick="doManage('top');return false;">置顶/解除置顶</button>&nbsp;
	<button onclick="doManage('digest');return false;">加入/解除精华</button>
<script type="text/javascript">
	function doManage(action) 
	{
		var theform = document.frmmanage;
		var hasCheckedID = false;
		if (typeof(theform.chkTopicID) != "undefined")
		{
			if (typeof(theform.chkTopicID.length) != "undefined")
			{
				for (i=0; i<theform.chkTopicID.length; i++){
					if (theform.chkTopicID[i].checked){
						hasCheckedID = true;
						break;
					}
				}
			}
			else if (theform.chkTopicID.checked)
				hasCheckedID = true;
		}
		if (!hasCheckedID){
			alert("请至少选中一个主题");
			return false;
		}
		theform.act.value = action;
		theform.submit();
	}
</script>
</div>
</FORM>
<%
	}
%>
</DIV>
<DIV class=pages_btns>
<%
	if (result != null && result[0] != null)
	{
%>	  
	<%= result[0] %>
<%
	}
%>
<SPAN class=postbtn id="newtopictmp" onmouseover="$('newtopic').id = 'newtopictmp';this.id = 'newtopic';showMenu(this.id);">
<A href="post.jsp?sid=<%= sectionID %>&fid=<%= boardID %>"><IMG alt=发新话题 
src="styles/<%= forumStyle %>/images/newtopic.gif"></A></SPAN></DIV>
<DIV class=legend id=footfilter><DIV class=jump_sort><form id="frmsort" name="frmsort" action="<%= forumUrl %>" method="post">
<SELECT onchange="if(this.options[this.selectedIndex].value != ''){window.location = this.options[this.selectedIndex].value;}">
<OPTION value="" selected>版块跳转 ...</OPTION> 
<%
	if (sections != null)
	{
		SectionVO tmpSection = null;
		BoardVO tmpBoard = null;
		String tmpUrl = null;
		StringBuilder sb = new StringBuilder();
		
		for (int i=0; i<sections.size(); i++)	
		{
			tmpSection = (SectionVO)sections.get(i);
			if (tmpSection.boardList == null) continue;

			sb.append("<OPTGROUP label=\"").append(tmpSection.sectionName).append("\">\n");
			
			for (int j=0; j<tmpSection.boardList.size(); j++)
			{
				tmpBoard = (BoardVO)tmpSection.boardList.get(j);
				if (tmpBoard.state == 'I' && !isModerator) continue;
				sbuf.setLength(0);
				sbuf.append("./forum-").append(tmpSection.sectionID).append("-").append(tmpBoard.boardID).append("-1.html");
				tmpUrl = response.encodeURL(sbuf.toString());
				sb.append("<OPTION value=\"").append(tmpUrl).append("\">&nbsp; &gt; ")
				  .append(tmpBoard.boardName).append("</OPTION>\n");
			}
			sb.append("</OPTGROUP>");
		}
		out.write(sb.toString());
	}
%>
</SELECT>&nbsp;
<SELECT name="sortfield" id="sortfield" onchange="$('frmsort').submit();"> 
<OPTION value="lastPostTime" selected>按回复时间排序</OPTION> 
<OPTION value="createTime">按发布时间排序</OPTION> 
<OPTION value="A_lastPostTime">按回复时间排序(升序)</OPTION> 
<OPTION value="A_createTime">按发布时间排序(升序)</OPTION> 
<OPTION value="replies">按回复数量排序</OPTION> 
<OPTION value="visits">按浏览次数排序</OPTION>
<OPTION value="A_replies">按回复数量排序(升序)</OPTION> 
<OPTION value="A_visits">按浏览次数排序(升序)</OPTION></SELECT>
<INPUT type=hidden value="<%= spec %>" name="spec"></form></DIV>
<DIV><LABEL><IMG alt=正常主题 
src="images/folder_common.gif">正常主题</LABEL> <LABEL><IMG alt=热门主题 
src="images/folder_hot.gif">热门主题</LABEL> <LABEL><IMG alt=关闭主题 
src="images/folder_lock.gif">关闭主题</LABEL> </DIV>
</DIV>
<SCRIPT type=text/javascript>
var forumUrl = "<%= forumUrl %>";
$('sortfield').value = "<%= sortField %>";
function viewPage(pageno)
{
	$('frmsort').action = forumUrl.replace(/(.+?-)\d+(\.html.*)/, '$1' + pageno + '$2');
	$('frmsort').submit();
}
</SCRIPT>
</DIV>
<%= menus[1]==null?"":menus[1] %>
<%= menus[2]==null?"":menus[2] %>
<%= PageUtils.getFootAdBanner(request, aBoard) %>
<%= PageUtils.getFooter(request, forumStyle) %>
</BODY></HTML>

⌨️ 快捷键说明

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