modify_leaveword.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.Calendar" %>
- <%@ page import="com.vnex.intranet.util.TimeStamp" %>
- <%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
- <jsp:useBean id="leaveWordProxy" scope="application" class="com.vnex.intranet.communication.leaveword.proxy.LeaveWordProxyBean" />
- <jsp:useBean id="lvb" scope="request" class="com.vnex.intranet.communication.leaveword.value.LeaveWordValueBean" />
- <%
- lvb = leaveWordProxy.getLeaveWordDetail(Integer.parseInt(request.getParameter("leaveWordId")));
- String year = "0";
- String month = "0";
- String day = "0";
- String endDate = "";
- if(lvb.getEndDate() != null)
- {
- Calendar cal = lvb.getEndDate();
- year = ""+cal.get(Calendar.YEAR);
- if((cal.get(Calendar.MONTH)+1)<10)
- month = "0"+(cal.get(Calendar.MONTH)+1);
- else
- month = ""+(cal.get(Calendar.MONTH)+1);
- if(cal.get(Calendar.DAY_OF_MONTH)<10)
- day = "0"+cal.get(Calendar.DAY_OF_MONTH);
- else
- day = ""+cal.get(Calendar.DAY_OF_MONTH);
- endDate = year+"-"+month+"-"+day;
- }
- java.sql.Timestamp ts = BaseJdbcDAO.getDBSystemDate();
- String current = ts.toString();
- current = current.substring(0, current.indexOf(" "));
- String deleteSuffix = "/mainctrl/leaveword/deleteLeaveWordSuccess";
- if(request.getParameter("history") != null)
- deleteSuffix += "?history";
- %>
- <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
- <script language="javascript" src="/vnex/util/strUtil.js"></script>
- <script language=JavaScript>
- function modifyLeaveWord(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/leaveword/modifyLeaveWordSuccess?start=<%=request.getParameter("start")%>";
- form.submit();
- }
- }
- function deleteLeaveWord(form)
- {
- if(confirm("是否删除此条留言?"))
- {
- form.action="<%=deleteSuffix%>";
- form.submit();
- }
- }
- function checkIt(form)
- {
- if(isEmpty(form.msgBody.value) || isEmptyStr(form.msgBody.value))
- {
- alert("请输入留言信息");
- form.msgBody.focus();
- return false;
- }
- else
- {
- if(isInvalidateLen(form.msgBody.value, 1000))
- {
- alert("留言内容不能超过250个汉字或1000个英文字符");
- form.msgBody.focus();
- return false;
- }
- }
- if(!isEmpty(form.endDate.value))
- {
- if(form.endDate.value < "<%=current%>")
- {
- alert("截止日期必须在本日之后");
- return false;
- }
- }
- return true;
- }
- </script>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <DIV align=center>
- <form name="form1" method="post">
- <input type="hidden" name="leaveWordId" value="<%=request.getParameter("leaveWordId")%>">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr valign="top" bgcolor="#fafafa">
- <td >
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr valign="top" bgcolor="#fafafa">
- <td>
- <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
- <tr bgcolor="#666666">
- <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>>><a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>>><a href="/mainctrl/leaveword/home"><font color="#ffffff">留言板</font></a>>>修改留言内容</font>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"><strong> 留言时间:</strong></td>
- <td><%=TimeStamp.toString(TimeStamp.convertCalendarToTimestamp(lvb.getWriteDate()))%></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><strong> 内容:</strong></td>
- <td>
- <textarea name="msgBody" rows="5" cols="39"><%=lvb.getMsgBody()%></textarea> * (注:带*为必填内容)
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"><strong> 截止日期:</strong></td>
- <td>
- <input type="text" name="endDate" readonly size="30" class="text" value="<%=endDate%>">
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择借阅档案日期" onClick="fPopUpCalendarDlg(endDate);return false">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="2" align="center" height="30">
- <input type="button" value="保存" name="B1" onClick="modifyLeaveWord(this.form)" class="text">
-
- <input type="button" value="删除" name="B2" onClick="deleteLeaveWord(this.form)" class="text">
-
- <input type="reset" value="重置" name="B3" class="text">
-
- <input type="button" value="放弃" name="B4" class="text" onclick="history.back()">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>