<!--#include file="conn.asp" -->
<%
strCurrMenu="⑨menuid⑨"
ThisPage=request.ServerVariables("URL")
strClassName=GetVariable("classname")
if strClassName="" then
	strClassName="所有产品"
end if

strQuery=""

strClass=GetVariable("class")
if strClass<>"" then
	SourCode=conn.execute("Select c_code From web_product_class Where mn_id=" & strCurrMenu & " and id="&strClass)(0)
	strQuery=strQuery & " And c_code Like '" & SourCode &"%'"
end if

strKey=GetVariable("key")
if strKey<>""  then
	strQuery=strQuery & " And (p_name Like '%" & strKey & "%' Or p_detail Like '%" & strKey & "%') "
	strClassName="搜索：" & strKey
end if

strPrice1=GetVariable("price1")
if strPrice1<>"" then
	strQuery=strQuery & " And p_price>=" & strPrice1 
	strClassName=strClassName & "　　最低价格" & strPrice1
end if

strPrice2=GetVariable("price2")
if strPrice2<>"" then
	strQuery=strQuery & " And p_price<=" & strPrice2
	strClassName=strClassName & "　　最高价格" & strPrice1
end if

%>
<%
'读取产品展示的属性，以确定显示那个字段
showClass=GetKey("showClass",WebUserID,"product_" & strCurrMenu )
showPrice=GetKey("showPrice",WebUserID,"product_" & strCurrMenu )
showSize=GetKey("showSize",WebUserID,"product_" & strCurrMenu )
showSymbol=GetKey("showSymbol",WebUserID,"product_" & strCurrMenu )
showFace=GetKey("showFace",WebUserID,"product_" & strCurrMenu )
showShop=GetKey("showShop",WebUserID,"product_" & strCurrMenu )
showDetail=GetKey("showDetail",WebUserID,"product_" & strCurrMenu )
%>

                  <!--Product Begin-->
                  
<%
					strSQL="Select * From v_web_product Where mn_id=" & strCurrMenu & strQuery & " Order by p_code,ID Desc"
					Set rs=Server.CreateObject("ADODB.RecordSet")
					rs.open strSQL,conn,1,1
					'分页显示初始化
					page=GetVariable("page")
					if page="" then
						page=1
					else
						page=Cint(page)
					end if
					
					Section=GetVariable("section")
					if Section="" then
						Section=1
					else
						Section=Cint(Section)
					end if
					'变量赋值
					intPageSize=6
					intSectionSize=5		''多少页为一段，像GOOGLE一样
					PrevSectionText="<FONT face=webdings>7</FONT>"		'上一段的链接文字
					NextSectionText="<FONT face=webdings>8</FONT>"		'下一段的链接文字
					PrevPageText="<FONT face=webdings>3</FONT>"			'上页的链接文字	
					NextPageText="<FONT face=webdings>4</FONT>"			'下页的链接文字
					
					strPageUrl="?class=" & GetVariable("class") & "&key=" & GetVariable("key") & "&price1=" & GetVariable("price1") & "&price2=" & GetVariable("price2")
					
					rs.pagesize=intPageSize
					intCount=rs.RecordCount 
					intPageCount=rs.pagecount
					intSectionCount=(intPageCount - 1) \ intSectionSize + 1
					if intCount>0 then
						rs.AbsolutePage=page  
					end if
					%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="common/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
@import url("css.css");
-->
</style>
<script language="JavaScript" src="common/JS_CheckForm.js"></script>
<script language="JavaScript">
	function PutWare(strID){
		Shopwin=window.open("shopping.asp?action=add&spid=" + strID+ "&PtCount=1&mnid=<%=strCurrMenu%>",'WareList','width=580,height=250,scrollbars=yes,resizable=yes');
		Shopwin.focus();
	}

</script>
</head>


<body bgcolor="#CCCCCC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" BodyBegin>
<!--#include file="top.asp" -->

