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

📄 topic.jsp

📁 这是一个用JSP开发的论坛源 码。。。 按照上在的README可轻松的捅有下JSP论坛
💻 JSP
📖 第 1 页 / 共 3 页
字号:
      authorQQ=user.getQQ();
      authorIcq=user.getIcq();
      authorOnline=user.getOnline();
      authorTitle=user.getNewMemberTitle();
      authorPart=user.getNewSocialPart();
      authorRegisterTime=user.getRegisterTimeInTopic();
      authorAstro=user.getAstro();
      authorSignature=user.getSignature();
      authorAvatar=user.getUserAvatar();
      authorSex=user.getSex();
      userImageURL=user.getUserImageURL();
      authorGradeTitle=user.getGradeTitle();
      authorGradeGraphic=user.getGradeGraphic();
      coinName=(new ForumEncourage()).getCoinName();
      authorStatus=user.getAuthorStatus();
      notShowSignature=user.getNotShowSignature();

      authorPostNumber=user.getAllPostNumber()+user.getAllReplyNumber()-user.getAllDeleteNumber();
      authorPostNumber=authorPostNumber<0?0:authorPostNumber;
      authorCharmLength=(authorCharm/12000>0)?120:authorCharm/100;
      authorExperienceLength=(authorExperience/12000>0)?120:authorExperience/100;
    }
    catch(UserException exception) {
    }
  }
  if(i%2==0)
    tempbgcolor=postcolorone;
  else
    tempbgcolor=postcolortwo;

  //是否支持凌云标签
  if(lyCodeStat.equals("1")) {
    postContent=(new ForumFilter(postContent)).getFilterString();
  }
  if(arrawPostFontSize.equals("1"))
    postContent=(new ForumFilter(postContent)).getFilterString("FontFilter");
  if(arrawPostPic.equals("1"))
    postContent=(new ForumFilter(postContent)).getFilterString("ImgFilter");
  if(emotIcons.equals("1"))
    postContent=(new ForumFilter(postContent)).getFilterString("SmileFilter");

  //文章内容支持flash
  if(arrawPostFlash.equals("1"))
    postContent=(new ForumFilter(postContent)).getFilterString("FlashFilter");
  //文章内容支持media[rm][mp][qt]
  if(arrawPostMedia.equals("1"))
    postContent=(new ForumFilter(postContent)).getFilterString("ObjectFilter");
  //文章内容支持背景音乐[bgsound]
  if(arrawPostSound.equals("1"))
    postContent=(new ForumFilter(postContent)).getFilterString("SoundFilter");

  if(!authorSignature.equals("") && notShowSignature.equals("0") && boardDispSign.equals("1")) {
    if(lyCodeStat.equals("1"))
      authorSignature=(new ForumFilter(authorSignature)).getFilterString();
    if(arrawSignFontSize.equals("1"))
      authorSignature=(new ForumFilter(authorSignature)).getFilterString("FontFilter");
    if(arrawSignPic.equals("1"))
      authorSignature=(new ForumFilter(authorSignature)).getFilterString("ImgFilter");

    //用户签名支持flash
    if(arrawSignFlash.equals("1"))
      authorSignature=(new ForumFilter(authorSignature)).getFilterString("FlashFilter");
    //用户签名支持media[rm][mp][qt]
    if(arrawSignMedia.equals("1"))
      authorSignature=(new ForumFilter(authorSignature)).getFilterString("ObjectFilter");
    //用户签名支持背景音乐[bgsound]
    if(arrawSignSound.equals("1"))
      authorSignature=(new ForumFilter(authorSignature)).getFilterString("SoundFilter");
  }

  //转化postcontent中的/n -> <br>
  postContent=StringUtils.toBR(postContent);
  authorSignature=StringUtils.toBR(authorSignature);

%>
<table cellpadding=0 cellspacing=1 width=<%=tablewidth%> align=center>
 <tr>
  <td bgcolor="<%=tempbgcolor%>" rowspan=2 width=180 valign=top>
   <table width=100% cellpadding=4 cellspacing=5>
    <tr>
     <td bgcolor=<%=tempbgcolor%> valign=top>
      <table cellpadding=0 cellspacing=0>
       <tr>
        <td width=30>
