inc_showtopic_after_note.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:8k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="cn.js.fan.db.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="java.util.*"%>
  5. <%@ page import="cn.js.fan.web.*"%>
  6. <%@ page import="com.redmoon.forum.ui.*"%>
  7. <%@ page import="com.redmoon.forum.*"%>
  8. <%@ page import="com.redmoon.forum.person.*"%>
  9. <%@ page import="com.redmoon.forum.setup.*"%>
  10. <%@ page import="com.redmoon.forum.plugin.*"%>
  11. <%@ page import="com.redmoon.forum.plugin.debate.*"%>
  12. <%@ page import="com.redmoon.forum.plugin.score.*"%>
  13. <%
  14. MsgMgr mm = new MsgMgr();
  15. long rootid = ParamUtil.getLong(request, "rootid");
  16. MsgDb rootMsgDb = mm.getMsgDb(rootid);
  17. String boardcode = rootMsgDb.getboardcode();
  18. UserSession.setBoardCode(request, boardcode);
  19. Leaf msgLeaf = new Leaf();
  20. msgLeaf = msgLeaf.getLeaf(boardcode);
  21. String querystring = StrUtil.getNullString(request.getQueryString());
  22. String privurl = request.getRequestURL()+"?"+StrUtil.UrlEncode(querystring);
  23. // 取得皮肤路径
  24. String skincode = msgLeaf.getSkin();
  25. if (skincode.equals("") || skincode.equals(UserSet.defaultSkin)) {
  26. skincode = UserSet.getSkin(request);
  27. if (skincode==null || skincode.equals(""))
  28. skincode = UserSet.defaultSkin;
  29. }
  30. SkinMgr skm = new SkinMgr();
  31. Skin skin = skm.getSkin(skincode);
  32. String skinPath = skin.getPath();
  33. DebateDb dd = new DebateDb();
  34. dd = dd.getDebateDb(rootid);
  35. %>
  36. <style type="text/css">
  37. <!--
  38. .STYLE1 {font-size: 14px}
  39. .STYLE3 {font-size: 14px; font-weight: bold; }
  40. .STYLE4 {
  41. color: #FF0000;
  42. font-weight: bold;
  43. font-size: 18px;
  44. }
  45. a.viewpoint {
  46. color:#FF0000;
  47. }
  48. a.viewpoint:visited {
  49. color:#FF0000;
  50. }
  51. -->
  52. </style>
  53. <table width="98%"  border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="<%=skin.getTableBorderClr()%>">
  54.   <tr>
  55.     <td height="24" colspan="2" align="center" background="<%=skinPath%>/images/bg1.gif" class="text_title"><strong>辩论</strong></td>
  56.   </tr>
  57.   <tr>
  58.     <td width="50%" valign="top" background="plugin/debate/images/bg_l.gif">
  59. <div style="height:40px; width:100%"><img src="plugin/debate/images/br_1.gif" align="absmiddle" />
  60. <span class="STYLE1"><%=rootMsgDb.getTitle()%></span> </div>
  61. <span style="line-height:150%"><span class="STYLE1"><strong>背景资料</strong></span><br />
  62.     正方:<%=dd.getViewpoint1()%><br />
  63.     <br />
  64. <span>反方:</span><%=dd.getViewpoint2()%><br />
  65. <br />
  66. <table width="98%" height="100">
  67.       <tr>
  68.         <td width="3%" height="46">&nbsp;</td>
  69.         <td width="42%" align="center" bgcolor="D6EBF7"><span class="STYLE3">支持方得票数 <%=dd.getVoteCount1()%> 票 </span></td>
  70.         <td width="9%" align="center"><span class="STYLE4">VS</span></td>
  71.         <td width="42%" align="center" bgcolor="D6EBF7"><span class="STYLE3">反对方票数 <%=dd.getVoteCount2()%> 票 </span></td>
  72.         <td width="4%">&nbsp;</td>
  73.       </tr>
  74.       <tr>
  75.         <td>&nbsp;</td>
  76.         <td colspan="3" align="center"><%
  77. // 到期检查
  78. boolean isExpired = false;
  79. if (DateUtil.compare(dd.getEndDate(), new java.util.Date())==2) {
  80. if (!DateUtil.isSameDay(dd.getEndDate(), new java.util.Date())) {
  81. isExpired = true;
  82. }
  83. }
  84. if (isExpired) {
  85. String s = "";
  86. if (dd.getUserCount1()>dd.getUserCount2())
  87. s  = "正方";
  88. else
  89. s = "反方";
  90. out.print("该辩论已过期," + s + "获胜!");
  91. }
  92. else {
  93. %>
  94.           <img src="images/emot/em42.gif" />&nbsp;<a href="#" onclick="hopenWin('plugin/debate/debate_do.jsp?op=vote_support&msgId=<%=rootid%>', 480, 320)">
  95.   投支持票
  96.   </a>&nbsp;&nbsp;<img src="images/emot/em41.gif" />&nbsp;<a href="#" onclick="hopenWin('plugin/debate/debate_do.jsp?op=vote_oppose&msgId=<%=rootid%>', 480, 320)">投反对票</a>
  97.           <%}%></td>
  98.         <td>&nbsp;</td>
  99.       </tr>
  100.     </table> </td>
  101.     <td valign="top" background="plugin/debate/images/bg_r.gif"><table width="98%">
  102.         <tr>
  103.           <td width="15%" rowspan="2" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="85" height="81">
  104.             <param name="movie" value="plugin/debate/images/clock1.swf" />
  105.             <param name="quality" value="high" />
  106. <PARAM NAME=wmode value=transparent>
  107.             <embed src="plugin/debate/images/clock1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="85" height="81"></embed>
  108.           </object></td>
  109.           <td width="85%"><span class="STYLE1">辩论时间:</span></td>
  110.         </tr>
  111.         <tr>
  112.           <td height="65"><span class="STYLE1"><strong>开始时间:<%=ForumSkin.formatDate(request, dd.getBeginDate())%></strong><strong><br />
  113. 结束时间:<%=ForumSkin.formatDate(request, dd.getEndDate())%></strong></span></td>
  114.         </tr>
  115.         <tr>
  116.           <td colspan="2" valign="top" height="2px" background="plugin/debate/images/br_line.gif"></td>
  117.         </tr>
  118.       </table>
  119.       <strong><span class="STYLE1"><br />
  120.       </span></strong><span class="STYLE1">
  121.     人气:<br />
  122.     <br />
  123.     <strong>正方人数:<%=dd.getUserCount1()%>人<br />
  124.     反方人数:<%=dd.getUserCount2()%>人<br />
  125.     第三方:<%=dd.getUserCount3()%>人</strong></span></td>
  126.   </tr>
  127.   <tr>
  128.     <td height="31" valign="top" background="plugin/debate/images/bg_l.gif"><table border="0" align="center" cellpadding="0" cellspacing="0">
  129.       <tr>
  130.         <td width="65" height="22" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)">
  131. <%
  132. String viewpointType = ParamUtil.get(request, "viewpointType");
  133. %>
  134. <a class="<%=viewpointType.equals("")?"viewpoint":""%>" href="showtopic.jsp?rootid=<%=rootid%>">全部观点</a></td>
  135.         <td width="5" align="center">&nbsp;</td>
  136.         <td width="65" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)"><a class="<%=viewpointType.equals("" + DebateViewpointDb.TYPE_SUPPORT)?"viewpoint":""%>" href="showtopic.jsp?rootid=<%=rootid%>&amp;pluginCode=<%=DebateUnit.code%>&amp;viewpointType=<%=DebateViewpointDb.TYPE_SUPPORT%>">支持观点</a></td>
  137.         <td width="5" align="center">&nbsp;</td>
  138.         <td width="65" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)"><a class="<%=viewpointType.equals("" + DebateViewpointDb.TYPE_OPPOSE)?"viewpoint":""%>" href="showtopic.jsp?rootid=<%=rootid%>&amp;pluginCode=<%=DebateUnit.code%>&amp;viewpointType=<%=DebateViewpointDb.TYPE_OPPOSE%>">反对观点</a></td>
  139.         <td width="5" align="center">&nbsp;</td>
  140.         <td width="65" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)"><a class="<%=viewpointType.equals("" + DebateViewpointDb.TYPE_OTHERS)?"viewpoint":""%>" href="showtopic.jsp?rootid=<%=rootid%>&amp;pluginCode=<%=DebateUnit.code%>&amp;viewpointType=<%=DebateViewpointDb.TYPE_OTHERS%>">第三方观点</a></td>
  141.       </tr>
  142.     </table>
  143.     </td>
  144.     <td valign="top" background="plugin/debate/images/bg_r.gif">
  145. <%
  146. String replypage = "addreply_new.jsp";
  147. if (msgLeaf.getWebeditAllowType()==Leaf.WEBEDIT_ALLOW_TYPE_REDMOON_FIRST) {
  148. replypage = "addreply_we.jsp";
  149. }
  150. %>
  151. <table border="0" align="center" cellpadding="0" cellspacing="0">
  152.       <tr>
  153.         <td width="65" height="22" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)"><a href="<%=replypage%>?viewpoint_type=<%=DebateViewpointDb.TYPE_SUPPORT%>&boardcode=<%=boardcode%>&replyid=<%=rootid%>&privurl=<%=privurl%>">我支持</a></td>
  154.         <td width="5" align="center">&nbsp;</td>
  155.         <td width="65" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)"><a href="<%=replypage%>?viewpoint_type=<%=DebateViewpointDb.TYPE_OPPOSE%>&boardcode=<%=boardcode%>&replyid=<%=rootid%>&privurl=<%=privurl%>">我反对</a></td>
  156.         <td width="5" align="center">&nbsp;</td>
  157.         <td width="65" align="center" style="background-image:url(plugin/debate/images/btn_bg.gif)"><a href="<%=replypage%>?viewpoint_type=<%=DebateViewpointDb.TYPE_OTHERS%>&boardcode=<%=boardcode%>&replyid=<%=rootid%>&privurl=<%=privurl%>">第三方观点</a></td>
  158.         </tr>
  159.     </table>
  160. </td>
  161.   </tr>
  162. </table>
  163. <br />