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

📄 dispbbs.jsp

📁 BBS 论坛系统 使用JSP struts hibernate spring等技术 全部的源码
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="net.acai.util.*,
		 net.acai.forum.*,
		 net.acai.forum.util.*,
		 java.util.Vector"%>
<%@ include file="INC/theme.jsp"%>

<%
	
	int perPage=ParamUtil.getInt(request,"perPage",10);
	int Page=ParamUtil.getInt(request,"Page",1);
	int startPage=((Page-1)/10)*10+1;
	int start=(Page-1)*perPage+1;
	int rootID=ParamUtil.getInt(request,"rootID",1);
	int announceID=ParamUtil.getInt(request,"announceID",1);
	stats="查看帖子";
	try{
		
		Forum  theForum=new Forum(forumID);
		
		Vector forumMSGs=theForum.getForumMSGs(forumID,rootID,announceID,start,perPage);
		
		ForumMSG topicMSG=(ForumMSG)forumMSGs.get(0);
		stats=theForum.getForumType()+" 浏览:"+topicMSG.getTopic();
		SkinUtil.checkUserStats(request,response,stats);
%>

<%@ include file="INC/js.jsp"%>
<style>
	TABLE {BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px; }
	TD {BORDER-RIGHT: 0px; BORDER-TOP: 0px; color: #000000; }
</style>

<%
	
		int totalMSGNum=theForum.getForumMSGsNum();
		
	%>

<%	stats=" 浏览:"+topicMSG.getTopic();
	out.println(headLine(theForum.getForumID(),forumName,forumLogo,theForum.getForumType(),2,stats));
	

	%>

<table cellpadding=0 cellspacing=0 border=0 width="95%" align=center>
	<tr><td align=left width=* valign=middle>&nbsp; <a href=announce.jsp?forumID=<%=forumID%>> 
			<img src=pic/post.gif alt=发表一个新主题 border=0></a>&nbsp; <a href=vote.jsp?forumID=<%=forumID%>>
			<img src=pic/newpoll.gif alt=发表一个新投票 border=0></a>&nbsp;<a href=reannounce.jsp?forumID=<%=forumID%>&rootID=<%=rootID%>&parentID=<%=topicMSG.getRootID()%>> 
			<img src=pic/newreply1.gif alt=回复主题 border=0></a>&nbsp;  </td>
			<td align=right width=""50%"" valign=middle>您是本帖的第 <B><%=topicMSG.getHits()%></B> 个阅读者</td>			
			</tr></table>







<table cellpadding=0 cellspacing=0 border=0 width="95%" bgcolor=#FFFFFF align=center>
			<tr> <td height=1> </td></tr></table>

<table cellpadding=0 cellspacing=0 border=0 width="95%" bgcolor="<%=tableBackColor%>" align=center>
			<tr><td height=1> </td></tr></table>
<table cellpadding=0 cellspacing=0 border=0 width="95%" align=center><tr>
			<td bgcolor="<%=tableBackColor%>" valign=middle width=1 height=24> </td>
			<td bgcolor="<%=tableTitleColor%>" colspan=2 align=left valign=middle width=*> 
			<table cellpadding=0 cellspacing=1 border=0 width="100%">
			<tr><td bgcolor="<%=tableTitleColor%>" align=left valign=middle width="65%"><font color="<%=tableFontColor%>">
            		&nbsp;<b>* 贴子主题</B>: <%=topicMSG.getTopic()%></font> </td><td width=""35%"" align=right>
			 <a href=# onclick="javascript:WebBrowser.ExecWB(4,1)"><img src=pic/saveas.gif border=0 width=16 height=16 alt=保存该页为文件 align=absmiddle></a>&nbsp;<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object><a href=report.jsp?forumID="&forumID&"&rootID="&rootID&"&announceID="&announceid_1&"><img src=pic/report.gif alt=报告本帖给版主 border=0></a>&nbsp; 
			<a href="printpage.jsp?forumID=<%=forumID%>&rootID=<%=rootID%>&announceID=<%=announceID%>"><img src=pic/printpage.gif alt=显示可打印的版本 border=0></a>&nbsp; 
			 <a href="usersms.jsp?action=new&forumID=<%=forumID%>&rootID=<%=rootID%>&announceID=<%=announceID%>">
			<img src=pic/pag.gif border=0 alt=把本贴打包邮递></a>&nbsp; 
			<a href="favadd.jsp?forumID=<%=forumID%>&rootID=<%=rootID%>&announceID=<%=announceID%>">
			<IMG SRC=pic/fav_add.gif BORDER=0 alt=把本贴加入论坛收藏夹></a>&nbsp; 
			<a href="usersms.jsp?action=new&forumID=<%=forumID%>&rootID=<%=rootID%>&announceID=<%=announceID%>">
			<img src=pic/emailtofriend.gif border=0 alt=发送本页面给朋友></a>&nbsp;
			<a href=#><span style="CURSOR: hand" onClick="window.external.AddFavorite('<%=forumURL%>dispbbs.jsp?forumID=<%=forumID%>&rootID=<%=rootID%>&announceID=<%=topicMSG.getAnnounceID()%>', ' <%=forumName%>- <%=topicMSG.getTopic()%>')"><IMG SRC=pic/fav_add1.gif BORDER=0 width=15 height=15 alt=把本贴加入IE收藏夹></span></a>
			&nbsp;</td></tr>
			</table></td><td bgcolor="&tableBackColor&" valign=middle width=1 height=24> </td>
			</tr></table>
			<table cellpadding=0 cellspacing=0 border=0 width=""95%"" bgcolor="&tableBackColor&" align=center>
			<tr> <td height=1> </td></tr></table>
	<%
	
	for (i=0;i<forumMSGs.size();i++)
	{
		//if(i>=totalMSGNum)	break;
		ForumMSG theMSG=(ForumMSG)forumMSGs.get(i);
		User theUser=theMSG.getUser();
		String nameStyle="";
		if (theUser.getUserClass()==18)
			nameStyle="filter:glow(color=green,strength=2)";
		else if(theUser.getUserClass()==19)
			nameStyle="filter:glow(color=#660099,strength=2)";
		else if (theUser.getUserClass()==20)
			nameStyle="filter:glow(color=#FF3333,strength=2)";
		else
			nameStyle="filter:glow(color=#798AB7,strength=2)";
		String bgcolor=tableBodyColor;
		String abgcolor=aTableBodyColor;
%>
<table cellpadding=0 cellspacing=0 border=0 width="95%" align=center>
		<tr><td bgcolor="<%=tableBackColor%>" valign=middle width=1 height=24> </td>
		<td bgcolor="<%=bgcolor%>">
		<table width="100%" cellpadding=4 cellspacing=0><tr>
        <td bgcolor="<%=bgcolor%>" valign=top width="20%" rowspan=2><img src="" width=0 height=4><BR><table width="100%" cellpadding=4 cellspacing=0 style="<%=nameStyle%>"><tr><td>
        &nbsp;<img src=<%=theUser.getFace()%>>  &nbsp;<a name="<%=theMSG.getAnnounceID()%>"><B><%=theUser.getUserName()%></B></a></td></tr></table>
	<%
	if ("1".equals(titleFlag)&&theUser.getTitle()!=null&&!"".equals(theUser.getTitle())){
		out.println(" 头衔:"+theUser.getTitle()+"<br>");
		
		
	}
	    out.println("<br>&nbsp;&nbsp;等级:"+theUser.getUserClassStr()+"<BR>");
	
	/*if FromFlag=0 {
		if boardmaster or master {
		comefrom=address(ip)
		else
        	comefrom="保密"
		end if
	else
		comefrom=address(ip)
        end if*/
	out.println(" 财产:<img src=pic/bar1.gif width=\""+(theUser.getUserWealth()*0.005+3)+"\" height=8 alt="+theUser.getUserWealth()+"><br>"+
							" 经验:<img src=pic/bar4.gif width="+(theUser.getUserEP()*0.005+3)+" height=8 alt="+theUser.getUserEP()+"><br>"+
							" 魅力:<img src=pic/bar5.gif width="+(theUser.getUserCP()*0.005)+3+" height=8 alt="+theUser.getUserCP()+"><br>");
	out.println("&nbsp;&nbsp;注册:"+Format.getStrDate(theUser.getAddDate()));
	out.println("<BR> &nbsp;&nbsp;文章:"+theUser.getArticle()+"  <br>&nbsp;&nbsp;鉴定:"+"保密"+" <img src=\"\" width=0 height=4><BR>"+
			"</td><td bgcolor="+bgcolor+" width=1 height=100% rowspan=2>"+ 
            "<table width=1 height=\"100%\" cellpadding=0 cellspacing=0 bgcolor="+tableTitleColor+">"+
            "<tr><td width=1></td></tr></table></td>"+
			"<td bgcolor="+bgcolor+" valign=top width=* height=\"95%\"><img src=\"\" width=0 height=4><BR>"+
            "&nbsp; <a href=javascript:openScript('usersms.jsp?action=new&touser="+theUser.getUserName()+"',420,320)>"+
			"<img src=pic/message.gif border=0 alt=给"+theUser.getUserName()+"发送一个短消息></a>&nbsp;"+
            "<a href=javascript:openScript('dispuser.jsp?name="+theUser.getUserName()+"',350,300)>"+
			"<img src=pic/profile.gif border=0 alt=查看"+theUser.getUserName()+"的个人资料></a>&nbsp;"+
            "<a href=queryresult.jsp?sType=1&nSearch=3&keyword="+theUser.getUserName()+"&forumID="+forumID+"&SearchDate=ALL target=_blank><img src=pic/find.gif border=0 alt=\"搜索"+theUser.getUserName()+"在"+response.encodeURL(theForum.getForumType())+"的所有贴子\"></a>&nbsp; ");

	if (theUser.getUserEmail()!=null&&!"".equals(theUser.getUserEmail()))
		out.println("<A href='mailto:"+theUser.getUserEmail()+"'><IMG alt='点击这里发送电邮给"+theUser.getUserName()+"' border=0 src='pic/email.gif'></A>&nbsp;"); 
   	if (!"".equals(theUser.getOicq()))
	out.println("<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln="+theUser.getOicq()+" target=_blank title=\""+theUser.getUserName()+"["+theUser.getOicq()+"]的QQ情况\"><img src=pic/oicq.gif width=16 height=16 border=0>OICQ</a>&nbsp;");
	
	if (theUser.getHomePage()!=null&&!"".equals(theUser.getHomePage()))
		out.println("<A href='"+theUser.getHomePage()+"' target=_blank><IMG alt='访问"+theUser.getUserName()+"的主页'  border=0 src='pic/homepage.gif'></A>&nbsp; ");

	out.println("<a href=reannounce.jsp?forumID="+forumID+"&rootID="+rootID+"&parentID="+theMSG.getAnnounceID()+"&reply=true>"+
			"<img src=pic/reply.gif border=0 alt=引用回复这个贴子></a>&nbsp; "+
			"<a href=reannounce.jsp?forumID="+forumID+"&rootID="+rootID+"&parentID="+theMSG.getAnnounceID()+">"+
			"<img src=pic/reply_a.gif border=0 alt=回复这个贴子></a>&nbsp; "+
            "<BR><hr width=\"100%\" size=1 color=#777777>"+
            "<table cellpadding=0 cellspacing=0 width=\"95%\" style=\"word-break:break-all\">"+
            "<tr><td width=32 align=left valign=top>");
	if (theMSG.getExpression()!=null&&!"".equals(theMSG.getExpression()))
		out.println("<img src='face/"+theMSG.getExpression()+"' border=0 alt=发贴心情>");
	
	out.println("&nbsp;</td><td style=\"LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word\">"+
			"<font face=宋体 color=#333333>" );
	out.println("<b>"+theMSG.getTopic()+"</b><br>"+theMSG.getBody()); 

if (theMSG.getIsVote()&& theMSG.getAnnounceID()==theMSG.getRootID()){
	try{
	ForumVote theVote=theForum.getForumVote(theMSG.getAnnounceID());
	
	
	String [] votes=theVote.getVoteS();
	int [] voteNum=theVote.getVoteNumS();
	out.println("<table border=0 cellpadding=0 cellspacing=3 width=\"95%\" align=center><tr>");
	out.println("<td colSpan=2>以下为投票内容:</td></tr>");
	out.println("<form action=postvote.jsp?forumID="+forumID+"&announceID="+rootID+"&action="+theVote.getVoteType()+" method=POST>");
	String voteString="";
	int voteSign=0;
	for(int voteI=0;voteI<votes.length;voteI++)
		if(!votes[voteI].trim().equals("")){
			if (theVote.getVoteType()==0)
				voteString+=(voteSign+1)+".  <input type=radio name=postVote value=\""+(voteSign)+"\">"+(votes[voteI].trim())+"<br>";
			else
				voteString+=(voteSign+1)+".  <input type=checkbox name=postVote_"+voteSign+" value=\""+voteSign+"\">"+votes[voteI].trim()+"<br>";
			voteSign++;
		}
	
	
	
	out.println("<tr><td width=\"60%\"><span style=\"LINE-HEIGHT: 200%;\">"+voteString+"</span></td>");
	voteString="";
	for(int voteI=0;voteI<voteNum.length;voteI++)
		voteString+="票数:<font color=#990000><b>"+voteNum[voteI]+"</b></font><br>";
	

⌨️ 快捷键说明

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