%@LANGUAGE="VBSCRIPT"%> <%option explicit%> <% '******code for catalog results start************** dim strLocation,strRange,strOwnership,strType,strMessage,strQuery,rsSearch,intInitial,strSQL,strImage strLocation=Request.QueryString("l") strRange=Request.QueryString("r") strOwnership=Request.QueryString("o") strType=Request.QueryString("t") strQuery=Request.Form("rdoQuery")' if Form submitted then get value form objects If strQuery="" then strQuery=Request.QueryString("qt")' if Pagination link is used then get value from QueryString End If If strQuery="" then strQuery="OR"'To set Default query type as ORed query End If strMessage="" set rsSearch = Server.CreateObject("adodb.recordset") rsSearch.cursortype=3 rsSearch.cursorlocation=3 intInitial=0 strMessage="" strSQL="select * from tblProperties " if strLocation <> "" then if intInitial=1 then strMessage= strMessage&" "&strQuery& " Location: "&strLocation strSQL=strSQL & " "&strQuery&" prop_location = '" & replace(trim(strLocation),"'","`")& "'" else intInitial=1 strMessage= strMessage& "Location: "&strLocation strSQL=strSQL & "where prop_location = '" & replace(trim(strLocation),"'","`")& "'" end if end if if strOwnership <> "" then if intInitial=1 then strMessage= strMessage &" "&strQuery& " Ownership: "&strOwnership strSQL=strSQL & " "&strQuery&" prop_ownership='" & trim(strOwnership)& "'" else intInitial=1 strMessage= strMessage&"Ownership: "&strOwnership strSQL=strSQL & "where prop_ownership='" & trim(strOwnership)& "'" end if end if if strType <> "" then if intInitial=1 then strMessage= strMessage&" "&strQuery& " Type: "&strType strSQL=strSQL & " "&strQuery&" prop_type='" & trim(strType)& "'" else intInitial=1 strMessage= strMessage&"Type: "&strType strSQL=strSQL & "where prop_type='" & trim(strType)& "'" end if end if if strRange <>"" then dim loc,strurange,strlrange loc = instrRev(strRange,"-") strurange = mid(strRange, loc+1, len(strRange) - loc) strlrange=mid(strRange,1,loc-1) if intInitial=1 then strMessage= strMessage&" "&strQuery& " Price Range: "&strRange strSQL=strSQL&" "&strQuery&" prop_price between "&clng(strlrange)&" and "&clng(strurange) else intInitial=1 strMessage= strMessage& "Price Range: "&strRange strSQL=strSQL&"where prop_price between "&clng(strlrange)&" and "&clng(strurange) end if end if 'if intInitial=1 then ' strSQL=strSQL & " and prop_status='Active'" ' else ' intInitial=1 ' strSQL=strSQL & "where prop_status='Active'" 'end if rsSearch.open strSQL,objConn,3,3 '*******code for catalog results end*************** '*****************Code for Paging******************* if not rsSearch.eof then dim intcp,intRowCount dim currpage currpage=request.QueryString("currpage") intcp=cint(currpage) if currpage = "" then intcp=1 end if 'if Session("numres")<>"" then 'rsSearch.pagesize=cint(Session("numres")) 'else rsSearch.pagesize=2 'end if rsSearch.absolutepage=intcp intRowCount=0 end if '***************End Code for Paging***************** %>