<META http-equiv=Content-Type content="text/html; charset=gb2312">
            <style type="text/css">
<!--
.style1 {color: #999999}
.unnamed1 {text-decoration: none;
}
.STYLE5 {color: #FF6600}
.bg {
	border: 1px solid #CCCCCC;
}
-->
            </style>
            <script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
            </script>
<table width="6%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><%
				Const MaxPerPage=30
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    				if Not isempty(SafeRequest("page",1)) then
      				currentPage=Cint(SafeRequest("page",1))
   				else
      				currentPage=1
   				end if 
		 set rs=server.CreateObject("adodb.recordset")
		   rs.open "select id,name,pic,price1,price2,adddate,stock,spic from product where stock >= 0 and recommend<>3 order by adddate desc",conn,1,1
  				if rs.eof And rs.bof then
       				Response.Write "<p align='center' class='contents'> 对不起，此分类暂时还没有商品！</p>"
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"newarrivals.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"newarrivals.asp"
        				else
	        				currentPage=1
           					showContent
           					
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i,t
	   			i=0
				t=1

			%>
                    <table width="1%" border="0" align="center" cellpadding="9" cellspacing="3">
                      <%
			do while not rs.eof
			%>
                      <tr>
                        <%
				  for t=1 to 5
				  	if not rs.eof then
				  %>
                        <td align="center"><TABLE WIDTH="130" HEIGHT="140" BORDER="0" CELLPADDING="2" CELLSPACING="2">
                            <TR>
                              <TD width="140" height="130" colspan="2" align="center" background="image/cplistbg.jpg" class="bg"><a href=b2b_cpinfo.asp?id=<% = rs("id") %> target="_blank">
                                <% if trim(rs("spic"))<>"" then %>
                                <img src=image\<% = trim(rs("spic"))%>  border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a>
                                  <%  else %>
                                  <img src=images/emptybook.jpg  border=0 width="<% = webimg9 %>" height="<% = webimg10 %>">
                              <% end if %></TD>
                            </TR>
                            <tr>
                              <td align="center"><%=trim(rs("name"))%></td>
                            </tr>
                            <tr>
                              <td align="center"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                                <tr>
                                  <td width="84%" align="left"><span class="STYLE5"><strong><img src="images/won.gif" align="absmiddle" /></strong>&nbsp;市场价:<%=trim(rs("price1"))%>元</span></td>
                                  <td width="16%" align="right"><a href="b2b_cpinfo.asp?id=<%=rs("id")%>" target="_blank"><img src="image/but_bbogi.gif" alt="查看详细" width="14" height="16" border="0"></a></td>
                                </tr>
                                <tr>
                                  <td align="left"><span class="STYLE5"><strong><img src="images/won.gif" align="absmiddle" /></strong>&nbsp;会员价:<%=trim(rs("price2"))%>元</span></td>
                                  <td align="right"><a href="####" onClick="MM_openBrWindow('check.asp?ProdId=<%=rs("id")%>','','scrollbars=yes,width=760,height=500')"><img src="image/but_bbogi2.gif" alt="购物车" width="14" height="14" border="0"></a></td>
                                </tr>
                                
                              </table></td>
                            </tr>
                        </TABLE></td>
                        <%
						else
					%>
                        <%
						end if
						if t<>5 then
							rs.movenext
						end if
					next
					%>
                      </tr>
                      <%
			i=i+5
			if i>=MaxPerPage then Exit Do
			rs.movenext
			loop
			rs.close
			set rs=nothing
			end sub
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If %>
                    <form method=Post action=<% = filename %>?catid=<% = catid %>>
                      <%
				If CurrentPage<2 Then  %>
                      
                      
                      首页 上页
                      <% Else  %>

                      <a href=<% = filename %>?page=1&catid=<% = catid %>>首页</a> <a href=<% = filename %>?page=<% = CurrentPage-1 %>&catid=<% = catid %>>上页</a>
                      <%
				End If
				If n-currentpage<1 Then  %>
                      下页 尾页
                      <%	Else  %>
                      <a href=<% = filename %>?page=<% = (CurrentPage+1) %>&catid=<% = catid %>>下页</a> <a href=<% = filename %>?page=<% = n %>&catid=<% = catid %>>尾页</a>
                      <%	End If  %>
                      第 <b>
                        <% = CurrentPage %>
                        </b>页 共 <b>
                          <% = n %>
                          </b>页 共 <b>
                            <% = totalnumber %>
                            </b>件商品 每页 <b>
                              <% = maxperpage %>
                              </b> 件商品 转到第：
                      <input class='input_sr' type='text' name='page' size=2 maxlength=10 value=<% = currentpage %>>
                      页
                      <input type='submit' class='input_bot' value='跳转' name='cndok'>
                    </form>
                    <%
				End Function  
			%>
                  </table></td>
              </tr>
              <tr>
                <td align="center"><%showpage totalput,MaxPerPage,"newarrivals.asp"%></td>
              </tr>
</table>