<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
 <TBODY>
  <TR>
   <TD class=showlist><%=Products01("1,",4,4)%>
</TD></TR></TBODY></TABLE>

<%
Function Products01(SortPath,trs,tds)
  dim rs,sql,tr,td,ProductName,SmallPicPath
  set rs = server.createobject("adodb.recordset")
  sql="select top "&trs*tds&" * from Qianbo_Products where ViewFlag and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
  rs.open sql,conn,1,1
  if rs.eof then
    response.write "暂无相关商品"
  else
    Response.Write "<table cellpadding=""0"" cellspacing=""0"" border=0>"&VbCrLf
	for tr=1 to trs
	    Response.Write "  <tr>"&VbCrLf
        for td=1 to tds
	      if StrLen(rs("ProductName"))<=18 then
            ProductName=rs("ProductName")
	      else
	        ProductName=StrLeft(rs("ProductName"),18)
	      end If
			If ISHTML = 1 Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductView.asp?ID="&rs("id")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
			Response.Write "    <td><table cellpadding=""0"" cellspacing=""0"" border=0 width=160>"&VbCrLf
			Response.Write "        <tr>"&VbCrLf
			Response.Write "          <td width=155><TABLE cellSpacing=1 cellPadding=2 bgColor=#F5E7CA border=0><TR><TD bgColor=#ffffff align=center><a href="""&AutoLink&"""><img src="""&SmallPicPath&""" alt="""&rs("ProductName")&""" width=""130"" height=""100"" border=""0"" /></a></TD></TR></TABLE></td>"&VbCrLf
			Response.Write "        </tr>"&VbCrLf
			Response.Write "        <tr>"&VbCrLf
			Response.Write "          <td style=""height:20px; text-align:center;""><a href="""&AutoLink&""" title="""&rs("ProductName")&""">"&ProductName&"</a> </td>"&VbCrLf
			Response.Write "        </tr>"&VbCrLf				
			Response.Write "  <tr height=""18"">"&VbCrLf
Response.Write "  <td align=center>批发价： <font color=red>"&rs("P_Price")&"</font> 元 </td>"&VbCrLf
Response.Write "  </tr>"&VbCrLf
Response.Write "      </table></td>"&VbCrLf
Response.Write "    <td width=""8""></td>"&VbCrLf
	      rs.movenext
		  if rs.eof then exit for
		next
	    Response.Write "  </tr>"&VbCrLf
		if rs.eof then exit for
	next
    Response.Write "</table>"&VbCrLf
  end if
  rs.close
  set rs=nothing
End Function
%>