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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  4. <HTML>
  5. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  6. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  7. <script language="javascript" src="/vnex/validate.js" ></script>
  8. <script language=JavaScript>
  9. function isValidChar(str)
  10. {
  11.   var i,j,strTemp;
  12.   strTemp="<>";
  13.   for (i=0;i<str.length;i++)
  14.   {
  15.     j=strTemp.indexOf(str.charAt(i));
  16.     if (j!=-1)
  17.     {
  18.       return false;
  19.     }
  20.   }
  21.   return true;
  22. }
  23. function check()
  24. {
  25.   if (!stripWhitespace(document.myform.publicationName.value) || document.myform.publicationName.value=="" || document.myform.publicationName.value.length>50)
  26. {
  27.   alert("内部刊物名不能为空,并且少于50个字。");
  28.   document.myform.publicationName.focus();
  29.   return false;
  30. }
  31. if (document.myform.publicationDepartment.value==0)
  32. {
  33.   alert("请选择部门。");
  34.   document.myform.publicationDepartment.focus();
  35.   return false;
  36. }
  37. if (document.myform.attachmentUrl.value=="")
  38. {
  39.   alert("必须上传附件。");
  40.   document.myform.attachmentUrl.focus();
  41.   return false;
  42. }
  43. if(!isValidChar(myform.attachmentUrl.value))
  44.   {
  45.     alert("上传文件不能包括 < > 这些特殊字符。");
  46.     return false;
  47.   }
  48.   else
  49.     return true;
  50. }
  51. function createPublication()
  52. {
  53.   if( !check() )
  54.   {
  55.     return false;
  56.   }
  57.  myform.action= "/mainctrl/commoninfo/publication/createPublicationSuccess";
  58.  myform.encoding="multipart/form-data";
  59.   myform.submit();
  60. }
  61. </script>
  62. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  63. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  64. <DIV align=center>
  65.   <form name="myform" method="post" action="">
  66.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  67.      <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  68.     <TR> 
  69.         <TD colSpan=3 align="center"><br>
  70.           <!--个人信息开始 -->
  71.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  72.             <tr> 
  73.               <td bgcolor="#fafafa"> 
  74.                 <table width="600" border="0" cellspacing="1" cellpadding="2" class=title>
  75.                   <tr> 
  76.                     <td colspan="2" height="15" bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href="/mainctrl/commoninfo/publication/getPublicationList"><font color="#FFFFFF">内部刊物</font></a>&gt;&gt;新增内部刊物
  77.                       </font></td>
  78.                   </tr>
  79.                   <tr bgcolor="#e0e0e0"> 
  80.                     <td width="100"><font class="strong">&nbsp;名称:</font></td>
  81.                     <td width="487"> 
  82.                       <input type="text" name="publicationName" class="file" size="24">&nbsp;*&nbsp;(注:带*为必填内容)
  83.                     </td>
  84.                   </tr>
  85.                   <tr bgcolor="#fafafa"> 
  86.                     <td width="100"><font class="strong">&nbsp;发布部门:</font></td>
  87.                     <td width="487"> 
  88.                     <org:DivisionList>
  89.                       <select name="publicationDepartment">
  90.                         <option value="0" selected>-请选择-</option>
  91.                         <vnex:items>
  92.                           <option value="<org:DivisionAttribute attribute="name"/>" <org:DivisionAttribute attribute="isSelectedByName"/> > 
  93.                             <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
  94.                           </option>
  95.                         </vnex:items>
  96.                       </select>&nbsp;*
  97.                     </org:DivisionList>
  98.                     </td>
  99.                   </tr>
  100.                   <tr bgcolor="#e0e0e0"> 
  101.                     <td width="100"><font class="strong">&nbsp;上传文件:</font></td>
  102.                     <td width="487"> 
  103.                       <input type="file" name="attachmentUrl" class="text" size="24">&nbsp;*
  104.                     </td>
  105.                   </tr>
  106.                   <tr align="center"> 
  107.                     <td colspan="2" height="30" bgcolor="#fafafa"> 
  108.                       <input type="button" name="Submit32" value="保存" class="file" onClick="createPublication()">&nbsp;&nbsp;
  109.                       <input type="reset" name="Submit33" value="重置" class="file">&nbsp;&nbsp;
  110.                       <input type="button" name="Submit34" value="放弃" class="file" onClick="history.back()">
  111.                     </td>
  112.                   </tr>
  113.                 </table>  
  114.               </td>
  115.             </tr>
  116.           </table>
  117.           <br>
  118.           <br>
  119.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  120.        </TD>
  121.     </TR>
  122.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  123.     </TABLE>
  124.   <BR>
  125.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  126. </form></DIV>
  127. </BODY></HTML>