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

📄 showtopic.jsp

📁 这是论坛原代码,希望大家能好好看看,说明需要的太多了吧
💻 JSP
📖 第 1 页 / 共 3 页
字号:
                      <%
				String[] voptions = null;
				voteoption = render.RenderVote(request, msgdb); // 如果不可见则voteoption为null
				if (type==1 && voteoption!=null)
				{	
					voptions = voteoption.split("\\|");
					int len = voptions.length; %>
                      <br>
                      <form action="vote.jsp?privurl=<%=privurl%>" name=formvote method="post">
                        <input type=hidden name=boardcode value="<%=boardcode%>">
                        <input type=hidden name=boardname value="<%=boardname%>">
                        <input type=hidden name=voteid value="<%=id%>">
                        <%
					for (int k=0; k<len; k++) { %>
                        <%=k+1%>、
                        <input class="n" type=radio name=votesel value="<%=k%>" onClick="formvote.submit()">
&nbsp;&nbsp;&nbsp;<%=voptions[k]%><br>
  <% } %>
                      </form>
                      <%
					String[] result = voteresult.split("\\|");
					len = result.length;
					int[] re = new int[len];
					int[] bfb = new int[len];
					int total = 0;
					for (int k=0; k<len; k++) {
						re[k] = Integer.parseInt(result[k]);
						total += re[k];
					}
					if (total!=0) {
						for (int k=0; k<len; k++) {
							bfb[k] = (int)Math.round((double)re[k]/total*100);
						}
					}
%>
                      <table class=p9 width="98%" border="0" cellpadding="0" cellspacing="1" height="100">
                        <%
						int barId = 0;
						for (int k=0; k<len; k++) { %>
                        <tr>
                          <td width="30" height="22"><%=k+1%>、</td>
                          <td width="357"><img src=images/vote/bar<%=barId%>.gif width="<%=bfb[k]%>%" height=10></td>
                          <td align="left">&nbsp;&nbsp;<strong><%=re[k]%></strong>&nbsp;(<%=bfb[k]%>%)</td>
                          </tr>
                        <%
							barId ++;
							if (barId==10)
								barId = 0;
						}
				%>
                        <tr>
                          <td colspan="3" align="left"><strong>&nbsp;<lt:Label res="res.label.forum.showtopic" key="vote_user"/><%=total%><lt:Label res="res.label.forum.showtopic" key="ren"/></strong></td>
                        </tr>
                      </table>
                      <br>
                    <%}
					if (!msgdb.getPlugin2Code().equals("")) {
						Plugin2Mgr p2m = new Plugin2Mgr();
						Plugin2Unit p2u = p2m.getPlugin2Unit(msgdb.getPlugin2Code());
						out.print(p2u.getUnit().getRender().rend(request, msgdb));
					}
					out.print(render.RenderContent(request, msgdb));
					// if (msgdb.getIsWebedit()==msgdb.WEBEDIT_REDMOON) {
						String att = render.RenderAttachment(request, msgdb);
						out.print(att);
					// }
					%>
                   	</span></td>
                  </tr>
                </table>                  
                <table width="99%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td valign="bottom"><%
				if (!sign.equals(""))
				{
					out.print("<font color=#777777>----------------------------------------------</font><BR>");
					sign = StrUtil.toHtml(sign);
					if (cfg1.getBooleanProperty("forum.sign_ubb"))
						out.print(StrUtil.ubb(request, sign, true));
					else
						out.print(sign);
					//out.print("<BR><font color=#777777>----------------------------------------------</font><BR>");
				}
				%></td>
                          </tr>
                        </table>                      </TD>
              </TR>
              <TR vAlign=top height=20>
                <TD colspan="3"></TD>
                </TR>
              </TBODY> 
            </TABLE>          </TD></TR>
        <TR bgColor=#ffffff>
          <TD align="center"><%
			String ip = "";
			if (privilege.isMasterLogin(request))
	            ip=msgdb.getIp();
			else
				ip = SkinUtil.LoadString(request, "res.label.forum.showtopic", "ip_view_not"); // "您无权察看";
          %>
            <img src="images/system.gif" alt="IP:<%=ip%>" align="absmiddle"> <%=lydate%></TD>
          <TD align=right>
			<hr width="100%" color=#777777 size=1>		  
		    <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="76%">
				<%
				if (isShowAdBottom && v_ad.size()>0) {
					if (ad_count < v_ad.size()) {
						MsgDb msgAd = (MsgDb)v_ad.get(ad_count);
						ad_count ++;
						if (ad_count == v_ad.size())
							ad_count = 0;
				%>
					[<a href="showtopic.jsp?rootid=<%=msgAd.getId()%>" target="_blank"><%=msgAd.getTitle()%></a>]
				<%	}
				}
				%>
				</td>
                <td width="24%" align="right">
				<%if (privilege.isMasterLogin(request)) {%>
					IP: <%=msgdb.getIp()%>&nbsp;
				<%}%>				
				<%
		  String editpage = "edittopic_new.jsp";
		  if (iswebedit==MsgDb.WEBEDIT_UBB) {
		  	editpage = "edittopic.jsp";
		  } else if (iswebedit==MsgDb.WEBEDIT_REDMOON) {
		  	editpage = "edittopic_we.jsp";
		  }
		  String mstr = "<a href='addfriend.jsp?friend=" + StrUtil.UrlEncode(name) + "'>" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "add_friend") + "</a>";
		  mstr += "<a href='myfavoriate.jsp?op=add&privurl=" + privurl + "&id=" + rootid + "'>" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "add_favoriate") + "</a>";
		  mstr += "<a href=" + editpage + "?boardcode=" + StrUtil.UrlEncode(boardcode) + "&editid=" + id + "&privurl=" + privurl + ">" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_edit") + "</a>";
		  mstr += "<a onClick=checkclick('" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_del_confirm") + "') href=deltopic.jsp?" + "boardcode=" + StrUtil.UrlEncode(boardcode) + "&delid=" + id + "&privurl=" + privurl + ">" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_del") + "</a>";
		  %>
                  <a class="nav" href='#' onMouseOver="showmenu(event, &quot;<%=mstr%>&quot;, 0)"><img src="images/edit.gif" border=0 align="absmiddle"></a>&nbsp;
                  <%if (msgdb.getReplyid()==-1) {%>
                  <lt:Label res="res.label.forum.showtopic" key="topic_owner"/>
                  <%}else{%>
                  <%=(curpage-1)*pagesize+i%>&nbsp;
                  <lt:Label res="res.label.forum.showtopic" key="topic_floor"/>
                  <%}%>
