<%@page contentType="text/html;charset=GBK" %>
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>
<%@ taglib uri="/logic" prefix="logic" %>
<%@ taglib uri="/keyshop" prefix="keyshop" %>
<%@include file="/jsp/pub/pub.jsp"%>
<%

  String subtitle = "";
  List parentCategoryList = (List)request.getAttribute("categoryList");
  String[] currentCategory = null;
  String curCategoryName = "";
  String curCategoryId = "";  
  String categoryId ="";
  if(parentCategoryList != null && parentCategoryList.size()  >0 ) {
    currentCategory = (String[])parentCategoryList.get(0);
    if(currentCategory != null) {     
      curCategoryName = currentCategory[1];
      curCategoryId = currentCategory[0];
      PAGETITLE = curCategoryName;
      ProductCategory c = ProductHelper.getProductCategory(curCategoryId);
      if(c != null && c.getDescription() != null) {
        PAGETITLE = PAGETITLE + c.getDescription();
      }
    } 
  }
  if(StringUtil.isEmpty(PAGETITLE)) {
    PAGETITLE = "商品列表" + subtitle;
  } else {
    PAGETITLE = PAGETITLE + subtitle;
  }
%>
<%
  //设置网页title, 关键字,网页描述。
  PAGEDESCRIPTION =  PAGETITLE;
  PAGEKEYWORDS = PAGETITLE;
%>
<script>
  function select(act) {
    currentPage = parseInt(document.all['currentPageNo'].value);
    var toPage;
    if(act == "jump") {
      toPage= parseInt(document.all.toPage.value);
    }else if(act == "prev") {
	    toPage = currentPage - 1;
    }else if(act == "next"){
	    toPage = currentPage + 1 ;
    }
    document.all.currentPageNo.value = toPage;
    document.all.actionType.value = "qiantailist";
    document.fgProductSearchForm.submit();
  }
  
  function jump(page) {
  	document.all.toPage.value=page;
  	document.all.currentPageNo.value=page;
  	document.fgProductSearchForm.submit();
  }
  
  function orderby(orderbyType) {
  	document.all.orderbyType.value=orderbyType;
  	document.fgProductSearchForm.submit();
  }
  
</script>

<jsp:useBean id="fgProductSearchForm" class="com.keyshop.shop.product.controller.ProductForm" scope="request"/>
<%
	Product bean = (Product)fgProductSearchForm.getBean();
%>
<%@include file="/jsp/pub/top.jsp"%>
<table width="830" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="181" valign="top">
    	<table width="181" height="828" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top">
				  <!--左侧商品分类列表-->
				  <%@include file="/jsp/pub/index/categorytree.jsp"%>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height=5></td>
              </tr>
            </table>
           <!--左侧信息列表-->
          	<jsp:include page="/jsp/pub/index/leftContentList.jsp"> 
							<jsp:param name="channelId" value="<%=currentChannel.getId()%>"/>
							<jsp:param name="searchKey" value="<%=LEFT_CONTENT%>"/>
							<jsp:param name="position" value="1"/> 	
						</jsp:include>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height=5></td>
              </tr>
            </table>
            <!--左侧广告-->
			      <jsp:include page="/jsp/pub/adContentView.jsp"> 
							<jsp:param name="channelId" value="<%=currentChannel.getId()%>"/> 	
							<jsp:param name="searchKey" value="<%=AD_CATEGORY_LEFT%>"/> 	
							<jsp:param name="position" value="1"/> 
						</jsp:include>	
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height=5></td>
              </tr>
            </table>
            <!--网上调查-->
            <%@include file="/jsp/pub/sm/inquisition.jsp"%>
          </td>
        </tr>
      </table>
    </td>
    <td width="0" align="center" valign="top">
    </td>
  </tr>
</table>
<!--底部文件-->
<%@include file="/jsp/pub/bottom.jsp"%>