<%
tempsql=""
temppage=""
key=request("key")
if key<>"" then
tempsql=tempsql&" and [product_name] like '%"& key &"%'"
temppage=temppage&"&key="&key
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [cp0_product] where 1=1 "& tempsql &" order by [product_index] asc,[id]"
rs.open sql,conn,1,1
if not rs.eof then
pages rs,12
for i=1 to Records
%>
<%
rs.movenext
next
end if
rs.close : set rs=nothing
%>
<% If totalpages>1 Then %><%call PageList(temppage)%>
<%end if %>