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

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. <script src="<%=request.getContextPath()%>/inc/common.js"></script>
  14. <script>
  15. var GetDate=""; 
  16. function SelectDate(ObjName,FormatDate) {
  17. var PostAtt = new Array;
  18. PostAtt[0]= FormatDate;
  19. PostAtt[1]= findObj(ObjName);
  20. GetDate = showModalDialog("<%=request.getContextPath()%>/util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  21. }
  22. function SetDate() { 
  23. findObj(ObjName).value = GetDate; 
  24. </script>
  25. <%
  26. long msgId = ParamUtil.getLong(request, "editid");
  27. MsgMgr mm = new MsgMgr();
  28. MsgDb md = mm.getMsgDb(msgId);
  29. if (md.isRootMsg()) {
  30. DebateDb atd = new DebateDb();
  31. atd = atd.getDebateDb(msgId);
  32. if (!atd.isLoaded()) {
  33. out.print(SkinUtil.makeErrMsg(request, "该贴不是辩论贴!"));
  34. return;
  35. }
  36. %>
  37. <TABLE width="100%" border=0 align=center cellPadding=2 cellSpacing=1 bgcolor="#CCCCCC">
  38.   <tr>
  39.     <td width="20%" align="left" bgcolor="#F9FAF3">开始时间:</td>
  40.     <td height="23" align="left" bgcolor="#F9FAF3"><input readonly="readonly" type="text" id="debateBeginDate" name="debateBeginDate" size="10" value="<%=DateUtil.format(atd.getBeginDate(), "yyyy-MM-dd")%>"/>
  41.         <img src="<%=request.getContextPath()%>/util/calendar/calendar.gif" align="absmiddle" style="cursor:hand" onclick="SelectDate('debateBeginDate','yyyy-mm-dd')" />
  42.         <input type="hidden" name="pluginCode" value="<%=DebateUnit.code%>" /></td>
  43.   </tr>
  44.   <tr>
  45.     <td align="left" bgcolor="#F9FAF3">结束时间:</td>
  46.     <td height="23" align="left" bgcolor="#F9FAF3"><input readonly="readonly" type="text" id="debateEndDate" name="debateEndDate" size="10" value="<%=DateUtil.format(atd.getEndDate(), "yyyy-MM-dd")%>"/>
  47.         <img src="<%=request.getContextPath()%>/util/calendar/calendar.gif" align="absmiddle" style="cursor:hand" onclick="SelectDate('debateEndDate','yyyy-mm-dd')" /></td>
  48.   </tr>
  49.   <tr>
  50.     <td align="left" bgcolor="#F9FAF3">正方:</td>
  51.     <td height="23" align="left" bgcolor="#F9FAF3"><textarea name="viewpoint1" cols="30" rows="4"><%=atd.getViewpoint1()%></textarea></td>
  52.   </tr>
  53.   <tr>
  54.     <td align="left" bgcolor="#F9FAF3">反方:</td>
  55.     <td height="23" align="left" bgcolor="#F9FAF3"><textarea name="viewpoint2" cols="30" rows="4"><%=atd.getViewpoint2()%></textarea></td>
  56.   </tr>
  57. </TABLE>
  58. <%}else{
  59. DebateViewpointDb dvd = new DebateViewpointDb();
  60. dvd = dvd.getDebateViewpointDb(msgId);
  61. %>
  62. <table width="100%">
  63.   <tr>
  64.     <td>选择支持哪一方:
  65. <input name="viewpoint_type" value="<%=dvd.getType()%>" type="hidden" />
  66.       <select name="viewpoint_type2" disabled>
  67.         <option value="<%=DebateViewpointDb.TYPE_SUPPORT%>">正方</option>
  68.         <option value="<%=DebateViewpointDb.TYPE_OPPOSE%>">反方</option>
  69.         <option value="<%=DebateViewpointDb.TYPE_OTHERS%>">第三方</option>
  70.       </select>
  71.       <input type="hidden" name="pluginCode" value="<%=DebateUnit.code%>" />
  72.   <script>
  73.   frmAnnounce.viewpoint_type2.value = "<%=dvd.getType()%>";
  74.   </script>
  75.   </td>
  76.   </tr>
  77. </table>
  78. <%}%>