&nbsp;&nbsp;<a href="#top"><img src="<%=skinPath%>/images/go_top.gif" alt="<lt:Label res="res.label.forum.showtopic" key="go_top"/>" align="absmiddle" border=0></a></td>
              </tr>
            </table>
		    </TD>
        </TR>
        </TBODY></TABLE></TD></TR></TBODY></TABLE>
<%
}
if (paginator.getTotal()>0)
{
	msgdb.increaseHit(rootid);
}
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  <tr>
    <td height="5" colspan="2" align="left"></td>
  </tr>
  <tr> 
    <td width="12%" height="23" align="left">
	<select name="selboard" onChange="if(this.options[this.selectedIndex].value!=''){location='listtopic.jsp?' + this.options[this.selectedIndex].value;}">
      <option value="" selected><lt:Label res="res.label.forum.showtopic" key="sel_board"/></option>
      <%
LeafChildrenCacheMgr dlcm = new LeafChildrenCacheMgr("root");
java.util.Vector vt = dlcm.getChildren();
Iterator ir = vt.iterator();
while (ir.hasNext()) {
	Leaf leaf = (Leaf) ir.next();
	String parentCode = leaf.getCode();
	if (leaf.getIsHome()) {
%>
      <option style="BACKGROUND-COLOR: #f8f8f8" value="">╋ <%=leaf.getName()%></option>
      <%
	LeafChildrenCacheMgr dl = new LeafChildrenCacheMgr(parentCode);
	java.util.Vector v = dl.getChildren();
	Iterator ir1 = v.iterator();
	while (ir1.hasNext()) {
		Leaf lf = (Leaf) ir1.next();
%>
      <option value="boardcode=<%=StrUtil.UrlEncode(lf.getCode(),"utf-8")%>&boardname=<%=StrUtil.UrlEncode(lf.getName(),"utf-8")%>"> ├『<%=lf.getName()%>』</option>
      <%}
	  }
}%>
    </select></td>
    <td width="88%" height="23" align="right" valign="baseline"> 
    <%
	  String querystr = "&rootid="+rootid;
      out.print(paginator.getCurPageBlock(request, "showtopic.jsp?boardcode=" + boardcode + querystr));
	%>    </td>
  </tr>
</table>