<%
  if(authorOnline.equals("1"))
    out.println("<IMG SRC=images/online1.gif width=15 height=15 alt=该用户目前在线>");
  else
    out.println("<IMG SRC=images/offline1.gif width=15 height=15 alt=该用户目前不在线>");
%>
        </td>
        <td>
          <div style="filter:glow(color=<%if(authorStatus.equals("2")) out.print(banglow);else out.print(memglow);%>,direction=135)">
            &nbsp;<font color=<%=posternamecolor%>><b><%=postAuthor%>&nbsp;</b></font>
          </div>
        </td>
        <td>
<%
  if(postAuthorID!=0) {
    if(authorSex.equals("帅哥"))
      out.println("<img src=images/mal.gif width=20 height=14 alt='哦,帅哥哟'>");
    else if(authorSex.equals("美女"))
      out.println("<img src=images/fem.gif width=20 height=14 alt='哇,美女耶'>");
  }
  if(!authorAstro.equals("") && !authorAstro.equals("保密")) {
      out.print("<IMG height=13 src=star/"+authorAstro+".gif width=13 alt=");
      if(authorAstro.equals("z1"))
        authorAstro="白羊座";
      else if(authorAstro.equals("z2"))
        authorAstro="金牛座";
      else if(authorAstro.equals("z3"))
        authorAstro="双子座";
      else if(authorAstro.equals("z4"))
        authorAstro="巨蟹座";
      else if(authorAstro.equals("z5"))
        authorAstro="狮子座";
      else if(authorAstro.equals("z6"))
        authorAstro="处女座";
      else if(authorAstro.equals("z7"))
        authorAstro="天秤座";
      else if(authorAstro.equals("z8"))
        authorAstro="天蝎座";
      else if(authorAstro.equals("z9"))
        authorAstro="射手座";
      else if(authorAstro.equals("z10"))
        authorAstro="魔羯座";
      else if(authorAstro.equals("z11"))
        authorAstro="水瓶座";
      else if(authorAstro.equals("z12"))
        authorAstro="双鱼座";
      out.println(authorAstro+" align=absmiddle>");
  }
%>
        </td>
       </tr>
      </table>
<%
  if(authorStatus.equals("2"))
    out.println("<font color="+postfontcolorone+"><b>发言已被屏蔽</b></font><BR><BR>");
  if(postAuthorID==0)
      out.println("<font color="+postfontcolortwo+"> -* 未注册 *-</font><br>");
  else {
    if(!authorTitle.equals(""))
      out.println("<font color="+postfontcolortwo+">头衔: "+authorTitle+"</font><br>");
    if(!authorPart.equals(""))
      out.println("<font color="+postfontcolorone+">门派: "+authorPart+"</font><br>");
    if(!userImageURL.equals(""))
      out.println("&nbsp;&nbsp;<img src=\""+userImageURL+"\" width="+userImageWidth+" height="+userImageHeight+"><br>");
    else if(!authorAvatar.equals(""))
      out.println("&nbsp;&nbsp;<img src=avatars/"+authorAvatar+"><br>");
    if(authorGrade!=0 || authorMode>2)
      out.println("<img src=images/"+authorGradeGraphic+" width=100 height=16><br>");
  }
  if(postAuthorID!=0) {
%>
      <font color=<%=postfontcolortwo%>>威望: <%=authorMark%></font>
      <br><font color=<%=postfontcolorone%>>级别: <a href=lookinfo.jsp?action=style target=_blank><%=authorGradeTitle%></a></font>
      <br><font color=<%=postfontcolortwo%>>魅力: <img src=images/bar4.gif width=<%=authorCharmLength%> height=8 alt="<%=authorCharm%>"></font>
      <br><font color=<%=postfontcolorone%>>经验: <img src=images/bar5.gif width=<%=authorExperienceLength%> height=8 alt="<%=authorExperience%>"></font>
      <br><font color=<%=postfontcolortwo%>>金钱: <%=authorMoney%> <%=coinName%></font>
      <br><font color=<%=postfontcolorone%>>总发贴数: <b><%=authorPostNumber%></b> 篇</font>
      <br><font color=<%=postfontcolortwo%>>注册日期:  <%=authorRegisterTime%></font><BR>
<%
  }
  else {
%>
      <font color=<%=postfontcolortwo%>>威望: 未知</font>
      <br><font color=<%=postfontcolorone%>>级别: 未知</font>
      <br><font color=<%=postfontcolortwo%>>魅力: 未知</font>
      <br><font color=<%=postfontcolorone%>>经验: 未知</font>
      <br><font color=<%=postfontcolortwo%>>金钱: 未知</font>
      <br><font color=<%=postfontcolorone%>>总发贴数: 未知</font>
      <br><font color=<%=postfontcolortwo%>>注册日期: 未知</font><BR>
<%
  }
