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

电子政务应用

开发平台:

MultiPlatform

  1. <%@ page contentType="text/html;charset=gb2312"%>
  2. <%@ page import="java.util.*" %>
  3. <%@ include file="../include/config.jsp"%>
  4. <%@ include file="../pub/control.jsp"%>
  5. <%@ include file="../include/head.jsp"%>
  6. <html>
  7. <head>
  8. <title>新闻栏目维护</title>
  9. <link rel="stylesheet" href="../../../../css/style.css" type="text/css">
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  11. <script language="javascript" src="../../js/shop.js"></script>
  12. <script language="javascript" src="../../../../js/JsInclude.js"></script>
  13. <script language="javascript">
  14. function sub()
  15.  {       
  16.         document.form1.par.value="query";             
  17.         document.form1.submit();        
  18.  }
  19. //tuijianshangping 
  20. function recom()
  21.  {
  22.     document.form1.par.value="recommand";
  23.     document.form1.position.value="00";
  24.     document.form1.submit();
  25.  } 
  26. //tejiashangpin 
  27. function recom1()
  28.  {
  29.     document.form1.par.value="recommand";
  30.     document.form1.position.value="04";
  31.     document.form1.submit();
  32.  }  
  33.  
  34. </script>
  35. <script language="javascript">
  36. var arrayboardID=new Array();
  37. var arrayboardName=new Array();
  38. var arrayboardParentID=new Array();
  39. <%
  40. Vector type_vct = manageclass.getShopAllSubClass();
  41. for(int i=0; i<type_vct.size(); i++)
  42. {
  43.     Vector atype_vct =(Vector)type_vct.get(i);
  44.     %>
  45.     arrayboardID[<%=i%>]=<%=atype_vct.get(0)%>; arrayboardName[<%=i%>]='<%=atype_vct.get(1)%>'; arrayboardParentID[<%=i%>]='<%=atype_vct.get(2)%>';
  46.     <%
  47. }
  48. %>
  49. function changeBoardParent()
  50. {
  51. /**
  52. *@设置一级拦目
  53. */    
  54.    setBoard(document.form1.parentid.value);
  55. }
  56. function setBoard(parentid)
  57. {
  58. /**
  59. *@设置二级拦目
  60. */
  61. document.form1.catalog_id.options.length=0;
  62. var count=0;
  63. document.form1.catalog_id.add(document.createElement('OPTION'));
  64. document.form1.catalog_id.options[count].text="请选择子类";
  65. document.form1.catalog_id.options[count].value="all";
  66. count++; 
  67. if(parentid!="all"){
  68. for(var i=0; i<arrayboardParentID.length; ++i)
  69. {
  70.     if(arrayboardParentID[i]==parentid)
  71.     {
  72.          document.form1.catalog_id.add(document.createElement('OPTION'));
  73.          document.form1.catalog_id.options[count].text=arrayboardName[i];
  74.          document.form1.catalog_id.options[count].value=arrayboardID[i];
  75.          count++;
  76.     }
  77. }
  78.     }   
  79. }
  80. //-->
  81. </script>
  82. </head>
  83. <%
  84.        String par = request.getParameter("par");
  85.        String aid = session.getAttribute("aid").toString();
  86.        String manufacturer = managegoods.getManufacturer()==null?"":managegoods.getManufacturer();
  87.        String name = managegoods.getName()==null?"":managegoods.getName();
  88.        String parentid = managegoods.getParentid()==null?"all":managegoods.getParentid();
  89.        String catalog_id = managegoods.getCatalog_id()==null?"all":managegoods.getCatalog_id();
  90.        Vector m_vct =null;
  91.        Vector com_vct = null;
  92.        Vector com1_vct = null;
  93.        if(par!=null&&par.equals("recommand"))
  94.         {
  95.            ManageCommandGoods.updateFirstRecommand();           
  96.            m_vct = ManageCommandGoods.getGoodSList(); //取一级分类商品列表               
  97.         }
  98.        if(par!=null&&par.equals("query"))
  99.         {
  100.            com_vct = ManageCommandGoods.getCommandGoodsSList("03");//精品推荐
  101.            com1_vct = ManageCommandGoods.getCommandGoodsSList("04");//精品推荐
  102.            m_vct = ManageCommandGoods.getGoodSList(); //取一级分类商品列表            
  103.         }
  104.         
  105.      com_vct = ManageCommandGoods.getCommandGoodsSList("04");//首页特价商品        
  106.      com1_vct = ManageCommandGoods.getFirstCommandGoodsSList("00","");//首页商品
  107.                
  108. %>
  109. <body bgcolor="#eff3f7" topmargin="0"  leftmargin="0">
  110. </SCRIPT>
  111. <form name="form1" method="post"> 
  112. <input type="hidden" name="par">
  113. <input type="hidden" name="position" value="00">
  114. <!--input type="hidden" name="type" value="00"-->
  115. <!--input type="hidden" name="id"-->
  116. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  117. <tr> <td align="left" valign="middle" height="2"></td></tr> 
  118. <tr>
  119. <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  120. </td>
  121. </tr> 
  122. </table>
  123. <br>
  124. <br>
  125. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  126. <tr> 
  127. <td align="left" valign="top"> 
  128. <table align=center border=1 bordercolor=#095ab5 
  129.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  130.                   id=submenu1 width="90%">
  131.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  132.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;特价产品</FONT></B></td>
  133.                 </tr>
  134.                 <tbody>
  135.                   <tr valign=center> 
  136.                     <td align=left height=25 valign=MIDDLE 
  137.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;编号</font></td>
  138.                     <td align=left height=25 valign=MIDDLE 
  139.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</font></td> 
  140.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>类型</td>                                                 
  141.                     <td align=left height=25 valign=MIDDLE 
  142.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;推荐类型</font></td>                                            
  143.                    
  144.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>取消推荐</td>
  145.                   </tr>                      
  146.                   
  147.    <%
  148.    if(com_vct!=null&&com_vct.size()>0)
  149.     {
  150.        for(int i=0;i<com_vct.size();i++)
  151.         {         
  152.            Vector t_vct = (Vector)com_vct.get(i);
  153.            %>
  154.                   <tr valign=center> 
  155.                     <td align=left height=25 valign=MIDDLE 
  156.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(0)%></font></td>
  157.                     <td align=left height=25 valign=MIDDLE 
  158.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(1)%></font></td> 
  159.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><%=t_vct.get(2)%>--><%=t_vct.get(3)%></td>                                                 
  160.                     <td align=left height=25 valign=MIDDLE 
  161.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;特价产品</font></td>                                            
  162.                  
  163.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3><input type="checkbox" name="recomid1" value="<%=t_vct.get(0)%>" >取消推荐</input></td>
  164.                   </tr>            
  165.            <%
  166.         }
  167.     }
  168. %>           
  169.                   
  170.               </table>
  171.               <br> 
  172.               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  173.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  174.               </p></td></tr> 
  175. </table>
  176. </td>
  177. </tr> 
  178. <tr> 
  179. <td align="left" valign="top"> 
  180. <table align=center border=1 bordercolor=#095ab5 
  181.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  182.                   id=submenu1 width="90%">
  183.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  184.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;首页商品</FONT></B></td>
  185.                 </tr>
  186.                 <tbody>
  187.                   <tr valign=center> 
  188.                     <td align=left height=25 valign=MIDDLE 
  189.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;编号</font></td>
  190.                     <td align=left height=25 valign=MIDDLE 
  191.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</font></td> 
  192.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>类型</td>                                                 
  193.                     <td align=left height=25 valign=MIDDLE 
  194.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;推荐类型</font></td>                                            
  195.                    
  196.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>删除</td>
  197.                   </tr>                      
  198.                   
  199.    <%
  200.    if(com1_vct!=null&&com1_vct.size()>0)
  201.     {
  202.        for(int i=0;i<com1_vct.size();i++)
  203.         {         
  204.            Vector t_vct = (Vector)com1_vct.get(i);
  205.            %>
  206.                   <tr valign=center> 
  207.                     <td align=left height=25 valign=MIDDLE 
  208.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(0)%></font></td>
  209.                     <td align=left height=25 valign=MIDDLE 
  210.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(1)%></font></td> 
  211.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><%=t_vct.get(2)%>--><%=t_vct.get(3)%></td>                                                 
  212.                     <td align=left height=25 valign=MIDDLE 
  213.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;首页普通商品</font></td>                                            
  214.                     
  215.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3><input type="checkbox" name="recomid1" value="<%=t_vct.get(0)%>" >删除</input></td>
  216.                   </tr>            
  217.            <%
  218.         }
  219.     }
  220. %>           
  221.                   
  222.               </table>
  223.               <br> 
  224.               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  225.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  226.               </p></td></tr> 
  227. </table>
  228. </td>
  229. </tr> 
  230. <tr> 
  231. <td align="left" valign="top"> 
  232. <table align=center border=1 bordercolor=#095ab5 
  233.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  234.                   id=submenu1 width="90%">
  235.                 <tbody>
  236.                   <tr valign=center> 
  237.                     <td align=left height=25 valign=MIDDLE 
  238.                         width="10%" colspan=3 BGCOLOR="#D0ECF9">
  239.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  240.                         商品名称:
  241.                         </font>
  242.                         </td>                                          
  243.                     <td align=left height=25 valign=MIDDLE width="10%">
  244.                     &nbsp;&nbsp;<font color="#000000">
  245.                     <input type="text" name="name"></name>
  246.                     </font>
  247.                     </td>                        
  248.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1 BGCOLOR="#D0ECF9">
  249.                    厂商
  250.                    </td>     
  251.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>
  252.                     <input type="text" name="manufacturer"></name>
  253.                     </td>
  254.                   </tr>  
  255.                   
  256.                   <tr valign=center> 
  257.                     <td align=left height=25 valign=MIDDLE 
  258.                         width="10%" colspan=3 BGCOLOR="#D0ECF9">
  259.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  260.                         商品类型:
  261.                         </font>
  262.                         </td>                                          
  263.                     <td align=left height=25 valign=MIDDLE width="10%" colspan=2>
  264.                     &nbsp;&nbsp;<font color="#000000">
  265.                         <select name="parentid" onChange=changeBoardParent()>
  266.                         <option value="all">请选择大类</option>
  267. <%
  268.    Vector shop_class = manageclass.getShopClass();
  269.     if(shop_class!=null && shop_class.size()>0)
  270.      {
  271.           for(int i=0;i<shop_class.size();i++)
  272.            {
  273.              Vector t_vct = (Vector)shop_class.get(i);
  274.              %>
  275.               <option value="<%=t_vct.get(0)%>"><%=t_vct.get(1)%></option>
  276.              <% 
  277.            }
  278.      }
  279. %> 
  280.                         </select>
  281.                         <select name="catalog_id">
  282.                         <option value="all">请选择子类</option>
  283.                         </select>
  284.                     </font>
  285.                     </td> 
  286.                          <td align=left height=25 valign=MIDDLE 
  287.                         width="10%" colspan=3 >
  288.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  289.                         <input type="button" name="button_1" value="查询" onclick="sub()">
  290.                         </font>
  291.                         </td>                      
  292.                   </tr>                    
  293.                 </tbody>                     
  294.               </table>
  295.               </td>
  296.               </tr> 
  297. </table></td></tr> 
  298. <tr> 
  299. <td align="left" valign="top"> 
  300. <table align=center border=1 bordercolor=#095ab5 
  301.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  302.                   id=submenu1 width="90%">
  303.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  304.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  305.                 </tr>
  306.                 <tbody>
  307.                   <tr valign=center> 
  308.                     <td align=left height=25 valign=MIDDLE 
  309.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;编号</font></td>
  310.                     <td align=left height=25 valign=MIDDLE 
  311.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</font></td> 
  312.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>类型</td>                                                 
  313.                     <td align=left height=25 valign=MIDDLE 
  314.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;推荐类型</font></td>                                                               
  315.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>选择</td>
  316.                   </tr>                      
  317.                   
  318.    <%
  319.    if(m_vct!=null&&m_vct.size()>0)
  320.     {
  321.        for(int i=0;i<m_vct.size();i++)
  322.         {
  323.            Vector t_vct = (Vector)m_vct.get(i);
  324.            %>
  325.                   <tr valign=center> 
  326.                     <td align=left height=25 valign=MIDDLE 
  327.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(0)%></font></td>
  328.  <td align=left height=25 valign=MIDDLE 
  329.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(1)%></font></td>                     
  330.                     <td align=left height=25 valign=MIDDLE 
  331.                         width="15%" colspan=1><font coloER valign=MIDDLE colspan=1><%=t_vct.get(2)%>--><%=t_vct.get(3)%></td>                                                 
  332.                     <td align=left height=25 valign=MIDDLE 
  333.                         width="15%" colspan=1>
  334.                         <font color="#000000">&nbsp;&nbsp;
  335.                         <select name="type">
  336.                         <option value="00">首页普通商品</option>
  337.                         <option value="04">首页特价商品</option>
  338.                         </select>
  339.                         </font>
  340.                         </td>    
  341.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>
  342.                      <input type="hidden" name="recomid" value="<%=t_vct.get(0)%>">
  343.                     <input type="checkbox" name="recomnum" value="<%=i%>">选择</input>
  344.                     </td>
  345.                   </tr>            
  346.            <%
  347.         }
  348.     }
  349. %>           
  350.                   
  351.               </table>
  352.               <br> 
  353.               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  354.               <input type="button" value="推荐" onclick="recom()"></input>&nbsp;&nbsp; <input type="button" value="取消推荐" onclick="recom1()"></input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  355.               </p></td></tr> 
  356. </table>
  357. </td>
  358. </tr> 
  359. <tr> 
  360. <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  361. </td>
  362. </tr> 
  363. </table>
  364. </form>
  365. <script language="javascript">
  366. document.form1.name.value='<%=name%>';
  367. document.form1.manufacturer.value='<%=manufacturer%>';
  368. document.form1.parentid.value='<%=parentid%>';
  369. changeBoardParent();
  370. document.form1.catalog_id.value='<%=catalog_id%>';
  371. </script>
  372. </body>
  373. </html>