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

strQuery=""

strClass=GetVariable("class")
if strClass<>"" then
	strQuery=strQuery & " And p_class=" & strClass
end if

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

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

%>
<%
					strSQL="Select * From v_web_product Where mn_id=" & strCurrMenu & strQuery & " And left(p_code,2)='tj' 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=10		'每页显示记录数
					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>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="common/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="admin/common/JS_CheckForm.js"></script>
<script language="JavaScript">
function checkform(theform){
	if(!CheckEmpty(theform.key, "关键字")) return false;
}
</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="#D4D0C8" leftmargin="0" topmargin="0" BodyBegin>
<!--#include file="top.asp" -->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="5" rowspan="3"><table width="760" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="183" valign="top" background="images/index_r4_c1.gif"><table width="100%" height="421" border="0" cellpadding="0" cellspacing="0" background="images/index_r3_c1.gif" style="background-repeat:No-repeat";>
              <tr> 
                <td height="58" valign="top"><img src="images/dl.gif" width="183" height="49"></td>
              </tr>
              <tr> 
                <td height="59" align=center>
				<!--#include file="login.asp" --></td>
              </tr>
              <tr> 
                <td height="158" align="center"> <form action="pruduct.asp" method="post" name="search" id="search" onSubmit="return checkform(this)">
                    <TABLE cellSpacing=2 cellPadding=2 width="100%" align=center border=0>
                      <TR align="center"> 
                        <TD colspan="2" style="PADDING-LEFT: 6px"><strong><font style="color:white;font-size:16px">商品搜索</font></strong> 
                        </TD>
                      </TR>
                      <TBODY>
                        <TR> 
                          <TD align="right" style="PADDING-LEFT: 6px"><font color="#FFFFFF">关键字:</font></TD>
                          <TD style="PADDING-LEFT: 6px"><INPUT 
                  name=key id=searchkey2 size="13"> </TD>
                        </TR>
                        <TR> 
                          <TD width="31%" align="right" style="PADDING-LEFT: 6px"><font color="#FFFFFF">内 
                            容:</font></TD>
                          <TD style="PADDING-LEFT: 6px" width="69%"> <TABLE cellSpacing=0 cellPadding=0 border=0>
                              <TBODY>
                                <TR> 
                                  <TD><SELECT name=type>
                                      <OPTION value=1 selected>商品名称</OPTION>
                                      <OPTION value=2>内容简介</OPTION>
                                    </SELECT></TD>
                                  <TD> <TABLE id=T_select style="DISPLAY: none" cellSpacing=0 
                        cellPadding=0 border=0>
                                      <TBODY>
                                        <TR> 
                                          <TD></TD>
                                        </TR>
                                      </TBODY>
                                    </TABLE></TD>
                                </TR>
                              </TBODY>
                            </TABLE></TD>
                        </TR>
                        <TR> 
                          <TD width="31%" align="right" style="PADDING-LEFT: 6px"> 
                            <font color="#FFFFFF"> 价 格:</font></TD>
                          <TD style="PADDING-LEFT: 6px" width="69%">
						  <SELECT name=price>
                              <option value="20">20元以下</option>
                              <option value="30">30元以下</option>
                              <option value="50" selected>50元以下</option>
                              <option value="100">100元以下</option>
                              <option value="200">200元以下</option>
                              <option value="300">300元以下</option>
                              <option value="500">500元以下</option>
                              <option value="1000">1000元以下</option>
                              <option value="2000">2000元以下</option>
                              <option value="3000">3000元以下</option>
                            </SELECT>
							</TD>
                        </TR>
                        <TR> 
                          <TD width="31%" height=18 align="right" style="PADDING-LEFT: 6px"><font color="#FFFFFF">分 
                            类:</font></TD>
                          <TD style="PADDING-LEFT: 6px" width="69%"> <select name="class" style="width:90px">
                              <option value="">所有产品</option>
                              <%
								'开始输出分类
								strSQL="Select * From web_product_class Where c_parent=0 And mn_id=" & strCurrMenu & " Order by c_index"
								Set rsClass=Server.CreateObject("ADODB.RecordSet")
								rsClass.open strSQL,conn,1,1
								for i=1 to rsClass.recordcount
								%>
                              <option value="<%=rsClass("id")%>"><%=trim(rsClass("c_name"))%></option>
                              <%
									rsClass.movenext
								next
								rsClass.close
								%>
                            </select> </TD>
                        </TR>
                        <TR> 
                          <TD style="PADDING-LEFT: 6px" colSpan=2 height=18> <DIV align=center> 
                              <input type="submit" name="Submit3" value="搜 索">
                              <input type="reset" name="Submit4" value="重 置">
                              <br>
                            </DIV></TD>
                        </TR>
                    </TABLE>
                  </form></td>
              </tr>
              <tr> 
                <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/index_r8_c1.jpg">
                    <tr> 
                      <td><img src="images/index_r6_c1.gif" width="183" height="30"></td>
                    </tr>
                              <%
								'开始输出分类
								strSQL="Select * From web_product_class Where c_parent=0 And mn_id=" & strCurrMenu & " Order by c_index"
								Set rsClass=Server.CreateObject("ADODB.RecordSet")
								rsClass.open strSQL,conn,1,1
								for i=1 to rsClass.recordcount
								%>
                    <tr> 
                      <td height="30" background="images/index_r7_c1.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        <strong><font color="#FFFFFF"><%=trim(rsClass("c_name"))%></font></strong></td>
                    </tr>
                    <tr> 
                      <td><table width="90%" border="0" align="center" cellpadding="6" cellspacing="0">
                          <tr> 
                            <td><font color="#FFFFFF">
							  <%
								'开始二级输出分类
								strSQL="Select * From web_product_class Where c_parent=" & rsClass("id") & " And mn_id=" & strCurrMenu & " Order by c_index"
								Set rsClass1=Server.CreateObject("ADODB.RecordSet")
								rsClass1.open strSQL,conn,1,1
								for j=1 to rsClass1.recordcount
							  %><a href="product.asp?class=<%=rsClass1("id")%>&classname=<%=trim(rsClass1("c_name"))%>&mnid=<%=strCurrMenu%>" class="aWhite"><%=trim(rsClass1("c_name"))%></a>&nbsp;<%
									rsClass1.movenext
								next
								rsClass1.close
							  
							  %>
							  </font></td>
                          </tr>
                        </table></td>
                    </tr>
                              <%
									rsClass.movenext
								next
								rsClass.close
								%>
                  </table></td>
              </tr>
            </table></td>
          <td width="577" colspan="4" valign="top" bgcolor="#FFFFFF">