%>
     </td>
    </tr>
   </table>
  </td>
  <td bgcolor=<%=tempbgcolor%> valign=top>
   <a href="javascript:openScript('messanger.jsp?action=msgsend&toname=<%=postAuthor%>',420,320)" title="给<%=postAuthor%>发送一个短消息"><img src=images/message.gif border=0 width=16 height=16 align=absmiddle>消息</a>
   <a href=profile.jsp?action=show&member=<%=postAuthor%> title="查看<%=postAuthor%>的个人资料" target=_blank><img src=images/profile.gif border=0 width=16 height=16 align=absmiddle>查看</a>
   <a href="search.jsp?action=startsearch&TYPE_OF_SEARCH=username_search&NAME_SEARCH=topictitle_search&FORUMS_TO_SEARCH=1&SEARCH_STRING=<%=postAuthor%>" target=_blank title="搜索<%=postAuthor%>在本分论坛的全部贴子"><img src=images/find.gif border=0 width=16 height=16 align=absmiddle>搜索</a>
   <a href="javascript:openScript('friendlist.jsp?action=adduser&friendname=<%=postAuthor%>',420,320)" title="加<%=postAuthor%>为我的好友"><img src=images/friend.gif border=0 width=16 height=16 align=absmiddle>好友</a>
<%
  if(!authorEmail.equals("")) {
%>
   <a href=mailto:<%=authorEmail%> title=电子邮件地址><img src=images/email.gif border=0 width=16 height=16 align=absmiddle>邮件</a>
<%
  }
  if(!authorHomePage.equals("http://") && !authorHomePage.equals("")) {
%>
   <a href=<%=authorHomePage%> target=_blank title="访问 <%=postAuthor%> 的主页"><img src=images/homepage.gif border=0 width=16 height=16 align=absmiddle>主页</a>
<%
  }
  if(!authorQQ.equals("")) {
%>
   <a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=authorQQ%> target=_blank title="查看 QQ:<%=authorQQ%>的资料"><img src=images/oicq.gif border=0 width=16 height=16 align=absmiddle>QQ</a>
<%
  }
  if(!authorIcq.equals("")) {
%>
   <a href="javascript:openScript('misc.jsp?action=icq&UIN=<%=authorIcq%>',450,300)" title="给 ICQ:<%=authorIcq%> 发个消息"><img src=images/icq.bmp border=0 width=16 height=16 align=absmiddle>ICQ</a>
<%
  }
  if(postVote.equals("0")) {
%>
   <a href=post.jsp?action=copy&forumID=<%=forumID%>&topic=<%=topic%>&postID=<%=postID%> title=复制这个贴子><img src=images/copy.gif border=0 width=16 height=16 align=absmiddle>复制</a>
  <a href=post.jsp?action=replyquote&forumID=<%=forumID%>&topic=<%=topic%>&postID=<%=postID%> title=引用回复这个贴子><img src=images/reply.gif border=0 width=16 align=absmiddle>引用</a>
<%
  }
  if(postTitleLock.equals("0")) {
%>
   <a href=post.jsp?action=reply&forumID=<%=forumID%>&topic=<%=topic%>><img src=images/replynow.gif border=0 alt=回复贴子 width=16 height=16>回复</a>
<%
  }
