a_edit.jsp
资源名称:(J2EE)oa.rar [点击查看]
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:4k
源码类别:
Jsp/Servlet
开发平台:
Java
- <%@ page language="java" pageEncoding="GBK" import="java.util.*"%>
- <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
- <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
- <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
- <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <style type="text/css">
- .tableHead{ /*表头*/
- font-size:12px;
- font-weight:bold;
- height:20pt;
- background:url(img/bg.bmp);
- text-align:buttom;
- }
- .myTable{
- border:#00A8FF 1px solid;
- border-collapse:collapse;
- /*padding:0px 0px 0px 0px;*/
- }
- .myTable TD{
- border:#00A8FF 1px solid;
- font-family:"宋体";
- font-size:10pt;
- /*height:22px;*/
- padding:0px 0px 0px 0px;
- }
- .text{
- font-family:"宋体";
- font-size:10pt;
- /*height:22px;*/
- padding:0px 0px 0px 0px;
- width:200px;
- height:22px;
- }
- </style>
- <SCRIPT src="${pageContext.request.contextPath}/Js_file/Calendar.js">
- function checks(){
- if(form1.atitle.value==""){
- alert("公告标题不能为空!");
- return false;
- }
- if(form1.arealTime.value==""){
- alert("有效时间不能为空!");
- return false;
- }
- }
- </SCRIPT>
- </head>
- <body>
- <html:form action="/affiche?method=${affiche==null?'add':'edit'}" onsubmit="return checks();" enctype="multipart/form-data" styleId="form1">
- <table width=100% border=1 class="myTable">
- <html:hidden property="aid" value="${affiche.aid}" />
- <tr class="tableHead">
- <td colspan="2" align="center">
- 公告信息${affiche==null?'添加':'修改'}
- </td>
- </tr>
- <tr>
- <td>
- 公告标题:
- </td>
- <td>
- <html:text property="atitle" maxlength="50" value="${affiche.atitle}" size="50"></html:text>
- </td>
- </tr>
- <tr>
- <td>
- 有效时间:
- </td>
- <td>
- <html:text property="arealTime" value="${affiche.areal_time}" size="20" readonly="true" onclick="setDayHM(this);"></html:text>
- </td>
- </tr>
- <c:if test="${(affiche!=null)&&(affiche.affixpath!=null)}">
- <%Map map = (Map) request.getAttribute("affiche");
- String path = (String) map.get("affixpath");
- String name = (String) map.get("affixname");
- String[] paths = path.split(",");
- String[] names = name.split(",");
- for (int i = 0; i < paths.length; i++) {
- %>
- <tr>
- <td>
- 附件
- <%=i + 1%>
- </td>
- <td>
- <input type="file" name="file<%=i+1%>" value="<%=paths[i]%>" size="20"/>
- </td>
- </tr>
- <%}
- %>
- </c:if>
- <c:if test="${affiche==null}">
- <tr>
- <td rowspan="3">
- 上传附件
- </td>
- <td>
- <input type="file" name="file1">
- </td>
- </tr>
- <tr>
- <td>
- <input type="file" name="file2">
- </td>
- </tr>
- <tr>
- <td>
- <input type="file" name="file3">
- </td>
- </tr>
- </c:if>
- <tr>
- <td>
- 公告备注:
- </td>
- <td>
- <html:textarea cols="80" rows="6" property="amemo">${affiche.amemo}</html:textarea>
- </td>
- </tr>
- <tr>
- <td>
- 公告内容:
- </td>
- <html:hidden property="acontent" value="${affiche.acontent}" />
- <td>
- <IFRAME ID="eWebEditor1" src="${pageContext.request.contextPath}/editor2/ewebeditor.htm?id=acontent&style=coolblue" frameborder="0" scrolling="no" width="600" height="300"></IFRAME>
- </td>
- </tr>
- <tr>
- <td>
-
- </td>
- <td>
- <input type="submit" value="${affiche==null?'添加':'修改'}">
-
- <input type="reset" value="重置">
-
- <input type="button" value="取消" onclick="javascript:location.href='${pageContext.request.contextPath}/affiche.do?method=editlist'">
- </td>
- </tr>
- </table>
- </html:form>
- </body>
- </html>