<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="239" valign="top" background="images/fen left bei .JPG">
<table width="239" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><table width="239" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="239" height="47" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center" background="images/fen left 1.JPG">
<table width="163" height="46" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="46" align="center" valign="bottom" class="t"><%=request("classname")%>分类</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td><table width="239" height="25" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="20" align="center" background="images/fen left bei 1 .JPG"> 
                        <table width="189" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="197" align="right"><table width="89%" height="26" border="0" cellpadding="0" cellspacing="0">
                              <%
									'开始输出分类
									strcode=""
									for i=1 to Len(SourCode) \ 4
									strcode=strcode&" or c_code like '"&left(SourCode,i*4)&"____'"
									next
									if strcode<>"" then
									strcode="(1<>1"&strcode&" or Len(c_code)=4)"
									else
									strcode=" Len(c_code)=4"
									end if
									strSQL="Select * From web_product_class Where mn_id=" & strCurrMenu&" and " & strcode & "  Order by c_code"
									'response.Write(strsql)
									Set rsclass=Server.CreateObject("ADODB.RecordSet")
									rsclass.open strSQL,conn,1,1
									for i=1 to rsclass.recordcount
									Level=(Len(rsclass("c_code"))/4-1)*3
									%>
                              <tr>
                                <td height="26" ><%
			If Len(rsclass("c_code"))>4 Then Response.Write "├"
			Response.Write String(Level,"-")
			%>
                                  <a href="<%=request.QueryString("uppage")%>?class=<%=rsclass("id")%>&classname=<%=trim(rsclass("c_name"))%>"><%=trim(rsclass("c_name"))%></a> </td>
                              </tr>
                              <%
									rsclass.movenext
								next
								%>
                            </table></td>
                          </tr>
                        </table> </td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td><table width="239" height="35" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td background="images/fen left 2.JPG"><table width="220" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="220" height="18" align="right" class="t">&nbsp;</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
		      <%
							isVote=GetKey("Enable",WebUserID,"vote")
							if isVote="Yes" then
							%>
        <tr>
          <td><table width="239" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="239" height="47" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td align="center" background="images/fen left 1.JPG"> <table width="163" height="46" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="46" align="center" valign="bottom" class="t">网上调查</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
			        <%
							isVote=GetKey("Enable",WebUserID,"vote")
							if isVote="Yes" then
							%>
              <tr> 
                <td><table width="239" height="25" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="20" align="center" background="images/fen left bei 1 .JPG"><script language="JavaScript" src="admin/vote/viewvote.asp"></script></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td><table width="239" height="35" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td background="images/fen left 2.JPG">&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
		      <%
							  end if
							  %>
        <tr>
          <td><table width="239" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="239" height="48" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center" background="images/fen left 4.JPG">
