manage_bulletin.jsp
上传用户:sami52198
上传日期:2010-02-11
资源大小:5174k
文件大小:11k
源码类别:

电子政务应用

开发平台:

MultiPlatform

  1. <%@ page contentType="text/html;charset=gb2312"%>
  2. <%@ page errorPage="errorPage.jsp" session="true" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ include file="../pub/control.jsp"%>
  5. <%@ include file="../include/config.jsp"%>
  6. <%@ include file="../include/head.jsp"%>
  7. <html>
  8. <head>
  9. <title>新闻栏目维护</title>
  10. <link rel="stylesheet" href="../../../../css/style.css" type="text/css">
  11. <script language=javascript src="../../../../js/date.js"></script>
  12. <SCRIPT language=JavaScript src="../../../../js/JSDateFunction.js"></SCRIPT>
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  14. <script language="javascript">
  15. function sub()
  16.  {    
  17.      document.form1.par.value="auditing";   
  18.      document.form1.submit();
  19.  }
  20.  
  21. function subdel()
  22.  {
  23.      if(confirm("是否确定删除所选新闻?"))
  24.       {
  25.          document.form1.par.value="del";  
  26.          document.form1.submit();
  27.       }   
  28. function addsub()
  29.  {    
  30.      document.form1.par.value="add";  
  31.      document.form1.submit();
  32.  }
  33. function query()
  34.  {    
  35.      document.form1.par.value="query";            
  36.      document.form1.submit();
  37.  } 
  38. </script>
  39. </head>
  40. <%
  41.        String par = request.getParameter("par");
  42.        String aid =(String)session.getAttribute("aid");
  43.        
  44.        if(par!=null&&par.equals("add"))
  45.         {         
  46.           managebulletin.addBulletin(aid);         
  47.         }       
  48.        if(par!=null&&par.equals("del"))
  49.         {
  50.           managebulletin.deleteBulletin(aid);
  51.         }       
  52.             
  53.         
  54.        int curpage = request.getParameter("jumpPage")==null?1:Integer.parseInt(request.getParameter("jumpPage"));   
  55.          
  56.       // Vector m_vct = pageCtl.getcurData(managebulletin.getListBulletin(),10,curpage);  //取公告列表分页
  57.        Vector m_vct = managebulletin.getListBulletin(); 
  58.         
  59. %>
  60. <body bgcolor="#eff3f7" topmargin="0"  leftmargin="0">
  61. <IFRAME id=CalFrame style="DISPLAY: none; Z-INDEX: 100; WIDTH: 148px; POSITION: absolute; HEIGHT: 194px; left: 10px; top: 353px" 
  62. marginWidth=0 
  63. marginHeight=0 
  64. src="../../../../html/calendar.htm"
  65. frameBorder=0 
  66. noResize 
  67. scrolling=no>
  68. </IFRAME> 
  69. <SCRIPT event=onclick() for=document>
  70. <!--
  71. document.all.CalFrame.style.display="none";
  72. //-->
  73. </SCRIPT>
  74. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  75. <form name="form1" method="post">
  76. <input type="hidden" name="par">
  77. <tr valign=center > 
  78.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  79.                 </tr>  
  80. <tr> 
  81. <td align="left" valign="top"> 
  82. <table align=center border=1 bordercolor=#095ab5 
  83.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  84.                   id=submenu1 width="90%">
  85.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  86.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  87.                 </tr>
  88.                 <tbody>
  89.                   <tr valign=center> 
  90.                     <td align=left height=25 valign=MIDDLE 
  91.                          colspan=3><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;公告标题</font></td>                                          
  92.                     <td align=CENTER height=25 valign=MIDDLE 
  93.                         width="10%"><font color="#000000">发布人</font></td>
  94.                         <td align=CENTER height=25 valign=MIDDLE 
  95.                         width="10%"><font color="#000000">有效日期</font></td>                   
  96.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>状态</td>
  97.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>
  98.                     选择<input type="checkbox" name="allsel" value="all">
  99.                     </td>
  100.                   </tr>                  
  101.                   
  102. <%
  103.    if(m_vct!=null&&m_vct.size()>0)
  104.     {
  105.        for(int i=0;i<m_vct.size();i++)
  106.         {
  107.             Vector t_vct = (Vector)m_vct.get(i);
  108.             String status = (String)t_vct.get(5);
  109.             %>
  110.                   <tr valign=center> 
  111.                     <td align=left height=25 valign=MIDDLE 
  112.                         colspan=3><font color="#000000"><a href="#"><%=t_vct.get(1)%></a></font></td>                                          
  113.                     <td align=CENTER height=25 valign=MIDDLE 
  114.                         width="10%"><font color="#000000"><%=t_vct.get(2)%></font></td>
  115.                         <td align=CENTER height=25 valign=MIDDLE 
  116.                         width="20%"><font color="#000000"><%=t_vct.get(3)%>至<%=t_vct.get(4)%></font></td>                   
  117.                     
  118.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>&nbsp;
  119.                    <%
  120.                       if(status.equals("00"))
  121.                        {
  122.                           %>已发布<%
  123.                        }
  124.                       else
  125.                        {
  126.                            %>未发布<% 
  127.                        } 
  128.                    %>
  129.                    </td>
  130.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><input type="checkbox" name="id" value="<%=t_vct.get(0)%>"></td>
  131.                   </tr>               
  132.             <%
  133.         }
  134.     }
  135. %>    
  136.             
  137.                   
  138.                   
  139.                   
  140.                   <tr valign=center> 
  141.                     <td align=center height=25 valign=middle COLSPAN="9">&nbsp;</td>
  142.                   </tr>  
  143.                                           <%
  144. if(pageCtl.getmaxPage()>1)
  145. {
  146.   %>
  147.                   <tr valign=top> 
  148.                     <td align=center height=16 valign="top" COLSPAN="9">
  149. <table>   
  150. <form name="PageForm"  action="manage_bulletin.jsp" method="post">
  151.           <tr>
  152. <td colspan="9" width="100%" align="left" valign="top"> 
  153. <div align="center"><br>&nbsp;&nbsp;
  154. <%if(pageCtl.getcurPage()==1){ out.print(" 首页 上一页");   }else{  %>
  155. <A HREF="javascript:gotoPage(1)">首页</A>
  156. <A HREF="javascript:gotoPage(<%=pageCtl.getcurPage()-1%>)">上一页</A>
  157. <%}%>
  158. <%if(pageCtl.getcurPage()==pageCtl.getmaxPage()){ out.print("下一页 尾页");
  159.    }else{  %>   
  160. <A HREF="javascript:gotoPage(<%=pageCtl.getcurPage()+1%>)">下一页</A>
  161. <A HREF="javascript:gotoPage(<%=pageCtl.getmaxPage()%>)">尾页</A>
  162. <%}%>
  163. 转到第<SELECT name="jumpPage" onchange="Jumping()">
  164.      <% for(int j=1;j<=pageCtl.getmaxPage();j++)  {
  165.      if (j== pageCtl.getcurPage()){
  166.      %>
  167.      <OPTION selected value=<%=j%>><%=j%></OPTION>
  168.      <%}else{%>
  169.      <OPTION value=<%=j%>><%=j%></OPTION>
  170.      <%}}%>   
  171.      </SELECT>页
  172.     </div>
  173. </td>
  174. </tr>
  175. </form> 
  176. </td>
  177.  </table>                    
  178.                     </td>
  179.                   </tr> 
  180.                    <tr valign=center> 
  181.                     <td align=center height=25 valign=middle COLSPAN="9">&nbsp;</td>
  182.                   </tr>     
  183. <% }%>                   
  184.                   
  185.               </table>
  186.               
  187.               <br> 
  188.               <p>&nbsp;&nbsp;&nbsp;&nbsp;
  189.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  190.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  191.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  192.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  193.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  194.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  195.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  196.               &nbsp;&nbsp;&nbsp;<input type="button" name="button_1" value="发布" onclick="sub()">&nbsp;<input type="button" name="button_1" value="删除" onclick="subdel()">&nbsp;&nbsp;</p></td></tr> 
  197. </table></td></tr>
  198. <!--form name="form1" method="post"> 
  199. <input type="hidden" name="par"-->
  200. <tr>
  201. <td align="left" valign="middle" height="2">&nbsp;</td>
  202. </tr> 
  203. <tr>
  204. <td align="left" valign="middle" height="2">&nbsp;</td>
  205. </tr> 
  206. <tr>
  207. <td align="left" valign="middle" height="2">
  208. <table align=center border=1 bordercolor=#095ab5 
  209.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  210.                   id=submenu1 width="90%">
  211.                   <tr valign=center>
  212.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">公告标题:</FONT></B></td>
  213.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" width="25%">                  
  214.                   <FONT SIZE="2">
  215.                   <input type="text" name="title">
  216.                   </FONT>
  217.                   </td>
  218.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">状    态:</FONT></B></td>
  219.                   <td align=left height=25 valign=MIDDLE COLSPAN="" width="25%">&nbsp;&nbsp;
  220.                   <FONT SIZE="2">
  221.                   <select name="status">
  222.                   <option value="00">已发布</option>
  223.                   <option value="10">未发始</option>
  224.                   </select>
  225.                   </FONT>
  226.                   </td>
  227.                 </tr>  
  228.                   <tr valign=center>
  229.                   <td align=left height=25 valign=MIDDLE COLSPAN="1" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">有 效 期:</FONT></B></td>
  230.                   <td align=left height=25 valign=MIDDLE COLSPAN="3" width="25%">&nbsp;&nbsp;                   
  231.                   <FONT SIZE="2">
  232.                   <input type="text" name="low_valid_date"> 
  233.                    <A  onclick=event.cancelBubble=true;  href="javascript:ShowCalendar(document.form1.dimg3,document.form1.low_valid_date,null,0,330)"> 
  234.                     <img id=dimg3 src="../../../../image/public/images/button.gif" width="34" height="21" align="middle" border=0> 
  235.                     </A>                  
  236.                   至 <input type="text" name="hight_valid_date">
  237.                   <A  onclick=event.cancelBubble=true;  href="javascript:ShowCalendar(document.form1.dimg4,document.form1.hight_valid_date,null,0,330)"> 
  238.                     <img id=dimg4 src="../../../../image/public/images/button.gif" width="34" height="21" align="middle" border=0> 
  239.                     </A>
  240.                   </FONT>
  241.                   </td>                  
  242.                 </tr>                 
  243.                   <tr valign=center>
  244.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">公告内容:</FONT></B></td>
  245.                   <td align=left height=25 valign=MIDDLE width="25%" colspan="3">&nbsp;&nbsp;                  
  246.                   <FONT SIZE="2">
  247.                   <textarea name="content" cols="65" rows="20" maxlength="4000" maxchar=4000></textarea>
  248.                   </FONT>
  249.                   </td>
  250.                   
  251.                 </tr>                     
  252.                 
  253.                 <tr valign=center>
  254.                   <td align=center height=25 valign=MIDDLE COLSPAN="4" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2"><input type="button" value="添 加" onclick="addsub()"></input></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></td>
  255.                 </tr>                                            
  256. </table>                  
  257. </td>
  258. </tr> 
  259. <tr> <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  260. </td></tr> </table>
  261. </form>
  262. </body>
  263. </html>