<%@ LANGUAGE = VBScript CodePage = 936 LCID=2052%>
<!--#include file="conn.asp"-->
<!--#include file="newsConvert.asp"-->
<!--#include file="top.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=web_name%></title>
<link rel="stylesheet" href="image/style.css" type="text/css">
<body>
 <table width="780" border="0" cellspacing="0" cellpadding="0" height="186" bgcolor="#FFFFFF" align="center">
  <tr valign="top"> 
    <td> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="200" valign="top" bgcolor="#F3F3F3" background="images/ax2.jpg"> 
            <table width="99%" border="0" cellspacing="0" cellpadding="0" height="308">
              <tr valign="top">
                <td height="29"><img src="img/bar1.jpg" width="199" height="34" border="0"></td>
              </tr>
              <tr>
                <td height="8"></td>
              </tr>
              <tr valign="top">
                <td height="26"><table border="0" width="100%" cellpadding="0" cellspacing="0" height="103">
                    <tr>
                      <td width="100%" height="103" align="left">
                        <p align="left" style="line-height: 150%">
                          <%
            sql="select * from class"
            res.Open sql,con,1,1 
            if res.eof or res.bof then
               response.write  "no products class here！<br>"
            else
               do while not res.eof
               Response.Write("&nbsp;&nbsp;&nbsp;")
               Response.Write("<a href=product.asp?Sort_ID="&res("Sort_ID")&">")
               Response.Write(""&res("sort")&"</a><br>")
               res.movenext
               loop
            end if
			res.close
           %>
                                  </td>
                    </tr>
                </table></td>
              </tr>
              <tr valign="top">
                <td height="8"><img src="img/bar4.jpg" width="199" height="14"></td>
              </tr>
              <tr>
                <td height="31"><img src="img/bar2.jpg" width="199" height="34" border="0"></td>
              </tr>
              <tr valign="top">
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                        <p align="center">
                        <form action="Product.asp" method=post name="myform">
                          <div align=center>
                            <center>
                              <table border=0 cellpadding=0 cellspacing=0 height=87 
                        width="180">
                                <!--DWLayoutTable-->
                                <tbody>
                                  <tr valign=bottom>
                                    <td align=right height=25 width=69>
                                      <div align=center><font color=#000000>分类:</font></div></td>
                                    <td width=180>
                                      <div align=left>
                                        <select name="sort_id" size="1">
                                          <option selected>选择分类</option>
                                          <% sql="select * from class"
										   res.open sql,con,1,1
										   do while not res.eof
										%>
                                          <option value="<%=res("sort_id")%>"><%=res("sort")%></option>
                                          <% res.movenext
										   loop
										   res.close
										%>
                                        </select>
                                    </div></td>
                                  </tr>
                                  <tr valign=bottom>
                                    <td align=right height=31 width="69">
                                      <div align=center><font color=#000000>关键:</font></div></td>
                                    <td width="180">
                                      <div align=left><font color=#000000>
                                        <input name=keyword type=text id="keyword" size=12 maxlength=50 value="关键词">
                                    </font></div></td>
                                  </tr>
                                  <tr>
                                    <td align=right width="69"></td>
                                    <td width="148"><input name=B1 type=submit value="搜 索"></td>
                                  </tr>
                                </tbody>
                              </table>
                            </center>
                          </div>
                      </form></td>
                    </tr>
                </table></td>
              </tr>
              <tr valign="top">
                <td><img src="img/bar4.jpg" width="199" height="14"></td>
              </tr>
              <tr valign="top">
                <td height="39"><table border="0" width="100%" cellpadding="0" cellspacing="0" height="243">
                  <tr valign="top">
                    <td height="29"><img src="img/bar3.jpg" width="199" height="34" border="0"></td>
                  </tr>
                  <tr>
                    <td height="8"></td>
                  </tr>
                  <tr>
                    <td width="100%" height="200" valign="top"><div align="center">
                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="190" height="190">
                          <param name="movie" value="ballot.swf">
                          <param name="quality" value="high">
                          <param name="menu" value="false">
                          <!--隐藏flash的右键菜单-->
                          <param name="wmode" value="transparent">
                          <!-设置flash为透明底-->
                          <embed src="ballot.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="190" height="190"></embed>
                        </object>
                    </div></td>
                  </tr>
                  <tr>
                    <td height="14" valign="top"><img src="img/bar4.jpg" width="199" height="14"></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          <td height="186" valign="top" bgcolor="#FFFFFF"> 
