<% dim keyword dim sort_id keyword=request("keyword") sort_id=request("sort_id") if sort_id<>"" then sqlwhere=sqlwhere &" and sort_id="&sort_id&"" if keyword<>"" then sqlwhere=sqlwher &" and shop_name like '%"&keyword&"%'" Set rs=Server.CreateObject("ADODB.RecordSet") strsql="select * from Product2 where shop_id<>0 "&sqlwhere&" order by dateandtime desc" rs.Open strsql,conn,1,1 if rs.eof then response.write "" else rs.movefirst if not isempty(request("page")) then pagecount=cint(request("page")) else pagecount=1 end if rs.pagesize=12 if pagecount>rs.pagecount or pagecount<=0 then pagecount=1 end if rs.AbsolutePage=pagecount %> <% j=1 do while not (rs.eof or err) if (j mod 4)=1 then response.write "" end if %> <% if (j mod 4)=0 then response.write "" end if j=j+1 rs.moveNext if j>12 then exit do loop end if %>
<%If rs("Pic")<>"" then%> ">" alt="<%=left(rs("shop_name"),12)%>" border='0' align='center' onload='javascript:MyImage(this);' /> <%Else%> <%=left(rs("shop_name"),20)%> <%End If%>
"border="0" rel=lyteframe[catalog] title="<%=left(rs("shop_name"),12)%>"><%=left(rs("shop_name"),20)%>

<% if rs.pagecount>1 then response.Write "第"&pagecount&"页/共"&rs.pagecount&"页  " if pagecount>=10 then response.write"<<  " end if q=(cstr(pagecount)-1)\10 if q<0 then q=1 end if p=(q*10)+1 do while p<((q*10)+11) If p=pagecount Then Response.Write p&"  " Elseif p<=rs.pagecount then Response.Write ""& p &"  " End If p=p+1 loop A=rs.pagecount if (A mod 10)=0 then A=rs.pagecount-1 end if if pagecount=<(A\10)*10 then response.write">>" end if End If%>