<%'If the directory selected is not Importer then redirect it to the 'relevant page. 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 COUNTRY_QUERY_WITH_OUT_WORLD = " Select Country_Name, Country_Code from Country_Master where ltrim(rtrim(Country_name)) not in ('World') 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 = "" '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")) 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 'Response.Write "lngCountryCode = " & lngCountryCode 'change 'Product Code if trim(Request.Form("cboProd")) <> "" then lngProductCode = Clng(trim(Request.Form("cboProd"))) else lngProductCode = Clng(trim(Request.querystring("ProdCd"))) end if '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 "T" 'COUNTRY Response.redirect COUNTRY_PATH & strQryString case "P" 'PRODUCT Response.redirect PRODUCT_PATH & strQryString end select 'else 'User has come from Other pages like Exporter, Manufacturer, he will be given default 'values. ' txtKeyword = "" ' strKeyWord = "" ' ' lngCountryCode = -1 ' lngProductCode = -1 'end if strDirName = "Importer" 'To be posted. dim strCountry_Name dim strProductCatgName strCountry_Name = "" strProductCatgName = "" %> <% 'Security Code......... dim strPageCode strPageCode = "442Dr02" %> ITPO - Search Results For Importer Directory
<% 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) = "" if (trim(Request.Form("Search"))) <> "" Or (trim(Request.QueryString("Search") <> "")) then NavigArray(1,1) = "Importer's Search Result" else NavigArray(1,1) = "Importer's Search" end if Proc_TO_Display_NavigationPath NavigArray, "U" %>
Importers Search
<% dim strDirVal strDirVal = "" strDirVal = "I" 'Importer %> <% strKeyWord = WorkingOnSpecialCharacters_IN_Keywords(strKeyWord) %>
Directory
Country
<% dim rs dim strQry strQry = "" dim strCaption dim strLabel strLabel = "" strCaption = "" set rs = server.CreateObject("adodb.recordset") 'strDirVal = "I" Select Case strDirVal case "I" 'Importer strQry = QRY_COUNTRY_IMPORTER strCaption = "-ALL-" strLabel = "Country" case "E" 'Exporter strQry = "Select City_Name,City_Code from City_Master" & _ " Order by City_Name" strCaption = "-ALL-" strLabel = "City" case "M" 'Manufacturer strQry = COUNTRY_QUERY_WITH_OUT_WORLD strCaption = "-ALL-" strLabel = "Country" case "C" 'Company strQry = COUNTRY_QUERY_WITH_OUT_WORLD strCaption = "-ALL-" strLabel = "Country" case "T" 'Country strQry = COUNTRY_QUERY_WITH_OUT_WORLD strCaption = "-ALL-" strLabel = "Country" end select set rs = objConn.execute(strQry) %>
Product Category
<% strQry = "Select Product_desc,Product_Code from product_directory" & _ " Order by Product_desc" set rs = objConn.execute(QRY_PRODUCT_IMPORTER) %>
Keywords
Search Tips
<%if Request.QueryString("fromDiff") = "" then %> <% if rs.State <> 0 then rs.Close end if strQry = "" dim bln_NotEmptyAfterReplacements bln_NotEmptyAfterReplacements = 1 'Conditions with Keyword involvement ie Full - Text Search . if trim(strKeyWord) <> "" then 'For Search the words entered by the user will be taken as 'different members of an Array and then where Clause will be made 'against those words with ORing them . dim arrCrt if strKeyWord <> "" then 'Removing All the "," , "'", and ";" from the string. 'rules for OR ing or taking Keywords as a single word. strKeyWord = trim(strKeyWord) strKeyWord = replace(strKeyWord,"'","",1,-1,1) strKeyWord = replace(strKeyWord,","," ",1,-1,1) strKeyWord = replace(strKeyWord,";"," ",1,-1,1) strKeyWord = replace(strKeyWord,":","",1,-1,1) 'Response.Write "strKeyWord = " & strKeyWord if trim(strKeyWord) <> "" then dim intKeyWordType intKeyWordType = 0 intKeyWordType = DoubleQuotes_Processing(strKeyWord) if (intKeyWordType = 2 ) Or (intKeyWordType = 3 ) then arrCrt = split(strKeyWord," ",-1,1) end if else bln_NotEmptyAfterReplacements = 0 end if end if 'When Country and Product Catg is not selected. if (lngCountryCode = -1) And (lngProductCode = -1) then strQry = "Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from " & _ " Importer_Master IM,Country_Master CM where " & _ " IM.Country_Code = CM.Country_Code " & _ " And CONTAINS(IM.*,'" elseif (lngCountryCode <> -1) And (lngProductCode = -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from Importer_Master " & _ " IM,Country_Master CM where " & _ " IM.Country_Code = CM.Country_Code " & _ " and IM.Country_Code = " & lngCountryCode & _ " And CONTAINS(IM.*,'" elseif (lngCountryCode = -1) And (lngProductCode <> -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from " & _ " Importer_Master IM,Country_Master CM, " & _ " importer_product_detail IP " & _ " where IM.Country_Code = CM.Country_Code " & _ " And IM.Importer_Code = IP.Importer_Code " & _ " And IP.Prod_Code = " & lngProductCode & " " & _ " And CONTAINS(IM.*,'" elseif (lngCountryCode <> -1) And (lngProductCode <> -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from " & _ " Importer_Master IM,Country_Master CM, " & _ " importer_product_detail IP " & _ " where IM.Country_Code = CM.Country_Code " & _ " And IM.Importer_Code = IP.Importer_Code " & _ " And IM.Country_Code = " & lngCountryCode & _ " And IP.Prod_Code = " & lngProductCode & _ " " & _ " And CONTAINS(IM.*,'" end if 'If there are multiple keywords separated by a delimiter 'viz. a space..then Where Clause will be constructed in a diff. 'way. dim strWhereClause strWhereClause = "" if (intKeyWordType = 2 ) Or (intKeyWordType = 3 ) then if Isarray(arrCrt) then dim I dim strWord strWord = "" for I = 0 to ubound(arrCrt) strWord = trim(arrCrt(i)) if strWord <> "" then strWhereClause = strWhereClause & """" & strWord & "*""" & " OR " end if next end if strWhereClause = trim(strWhereClause) 'Removing the unwanted OR word from the last . if strWhereClause <> "" then strWhereClause = trim(left(strWhereClause,len(strWhereClause) - 2)) end if elseif intKeyWordType = 1 then 'For single Word strWhereClause = strKeyWord strWhereClause = trim(strWhereClause) end if 'Response.Write "
where clause = " & strWhereClause strQry = strQry & strWhereClause & "')" 'Response.Write "
qry = " & strQry 'Conditions without Keyword involvement ie Full - Text Search . elseif (trim(strKeyWord) = "") And (lngCountryCode = -1) And (lngProductCode = -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, CM.Country_Name, " & _ " IM.Importer_Code from Importer_Master IM, " & _ " Country_Master CM " & _ " where IM.Country_Code = CM.Country_Code " elseif (trim(strKeyWord) = "") And (lngCountryCode <> -1) And (lngProductCode = -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from " & _ " Importer_Master IM,Country_Master CM " & _ " where IM.Country_Code = CM.Country_Code " & _ " and IM.Country_Code = " & lngCountryCode elseif (trim(strKeyWord) = "") And (lngCountryCode = -1) And (lngProductCode <> -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from " & _ " Importer_Master IM,Country_Master CM, " & _ " importer_product_detail IP " & _ " where IM.Importer_Code = IP.Importer_Code " & _ " and IM.Country_Code = CM.Country_Code " & _ " and IP.Prod_Code = " & lngProductCode & _ " " elseif (trim(strKeyWord) = "") And (lngCountryCode <> -1) And (lngProductCode <> -1) then strQry = " Select distinct IM.Importer_Name,IM.Other_inf, " & _ " CM.Country_Name,IM.Importer_Code from Importer_Master " & _ " IM,Country_Master CM, " & _ " importer_product_detail IP " & _ " where IM.Importer_Code = IP.Importer_Code and " & _ " IM.Country_Code = CM.Country_Code and " & _ " IP.Prod_Code = " & lngProductCode & " " & _ " And IM.Country_Code = " & lngCountryCode end if strQry = strQry & " Order by IM.Importer_Name " '----------------------------------------------- 'variables defined for holding the Column header 'values which will vary according to the 'Directory selected by the user for search.. dim ColHead1 dim ColHead2 dim ColHead3 dim ColHead4 ColHead1 = "" ColHead2 = "" ColHead3 = "" ColHead4 = "" ColHead1 = "Importer Name" ColHead2 = "Country" ColHead3 = "Products Imported Details" 'ColHead4 = "Products Imported" '----------------------------------------------- '********* 'set rs = server.CreateObject("adodb.recordset") rs.ActiveConnection = objConn rs.CursorType = AdOpenStatic rs.LockType = adLockOptimistic if bln_NotEmptyAfterReplacements = 1 then 'Error Handling in the Search : especially of Ignored Words. dim EncodedSectionName EncodedSectionName = "Search from Different Directories - Global Importer" On error resume next rs.Open strQry 'Response.Write strQry if cint(Err.number)=-2147217900 then Response.Redirect "/inc/commoninc/error.asp?section=" & EncodedSectionName & "&errorno=M11" end if on error goto 0 '---------Error Handling Ends----------' 'Response.Write strQry '-----------Pagination Code-------------' dim PgNo PgNo = 0 if not ( rs.EOF and rs.BOF ) then rs.PageSize = NO_OF_REC_PER_PAGE dim intPageCount intPageCount = rs.PageCount rs.AbsolutePage = intPageno end if '------------Pagination Related Code ends---------------' end if %> <% dim StartRecNo dim EndRecNo dim rCount rCount = 0 if Not ( rs.EOF and rs.BOF ) then rCount = rs.RecordCount StartRecNo = 0 EndRecNo = 0 ReturnRecNumbers intPageNo, StartRecNo, EndRecNo, rCount end if 'Latest changes 27th July dim strMsg dim strNoDataMsg strMsg = "" dim strMsgIMP strMsgIMP = "" strNoDataMsg = "" strNoDataMsg = Produce_NO_DATA_FOUND_String() strMsg = Produce_SEARCH_FOR_String() dim strSrchCaption strSrchCaption = "" 'strSrchCaption = strMsg strSrchCaption = replace(strMsg,"*","",1,-1,0) strSrchCaption = replace(strSrchCaption,"" & chr(34) & "","",1,-1,0) '---changes finished------' %>
<%if rs.RecordCount > 0 then %> <%=StartRecNo%> to <%=EndRecNo%> of <%=rCount%> Matching Records <%else%> 0 Matching Records <%End if %>
<%=strSrchCaption%> 
<%if bln_NotEmptyAfterReplacements = 1 then dim bln_NoRecord bln_NoRecord = 1 if not ( rs.EOF and rs.BOF ) then %> <% bln_NoRecord = 0 'do while not rs.EOF for i = 1 to rs.PageSize %> <% rs.MoveNext If rs.EOF Then Exit For Next Else %> <% end if else%> <% end if %>
Importer Name
Country
Products Imported Details
<%=rs("country_Name")%> 
<%=rs("Other_Inf")%> 
<% strNoDataMsg = replace(strNoDataMsg,"*","",1,-1,0) strNoDataMsg = replace(strNoDataMsg,"" & chr(34) & "","",1,-1,0) %> <%=strNoDataMsg%>
<% strNoDataMsg = replace(strNoDataMsg,"*","",1,-1,0) strNoDataMsg = replace(strNoDataMsg,"" & chr(34) & "","",1,-1,0) %> <%=strNoDataMsg%>
<% if not (rs.EOF and rs.BOF ) then if rs.RecordCount > NO_OF_REC_PER_PAGE then %>
<% 'Code specific to a section strCrt = "" strCrt = server.URLEncode(trim(strKeyWord)) '--Pagination code--' call pagination(rs.pagecount , strKeyword) %>
<% end if end if %> <%end if%>
<% if not rs is nothing then if rs.state <> 0 then rs.close end if end if %> <% function GetProducts(Code) dim rsProd dim strQry dim strListProducts strListProducts = "" strQry = "" strQry = "Imp_Products " & Code & ",'I'" set rsProd = objConn.execute(strQry) 'Calling Stored Procedure if not ( rsProd.eof and rsProd.bof) then do while not rsProd.eof strListProducts = strListProducts & rsProd(0) & ", " rsProd.movenext loop strListProducts = trim(strListProducts) strListProducts = left(strListProducts,len(strListProducts)-1) end if GetProducts = strListProducts end function %> <% 'This function removes in between double 'quotes from the string having double quotes. 'eg. "ajay" "singh" will be returned as "ajay singh". 'even if there is a single quote like "ajay singh, it 'will be returned as "ajay singh". 'So three cases will be entertained in this function '1) "ajay" "singh" will be returned as "ajay singh". '2) "ajay singh, it will be returned as "ajay singh". '3) ajay "singh" it will be returned as ajay singh to be ORed. function DoubleQuotes_Processing(strKeyWords) 'Checking for the presence of first double quote. dim intPos1 dim intPos2 dim NumberToBEPassed intPos1 = 0 intPos2 = 0 NumberToBEPassed = -1 strKeyWords = trim(strKeyWords) intPos1 = instr(1,strKeyWords,"" & chr(34) & "",0) if intPos1 > 0 and intPos1 = 1 then 'ie the first Character is a Double quote ..eg "ajay singh " 'Changed on 6th Aug 01 'strKeyWords = trim(replace(strKeyWords,"" & chr(34) & "","",1,-1,0)) 'Putting an * after exact phrase removes the error for 'Ignored words in the Free text Search eg "as" will throw error 'but "as*" will not 'Changed on 6th Aug 01 'strKeyWords = chr(34) & strKeyWords & "*" & chr(34) 'strKeyWord = strKeyWords NumberToBEPassed = 1 'DoubleQuotes_Processing = 1 'Return value elseif intPos1 > 1 then 'ie the Double quote character is in betwwen ..eg ajay "singh " strKeyWords = trim(replace(strKeyWords,"" & chr(34) & "","",1,-1,0)) strKeyWord = strKeyWords NumberToBEPassed = 2 'DoubleQuotes_Processing = 2 'Return value elseif intPos1 = 0 then 'Double quote Not found strKeyWord = trim(strKeyWords) NumberToBEPassed = 3 'DoubleQuotes_Processing = 3 'Return value end if 'Remove error when user puts ""a or ""b in the keywords field ie ignored words 'within double quotes. DoubleQuotes_Processing = NumberToBEPassed end function %> <% function WorkingOnSpecialCharacters_IN_Keywords_Old(lstrKeyWord) lstrKeyWord = trim(lstrKeyWord) lstrKeyWord = replace(lstrKeyWord,"'","",1,-1,1) lstrKeyWord = replace(lstrKeyWord,","," ",1,-1,1) lstrKeyWord = replace(lstrKeyWord,";"," ",1,-1,1) lstrKeyWord = replace(lstrKeyWord,"%","",1,-1,1) lstrKeyWord = replace(lstrKeyWord,"+"," ",1,-1,1) lstrKeyWord = trim(lstrKeyWord) 'Removal of Single double Quote when it is the only value in the 'keyword dim intPosOfDoubleQuote intPosOfDoubleQuote = instr(1,lstrKeyWord,"" & chr(34) & "",0) 'CHANGED ON 6TH OF AUGUST 'if ((len(lstrKeyWord) <=1) and (intPosOfDoubleQuote > 0 )) then 'lstrKeyWord = "" 'end if intPosOfDoubleQuote = instr(1,lstrKeyWord,"'",0) if ((len(lstrKeyWord) <=1) and (intPosOfDoubleQuote > 0 )) then lstrKeyWord = "" end if intPosOfDoubleQuote = instr(1,lstrKeyWord,",",0) if ((len(lstrKeyWord) <=1) and (intPosOfDoubleQuote > 0 )) then lstrKeyWord = "" end if intPosOfDoubleQuote = instr(1,lstrKeyWord,";",0) if ((len(lstrKeyWord) <=1) and (intPosOfDoubleQuote > 0 )) then lstrKeyWord = "" end if WorkingOnSpecialCharacters_IN_Keywords = lstrKeyWord end function %> <% function Produce_SEARCH_FOR_String() dim LstrMsg LstrMsg = "Search Result for Importer for " if trim(strCountry_Name) <> "" then LstrMsg = LstrMsg & " " & strCountry_Name & "," else LstrMsg = LstrMsg & " All," end if if trim(strProductCatgName) <> "" then LstrMsg = LstrMsg & " " & strProductCatgName & "," else LstrMsg = LstrMsg & " All," end if if trim(strKeyWord) <> "" then LstrMsg = LstrMsg & " " & strKeyWord & "" end if LstrMsg = trim(LstrMsg) if instr(len(LstrMsg)-3,LstrMsg,"for",1) > 0 then LstrMsg = left(LstrMsg,len(LstrMsg) - 3) end if LstrMsg = trim(LstrMsg) if instr(len(LstrMsg),LstrMsg,",",0) > 0 then LstrMsg = left(LstrMsg,len(LstrMsg) - 1) end if Produce_SEARCH_FOR_String = LstrMsg end function %> <% function Produce_NO_DATA_FOUND_String() strMsgIMP = "No Importer found for" if trim(strCountry_Name) <> "" then strMsgIMP = strMsgIMP & " " & strCountry_Name & "," else strMsgIMP = strMsgIMP & " All," end if if trim(strProductCatgName) <> "" then strMsgIMP = strMsgIMP & " " & strProductCatgName & "," else strMsgIMP = strMsgIMP & " All," end if if trim(strKeyWord) <> "" then strMsgIMP = strMsgIMP & " " & strKeyWord & "" end if strMsgIMP = trim(strMsgIMP) if instr(len(strMsgIMP)-3,strMsgIMP,"for",1) > 0 then strMsgIMP = left(strMsgIMP,len(strMsgIMP) - 3) end if strMsgIMP = trim(strMsgIMP) if instr(len(strMsgIMP),strMsgIMP,",",0) > 0 then strMsgIMP = left(strMsgIMP,len(strMsgIMP) - 1) end if Produce_NO_DATA_FOUND_String = strMsgIMP end function %> <% 'this procedure returns Start and End Record no. of the 'selected page. sub ReturnRecNumbers(lintPageNo, lStartRecNo, lEndRecNo, tot_recs) lEndRecNo = lintPageNo * NO_OF_REC_PER_PAGE lStartRecNo = (lEndRecNo - NO_OF_REC_PER_PAGE) + 1 if lEndRecNo >= tot_recs then lEndRecNo = tot_recs end if StartRecNo = lStartRecNo EndRecNo = lEndRecNo end sub %> <% function SelectOption(optionVal,SelectedDirVal) if trim(SelectedDirVal) = "" then SelectOption = " Selected" end if Select case SelectedDirVal case optionVal SelectOption = " Selected" end select end function %> <% Function pagination(rsmaxpages,keywords) Dim intstartpage ' starting page Dim intendpage ' Ending Page Dim intPageNo 'intpageno the Current Page No. Dim Maxpages ' set it to the recordset.pagecount Dim Maxpageset ' set it to one set Dim pagestring ' set it to pagestring ' Setting Maxpages = Recordset Maxpages maxpages = rsmaxpages ' If pgno is not there is querystring then set it to 1 if len(trim(Request("pgno"))) > 0 then intpageno=Request("pgno") else intpageno=1 end if '---ajay's Code-----------------' dim StrQryString StrQryString = "" 'change here StrQryString = "/Search/directory/results_diff_dirs.asp?" & _ "crt=" & strCrt & "&CtryCd=" & lngCountryCode & "&ProdCd=" & lngProductCode & _ "&Mainfrm=Y" & "&pgno=" 'Defining the PageString Here ' Change this pagestring = StrQryString '---ajay's Code ends------------' ' Defining the MaxPageSet Here ' Change This 'maxpageset=3 maxpageset = NO_OF_PAGES_PER_SET 'Initializing maxpages to the Record ' Change the Recordset Name maxpages = rsmaxpages if ((intpageno/maxpageset)=(intpageno\maxpageset)) then if (Cint(intendpage)>=Cint(maxpages)) then intendpage=maxpages else intendpage = ((maxpageset)*(intpageno\maxpageset)) intstartpage = intendpage-maxpageset+1 end if else intstartpage = ((maxpageset)*(intpageno\maxpageset))+1 intendpage = intstartpage+maxpageset-1 end if ' For Restricting the records in case the maxpageset is more than the maxpages if maxpageset > maxpages then intendpage = maxpages end if ' For Restricting the records in case the intendpage is more than the maxpages if intendpage > maxpages then intendpage = maxpages end if if (Cint(intstartpage)" if not(Cint(intpageno)=1) then Response.write "" & "«Prev" & "" & "  " end if For I = Cint(intstartpage) to Cint(intendpage) if Not (maxpages=1) then if (I = Cint(intpageno)) then ' if it is the current page disable the Link Response.write I & "  " else Response.write "" & I & "" & "  " end if End if Next ' Next Processing if not(Cint(intpageno)>=Cint(maxpages)) then Response.write "" & "Next »" & "" & "  " end if Response.write "" End if end function %>