<table width="579" border="0" cellspacing="0" cellpadding="0" align="center" height="99">
  <tr>
    <td height="20"><img src="img/bg1.jpg" width="579" height="56"></td>
  </tr>
  <tr>
    <td height="20"><img src="img/product.jpg" width="579" height="50"></td>
  </tr>
  <tr>
    <td height="19" background="images/ax4.jpg"></td>
  </tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="517">
  <tr>
    <TD width=577 height="405" vAlign=top background="images/ax4.jpg"><br><%
	    dim keyword
		dim sort_id
		keyword=request("keyword")
		sort_id=request("sort_id")
		if sort_id<>"" then sqlwhere=sqlwhere &" and sort_id="&sort_id&""
		if keyword<>"" then sqlwhere=sqlwher &" and shop_name like '%"&keyword&"%'"
        Set rs=Server.CreateObject("ADODB.RecordSet")
        strsql="select * from Product where shop_id<>0 "&sqlwhere&" order by audit desc,dateandtime desc"
		rs.Open strsql,con,1,1
	if rs.eof then 
		   response.write "<script language=javascript>alert('没有发现产品!');window.history.back();</script>"
    else
		rs.movefirst
		if not isempty(request("page")) then   
           pagecount=cint(request("page"))   
        else   
           pagecount=1   
        end if
        rs.pagesize=9
        if pagecount>rs.pagecount or pagecount<=0 then              
           pagecount=1              
        end if              
        rs.AbsolutePage=pagecount
      %>
                  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF9900">
                    <%
          j=1
          do while not (rs.eof or err)
          if (j mod 3)=1 then
              response.write "<tr>"
          end if
        %>
  <td align="center" valign="top">
      <table width="100%" height="125" border="0" align="center" cellpadding="1" cellspacing="0">
        <tr>
          <td width="150" align="center" valign="middle"><table width="120" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
              <tr>
                <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                    <tr>
                      <td align="center" valign="middle">
                        <%If rs("Pic")<>"" then%>
                        <a href='List.asp?Shop_ID=<%=rs("Shop_ID")%>' target=_blank><img border='0' width='130' height='130' src="<%=rs("pic")%>" align='center'></a>
                        <%Else%>  
                        <a href='List.asp?Shop_ID=<%=rs("Shop_ID")%>' target=_blank><img border='0' width='130' height='130' src='Pic/no.jpg' align='center'></a>  
                        <%End If%>  
                      </td>
                    </tr>
                </table></td>
              </tr>
          </table>
            <table width="100%" height="35"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><a class=a4 href="List.asp?Shop_id=<%=rs("shop_id")%>" target=_blank>[<%=left(rs("shop_name"),12)%>]</a></td>
              </tr>
            </table></td>
          <td align="center" valign="middle">　</td>
        </tr>
        <tr>
          <td colspan="2" height="8"> </td>
        </tr>
    </table></td>
      <%  
          if (j mod 3)=0 then
		     response.write "</tr>"
          end if
	      j=j+1
		  rs.moveNext
		  if j>9 then exit do
          loop
    end if
       %>
                  </table>
                  <table width="95%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="18" colspan="4" align="center" valign="middle" class="unnamed1">
                        <%
			 if rs.pagecount>1 then
			    response.Write "第"&pagecount&"页/共"&rs.pagecount&"页&nbsp;&nbsp;"
			    if pagecount>=10 then
				   response.write"<a href=?Sort_ID="&sort_id&"&keyword="&keyword&"&page="&(((cstr(pagecount)\10)-1)*10)+1&"><<</a>&nbsp;&nbsp;"
			    end if
			    q=(cstr(pagecount)-1)\10
			    if q<0 then
			       q=1
			    end if
			    p=(q*10)+1
			    do while p<((q*10)+11)
			       If p=pagecount Then                        
				      Response.Write p&"&nbsp;&nbsp;"
			       Elseif p<=rs.pagecount then
				      Response.Write "<a href='?Sort_ID="&sort_id&"&keyword="&keyword&"&page="&p&"'>"& p &"</a>&nbsp;&nbsp;"
			       End If
			       p=p+1
		        loop
			    A=rs.pagecount
			    if (A mod 10)=0 then
			        A=rs.pagecount-1
			    end if
			    if pagecount<(A\10)*10 then
				   response.write"<a href=?Sort_id="&Sort_id&"&keyword="&keyword&"&page="&((((cstr(pagecount)-1)\10)+1)*10)+1&">>></a>"
			    end if
			 End If%>
                        <br>
                        <br>
                      </td>
                    </tr>
                  </table></TD>

  </tr>
</table>
<table width="579" border="0" cellspacing="0" cellpadding="0" align="center" height="20">
  <tr>
    <td height="20"><img src="images/ax6.jpg" width="579" height="31"></td>
  </tr>
</table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<!--#include file="foot.asp"-->
<% con.close
   set con=nothing
%></body>