"
response.write " Home / Trade Fair / "
response.write "Trade Fair Search Result : " dim flag flag=true 'if request.querystring("currpage")="" then if request.form("Country") <> "" then Country = request.form("Country") Category = request.form("Category") startdate = request.form("startdate") enddate = request.form("enddate") year1 = request.form("year1") year2 = request.form("year2") if request.form("currpage") <> "" then currpage = request.form("currpage") else Country = request.querystring("Country") startdate = request.querystring("startdate") enddate = request.querystring("enddate") Category = request.querystring("Category") year1 = request.querystring("year1") year2 = request.querystring("year2") end if if flag then accessdb="fair.mdb" myDSN="DRIVER={Microsoft Access Driver (*.mdb)};" myDSN=myDSN & "DBQ=" & server.mappath(accessdb) Set db=Server.CreateObject("ADODB.Connection") db.open myDSN if country = "0" then country1 = "All " else country1 = country end if if Category = "0" then Category1 = "All " else Category1 = Category end if if int(startdate) = 1 then month1 = "January" if int(startdate) = 2 then month1 = "February" if int(startdate) = 3 then month1 = "March" if int(startdate) = 4 then month1 = "April" if int(startdate) = 5 then month1 = "May" if int(startdate) = 6 then month1 = "June" if int(startdate) = 7 then month1 = "July" if int(startdate) = 8 then month1 = "August" if int(startdate) = 9 then month1 = "September" if int(startdate) = 10 then month1 = "October" if int(startdate) = 11 then month1 = "November" if int(startdate) = 12 then month1 = "December" if int(enddate) = 1 then month2 = "January" if int(enddate) = 2 then month2 = "February" if int(enddate) = 3 then month2 = "March" if int(enddate) = 4 then month2 = "April" if int(enddate) = 5 then month2 = "May" if int(enddate) = 6 then month2 = "June" if int(enddate) = 7 then month2 = "July" if int(enddate) = 8 then month2 = "August" if int(enddate) = 9 then month2 = "September" if int(enddate) = 10 then month2 = "October" if int(enddate) = 11 then month2 = "November" if int(enddate) = 12 then month2 = "December" response.write " " response.write "The Search Result For "&Category1&" Category " response.write ""&country1&" Country Month between "&month1&" "&year1&" AND "&month2&" "&year2&"." if country <> "0" then if Category <> "0" then sql="Select * from Trade where contry like '%"&country&"%' and year Between "&year1&" and "&year2&" and month Between "&int(startdate)&" and "&int(enddate)&" and Code in(select distinct(Code) from cat where cat_id in(select cat_id from category where cat_id ="&Category&")) order by month" else sql="Select * from Trade where contry like '%"&country&"%' and year Between "&year1&" and "&year2&" and month Between "&int(startdate)&" and "&int(enddate)&" order by month" end if else if Category <> "0" then sql="Select * from Trade where Code in(select distinct(Code) from cat where cat_id in(select cat_id from category where cat_id ="&Category&")) and year Between "&year1&" and "&Year2&" and month Between "&int(startdate)&" and "&int(enddate)&" order by month" else sql="Select * from Trade where year Between "&year1&" and "&Year2&" and month Between "&int(startdate)&" and "&int(enddate)&" order by month" end if end if set r1=Server.CreateObject("adodb.recordset") r1.cursortype=3 r1.cursorlocation=3 r1.open sql, db, adopenstatic r1.pagesize=20 r1.cachesize=20 pages=r1.pagecount count=r1.recordcount if count=0 then response.write " No Trade fair matches found for your search Click Back to Go back No Trade fair matches found for your search"
else
' response.write " Trade Fairs : "
' response.write start&" to "&finish
' response.write " of "&count
'' response.write " "
productdisplay
end if
end if
db.close
set db=nothing
response.write " |
" response.write "" response.write "Search Result for Trade Fairs : "&start&" to "&finish&" of "&count&" | |
"
response.write " | |
" 'response.write " " 'response.write "Profile = "&r1("Profile")&" | |
" response.write " " response.write "Profile : | " response.write "" response.write lcase(r1("Profile"))&" |
" response.write " " response.write "Country : | " response.write "" response.write lcase(r1("contry"))&" |
" response.write " " response.write "Venue : | " response.write "" response.write lcase(r1("Venue"))&" |
" response.write " " response.write "Date : | " response.write "" response.write r1("startdate")&" to "&r1("enddate")&" |
" response.write " " response.write "Organiser : | " response.write ""
if r1("organizer") <> "" then response.write lcase(r1("organizer"))&" " response.write lcase(r1("organizeraddress"))&" |
" response.write " " response.write "Tel : | " response.write "" response.write r1("Tel")&" |
" response.write " " response.write "Fax : | " response.write "" response.write r1("Fax")&" |
" response.write " " response.write "WebSite : | " response.write "" response.write ""&lcase(r1("website"))&" |
" response.write " " response.write "Email : | " response.write "" response.write " "&lcase(r1("Email"))&" |
" response.write " |
"
response.write "Result Page : "
if start>1 then
response.write ""&"Previous " &""
end if
if currpage<10 then
if pages<=10 then
s1=pages
else
s1=10
end if
for i=1 to s1
if i=currpage then
response.write i&" "
else
response.write ""&i&" "
end if
next
elseif currpage=pages then
for i=pages-4 to pages
if i=currpage then
response.write i&" "
else
response.write ""&i&" "
end if
next
end if
if currpage |