<% 'Security Code......... dim strPageCode strPageCode = "442Dr01" %> <% 'Since this Page and can not be accessed by any user 'so no Security file is required in this and all 'subsequent pages. dim strKeywordLabel strKeywordLabel = "" 'Changed on 04th Aug dim strDirName strDirName = ucase(trim(Request.Form("cboDir"))) if trim(Request.Form("hdblndirchange")) <> "Y" then 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 COUNTRY_PATH = "/Search/directory/results_diff_dirs_Country.asp" CONST IMPORTER_PATH = "/Search/directory/results_diff_dirs.asp" dim strKeyword 'change dim lngCountryCode dim lngProductCode strKeyWord = "" lngCountryCode = 0 lngProductCode = 0 dim txtKeyword txtKeyword = "" 'Change in Code 'if the user has come to this page via main page or this page itself. 'if (trim(Request.Form("hdFromMainfrm")) = "Y" And trim(Request.QueryString("Mainfrm")) = "Y") then if trim(Request.Form("txtKeyword")) <> "" then txtKeyword = trim(server.htmlEncode(Request.Form("txtKeyword"))) strKeyWord = trim(Request.Form("txtKeyword")) end if 'change 'Country Code if trim(Request.Form("cboCtry")) <> "" then lngCountryCode = Clng(trim(Request.Form("cboCtry"))) end if 'Response.Write "lngCountryCode = " & lngCountryCode 'change 'Product Code if trim(Request.Form("cboProd")) <> "" then lngProductCode = Clng(trim(Request.Form("cboProd"))) end if dim strQryString strQryString = "" 'strQryString = "?Crt=" & server.urlEncode(strKeyWord) & "&CtryCd=" & lngCountryCode & "&ProdCd=" & lngProductCode strQryString = "?Crt=" & strKeyWord & "&CtryCd=" & lngCountryCode & "&ProdCd=" & lngProductCode & "&Search=Search" 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 "T" 'COUNTRY Response.redirect COUNTRY_PATH & strQryString case "I" 'Importer Response.redirect IMPORTER_PATH & strQryString case "P" 'PRODUCT Response.redirect PRODUCT_PATH & strQryString end select else Select case strDirName case "E" 'EXPORTER strKeywordLabel = "Keywords" case "M" 'MANUFACTURER strKeywordLabel = "Keywords" case "C" 'COMPANY strKeywordLabel = "Keywords" case "T" 'COUNTRY strKeywordLabel = "Keywords (Country Name, Language)" case "I" 'Importer strKeywordLabel = "Keywords" case "P" 'PRODUCT strKeywordLabel = "Keywords" end select end if %> ITPO - Search from Different Directories
<% dim NavigArray() Redim NavigArray(1,0) NavigArray(0,0) = "/search/directory/" NavigArray(1,0) = "Search From Different Directories" Redim Preserve NavigArray(1,1) NavigArray(0,1) = "" NavigArray(1,1) = "Search" Proc_TO_Display_NavigationPath NavigArray, "U" %>
Directory Search
<% dim strDirVal strDirVal = "" 'Response.Write Request.form("cboDir") if trim(Request.form("cboDir")) <> "" then strDirVal = trim(Request.form("cboDir")) else strDirVal = "I" end if %> <% dim rs dim strQry dim strQryProdCatg strQry = "" dim strCaption dim strLabel strQryProdCatg = "" strLabel = "" strCaption = "" set rs = server.CreateObject("adodb.recordset") Select Case strDirVal case "I" 'Importer strQry = QRY_COUNTRY_IMPORTER strCaption = "-ALL-" strLabel = "Country" strQryProdCatg = QRY_PRODUCT_IMPORTER case "E" 'Exporter 'strQry = "Select City_Name,City_Code from City_Master" & _ ' " Order by City_Name" strQry = QRY_CITY_EXPORTER_SEARCH_DIFF_DIR strCaption = "-ALL-" strLabel = "City" strQryProdCatg = QRY_PRODUCT_CATG_EXP_PRODUCTS case "M" 'Manufacturer 'strQry = "Select City_Name,City_Code from City_Master" & _ ' " Order by City_Name" strQry = QRY_CITY_MANUF_SEARCH_DIFF_DIR strCaption = "-ALL-" strLabel = "City" strQryProdCatg = QRY_PRODUCT_CATG_MANUF case "C" 'Company strQry = QRY_CITY_COMPANY_SEARCH_DIFF_DIR strCaption = "-ALL-" strLabel = "Country" strQryProdCatg = QRY_PRODUCT_CATG_COMPANY case "T" 'Country strQry = COUNTRY_QUERY_WITH_OUT_WORLD strCaption = "-ALL-" strLabel = "Country" end select set rs = objConn.execute(strQry) %> <%if Ucase(trim(Request.form("cboDir"))) <> "T" then 'Country%> <%end if%>
Directory
<%=strLabel%>
Product Category
<% strQry = "Select Product_desc,Product_Code from product_directory" & _ " Order by Product_desc" set rs = objConn.execute(strQryProdCatg) %>
Keywords
Search Tips
<% if not rs is nothing then if rs.state <> 0 then rs.close end if end if %> <% function SelectOption(optionVal,SelectedDirVal) if trim(SelectedDirVal) = "" then SelectOption = " Selected" end if Select case SelectedDirVal case optionVal SelectOption = " Selected" end select end function %>