% if request.queryString("Submit") = "Create a Wish List" then response.redirect("buyerlogin.asp") end if if request.queryString("Submit") = "Whole Wish List" then set rs = server.CreateObject("ADODB.recordset") strsql = "Select * from buyerslisting order by dist_no" rs.Open strsql , conn , 3 , 3 end if if request.queryString("Submit") = "Search" then if not request.queryString("hdb")="" and not request.queryString("pte")="" then set rs = server.createObject("ADODB.recordset") str = "Select * from buyerslisting where type_hdb = '"&trim(request.queryString("hdb"))&"' or type_pte='"&trim(request.queryString("pte"))&"' and disabled = 0 order by dist_no" rs.open str, conn, 3, 3 if rs.recordcount = 0 then msg = "null" end if elseif not request.queryString("hdb") = "" then set rs = server.createObject("ADODB.recordset") str = "Select * from buyerslisting where type_hdb = '"&trim(request.queryString("hdb"))&"' and disabled = 0 order by dist_no" rs.open str, conn, 3, 3 if rs.recordcount = 0 then msg = "null" end if elseif not request.queryString("pte") = "" then set rs = server.createObject("ADODB.recordset") str = " Select * from buyerslisting where type_pte='"&trim(request.queryString("pte"))&"' and disabled = 0 order by dist_no" rs.open str, conn, 3, 3 if rs.recordcount = 0 then msg = "null" end if else set rs = server.CreateObject("ADODB.recordset") strsql = "Select * from buyerslisting where disabled = 0 order by dist_no" rs.Open strsql , conn , 3 , 3 end if end if if request.queryString("Submit") = "" then set rs = server.CreateObject("ADODB.recordset") strsql = "Select * from buyerslisting where disabled = 0 order by dist_no" rs.Open strsql , conn , 3 , 3 end if dim counter counter = 0 '--------------------- ' code for pagination '--------------------- Dim thePageNo , thePageSize , maxPages, maxRecords , recordStatus thePageNo = request("whichpage") If thePageNo="" then thePageNo=1 End if thePageSize=request("pagesize") If thePageSize="" then thePageSize=20 End if if rs.RecordCount <> 0 then rs.MoveFirst rs.PageSize = thePageSize maxPages = cint(rs.PageCount) maxRecords = cint(rs.PageSize) rs.AbsolutePage = thePageNo recordStatus = 0 bgcolor="#ffffff" end if if request("no") = "" then no = 1 else no = request("no") end if %>