%
ServerPath = "d:\domains\india150\theindiatravel"
strProvider="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & ServerPath & "\theindiatravel.mdb"
state = request("state")
keyword = request("keyword")
word = split(keyword, " ")
countar = ArrayCount(word)
condition = MakeCondition(word,countar)
page = request("page")
if page = "" then
page=1
end if
if state <> "" then
if keyword <> "" then
searchtext = keyword
end if
if keyword = "" then
strQuery = "select * from travelagents where state='" & state & "' order by plan, date desc"
else
strQuery = "select * from travelagents where state='" & state & "' and (" & condition & ") order by plan, date desc"
end if
else
if keyword <> "" then
searchtext = keyword
end if
if keyword = "" then
strQuery = "select * from travelagents order by plan, date desc"
else
strQuery = "select * from travelagents where " & condition & " order by plan, date desc"
end if
end if
Set rstAgents = Server.CreateObject("ADODB.recordset")
rstAgents.CursorType = 3
rstAgents.CursorLocation = 3
rstAgents.LockType = 3
rstAgents.Open strQuery, strProvider
if rstAgents.recordcount > page * 10 then
startresult = ((page-1) * 10) + 1
endresult = page * 10
else
startresult = ((page-1) * 10) + 1
endresult = rstAgents.recordcount
end if
if page > 1 then
rstAgents.movefirst
for i = 1 to ((page-1) * 10) + 1
rstAgents.movenext
next
end if
%>
Tour Operator & Travel Agent Search With Theindiatravel.com, Become A Travel Agent!, Travel Agent Websites, Free Webpages For Travel Agents, Websites For Travel Agents, Travel Agent Search, Travel Agents From Delhi, Tour Operators From Delhi, Hotels In Delhi, Hotel Booking Delhi, 5 Star Hotels In Delhi, 4 Star Hotels In Delhi, Heritage Hotels In Delhi, Taj Group Of Hotels, Oberoi Group Of Hotels, Jay Pee Group Of Hotels, Holiday Inn Hotel Chain
<%
function ArrayCount(word)
dim count1
count1 = 0
for each art in word
count1 = count1 + 1
next
ArrayCount = count1
end function
function MakeCondition(word,length)
dim count1
dim condition
condition = ""
for count1 = 0 to length - 1
if count1 <> length-1 then
condition = condition & "companyname like '%" & word(count1) & "%' or "
condition = condition & "city like '%" & word(count1) & "%' or "
condition = condition & "state like '%" & word(count1) & "%' or "
condition = condition & "services like '%" & word(count1) & "%' or "
else
condition = condition & "companyname like '%" & word(count1) & "%' or "
condition = condition & "city like '%" & word(count1) & "%' or "
condition = condition & "state like '%" & word(count1) & "%' or "
condition = condition & "services like '%" & word(count1) & "%'"
end if
next
MakeCondition = condition
end function
%>