%>
   <BR><hr width=100% size=1 color=<%=tablebordercolor%>>
   <table cellpadding=0 cellspacing=0 width=100% style="TABLE-LAYOUT: fixed">
    <tr>
     <td width=32 valign=top>&nbsp;</td>
     <td style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word; 130; 0pt">
      <font color=<%=postfontcolortwo%>>
      <br>
<%
  if(authorStatus.equals("2")) {
     out.println("------------------------<br>");
     out.println("<font color="+fonthighlight+">此用户的发言已经被屏蔽!<br>如有疑问,请联系坛主!</font><br>");
     out.println("------------------------<br>");
  }
  else if((cookieMode.equals("0")||(isAdmin==0 && !isAuthor)) && markHidden.equals("1") && cookieMark<markPost) {
     out.println("附件保密!<br><br><FONT COLOR="+fonthighlight+">[您没有权限看这个帖子,您的威望至少需要 <B>"+markPost+"</B>]</FONT><BR>  <BR>");
  }
  else if((cookieMode.equals("0")||(isAdmin==0 && !isAuthor)) && moneyHidden.equals("1") && allowShowHiddenNumber==0) {
%>
      附件保密!<br><br><FONT COLOR=<%=fonthighlight%>>[察看这个帖子需要 <b><%=moneyPost%></b> <%=coinName%>,目前已有 <B><%=allBuyNumber%></B> 人购买]</FONT><BR><br>
     <FORM action=buypost.jsp method=post>
       <input name=postID type=hidden value=<%=postID%>>
       <input name=forumID type=hidden value=<%=forumID%>>
       <input name=topic type=hidden value=<%=topic%>>
       <input name=replyNum type=hidden value=<%=replyNum%>>
       <INPUT type=submit name=submit value="算你狠。。我买,我付钱">
      </form><BR>
<%
  }
  else if(postVote.equals("1")) {
    ForumPollFactory forumPollFactory=new ForumPollFactory();
    if(markHidden.equals("1"))
      out.println("<FONT COLOR="+fonthighlight+">[此帖查看需要威望 <B>"+markPost+"</B>]</FONT><BR><BR>");
    else if(moneyHidden.equals("1"))
      out.println("<FONT COLOR="+fonthighlight+">[此帖售价 <B>"+moneyPost+"</B> "+coinName+",目前已经 "+allBuyNumber+" 人购买]</FONT><BR><BR>");
%>
         <table width=100% cellpadding=0 cellspacing=0>
          <tr>
           <td>
            <font color=<%=postfontcolortwo%>><%=postContent%></font>
           </td>
          </tr>
         </table>
<%
    int canVote=forumPollFactory.getCanVote(postID,cookieName);
    //canVote==0->can vote; canVote==1->can't vote;
    if(postTitleLock.equals("0") && !cookieMode.equals("0") && canVote==0) {
%>
      <table cellpadding=1 cellspacing=0 bgcolor=<%=tablebordercolor%> align=center>
       <tr>
        <td nowrap>
         <table cellpadding=4 cellspacing=0 width=100% bgcolor=<%=postcolortwo%>>
          <form action="poll.jsp?action=poll&forumID=<%=forumID%>&topic=<%=topic%>&postID=<%=postID%>" method=post  enctype="multipart/form-data">
          <tr>
           <td nowrap>
<%
          ArrayList forumPollVector=(new ForumPollFactory()).getForumPollFactory(postID);
          for(int j=0;j<forumPollVector.size();j++) {
            ForumPoll forumPoll=(ForumPoll)forumPollVector.get(j);
            out.println("<input type='radio' name='myChoice' value='"+forumPoll.getVoteID()+"'>"+forumPoll.getVoteTitle()+"<br>");
          }
%>
           </td>
          </tr>
          <tr>
           <td align=center nowrap>
            <HR size=1 width=85%>
            <input type=submit name=results value='参加投票'>
           </td>
          </tr>
          </form>
         </table>
        </td>
       </tr>
      </table>
<%
    }
    int allVoteNumber=forumPollFactory.getAllVoteNumber(postID);
%>
      <table width=510>

⌨️ 快捷键说明

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