<table width="163" height="46" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="46" align="center" valign="bottom" class="t">友情联接</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td><table width="239" height="25" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="20" align="center" background="images/fen left bei 1 .JPG"><table width="183" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="33" height="20" align="center"><img src="images/fen%20left%20anniu%201.JPG" width="12" height="11"></td>
                            <td width="144" class="t">九天进出口公司</td>
                          </tr>
                          <tr> 
                            <td height="20" align="center"><img src="images/fen%20left%20anniu%201.JPG" width="12" height="11"></td>
                            <td class="t">九天进出口公司</td>
                          </tr>
                          <tr> 
                            <td height="20" align="center"><img src="images/fen%20left%20anniu%201.JPG" width="12" height="11"></td>
                            <td class="t">九天进出口公司</td>
                          </tr>
                          <tr> 
                            <td height="20" align="center"><img src="images/fen%20left%20anniu%201.JPG" width="12" height="11"></td>
                            <td class="t">九天进出口公司</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td><table width="239" height="35" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td background="images/fen left 2.JPG">&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table>
    </td>
    <td width="533" valign="top" background="images/fen right bei .JPG"><table width="539" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><table width="539" height="47" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td background="images/fen right 1.JPG"><table width="153" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="153" height="35" align="center" valign="bottom" class="t"><%=request("classname")%></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td align="center"><table width="93%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><%
									'读取产品展示的属性，以确定显示那个字段
									showPrice=GetKey("Price",WebUserID,"product_" & strCurrMenu )
									showSize=GetKey("Size",WebUserID,"product_" & strCurrMenu )
									showSymbol=GetKey("Symbol",WebUserID,"product_" & strCurrMenu )
									showWeight=GetKey("Weight",WebUserID,"product_" & strCurrMenu )
									showFace=GetKey("Face",WebUserID,"product_" & strCurrMenu )
									showPlace=GetKey("Place",WebUserID,"product_" & strCurrMenu )
									showProducer=GetKey("Place",WebUserID,"product_" & strCurrMenu )
									showShop=GetKey("showShop",WebUserID,"product_" & strCurrMenu )
									%>
                  <table width="100%" border="0" cellspacing="1" cellpadding="0">
                    <tr>
                      <td width="36%" valign="top"><a href="UpFile/<%=trim(rs("p_pic"))%>" target="_blank"><img src="UpFile/<%=trim(rs("p_pic"))%>" alt="点击看大图" width="220" hspace="8" vspace="5" border="0"></a></td>
                      <td width="64%" rowspan="2" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
                          <tr>
                            <td height="56" colspan="2"><strong><font color="#006699"><%=trim(rs("p_name"))%></font></strong></td>
                          </tr>
                          <tr>
                            <td height="24" align="right"><strong>型号：</strong></td>
                            <td height="24"><%
							  if showSymbol<>"none" then
							  	response.Write trim(rs("p_symbol"))
							  end if
							  %>
                            </td>
                          </tr>
                          <tr>
                            <td height="24" align="right"><strong>类别：</strong></td>
                            <td height="24"><%=trim(rs("c_name"))%></td>
                          </tr>
                          <%if showPrice<> "none" then%>
                          <tr>
                            <td width="25%" height="24" align="right"><font color="#FF0000"><strong>价格：</strong></font></td>
                            <td width="75%" height="24"><font color="#FF0000"><%=trim(rs("p_price"))%><strong> 元</strong></font></td>
                          </tr>
                          <%end if%>
                          <%if showSize<> "none" then%>
                          <tr>
                            <td height="24" align="right"><strong>尺寸：</strong></td>
                            <td height="24"><%=trim(rs("p_size"))%></td>
                          </tr>
                          <%end if%>
                          <%if showFace<> "none" And showFace<>"Null" then%>
                          <tr>
                            <td height="24" align="right"><strong>外观：</strong></td>
                            <td height="24"><%=trim(rs("p_face"))%></td>
                          </tr>
                          <%end if%>
                          <%if showWeight<> "none" And  showWeight<>"Null" then%>
                          <tr>
                            <td height="24" align="right"><strong>重量：</strong></td>
                            <td height="24"><%=trim(rs("p_weight"))%></td>
                          </tr>
                          <%end if%>
                          <%if showPlace<> "none" And showPlace<>"Null" then%>
                          <tr>
                            <td height="24" align="right"><strong>生产地：</strong></td>
                            <td height="24"><%=trim(rs("p_weight"))%></td>
                          </tr>
                          <%end if%>
                          <%if showProducer<> "none" then%>
                          <tr>
                            <td height="24" align="right"><strong>生产商：</strong></td>
                            <td height="24"><%=trim(rs("p_producer"))%></td>
                          </tr>
                          <%end if%>
                      </table></td>
                    </tr>
                    <tr>
                      <td align="center">图片及文字介绍仅供参考，请以实物为准</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td><%if showShop<>"none" then %>
                          <a href="javascript:;" onClick="PutWare('<%=trim(rs("id"))%>')"><img src="images/ljgm.gif" width="85" height="28" hspace="10" border="0"></a>
                          <%end if%>
                      </td>
                    </tr>
                    <tr>
                      <td><strong><font color="#006699">·产品描述</font></strong></td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td colspan="2"><hr width="98%" size="1" noshade></td>
                    </tr>
                    <tr valign="top">
                      <td height="100" colspan="2" align="center"><table width="96%" border="0" cellspacing="1" cellpadding="0">
                          <tr>
                            <td height="96" valign="top"><%=trim(rs("p_detail"))%></td>
                          </tr>
                          <tr>
                            <td height="16" align="right"><font color="#888888">更新时间：<%=trim(rs("p_createtime"))%></font></td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
            </tr>
          </table></td>
        </tr>
      </table> </td>
  </tr>
</table>
<table width="778" height="38" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="16" background="images/fen up .JPG">&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="471" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="471" height="26" align="right" valign="top" class="t">公司地址：未知<br>电话： E-Mail:sdafdsa@163.com<br>Copyright&copy;2006-2007 test1 All Rights Reserved.<br />

  <%
							iscounter=GetKey("Enable",WebUserID,"counter")
							if iscounter="Yes" then
							%>
您是本站第
<script language="JavaScript" src="admin/count/counter.asp" type="text/javascript"></script>
位访问者
<%end if%></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
<script language="JavaScript" src="common/init.js"></script>
<script language=Javascript src="common/tranbig5.Js"></script>
</html>

