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