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

电子政务应用

开发平台:

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