<TABLE cellSpacing=0 cellPadding=0 width=98% align=center border=0>
              <TBODY>
                <TR> 
                  <TD width="509"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="44%" align="center"><font color="#ff6600"><strong>特 
                          价 鲜 花</strong></font></td>
                        <td width="54%" align="right"><a href="javascript:;" onClick="window.open('shopping.asp?mnid=<%=strCurrMenu%>','','width=580,height=250,scrollbars=yes,resizable=yes');"><img src="images/buycar.gif" width="101" height="22" border="0"></a></td>
                        <td width="2%">&nbsp;</td>
                      </tr>
                    </table></TD>
                </TR>
                <TR> 
                  <TD bgColor=#ffffff><table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tr> 
                        <td height="30"><strong><%=strClassName%>: 共<%=intCount%>结果</strong></td>
                      </tr>
                      <tr> 
                        <td> 
                          <%
					 '循环输出
					 for i=1 to intPageSize
						if rs.eof then exit for
					%>
                          <table height="155" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr align="center"> 
                              <td width="521" height="139"> <table width="470" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td width="130" rowspan="5" align="center"><a href="productshow.asp?id=<%=trim(rs("id"))%>&mnid=<%=strCurrMenu%>&classname=<%=trim(rs("c_name"))%>&uppage=<%=ThisPage%>" target="_blank"><img src="UpFile/<%=trim(rs("p_smallpic"))%>" width="100" vspace="5" border="0"></a></td>
                                    <td width="340" height="20">【名 称】： <a href="productshow.asp?id=<%=trim(rs("id"))%>&mnid=<%=strCurrMenu%>&classname=<%=trim(rs("c_name"))%>&uppage=<%=ThisPage%>" target="_blank"><strong><font color="#ff6600"><%=trim(rs("p_name"))%></font></strong></a></td>
                                  </tr>
                                  <tr> 
                                    <td height="20">【编 号】： <a href="productshow.asp?id=<%=trim(rs("id"))%>&mnid=<%=strCurrMenu%>&classname=<%=trim(rs("c_name"))%>&uppage=<%=ThisPage%>" target="_blank"><strong><font color="#ff6600"><%=trim(rs("p_code"))%></font></strong></a></td>
                                  </tr>
                                  <tr> 
                                    <td height="20">【类 别】： <a href="productshow.asp?id=<%=trim(rs("id"))%>&mnid=<%=strCurrMenu%>&classname=<%=trim(rs("c_name"))%>&uppage=<%=ThisPage%>" target="_blank"><strong><font color="#ff6600"><%=trim(rs("c_name"))%></font></strong></a></td>
                                  </tr>
                                  <tr> 
                                    <td height="20">【市场价】：￥<s><%=trim(rs("p_price"))%></s>　<font color="#FF0000"><strong>【会员价】：</strong>￥<%=trim(rs("p_price1"))%></font></td>
                                  </tr>
                                  <tr> 
                                    <td height="30"><a href="javascript:;" onClick="PutWare('<%=trim(rs("id"))%>')"><img src="images/shopping.gif" width="78" height="23" border="0"></a><br>
                                      <font color="#FF0000">每款都特别推出简单胶纸包装价</font> 
                                    </td>
                                  </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#990000">
                                  <tr> 
                                    <td height="1" bgcolor="#666666"></td>
                                  </tr>
                                </table></td>
                            </tr>
                            <tr align="center"> 
                              <td height="16">&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                          <%
								
							rs.movenext
						next
			%>
                          <br> <table width="95%" border="0" align="center">
                            <tr> 
                              <td></td>
                            </tr>
                            <tr> 
                              <td height="28" align="right" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td align="right"> 共有<%=intCount%>记录，分<%=intPageCount%>页，当前页<%=Page%>，每页显示<%=intPageSize%>条记录 
                                      <%
			'计算每一段的开始页
			intStarPage=(Section-2) * intSectionSize + 1
			'前一段
			if Section<=1 then
				response.Write(PrevSectionText & " ")
			else
				response.Write("<a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section-1 & "'>" & PrevSectionText & "</a> ")
			end if 
			
			'显示页码列表
			response.Write("第")
			intStarPage=(Section-1) * intSectionSize + 1
		    for p=intStarPage to intStarPage + intSectionSize - 1
				if p > intPageCount then exit for
				if p=page then
		    		response.Write("<strong>[" & p & "]</strong> ")
				else
		    		response.Write("<a href='" & strPageUrl & "&page=" & p & "&section=" & Section & "'>[" & p & "]</a> ")
				end if	
		    next
			response.Write("页")
			'后一段
			intStarPage=(Section) * intSectionSize + 1
			if Section>=intSectionCount then
				response.Write(" " & NextSectionText)
			else
				response.Write(" <a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section+1 & "'>" & NextSectionText & "</a> ")
			end if 
		  %>
                                      　 </td>
                                  </tr>
                                </table></td>
                            </tr>
                            <tr> 
                              <td height="23" align="right" >&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr> 
                        <td>&nbsp;</td>
                      </tr>
                    </table> </TD>
                </TR>
              </TBODY>
            </TABLE>
            
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><img src="images/spacer.gif" width="1" height="15" border="0" alt=""></td>
  </tr>
  <tr> 
    <td><img src="images/spacer.gif" width="1" height="210" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="5"><img name="index_r6_c1" src="images/index_r10_c1.gif" width="760" height="30" border="0" alt=""></td>
    <td><img src="images/spacer.gif" width="1" height="30" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="5" valign="top" bgcolor="#EF3A75"> <div align="center"> 
        <TABLE width=98% height="41" 
border=0 cellPadding=4 cellSpacing=5>
          <TBODY>
            <TR> 
              <TD height=19 align=center background="images/bg.gif"><FONT 
      color=#ffffff> &nbsp;购物流程:</FONT><FONT 
      color=#ffffff>选购-&gt;加入购物车-&gt;去收银台-&gt;确认收货人信息-&gt;选配送方式-&gt;确定下订单-&gt;下单后汇款-&gt;汇款确认-&gt;发货-&gt;完成</FONT></TD>
            </TR>
          </TBODY>
        </TABLE>
        公司地址：未知电话： <BR>E-Mail:test@test.com<BR>Copyright&copy;2004-2005 test All Rights Reserved.<br>ICP<br>
        <font color="#FFFFFF">您是本站第 
        <script language="JavaScript" src="admin/count/counter.asp"></script>
        位访问者</font></div></td>
    <td><img src="images/spacer.gif" width="1" height="135" border="0" alt=""></td>
  </tr>
</table>
<script language="JavaScript" src="common/init.js"></script>

</body>
</html>

