<!--#include file="top.asp"-->
<div align="center">
  <table width="900" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
      <td width="256" height="289" valign="top"><table border="0" width="100%" cellpadding="0" cellspacing="0" >
        <!--DWLayoutTable-->
									<tr>
										<td height="1" background="images/hpoint.gif" align="left"><img src="images/hpoint.gif" width="3" height="1" alt=""></td>
									</tr>
									<tr>
										<td height="20"><div style='height:20px; padding-right:10px;color:#E80377; font-weight:bold; font-size:14px; text-align:right;'>
										  <div align="center"><img src='images/sign_what_newg.gif' width='21' height='17' style='margin-top:1px;'>&nbsp;&nbsp;<span class="STYLE13">CATALOG</span></div>
										</div></td>
									</tr>
									<tr>
										<td height="1" background="images/hpoint.gif" align="left"><img src="images/hpoint.gif" width="3" height="1" alt=""></td>
									</tr>
									<tr>
										<td ><!-- categories //-->

<table width="100%" cellpadding="0" cellspacing="10" border="0">
  <!--DWLayoutTable-->
 <tr>        
		<td align="left">

 
  <table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">
  <tr>
    <td class="boxText" align="left" >
	<%Set rs=Server.CreateObject("ADODB.recordset") 
			sql="select * from class_pay order by orderID "
			rs.open sql,conn,1,3
			do while not rs.eof
			set rss=Server.CreateObject("ADODB.recordset")
			sql1="select * from pays where classid="&rs("orderid")
			rss.open sql1,conn,1,3
			i=0
			do while not rss.eof
			i=i+1
			rss.movenext
			loop
			%>
	&nbsp;&nbsp;<img src="images/sign_link.jpg" width="13" height="14">&nbsp;&nbsp;<a href="products.asp?orderid=<%=rs("orderid")%>"><span class="crimson STYLE9">
	
			<%response.Write(rs("classname"))%>(<%=i%>)</a>
			<%response.Write "<p>"
			rs.movenext
			loop
			rss.close
			rs.close
	%></span>
	<br/></td>
  </tr>
</table></td>
  </tr>
</table></td>
		<td width="60"></td>
 </tr></table>
<!-- categories_eof //--></td>
									</tr>
									<tr>
										<td height="1" background="images/hpoint.gif" align="left"><img src="images/hpoint.gif" width="3" height="1" alt=""></td>
									</tr>
									<tr>
									
									
									
									
									
									
									   <td width="495" valign="top" align="center">
   <br />
   <span class="crimson">Choose the category to see products!</span>	</td>
<!-- body_text_eof //-->
									</tr>
									<tr>
									  <td height="76"></td>
		  </tr>
	  </table></td><td width="644" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
	        <%
			Set rss=Server.CreateObject("ADODB.recordset")
			sql1="SELECT * FROM pays WHERE classname LIKE '%"&request("keywords")&"%' or title LIKE '%"&request("keywords")&"%' ORDER BY id DESC"
			'sql1="SELECT * FROM pays WHERE  title LIKE '%"&request("keywords")&"%' ORDER BY id DESC"
            page=request.querystring("page")
      if page="" then page=1
      if not(isnumeric(page)) then page=1
      if page<1 then page=1
      page=int(page)   	
	  
      rss.open sql1,conn,2,3
      if rss.bof or rss.eof then%>
	      <tr>
          <td  align="center" width="644" height="26"><span class="crimson STYLE9" >&nbsp;&nbsp; Searching>><%=request("keywords")%></span></span></td>
          </tr>
          <tr>
          <td  align="center" width="644" height="50"><span class=" STYLE9" >
          <%response.write "Sorry!There are no products what you want!"%>
          </span></td></tr>
		  
		  
      <%else
          rss.pagesize=27
          totalrec=rss.recordcount
          totalpage=rss.pagecount
          if page>totalpage then page=totalpage
         'rss.absolutepage=page
          rss.cachesize=rss.pagesize
            %>
      
        
        <tr>
          <td  align="center" width="644" height="26"><span class="crimson STYLE9" >&nbsp;&nbsp; Searching>><%=request("keywords")%></span></span></td>
          </tr>
        <tr>
          <td height="1" ></td>
          </tr>
        <tr>
          <td height="150" valign="top">
              <table border="0" width="100%" cellspacing="0" cellpadding="4" class="infoBoxContents">
                <!--DWLayoutTable-->
                <tr>
				<%
				 i=0
          do while not rss.eof and (i<rss.pagesize)
		  i=i+1
         %>
                  <td   bgcolor="#FFFFFF" width="30%" height="150" align="center" valign="top" ><div><div class="image"><a href="product.asp?id=<%=rss("ID")%>"><img src="<%=trim(rss("spic"))%>" border="0" alt="Lingerie set No1" title=" Lingerie set No1 " width="107" height="87" align="left"></a></div>
                    <span  class="gray">Product:&nbsp;</span><span class="lil"><span class="crimson">$<%=rss("price")%></span></span><br/>
                    <span style="color:#E80377; font-weight:bold;">|&nbsp;<a class="more" href="product.asp?id=<%=rss("ID")%>"><%=rss("title")%></a></span>
                  </form>
                  </div>				  			  </td><%
		if (i mod 3=0) and i>=3 then%>	
        </tr><%end if
                rss.movenext
                       loop
					   end if%>
                            </table></td>
          </tr>     
        
      </table>
	  <!--首先保证总页数不为1、不为0-->
<%if rss.pagecount<>1 and rss.pagecount<>0 then%>
<!--如果当前页数大于1，无论何时都应显示首页和上一页的连接-->
<%if page>1 then%>
[<a Href="<%=filepath%>?orderid=<%=classid%>&Page=<% = 1%>">First</a>]
[<a Href="<%=filepath%>?orderid=<%=classid%>&Page= <% = page -1 %>">Up Page</a>]
<!--如果当前页数大于1并且小于总页面数时，显示出尾页和下一页的连接-->
<%if page<rss.pagecount then %>
[<a Href="<%=filepath%>?orderid=<%=classid%>&Page=<% = page +1%>">Next Page</a>]
[<a Href="<%=filepath%>?orderid=<%=classid%>&Page=<% = rss.PageCount%>">Last</a>]
<!--如果当前页数大于1并且仍大于或等于总页面数时，不显示出尾页和下一页的连接--> 
<%else%>
[Next Page] [Last]
<%end if%>
<!--否则，当前页数不大于1，则只显示尾页和下一页的连接-->
<%else%>
[First] [Up Page]
[<a Href="<%=filepath%>?orderid=<%=classid%>&Page=<% = page + 1%>">Next Page</a>] 
[<a Href="<%=filepath%>?orderid=<%=classid%>&Page=<% = rss.PageCount%>">Last</a>]
<%end if %>
<!--最终，总页数若为1、为0则没有任何连接-->
<%else%>
[First] [Up Page] [Next Page] [Last]
<%end if%>

[Page:<font color=red><b><%=page%></b></font>/<%=rss.PageCount%>]
[<font color=red><b><%=rss.PageSize%></b></font> Articles/Page]
	  </td>
    </tr>

    
      </table></td>
    </tr><tr>
      <td height="20" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <!--#include file="bottom.asp"-->
          </tr>
  </table>
  
</div>