<%if (privilege.isUserLogin(request)) {%>
<FORM name="frmAnnounce" onSubmit="return formCheck()" action="addquickreplytodb.jsp?privurl=<%=privurl%>" method=post>
<TABLE cellSpacing=0 width="98%" align=center bgColor=#d3d3d3 border=0>
  <TBODY>
  <TR>
    <TD height=1></TD></TR></TBODY></TABLE>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#d3d3d3 height=120 
cellSpacing=0 cellPadding=5 width="98%" align=center border=1>
  <TBODY>
  <TR>
    <TD background="<%=skinPath%>/images/bg1.gif" width=158 height=26 bgColor=#007dc6 class="text_title">&nbsp; 
      <lt:Label res="res.label.forum.showtopic" key="quick_reply"/></TD>
        <TD background="<%=skinPath%>/images/bg1.gif" height="26" bgcolor="#007dc6">&nbsp; </TD>
      </TR>
  <TR bgColor=#ffffff>
    <TD height=20 colspan="2">
<%	
if (vplugin.size()>0) {
	Iterator irplugin = vplugin.iterator();
	while (irplugin.hasNext()) {
		PluginUnit pu = (PluginUnit)irplugin.next();
		IPluginUI ipu = pu.getUI(request);
		IPluginViewShowMsg pv = ipu.getViewShowMsg(boardcode, rootMsgDb);
		if (pv.IsPluginBoard()) {
			if (!pu.getAddReplyPage().equals("")) {
%>
				<jsp:include page="<%=pu.getAddReplyPage()%>" flush="true">
				<jsp:param name="msgRootId" value="<%=rootid%>" /> 
				<jsp:param name="isQuickReply" value="true" /> 
				</jsp:include>
<%			}
			else {
				out.print(pu.getName(request) + "&nbsp;" + pv.render(UIShowMsg.POS_QUICK_REPLY_NOTE) + "<BR>");
				out.print(pv.render(UIShowMsg.POS_QUICK_REPLY_ELEMENT) + "<BR>");
			}
		}
	}
}
%>	</TD>
    </TR>
  <TR bgColor=#ffffff>
    <TD height=20>
      <lt:Label res="res.label.forum.showtopic" key="quick_reply_title"/>
    </TD>
    <TD height=20><input name="topic" value="<%=SkinUtil.LoadString(request, "res.label.forum.showtopic", "reply") + StrUtil.toHtml(rootMsgDb.getTitle())%>" size="40">
      <input type=hidden name="replyid" value="<%=rootid%>">
      <input type=hidden name="boardcode" value="<%=boardcode%>">
      <%
if (cfg1.getBooleanProperty("forum.addUseValidateCode")) {
%>
      <lt:Label res="res.label.forum.showtopic" key="input_validatecode"/>
      <input name="validateCode" type="text" size="1">
      <img src='../validatecode.jsp' border=0 align="absmiddle" style="cursor:hand" onClick="this.src='../validatecode.jsp'" alt="<lt:Label res="res.label.forum.index" key="refresh_validatecode"/>">
      <%}%></TD>
  </TR>
  <TR bgColor=#ffffff>
    <TD width="158" rowspan="4">
      &nbsp;&nbsp;<lt:Label res="res.label.forum.showtopic" key="sel_emote"/>
        <iframe src="iframe_browlist.jsp" height="120"  width="98%" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe>
      <input type="hidden" name="expression" value="25">
      <BR>
          <INPUT 
      type=checkbox value=0 name=show_ubbcode>
          <lt:Label res="res.label.forum.showtopic" key="forbid_ubb"/><BR> 
          <INPUT type=checkbox 
      value=0 name=show_smile>
        <lt:Label res="res.label.forum.showtopic" key="forbid_emote"/></TD>
  <TD>
		<TEXTAREA onkeydown=presskey() name=Content rows=6 cols=79 style="width:610"></TEXTAREA> 
        <BR>      </TD>
  </TR>
  
  <TR bgColor=#ffffff>
    <TD vAlign=top align=left><iframe src="iframe_emotequick.jsp" height="35" width="610" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe></TD>
  </TR>
  <TR bgColor=#ffffff>
    <TD vAlign=top align=left><input tabindex=4 type=submit value="Ctrl+Enter <lt:Label res="res.label.forum.showtopic" key="reply_topic"/>" name=submit1>
  <input onClick="checkclick('<lt:Label res="res.label.forum.showtopic" key="confirm_clear_content"/>')" type=reset value="<lt:Label res="res.label.forum.showtopic" key="re_write"/>" name=reset></TD>
  </TR>
  </TBODY></TABLE>
</FORM>
<%}%>
</BODY>
<%@ include file="inc/footer.jsp"%>
</HTML>

⌨️ 快捷键说明

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