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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_communication.tld" prefix="comm" %>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <jsp:useBean id="leaveWordProxy" scope="application" class="com.vnex.intranet.communication.leaveword.proxy.LeaveWordProxyBean" />
  5. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  6. <%
  7.     String addConTime = leaveWordProxy.getYesterday();
  8.     String condition = " and (a.end_date>='"+addConTime+"' or a.end_date is null) "; 
  9.     String pageTo = "/mainctrl/bulletin/home";
  10.     String start = "1";
  11.     if(request.getParameter("start") != null)
  12.        start = request.getParameter("start");
  13.     if(request.getParameter("home") != null)
  14.     {
  15.        condition += " and a.creator_id="+BusinessName.getEmpId()+" ";
  16.        pageTo += "?home";
  17.     }   
  18.     if(request.getParameter("mydept") != null)
  19.     {
  20.        condition += " and a.dept_id="+BusinessName.getDeptId();
  21.        pageTo += "?mydept";
  22.     }   
  23.     if(request.getParameter("ss") != null)
  24.     {
  25.        condition += " and a.creator_id = "+BusinessName.getEmpId()+ " ";   
  26.        pageTo += "?ss";
  27.     }
  28.     String deleteSuffix = "/mainctrl/bulletin/deleteBulletins";
  29.     if(request.getParameter("history") != null)
  30.     {
  31.        deleteSuffix += "?history";
  32.        condition = " and a.end_date<'"+addConTime+"' and a.creator_id="+BusinessName.getEmpId()+" ";
  33.        pageTo += "&history";
  34.     }
  35. %>
  36. <HTML>
  37. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  38. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  39. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  40. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  41. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  42. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>    
  43. <script language=JavaScript>
  44. function deleteBulletins(form)
  45. {
  46.    if(form.bulletinId == null)
  47.    {
  48.       alert("目前尚未有数据可供删除");
  49.       return;
  50.    }
  51.    if(!isChecked(form.bulletinId))
  52.    {
  53.       alert("请选择一条信息再进行删除");
  54.       return;
  55.    }  
  56.    if(confirm("是否删除所选的公告板信息?"))
  57.    {
  58.       form.action="<%=deleteSuffix%>";
  59.       form.submit();
  60.    }   
  61. }
  62. function search(form)
  63. {
  64.    form.action="/mainctrl/bulletin/searchBulletinResult";
  65.    form.submit();
  66. }
  67. function SelectAll(form)
  68. {
  69.   for (var i=0;i<form.elements.length;i++)
  70.   {
  71.     var e = form.elements[i];
  72.     if (e.name != 'C1')
  73.        e.checked = form.C1.checked;
  74.   }
  75. }
  76. function searchHistory(form)
  77. {
  78.    form.action="/mainctrl/bulletin/home?history";
  79.    form.submit();
  80. }
  81. </script>
  82. <DIV align=center>
  83. <form name="form1" method="post">
  84.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  85.     <TBODY> 
  86.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  87.       <TR> 
  88.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  89.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  90.             <tr valign="top"> 
  91.               <td bgcolor="#fafafa" > 
  92.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  93.                   <tr valign="top" bgcolor="#cccccc"> 
  94.                     <td> 
  95.                       <table width="600" border="0" cellpadding="2" cellspacing="0">
  96.                         <tr bgcolor="#666666"> 
  97.                             <td><font class="strongw">
  98.                                <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;
  99.                                <a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>&gt;&gt;
  100.                                公告板
  101.                                </font>
  102.                             </td>
  103.                         </tr>
  104.                       </table>
  105.                       <table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#fafafa">
  106.                         <tr>
  107.                        <td height="30">
  108.                          <jsp:include page="Bulletin_Head.jsp" />
  109.                          </td>
  110.                     </tr>
  111.                 </table>
  112.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  113.                 <tr bgcolor="#fafafa" height="30">
  114.                <td colspan="5">&nbsp;  
  115.                    <input type="button" name="Button2" value="新增" onClick="location='/mainctrl/bulletin/publishBulletin'" class="text">
  116.                    &nbsp;&nbsp;
  117. <%
  118.              if(request.getParameter("mydept") == null)
  119.              {
  120. %>
  121.                                    <input type="button" name="Button2" value="删除" onClick="deleteBulletins(this.form)" class="text">&nbsp;&nbsp;
  122. <%           }%>
  123.                              <input type="button" name="button22" style="width:110px" value="进入本部门公告板" onclick="location='/mainctrl/bulletin/home?mydept'" class="text">
  124.                            &nbsp;&nbsp;
  125.                            <input type="button" name="button23" style="width:120px" value="清理本人的过期公告" class="text" onclick="searchHistory(this.form)">
  126.                               </td>
  127.                            </tr>
  128.                      <tr>
  129. <%           if(request.getParameter("mydept") == null)
  130.              {
  131. %>                                           
  132.                                  <td align="left" height="12" width="7%"> 
  133.                                     <p align="center"><font class="strong">选择</font>
  134.                                  </td>
  135. <%           }%>                                
  136.                                 <td align="left" height="12"> 
  137.                                   <p align="center"><font class="strong">标题</font>
  138.                                 </td>
  139.                                 <td align="left" height="12"> 
  140.                                   <p align="center"><font class="strong">发布人</font>
  141.                                 </td>
  142.                                 <td align="left" height="12"> 
  143.                                   <p align="center"><font class="strong">发布日期</font>
  144.                                 </td>
  145.                               </tr>
  146.                               <comm:bulletinList queryStr="<%=condition%>">          
  147.                               <vnex:items paging="true">          
  148.                               <tr bgcolor="<vnex:itemsColor />" align="center"> 
  149. <%
  150.              if(request.getParameter("mydept") == null)
  151.              {
  152. %>                                           
  153.                                 <td width="7%"> 
  154.                                     <input type="checkbox" name="bulletinId" value="<comm:bulletinAttribute attribute="bulletin_id"/>">
  155.                                 </td>
  156. <%           }%>                                
  157.                                 <td>
  158.                                   <a href="/mainctrl/bulletin/bulletinDetail?bulletinId=<comm:bulletinAttribute attribute="bulletin_id"/>&start=<%=start%>
  159. <%           
  160.                    if(request.getParameter("ss") != null)
  161.                    {
  162. %>
  163. &ss
  164. <%                 }%>                       
  165.                                   "><comm:bulletinAttribute attribute="bulletin_title" /></a> 
  166.                                   </td>
  167.                                 <td>
  168.                                   <comm:bulletinAttribute attribute="bulletin_creator" />
  169.                                 </td>
  170.                                 <td>
  171.                                   <comm:bulletinAttribute attribute="bulletin_create_date" />
  172.                                 </td>
  173.                               </tr>
  174.                               </vnex:items>
  175. <%
  176.                   if(request.getParameter("mydept") == null)
  177.                   {
  178. %>                                                      
  179.                              <tr>
  180.                                 <td align="center" width="7%" bgcolor="#fafafa">
  181.                                    <input type="checkbox" name="C1" onclick="SelectAll(this.form)">
  182.                                 </td>
  183.                                 <td colspan="3" bgcolor="#fafafa">   
  184.                                    &nbsp;&nbsp;全选
  185.                                </td>
  186.                             </tr>
  187. <%                }%>                                       
  188.                             <tr>
  189.                                 <td colspan="4" align="left" bgcolor="#e0e0e0">
  190.                                    &nbsp;<vnex:pagingTag pageName="<%=pageTo%>" />
  191.                                 </td>
  192.                             </tr>    
  193.                             </comm:bulletinList>
  194.                          </table>
  195.                        </td>
  196.                     </tr>
  197.                   </table>
  198.                 </td>
  199.              </tr>
  200.           </table>
  201.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  202.        </TD>
  203.      </TR>
  204.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  205.     </TBODY> 
  206.   </TABLE>
  207.     <BR>
  208.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  209. </form>
  210. </DIV>
  211. </BODY>
  212. </HTML>