a_edit.jsp
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="GBK" import="java.util.*"%>
  2. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
  3. <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
  4. <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
  5. <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
  6. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <style type="text/css">
  11. .tableHead{ /*表头*/
  12. font-size:12px;
  13. font-weight:bold;
  14. height:20pt;
  15. background:url(img/bg.bmp);
  16. text-align:buttom;
  17. }
  18. .myTable{
  19. border:#00A8FF 1px solid;
  20. border-collapse:collapse;
  21. /*padding:0px 0px 0px 0px;*/
  22. }
  23. .myTable TD{
  24. border:#00A8FF 1px solid;
  25. font-family:"宋体";
  26. font-size:10pt;
  27. /*height:22px;*/
  28. padding:0px 0px 0px 0px;
  29. }
  30. .text{
  31. font-family:"宋体";
  32. font-size:10pt;
  33. /*height:22px;*/
  34. padding:0px 0px 0px 0px;
  35. width:200px;
  36. height:22px;
  37. }
  38. </style>
  39. <SCRIPT src="${pageContext.request.contextPath}/Js_file/Calendar.js">
  40.    function checks(){
  41.    if(form1.atitle.value==""){
  42.    alert("公告标题不能为空!");
  43.    return false;
  44.    }
  45.   
  46.    if(form1.arealTime.value==""){
  47.    alert("有效时间不能为空!");
  48.    return false;
  49.    }
  50.    }
  51.    </SCRIPT>
  52. </head>
  53. <body>
  54. <html:form action="/affiche?method=${affiche==null?'add':'edit'}" onsubmit="return checks();" enctype="multipart/form-data" styleId="form1">
  55. <table width=100% border=1 class="myTable">
  56. <html:hidden property="aid" value="${affiche.aid}" />
  57. <tr class="tableHead">
  58. <td colspan="2" align="center">
  59. 公告信息${affiche==null?'添加':'修改'}
  60. </td>
  61. </tr>
  62. <tr>
  63. <td>
  64. 公告标题:
  65. </td>
  66. <td>
  67. <html:text property="atitle" maxlength="50" value="${affiche.atitle}" size="50"></html:text>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>
  72. 有效时间:
  73. </td>
  74. <td>
  75. <html:text property="arealTime" value="${affiche.areal_time}" size="20" readonly="true" onclick="setDayHM(this);"></html:text>
  76. </td>
  77. </tr>
  78. <c:if test="${(affiche!=null)&&(affiche.affixpath!=null)}">
  79. <%Map map = (Map) request.getAttribute("affiche");
  80. String path = (String) map.get("affixpath");
  81. String name = (String) map.get("affixname");
  82. String[] paths = path.split(",");
  83. String[] names = name.split(",");
  84. for (int i = 0; i < paths.length; i++) {
  85. %>
  86. <tr>
  87. <td>
  88. 附件
  89. <%=i + 1%>
  90. </td>
  91. <td>
  92. <input type="file" name="file<%=i+1%>" value="<%=paths[i]%>" size="20"/>
  93. </td>
  94. </tr>
  95. <%}
  96. %>
  97. </c:if>
  98. <c:if test="${affiche==null}">
  99. <tr>
  100. <td rowspan="3">
  101. 上传附件
  102. </td>
  103. <td>
  104. <input type="file" name="file1">
  105. </td>
  106. </tr>
  107. <tr>
  108. <td>
  109. <input type="file" name="file2">
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>
  114. <input type="file" name="file3">
  115. </td>
  116. </tr>
  117. </c:if>
  118. <tr>
  119. <td>
  120. 公告备注:
  121. </td>
  122. <td>
  123. <html:textarea cols="80" rows="6" property="amemo">${affiche.amemo}</html:textarea>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td>
  128. 公告内容:
  129. </td>
  130. <html:hidden property="acontent" value="${affiche.acontent}" />
  131. <td>
  132. <IFRAME ID="eWebEditor1" src="${pageContext.request.contextPath}/editor2/ewebeditor.htm?id=acontent&style=coolblue" frameborder="0" scrolling="no" width="600" height="300"></IFRAME>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td>
  137. &nbsp;
  138. </td>
  139. <td>
  140. <input type="submit" value="${affiche==null?'添加':'修改'}">
  141. &nbsp;
  142. <input type="reset" value="重置">
  143. &nbsp;
  144. <input type="button" value="取消" onclick="javascript:location.href='${pageContext.request.contextPath}/affiche.do?method=editlist'">
  145. </td>
  146. </tr>
  147. </table>
  148. </html:form>
  149. </body>
  150. </html>