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

电子政务应用

开发平台:

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