write_leaveword.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:5k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  3. <%@ page import="com.vnex.intranet.util.TimeStamp" %>
  4. <%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
  5. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  6. <% 
  7.     java.sql.Timestamp ts = BaseJdbcDAO.getDBSystemDate();
  8.     String current = ts.toString(); 
  9.     current = current.substring(0, current.indexOf(" "));
  10. %>
  11. <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
  12. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  13. <script language=JavaScript>
  14. function writeIt(form)
  15. {
  16.    if(checkIt(form))
  17.    {
  18.       form.action="/mainctrl/leaveword/writeLeaveWordSuccess";
  19.       form.submit();
  20.    }   
  21. }
  22. function checkIt(form)
  23. {
  24.    if(isEmpty(form.msgBody.value) || isEmptyStr(form.msgBody.value))
  25.    {
  26.       alert("留言不能为空");
  27.       form.msgBody.focus();
  28.       return false;
  29.    }
  30.    else
  31.    {
  32.       if(isInvalidateLen(form.msgBody.value, 1000))
  33.       {
  34.          alert("留言内容不能超过250个汉字或1000个英文字符");
  35.          form.msgBody.focus();
  36.          return false;
  37.       }
  38.    }
  39.    if(!isEmpty(form.endDate.value))
  40.    {
  41.       if(form.endDate.value < "<%=current%>")
  42.       {
  43.         alert("截止日期必须在本日之后");
  44.         return false;
  45.       }
  46.    }      
  47.    
  48.    return true;
  49. }
  50. </script>
  51. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  52. <HTML>
  53. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  54. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  55. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  56. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  57. <DIV align=center>
  58. <form name="form1" method="post">
  59.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  60.     <TBODY> 
  61.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  62.     <TR> 
  63.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  64.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  65.             <tr valign="top"> 
  66.               <td > 
  67.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  68.                   <tr valign="top" bgcolor="#fafafa"> 
  69.                     <td> 
  70.                       <table width="100%" border="0" cellspacing="0" cellpadding="2">
  71.                         <tr bgcolor="#666666"> 
  72.                           <td colspan="6"><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>&gt;&gt;<a href="/mainctrl/leaveword/home"><font color="#ffffff">留言板</font></a>&gt;&gt;发布新留言</font></td>
  73.                         </tr>
  74.                         <tr bgcolor="#FFFFFF"> 
  75.                           <td colspan="6">  </td>
  76.                         </tr>
  77.                       </table>
  78.                       <table class=title width="600" cellpadding="2" cellspacing="1" border="0">
  79.             <tr bgcolor="#e0e0e0"> 
  80.                           <td width="20%"><strong>&nbsp;留言时间:</strong></td>
  81.                           <td><%=TimeStamp.toString(ts)%></td>
  82.                     </tr>      
  83.                     <tr bgcolor="#fafafa">
  84.                        <td width="20%"><strong>&nbsp;内容:</strong></td>
  85.                        <td>
  86.                               <textarea name="msgBody" rows="5" cols="39"></textarea>&nbsp;*&nbsp;(注:带*为必填内容)
  87.                         </td>
  88.                     </tr>
  89.             <tr bgcolor="#e0e0e0"> 
  90.               <td width="20%"><strong>&nbsp;截止日期:</strong></td>
  91.               <td>
  92.                <input type="text" name="endDate" readonly size="30" class="text">&nbsp;
  93.            <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择借阅档案日期" onClick="fPopUpCalendarDlg(endDate);return false">
  94.          </td>                
  95.            </tr>
  96.            <tr bgcolor="#fafafa">
  97.               <td colspan="2" height="30" align="center">
  98.                               <input type="button" value="保存" name="B1" onClick="writeIt(this.form)" class="text">
  99.                               &nbsp;&nbsp;
  100.                               <input type="reset" value="重置" name="B2" class="text">
  101.                               &nbsp;&nbsp;
  102.                               <input type="button" value="放弃" name="B3" class="text" onclick="history.back()">
  103.                       </td>
  104.                    </tr>        
  105.         </table>
  106.       </td>
  107.             </tr>   
  108.         </table>
  109.         </td>
  110.         </tr>
  111.         </table>
  112.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  113.        </TD>
  114.      </TR>
  115.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  116.     </TBODY> 
  117.   </TABLE>
  118.     <BR>
  119.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  120. </form>
  121. </DIV>
  122. </BODY>
  123. </HTML>