<% dim pagecount,page,Spage,Epage,recordcount,i page = request.querystring("page") if page = "" or IsNull(page) then page = 1 if not IsNumeric(page) then page = 1 page = Cint(page) set rs = server.CreateObject ("Adodb.recordset") sql="SELECT ProduceInfo.*, ProduceType.ProduceTypeName FROM ProduceInfo left JOIN ProduceType ON ProduceInfo.ProduceTypeId = ProduceType.ProduceTypeId where ProduceInfo.IsNewProduce = 'تا' and ProduceInfo.IsUnder='·ٌ' order by ProduceInfo.UpdateTime desc " rs.open sql,conn,1,1 recordcount = RS.RecordCount RS.PageSize = 1 pagecount = RS.PageCount if page < 1 then page = 1 elseif page > pagecount then page = pagecount end if %>
<% If Not RS.EOF then If recordcount > 0 then RS.AbsolutePage = page End If End If %>