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

电子政务应用

开发平台:

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="commend";
  18.      document.form1.submit();
  19.  }
  20. function subdel()
  21.  {
  22.      if(confirm("是否确定删除所选新闻?"))
  23.       {
  24.          document.form1.par.value="update";  
  25.          document.form1.submit();
  26.       }   
  27.  } 
  28. function query()
  29.  {    
  30.      document.form1.par.value="query";            
  31.      document.form1.submit();
  32.  } 
  33. </script>
  34. <script language="javascript">
  35. var arrayboardID=new Array();
  36. var arrayboardName=new Array();
  37. var arrayboardParentID=new Array();
  38. <%
  39. Vector type_vct = manageclass.getAllType();
  40. for(int i=0; i<type_vct.size(); i++)
  41. {
  42.     Vector atype_vct =(Vector)type_vct.get(i);
  43.     %>
  44.     arrayboardID[<%=i%>]=<%=atype_vct.get(0)%>; arrayboardName[<%=i%>]='<%=atype_vct.get(1)%>'; arrayboardParentID[<%=i%>]='<%=atype_vct.get(2)%>';
  45.     <%
  46. }
  47. %>
  48. function changeBoardParent()
  49. {
  50. /**
  51. *@设置一级拦目
  52. */    
  53.    setBoard(document.form1.new_type.value);
  54. }
  55. function setBoard(province)
  56. {
  57. /**
  58. *@设置二级拦目
  59. */
  60. document.form1.new_sub_type.options.length=0;
  61. var count=0;
  62. document.form1.new_sub_type.add(document.createElement('OPTION'));
  63. document.form1.new_sub_type.options[count].text="不限";
  64. document.form1.new_sub_type.options[count].value="all";
  65. count++; 
  66. if(province!="all"){
  67. for(var i=0; i<arrayboardParentID.length; ++i)
  68. {
  69.     if(arrayboardParentID[i]==province)
  70.     {
  71.          document.form1.new_sub_type.add(document.createElement('OPTION'));
  72.          document.form1.new_sub_type.options[count].text=arrayboardName[i];
  73.          document.form1.new_sub_type.options[count].value=arrayboardID[i];
  74.          count++;
  75.     }
  76. }
  77.     }   
  78. }
  79. //-->
  80. </script>
  81. </head>
  82. <%
  83.        String par = request.getParameter("par");
  84.        
  85.        if(par!=null&&par.equals("commend"))
  86.         {
  87.             managecommend.updateCommendType();
  88.         }
  89.         
  90.        int curpage = request.getParameter("jumpPage")==null?1:Integer.parseInt(request.getParameter("jumpPage"));   
  91.        //out.println(manageauditing.getNewList());  
  92.        //Vector m_vct = pageCtl.getcurData(managecommend.getNewList(),20,curpage);  //取新闻列表 
  93.        Vector m_vct =managecommend.getNewList();  //取新闻列表 
  94.        // out.println(m_vct.toString());  
  95.         
  96. %>
  97. <body bgcolor="#eff3f7" topmargin="0"  leftmargin="0">
  98. <IFRAME id=CalFrame style="DISPLAY: none; Z-INDEX: 100; WIDTH: 148px; POSITION: absolute; HEIGHT: 194px; left: 10px; top: 353px" 
  99. marginWidth=0 
  100. marginHeight=0 
  101. src="../../../../html/calendar.htm"
  102. frameBorder=0 
  103. noResize 
  104. scrolling=no>
  105. </IFRAME> 
  106. <SCRIPT event=onclick() for=document>
  107. <!--
  108. document.all.CalFrame.style.display="none";
  109. //-->
  110. </SCRIPT>
  111. <form name="form1" method="post"> 
  112. <input type="hidden" name="par">
  113. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  114. <tr>
  115. <td align="left" valign="middle" height="2">
  116. <table align=center border=1 bordercolor=#095ab5 
  117.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  118.                   id=submenu1 width="90%">
  119.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  120.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;焦点文章</FONT></B></td>
  121.                 </tr>
  122.                 <tbody>
  123.                   <tr valign=center> 
  124.                     <td align=left height=25 valign=MIDDLE 
  125.                         width="25%" colspan=3><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;新闻名称</font></td>                                          
  126.                     <td align=CENTER height=25 valign=MIDDLE 
  127.                         width="25%"><font color="#000000">所属栏目</font></td>
  128.                         <td align=CENTER height=25 valign=MIDDLE 
  129.                         width="10%"><font color="#000000">顺序</font></td>
  130.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>作者</td>     
  131.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>状态</td>
  132.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>选择</td>
  133.                   </tr> 
  134. <%
  135.     Vector c_m_vct = managecommend.getNewCommendList("01");
  136.    
  137. %> 
  138. <%
  139.    if(c_m_vct!=null&&c_m_vct.size()>0)
  140.     {
  141.        for(int i=0;i<c_m_vct.size();i++)
  142.         {
  143.             Vector t_vct = (Vector)c_m_vct.get(i);
  144.             %>
  145.                   <tr valign=center> 
  146.                     <td align=left height=25 valign=MIDDLE 
  147.                         width="25%" colspan=3><font color="#000000"><a href="#"><%=t_vct.get(1)%></a></font></td>                                          
  148.                     <td align=CENTER height=25 valign=MIDDLE 
  149.                         width="25%"><font color="#000000"><%=t_vct.get(7)%>--><%=t_vct.get(9)%></font></td>
  150.                         <td align=CENTER height=25 valign=MIDDLE 
  151.                         width="10%"><font color="#000000"><input type="text" name="sort" value="<%=t_vct.get(3)%>" size="4"></font></td>
  152.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><%=t_vct.get(2)%></td>     
  153.                     
  154.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>&nbsp;
  155.                
  156.                    </td>
  157.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><input type="checkbox" name="id" value="<%=t_vct.get(0)%>"></td>
  158.                   </tr>               
  159.             <%
  160.         }
  161.     }
  162. %>                                     
  163.                 </tbody>    
  164. </table>
  165. </td>
  166. </tr>
  167. <tr>
  168. <td align="left" valign="middle" height="2"></td>
  169. </tr>
  170. <tr>
  171. <td align="left" valign="middle" height="2">
  172. <table align=center border=1 bordercolor=#095ab5 
  173.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  174.                   id=submenu1 width="90%">
  175.                
  176.                  
  177.                   
  178.                   <tr valign=center>
  179.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">名&nbsp;&nbsp;&nbsp;&nbsp;称:</FONT></B></td>
  180.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" width="25%">                  
  181.                   <FONT SIZE="2">
  182.                   <input type="text" name="name">
  183.                   </FONT>
  184.                   </td>
  185.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  186.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="" width="25%">
  187.                   <FONT SIZE="2">&nbsp;
  188.                   <!--select name="status">
  189.                   <option value="10">初始</option>
  190.                   <option value="all">不限</option>                  
  191.                   <option value="00">已发布</option>
  192.                   </select-->
  193.                   </FONT>
  194.                   </td>
  195.                 </tr>   
  196.                   <tr valign=center>
  197.                   <td align=center height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">发布时间:</FONT></B></td>
  198.                   <td align=left height=25 valign=MIDDLE COLSPAN="3" width="25%">&nbsp;&nbsp;                 
  199.                   <FONT SIZE="2">
  200.                   <input type="text" name="start_date"> 
  201.                    <A  onclick=event.cancelBubble=true;  href="javascript:ShowCalendar(document.form1.dimg3,document.form1.start_date,null,0,330)"> 
  202.                     <img id=dimg3 src="../../../../image/public/images/button.gif" width="34" height="21" align="middle" border=0> 
  203.                     </A>
  204.                   
  205.                   至 <input type="text" name="end_date">
  206.                    <A  onclick=event.cancelBubble=true;  href="javascript:ShowCalendar(document.form1.dimg4,document.form1.end_date,null,0,330)"> 
  207.                     <img id=dimg4 src="../../../../image/public/images/button.gif" width="34" height="21" align="middle" border=0> 
  208.                     </A>                  
  209.                   </FONT>
  210.                   </td>
  211.                 </tr> 
  212.                 
  213.                   <tr valign=center>
  214.                   <td align=center height=25 valign=MIDDLE COLSPAN="" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2">所属栏目:</FONT></B></td>
  215.                   <td align=left height=25 valign=MIDDLE COLSPAN="3" width="25%">&nbsp;&nbsp;                 
  216.                   <FONT SIZE="2">
  217.                   <select name=new_type onChange=changeBoardParent()>               
  218.                   <option value="all">不限</option>
  219. <%
  220.    Vector new_type = manageclass.getNewClass();
  221.     if(new_type!=null && new_type.size()>0)
  222.      {
  223.           for(int i=0;i<new_type.size();i++)
  224.            {
  225.              Vector t_vct = (Vector)new_type.get(i);
  226.              %>
  227.               <option value="<%=t_vct.get(0)%>"><%=t_vct.get(1)%></option>
  228.              <% 
  229.            }
  230.      }
  231. %>                  
  232.                   </select>
  233.                   <select name=new_sub_type>               
  234.                   <option value="all">不限</option>
  235.                   </select>
  236.                   </FONT>
  237.                   </td>
  238.                 </tr>                 
  239.                     
  240.                 
  241.                 <tr valign=center>
  242.                   <td align=center height=25 valign=MIDDLE COLSPAN="4" BGCOLOR="#D0ECF9" width="25%"><B><FONT SIZE="2"><input type="button" value="查 询" onclick="query()"></input></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></td>
  243.                 </tr>                                            
  244. </table>                  
  245. </td>
  246. </tr> 
  247. <tr>
  248. <td align="left" valign="middle" height="4"></td>
  249. </tr>
  250. <tr> 
  251. <td align="left" valign="top"> 
  252. <table align=center border=1 bordercolor=#095ab5 
  253.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  254.                   id=submenu1 width="90%">
  255.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  256.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  257.                 </tr>
  258.                 <tbody>
  259.                   <tr valign=center> 
  260.                     <td align=left height=25 valign=MIDDLE 
  261.                         width="25%" colspan=3><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;新闻名称</font></td>                                          
  262.                     <td align=CENTER height=25 valign=MIDDLE 
  263.                         width="25%"><font color="#000000">所属栏目</font></td>
  264.                        <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>作者</td>                        
  265.                         <td align=CENTER height=25 valign=MIDDLE 
  266.                         width="10%" colspan="2"><font color="#000000">推荐类型</font></td>
  267.                         
  268.                   
  269.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>选择</td>
  270.                   </tr>                  
  271.                   
  272. <%
  273.    if(m_vct!=null&&m_vct.size()>0)
  274.     {
  275.        for(int i=0;i<m_vct.size();i++)
  276.         {
  277.             Vector t_vct = (Vector)m_vct.get(i);
  278.             %>
  279.                   <tr valign=center> 
  280.                     <td align=left height=25 valign=MIDDLE 
  281.                         width="25%" colspan=3><font color="#000000"><a href="#"><%=t_vct.get(1)%></a></font></td>                                          
  282.                     <td align=CENTER height=25 valign=MIDDLE 
  283.                         width="25%"><font color="#000000"><%=t_vct.get(7)%>--><%=t_vct.get(9)%></font></td>
  284.                         
  285.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><%=t_vct.get(2)%></td>     
  286.                     <td align=CENTER height=25 valign=MIDDLE 
  287.                         width="10%" colspan="2"><font color="#000000">&nbsp;<select ></font></td>
  288.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><input type="checkbox" name="id" value="<%=t_vct.get(0)%>"></td>
  289.                   </tr>               
  290.             <%
  291.         }
  292.     }
  293. %>                    
  294.                   
  295.  </form>                 
  296.                   
  297.                   <tr valign=center> 
  298.                     <td align=center height=25 valign=middle COLSPAN="9">&nbsp;</td>
  299.                   </tr>   
  300.                                           <%
  301. if(pageCtl.getmaxPage()>1)
  302. {
  303.   %>
  304.                   <tr valign=top> 
  305.                     <td align=center height=16 valign="top" COLSPAN="9">
  306. <table>   
  307. <form name="PageForm"  action="manage_newauditing.jsp" method="post">
  308.           <tr>
  309. <td colspan="9" width="100%" align="left" valign="top"> 
  310. <div align="center"><br>&nbsp;&nbsp;
  311. <%if(pageCtl.getcurPage()==1){ out.print(" 首页 上一页");   }else{  %>
  312. <A HREF="javascript:gotoPage(1)">首页</A>
  313. <A HREF="javascript:gotoPage(<%=pageCtl.getcurPage()-1%>)">上一页</A>
  314. <%}%>
  315. <%if(pageCtl.getcurPage()==pageCtl.getmaxPage()){ out.print("下一页 尾页");
  316.    }else{  %>   
  317. <A HREF="javascript:gotoPage(<%=pageCtl.getcurPage()+1%>)">下一页</A>
  318. <A HREF="javascript:gotoPage(<%=pageCtl.getmaxPage()%>)">尾页</A>
  319. <%}%>
  320. 转到第<SELECT name="jumpPage" onchange="Jumping()">
  321.      <% for(int j=1;j<=pageCtl.getmaxPage();j++)  {
  322.      if (j== pageCtl.getcurPage()){
  323.      %>
  324.      <OPTION selected value=<%=j%>><%=j%></OPTION>
  325.      <%}else{%>
  326.      <OPTION value=<%=j%>><%=j%></OPTION>
  327.      <%}}%>   
  328.      </SELECT>页
  329.     </div>
  330. </td>
  331. </tr>
  332. </form> 
  333. </td>
  334.  </table>                    
  335.                     </td>
  336.                   </tr> 
  337.                    <tr valign=center> 
  338.                     <td align=center height=25 valign=middle COLSPAN="9">&nbsp;</td>
  339.                   </tr>     
  340. <%
  341.  }
  342. %>                   
  343.                   
  344.               </table>
  345.               <br> 
  346.               <p>&nbsp;&nbsp;&nbsp;&nbsp;
  347.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  348.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  349.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  350.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  351.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  352.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  353.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  354.               &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> 
  355. </table></td></tr> <tr> <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  356. </td></tr> </table>
  357. </body>
  358. </html>