classid=request("classid")
classname=request("classname")
if classid="" then
set rstop=conn.execute("select top 1 * from tbl_product_class where parentid=0 order by paiming asc ")
if not rstop.eof then
classid=rstop("classid")
classname=rstop("classname")
else
classname="PRODUCTS 系列"
classid=0
end if
rstop.close
end if
if classname="" then classname="PRODUCTS 系列"
product=trim(checkstr(request("product")))
sql="select * from tbl_product where yuyan='cn'"
if product<>"" then
sql=sql&" and product like '%"&product&"%'"
end if
if classid<>"" then
classid=classid&AllsubClass(classid)
sql=sql&" and classid in("&classid&")"
end if
sql=sql&" order by paiming asc"
'response.Write sql
'response.End()
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
pagenum=4
if not rs.eof then
classid=request("classid")
classname=request("classname")
if classid="" then
set rstop=conn.execute("select top 1 * from tbl_product_class where parentid=0 order by paiming asc ")
if not rstop.eof then
classid=rstop("classid")
classname=rstop("classname")
else
classname="PRODUCTS 系列"
classid=0
end if
rstop.close
end if
if classname="" then classname="PRODUCTS 系列"
product=trim(checkstr(request("product")))
sql="select * from tbl_product where yuyan='cn'"
if product<>"" then
sql=sql&" and product like '%"&product&"%'"
end if
if classid<>"" then
classid=classid&AllsubClass(classid)
sql=sql&" and classid in("&classid&")"
end if
sql=sql&" order by paiming asc"
'response.Write sql
'response.End()
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
pagenum=4
if not rs.eof then