%
'If the directory selected is not Country then redirect it to the
'relevant page.
'ON ERROR RESUME NEXT
CONST EXPORTER_PATH = "/Search/directory/results_diff_dirs_exp.asp"
CONST MANUFACTURER_PATH = "/Search/directory/results_diff_dirs_Manuf.asp"
CONST COMPANY_PATH = "/Search/directory/results_diff_dirs_Company.asp"
CONST IMPORTER_PATH = "/Search/directory/results_diff_dirs.asp"
CONST COUNTRY_QUERY_WITH_OUT_WORLD = " Select Country_Master.Country_Name, Country_Master.Country_Code from Country_Master,Country_Profile where ltrim(rtrim(Country_name)) not in ('World') and country_master.country_code = country_profile.country_code order by country_name"
Const ERROR_PATH = "/inc/commoninc/error.asp?errno="
'---------Pagination Related Variables declarations-----------'
dim NO_OF_REC_PER_PAGE
NO_OF_REC_PER_PAGE = Cint(Application("numrecords"))
'NO_OF_REC_PER_PAGE = 2
NO_OF_PAGES_PER_SET = 10
'--------Pagination related Variables Declaration Ends--------'
' Pagination Code
if Request.QueryString("pgno")="" then
intPageno=1
else
intpageNo= Cint(Request.QueryString("pgno"))
end if
' End Pagination Code
'-----------------------------------------------------
'dim NO_OF_REC_PER_PAGE
'NO_OF_REC_PER_PAGE = Cint(Application("numrecords"))
dim strDirName
strDirName = ucase(trim(Request.Form("cboDir")))
dim strKeyword
'change
dim lngCountryCode
dim lngProductCode
strKeyWord = ""
lngCountryCode = 0
lngProductCode = 0
dim txtKeyword
txtKeyword = ""
if trim(Request.Form("txtKeyword")) <> "" then
txtKeyword = trim(server.htmlEncode(Request.Form("txtKeyword")))
strKeyWord = trim(Request.Form("txtKeyword"))
else
txtKeyword = trim(server.htmlEncode(Request.querystring("crt")))
strKeyWord = trim(Request.querystring("crt"))
end if
'--------------Redirection Code-----------------------------'
'if page is accessed directly then redirect it to
'the main first page default.asp.
If (trim(Request.Form("cboCtry")) = "") And (trim(Request.querystring("CtryCd") = "")) then
Response.Redirect ERROR_PATH
end if
'If (trim(Request.Form("cboProd")) = "") And (trim(Request.querystring("ProdCd") = "")) then
' Response.Redirect ERROR_PATH
'end if
'--------------Redirection Code is Over----------------------'
'change
'Country Code
if trim(Request.Form("cboCtry")) <> "" then
lngCountryCode = Clng(trim(Request.Form("cboCtry")))
else
lngCountryCode = Clng(trim(Request.querystring("CtryCd")))
end if
'In case of Country , Product Catg is not entertained.
'change
'Product Code
'if trim(Request.Form("cboProd")) <> "" then
' lngProductCode = Clng(trim(Request.Form("cboProd")))
'else
' lngProductCode = Clng(trim(Request.querystring("ProdCd")))
'end if
'lngProductCode = -1 'Only in case of Country
'Response.Write "
lngProductCode = " & lngProductCode
dim strQryString
strQryString = ""
'strQryString = "?Crt=" & server.urlEncode(strKeyWord) & "&CtryCd=" & lngCountryCode & "&ProdCd=" & lngProductCode
strQryString = "?Crt=&CtryCd=-1&ProdCd=-1&fromdiff=Y"
Select case strDirName
case "E" 'EXPORTER
Response.redirect EXPORTER_PATH & strQryString
case "M" 'MANUFACTURER
Response.redirect MANUFACTURER_PATH & strQryString
case "C" 'COMPANY
Response.redirect COMPANY_PATH & strQryString
case "I" 'IMPORTER
Response.redirect IMPORTER_PATH & strQryString
case "P" 'PRODUCT
Response.redirect PRODUCT_PATH & strQryString
end select
strDirName = "Country"
'To be posted.
dim strCountry_Name
dim strProductCatgName
strCountry_Name = ""
strProductCatgName = ""
%>
<%
'Security Code.........
dim strPageCode
strPageCode = "442Dr05"
%>