<% dim SearchSql dim arr dim mywordcount dim Addr,Logon,pages,str,count,start,finish,currpage,start1,finish1,currpage1,count1,pages1, keyword,radio1,city,state dim weight dim Prodcount,ProductPages,ProdStart,ProdFinish dim noproductflag, SupplierSearch noproductflag=false SupplierSearch=false set db1=server.createobject("adodb.connection") db1.open "Provider=SQLOLEDB.1;Password=nkdQglfud89;Persist Security Info=True;User ID=easy2source_com_handicrafts;Initial Catalog=easy2source_com_handicrafts;Data Source=X44\SQLEXPRESS" 'db1.open "driver={SQL Server};server=comp13;database=handicrafts;uid=handicrafts;pwd=handicrafts" if request.querystring("radio1") = "" then radio1=request.form("radio1") else radio1=request.querystring("radio1") end if if request.querystring("currpage")="" then keyword=ProperCase(request.form("keyword")) end if if request.form("keyword")="" then keyword=ProperCase(request.querystring("keyword")) end if if instr(1, keyword, ",") > 0 then arr2 = split(keyword, ",") keyword = arr2(0) end if if radio1="Product" then %> <%=keyword%>, wholesale <%=keyword%>, Indian products, wholesale products <% else %> <%=keyword%>, Indian manufacturer, Wholesaler and exporter <% end if %> <% response.write "" 'onselectstart="return false;" ''''handicrafts_top radio1, keyword %>
Handicrafts directory from India
<% if name <> "" and suid <> "" then %> | My Handicrafts | <%else%> | Sign In | Join Now | <%end if%> <% if name <> "" and suid <> "" then qcoun = "Select count(*) as coun from inquiry_basket where Mail_Sent = 0 and inquirer_id="&suid else qcoun = "Select count(*) as coun from temp_basket where session_id ="&session.sessionid end if set rscoun = server.CreateObject("adodb.recordset") ' rscoun.open qcoun,db,3,2 'if rscoun("coun") > 0 then %> <%'end if%> <%if name <> "" and suid <> "" then %> Logout | <%end if%>
Search :

| Home | Products Directory | Supplier Directory | Trade Leads |
<% rightside response.write "
" response.write "Home >> " response.write "Keyword Search >> "&keyword&" :" %>
<% response.write "
" keywordtitle keyword, radio1&" Directory" connection if radio1="Product" then 'set DispCat=server.createobject("Adodb.recordset") 'set DispCat1=server.createobject("Adodb.recordset") 'DispCat.cursorlocation =3 'DispCat.PageSize=5 'DispCat.open sqlCat , db, 3 'if DispCat.EOF = false then product_display else supplier_display end if %> <% sub product_display prod_sup_display bottom_patch exit sub 'On Error Resume Next dim sql,a1,a2 mywordcount=0 strwordy = trim(keyword) strNotallow = "is,to,in,on,are,an,if,we,of" strwordy = Replace(strwordy, "+", "") strwordy = Replace(strwordy, "%", "") strwordy = Replace(strwordy, "@", "") strwordy = Replace(strwordy, "'", "") strwordy = Replace(strwordy, "!", "") strwordy = Replace(strwordy, ">", "") strwordy = Replace(strwordy, "<", "") strwordy = Replace(strwordy, "(", "") strwordy = Replace(strwordy, ")", "") strwordy = Replace(strwordy, "*", "") strwordy = Replace(strwordy, "]", "") strwordy = Replace(strwordy, "[", "") strwordy = Replace(strwordy, "}", "") strwordy = Replace(strwordy, "{", "") strwordy = Replace(strwordy, "&", "") strwordy = Replace(strwordy, " and ", " ") strwordy = Replace(strwordy, " or ", " ") MyNotallow = Split(strNotallow, ",", -1, 1) For N = 0 To UBound(MyNotallow) If LCase(strwordy) = MyNotallow(N) Then strwordy = Replace(strwordy, MyNotallow(N), "") Next strwordy = Replace(strwordy, ",", " ") strwordy = Replace(strwordy, " ", " ") arr=split(strwordy," ") for i=1 to len(strwordy) if mid(strwordy,i,1)=" " then mywordcount=mywordcount+1 end if next if mywordcount=0 then s1="select * from product where product_name like '%"&strwordy&"%' order by date_added desc" else for i=0 to mywordcount if a2 = "" then a2=a2&" """&arr(i)&""" " else a2=a2&" AND """&arr(i)&""" " end if next 's1 ="SELECT * FROM product where CONTAINS(Product_name, '"""&strwordy&""" OR "&a2&"') order by img_no desc, date_added desc" s1="select * from product where product_name like '%"&strwordy&"%' order by date_added desc" end if 'response.write(s1) searchSql=s1 set RsProduct=server.createobject("adodb.recordset") RsProduct.cursortype=3 RsProduct.cursorlocation = 3 RsProduct.open s1, db,3 Response.Write "
" Prodcount=1 if RsProduct.RecordCount>0 then RsProduct.MoveFirst end if if RsProduct.eof then noproductflag=true response.write "

" response.write "Sorry, no products information to display. Following is the list of suppliers of "&ProperCase(keyword)&" from Products section." response.write "

" prod_sup_display bottom_patch exit sub end if RsProduct.pagesize=10 RsProduct.cachesize=10 ProductPages=RsProduct.pagecount Prodcount=RsProduct.recordcount if request.querystring("currpage")="" then currpage=1 else currpage=int(request.querystring("currpage")) end if RsProduct.absolutepage=currpage ProdStart=RsProduct.absoluteposition if currpage=ProductPages then ProdFinish=Prodcount else ProdFinish=ProdStart+RsProduct.pagesize-1 end if H = 0 set rsinquiry=server.createobject("adodb.recordset") rsinquiry.open "select * from inquiry_details where session_id='"&session.sessionid&"'",db,3 if not rsinquiry.eof then H=rsinquiry.recordcount response.write "

View inquiry basket : " response.write " "&H&" Unsent Inquiry" end if rsinquiry.close %> <% if DispCat.EOF = false then %> <% dstart=request("dstart") CatPage=request("CatPage") if CatPage="" then CatPage=1 'Response.Write "CatPage : " & CatPage 'Response.End DispCat.AbsolutePage = CatPage cCnt=(CatPage * DispCat.PageSize) / DispCat.PageSize MaxCount=(cCnt + DispCat.PageSize) While Not (DispCat.Eof) and (cCnt < MaxCount) %> <% cCnt = cCnt+1 DispCat.movenext 'end if wend %> <% if CatPage < DispCat.AbsolutePage then%> <% end if%>
 Categories :
<%=cCnt%> . &Lent=<%=Len(DispCat("Index1"))%>"><%=ProperCase(DispCat("Category"))%>   
[More]
<% end if response.write "

" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" 'set rs1=server.createobject("adodb.recordset") set r2=server.createobject("adodb.recordset") 'set Db=server.createobject("adodb.connection") ' db.open "driver={SQL Server};server=localhost;database=easysource;uid=easysource;pwd=gcua007" ''db.open "driver={SQL Server};server=localhost;database=easysource;uid=himanshu;pwd=modi" 'RsProduct.movefirst k=1 i=ProdStart for i=ProdStart to ProdFinish s1 = "select supplier_id, company_name, website, paid from supplier where supplier_id="&RsProduct("supplier_id") r2.open s1, db,adOpenStatic 'if k>10 then exit for 'k=k+1 'r2.movefirst response.write "" response.write "" else response.write "" end if rsinquiry.close response.write "" r2.close RsProduct.movenext if RsProduct.eof then exit for next response.write "" response.write "" response.write "
" response.write "Click on the thumbnails to view the product catalogue
" response.write "Click on supplier name to View company profile
" response.write "Select products below and click " response.write "   OR   " response.write "
" response.write "Thumbnail" response.write "Product Name / Description / Company Name" response.write "Select All
Clear All
" response.write "" response.write "
" if len(RsProduct("img_no"))>0 then response.write "" supFolder=int(RsProduct("supplier_id")/500)+1 'imgSrc="img" & fold & "/_"&RsProduct("img_no")&".jpg" imgSrc="thumb.asp?MaxSize=90&filen=\supplier\" & cstr(supFolder) & "\" & cstr(RsProduct("supplier_id")) & "\" & RsProduct("img_no")&".jpg" 'imgSrc="http://handicrafts.easy2source.com/thumbnails/_" & RsProduct("img_no")&".jpg" response.write " & Chr(34) & " else response.write "" response.write " & Chr(34) & " end if response.write "
" response.write "
" response.write "
Product :" response.write "" dim ReplaceName ReplaceName=replace((RsProduct("product_name")),arr(0)," "&ProperCase(arr(0))&"",1,-1,1) for a=1 to mywordcount if len(arr(a))> 1 then ReplaceName=replace(replacename,arr(a)," "&ProperCase(arr(a))&"",1,-1,1) next response.write ProperCase(replacename)&"" if date-RsProduct("date_added")<=30 then response.write "  New" response.write "" end if if len(RsProduct("description"))>100 then 'response.write "
Description : " response.write "
" response.write MakeFirstLetterCapital(left(RsProduct("description"),100)&".....") elseif len(RsProduct("description"))>0 then 'response.write "
Description :" response.write "
" response.write MakeFirstLetterCapital (RsProduct("description")) end if if len(r2("company_name")) > 3 then response.write "
Company Name : " response.write ProperCase(r2("company_name"))&"" end if response.write "
" rsinquiry.open "select * from inquiry_details where session_id='"&session.sessionid&"' and prod_id="&RsProduct("prod_id"),db,3 if not rsinquiry.eof then response.write "Added To Inquiry Basket
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "Select products below and click " response.write "   OR   " response.write "
" productpagewisedisplay RsProduct.close set RsProduct = nothing response.write "" prod_sup_display 'response.end *********************** ERROR IN 362***************************************** bottom_patch End Sub %> <% sub supplier_display 'On Error Resume Next dim a1 set ra1=server.createobject("adodb.recordset") ra1.CursorType=3 ra1.CursorLocation=3 strwordy = trim(keyword) strNotallow = "is,to,in,on,are,an,if,we,of" strwordy = Replace(strwordy, "+", "") ' strwordy = Replace(strwordy, "%", "") strwordy = Replace(strwordy, "@", "") strwordy = Replace(strwordy, "!", "") strwordy = Replace(strwordy, ">", "") strwordy = Replace(strwordy, "'", "") strwordy = Replace(strwordy, "<", "") strwordy = Replace(strwordy, "(", "") strwordy = Replace(strwordy, ")", "") ' strwordy = Replace(strwordy, "*", "") strwordy = Replace(strwordy, "]", "") strwordy = Replace(strwordy, "[", "") strwordy = Replace(strwordy, "}", "") strwordy = Replace(strwordy, "{", "") strwordy = Replace(strwordy, "&", "") strwordy = Replace(strwordy, " and ", " ") strwordy = Replace(strwordy, " And ", " ") strwordy = Replace(strwordy, " or ", " ") strwordy = Replace(strwordy, " Or ", " ") MyNotallow = Split(strNotallow, ",", -1, 1) For N = 0 To UBound(MyNotallow) If LCase(strwordy) = MyNotallow(N) Then strwordy = Replace(strwordy, MyNotallow(N), "") Next strwordy = Replace(strwordy, ",", " ") strwordy = Replace(strwordy, " ", " ") mywordcount=0 arr=split(strwordy," ") for i=1 to len(strwordy) if mid(strwordy,i,1)=" " then mywordcount=mywordcount+1 end if next 'a1 = "SELECT * FROM supplier AS FT_TBL INNER JOIN CONTAINSTABLE(supplier, company_name,'ISABOUT (""*"&keyword&"* "" weight(.8) " 'a3=" )' ) AS KEY_TBL ON FT_TBL.supplier_id = KEY_TBL.[KEY] ORDER BY paid desc, KEY_TBL.RANK desc " 'if mywordcount=0 then ' s1="select * from supplier where company_name like '%"&keyword&"%' order by paid desc,website desc ,email desc" 'else ' weight=7 ' for i=0 to mywordcount ' a2=a2&", ""%"&arr(i)&"%"" weight (."&weight-i&") " ' next ' s1=a1+a2+a3 'end if a1= "SELECT * FROM supplier where CONTAINS(company_name, '"""&strwordy&""" OR " a4 = "') order by paid desc, email desc" a2 = "" if mywordcount=0 then s1="select * from supplier where company_name like '%"&keyword&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161) order by paid desc,website desc ,email desc" else weight=7 ' for i=0 to mywordcount ' if a2 = "" then ' a2=a2&" """&arr(i)&""" " ' else ' a2=a2&" AND """&arr(i)&""" " ' end if ' next ' s1=a1+a2+a4 s1="select * from supplier where company_name like '%"&keyword&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161) order by paid desc,website desc ,email desc" end if ra1.open s1, db, adopenstatic ra1.Pagesize=25 ra1.Cachesize=25 pages=ra1.pagecount count=ra1.recordcount if request.querystring("currpage")="" then currpage=1 else currpage=int(request.querystring("currpage")) end if if ra1.recordcount > 0 then ra1.AbsolutePage=currpage start=ra1.AbsolutePosition end if if currpage=pages then finish=count else finish=start+ra1.pagesize-1 end if response.write "
" if count=0 then ' SupplierSearch=true ' prod_sup_display response.write "
Sorry, no Supplier listed" response.write "" else strwordy = Replace(strwordy, "%", "") strwordy = Replace(strwordy, "*", "") arr=split(strwordy," ") response.write "" response.write "
" response.write "   Suppliers "&start&"" response.write " to "&finish&" of "&count&"" response.write"
" dim s1 set rs1=server.createobject("adodb.recordset") for i=1 to ra1.pagesize s1 = "Directory_Display_Supplier "&ra1("supplier_id") rs1.open s1, db, 3 response.write "
" response.write "" else response.write ""&ProperCase(replacename)&"" end if if len(rs1(0))>1 then 'if len(rs1("description")) > 3 then response.write "" end if If Len(ra1("Contact_person")) > 1 Then response.write "" End If ' response.write "" If Len(ra1("tel1")) > 1 Then ' response.write "" End If ' If Len(ra1("fax")) > 1 Then response.write "" If Len(rs1(1)) > 1 Then response.write "" End If If Len(ra1("email")) > 1 Then response.write "" Else response.write "" End If response.write "
" dim ReplaceName folde=trim(ra1("company_name")) rdot=right(folde,1) if rdot="." then folde=replace(folde,".","") else folde=trim(ra1("company_name")) end if fold=GetOnlineFolderName(trim(ra1("company_name"))) If keyword <> "" Then 'response.Write(fold&"--2--test
") ReplaceName=""&replace( (ProperCase(ra1("company_name"))), arr(0), ""&arr(0)&"", 1,-1 ,1) Else ReplaceName=ProperCase(ra1("company_name")) End If for a=1 to mywordcount if len(arr(a))> 1 then ReplaceName=replace(ProperCase(replacename), ProperCase(arr(a)),""&ProperCase(arr(a))&"",1, -1,1) next if len(rs1(3)) <> "" then response.write ""&ProperCase(replacename)&"
Products :
" If keyword <> "" Then ReplaceName=replace(ProperCase((rs1(0))),arr(0),""&ProperCase(trim(arr(0)))&"",1,-1,1) Else ReplaceName=ProperCase(rs1(0)) End If for a=1 to mywordcount if len(arr(a))> 1 then ReplaceName=replace(replacename,arr(a),""&ProperCase(trim(arr(a)))&"",1,-1,1) next response.write ProperCase(replacename)&"
Contact Person :" & ProperCase(ra1("Contact_person")) & " " response.write "
" ' response.write "Address :" & ProperCase(ra1("address")) ' If Len(ra1("city")) > 0 Then response.write "
" & ProperCase(ra1("city")) ' If Len(ra1("pin")) > 0 Then response.write "-" & ra1("pin") ' If Len(ra1("state")) > 0 Then response.write "
" & ProperCase(ra1("state")) ' If Len(ra1("Country")) > 0 Then response.write "
" & ProperCase(ra1("Country")) ' response.write "
" ' response.write "Telephone :" & ra1("tel1") ' If Len(ra1("tel2")) > 1 Then response.write " / " & ra1("tel2") ' response.write "
Fax :" & ra1("fax") & "
Profile :
" & ProperCase(rs1(1)) & "
" response.write "Send :" response.write "" response.write "On-Line Trade Inquiry
" response.write "" response.write "Email is not available
" response.write "
" s1="" rs1.close ra1.movenext if ra1.eof then exit for next supplierpagewisedisplay SupplierSearch=false end if bottom_patch End Sub %> <% Sub supplierpagewisedisplay dim i,s1,s2,dstart response.write "
" response.write "Result Page : " i=1 if city="%" then city="All" if state="%" then state="All" if request.querystring("dstart")="" then dstart=1 else dstart=request.querystring("dstart") end if if start>1 then response.write "Previous " end if if pages>10 then if currpage<=dstart+3 then if currpage-3>=dstart then s1=currpage+6 i=currpage-3 end if if currpage<=6 then s1=10 i=1 end if end if if currpage>=dstart+5 then if currpage+5<=pages then s1=currpage+5 i=currpage-4 else s1=pages i=pages-9 end if end if dstart=i for i=i to s1 if i=currpage then response.write " "&i&" " else response.write ""&i&" " end if next else if pages<=10 then s1=pages else s1=10 end if dstart=1 for i=1 to s1 if i=currpage then response.write " " &i & " " else response.write ""&i&" " end if next end if if currpage" & "Next"&" " end if response.write "
" End Sub %> <% Sub productpagewisedisplay dim i,s1,s2,dstart response.write "
" response.write "Result Page : " i=1 if request.querystring("dstart")="" then dstart=1 else dstart=request.querystring("dstart") end if if ProdStart>1 then response.write ""&"Previous " &" " end if if ProductPages>10 then if currpage<=dstart+3 then if currpage-3>=dstart then s1=currpage+6 i=currpage-3 end if if currpage<=6 then s1=10 i=1 end if end if if currpage>=dstart+5 then if currpage+5<=ProductPages then s1=currpage+5 i=currpage-4 else s1=ProductPages i=ProductPages-9 end if end if dstart=i for i=i to s1 if i=currpage then response.write " " & i & " " else response.write ""&i&" " end if next else if ProductPages<=10 then s1=ProductPages else s1=10 end if dstart=1 for i=1 to s1 if i=currpage then response.write "  "&i else response.write " "&i&"" end if next end if if currpageNext " end if response.write "
" End Sub %> <% sub prod_sup_display connection 'set db=server.createobject("adodb.connection") 'db.open "driver={SQL Server};server=localhost;database=easysource;uid=easysource;pwd=gcua007" 'db.open "driver={SQL Server};server=comp12;database=easysource;uid=himanshu;pwd=modi" dim a1 set ra1=server.createobject("adodb.recordset") ra1.CursorType=3 ra1.CursorLocation=3 strwordy = trim(keyword) strNotallow = "is,to,in,on,are,an,if,we,of" strwordy = Replace(strwordy, "+", "") strwordy = Replace(strwordy, "%", "") strwordy = Replace(strwordy, "'", "") strwordy = Replace(strwordy, "@", "") strwordy = Replace(strwordy, "!", "") strwordy = Replace(strwordy, ">", "") strwordy = Replace(strwordy, "<", "") strwordy = Replace(strwordy, "(", "") strwordy = Replace(strwordy, ")", "") strwordy = Replace(strwordy, "*", "") strwordy = Replace(strwordy, "]", "") strwordy = Replace(strwordy, "[", "") strwordy = Replace(strwordy, "}", "") strwordy = Replace(strwordy, "{", "") strwordy = Replace(strwordy, "&", "") strwordy = Replace(strwordy, " and ", " ") strwordy = Replace(strwordy, " or ", " ") MyNotallow = Split(strNotallow, ",", -1, 1) For N = 0 To UBound(MyNotallow) If LCase(strwordy) = MyNotallow(N) Then strwordy = Replace(strwordy, MyNotallow(N), "") Next strwordy = Replace(strwordy, ",", " ") strwordy = Replace(strwordy, " ", " ") arr=split(strwordy," ") mywordcount=0 for i=1 to len(strwordy) if mid(strwordy,i,1)=" " then mywordcount=mywordcount+1 end if next 'response.write(noproductflag&"-->noproductflag") 'response.write(mywordcount&"-->mywordcount") if noproductflag=true then ' a1 = "select * from supplier where supplier_id in (SELECT distinct(supplier_id) FROM products AS FT_TBL INNER JOIN CONTAINSTABLE(products, description, 'ISABOUT (""%"&strwordy&"%"" weight(.8)" ' a3=" )' ) AS KEY_TBL ON FT_TBL.supplier_id = KEY_TBL.[KEY] ) order by paid desc" if mywordcount=0 then s1="select * from supplier where supplier_id in (select supplier_id from products where description like '"&strwordy&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161))) order by paid desc " else for i=0 to mywordcount if a2 = "" then a2=a2&" FORMSOF (INFLECTIONAL,"""&arr(i)&""") " else a2=a2&" AND FORMSOF (INFLECTIONAL,"""&arr(i)&""") " end if next s1="select * from supplier where supplier_id in (select supplier_id from products where description like '"&strwordy&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161))) order by paid desc " ''''s1 ="select * from supplier where supplier_id in (SELECT supplier_id FROM products where CONTAINS(description, '"""&strwordy&""" OR "&a2&"')) order by paid desc" ' s1="select * from supplier where supplier_id in (select supplier_id from products where contains (description , 'FORMSOF (INFLECTIONAL, """&strwordy&""")')) and supplier_id in (select supplier_id from CorporateCat) order by paid desc " end if a1=s1 'response.write s1 ' response.write "

" ' response.write "Sorry, no products information to display. Following is the list of suppliers of "&ProperCase(keyword)&" from directory section " else if mywordcount=0 then '/////// Modify by Ravi 21-08-2007 /////// s1="select * from supplier where supplier_id in (select supplier_id from products where description like '%"&strwordy&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161)) order by paid desc"'and supplier_id in (select supplier_id from CorporateCat) order by paid desc" '///// Old query //// ' s1="select * from supplier where supplier_id in (select supplier_id from products where contains (description , 'FORMSOF (INFLECTIONAL, "&strwordy&")')) order by paid desc " ' response.write(s1) else for i=0 to mywordcount if a2 = "" then a2=a2&" FORMSOF (INFLECTIONAL,"""&arr(i)&""") " else a2=a2&" AND FORMSOF (INFLECTIONAL,"""&arr(i)&""") " end if next s1="select * from supplier where supplier_id in (select supplier_id from products where description like '%"&strwordy&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161)) order by paid desc" '' s1 ="select * from supplier where supplier_id in (SELECT supplier_id FROM products where CONTAINS(description, '"""&strwordy&""" OR "&a2&"')) order by paid desc" ' s1="select * from supplier where supplier_id in (select supplier_id from products where contains (description , 'FORMSOF (INFLECTIONAL, """&strwordy&""")')) order by paid desc " end if a1=s1 end if if SupplierSearch = True then if mywordcount=0 then s1="select * from supplier where supplier_id in (select supplier_id from products where description like '%"&strwordy&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161)) order by paid desc " else for i=0 to mywordcount if a2 = "" then a2=a2&" """&arr(i)&""" " else a2=a2&" AND """&arr(i)&""" " end if next s1="select * from supplier where supplier_id in (select supplier_id from products where description like '%"&strwordy&"%' and Supplier_id not in(3639,3532,2660,42,1284,4439,2512,2248,2284,1720,2231,1158,1562,1643,1158,1161)) order by paid desc " ''' s1 ="select * from supplier where supplier_id in (SELECT supplier_id FROM products where CONTAINS(description, '"""&strwordy&""" OR "&a2&"')) order by paid desc" end if a1=s1 end if 'response.write a1 'response.End() ra1.open a1, db, 3 if SupplierSearch = True then ra1.Pagesize=25 ra1.Cachesize=25 else ra1.PageSize=10 ra1.CacheSize=10 end if pages1=ra1.pagecount count1=ra1.recordcount if request.querystring("currpage1")="" then currpage1=1 else currpage1=int(request.querystring("currpage1")) end if if ra1.recordcount > 0 then ra1.AbsolutePage=currpage1 start1=ra1.AbsolutePosition end if if currpage1=pages1 then finish1=count1 else finish1=start1+ra1.pagesize-1 end if response.write "
" if count1=0 then response.write "

Sorry, no Supplier listed" response.write"" else response.write"" response.write "
" response.write "   Suppliers "&start1&"" response.write " to "&finish1&" of "&count1&"" response.write"
" dim s1 set rs1=server.createobject("adodb.recordset") 'Response.Write "
ra1.pagesize : " & ra1.pagesize & "
" dim nt nt = 0 i = 0 for nt=start1 to finish1 if ra1.eof then exit for 's1="SELECT supplier_id,company_name, address, city,pin,state,tel1, tel2, fax, email,website,paid FROM Supplier WHERE supplier_id ="&ra1("supplier_id") s1 = "Directory_Display_Supplier "&ra1("supplier_id") rs1.open s1, db, 3 response.write "
" response.write "" else folde=trim(ra1("company_name")) rdot=right(folde,1) if rdot="." then folde=replace(folde,".","") else folde=trim(ra1("company_name")) end if fold=GetOnlineFolderName(trim(ra1("company_name"))) 'response.Write(fold&"--1--test
") response.write ""&ProperCase(ra1("company_name"))&"" end if a=1 'if not ra1.eof then if len(rs1(0))>1 then response.write "" end if 'end if If Len(ra1("Contact_person")) > 1 Then response.write "" End If 'response.write "" If Len(ra1("tel1")) > 1 Then ' response.write "" End If ' If Len(ra1("fax")) > 1 Then response.write "" If Len(rs1(1)) > 1 Then response.write "" End If If Len(ra1("email")) > 1 Then response.write "" Else response.write "" End If response.write "
" if len(rs1(3)) <> "" then response.write ""&ProperCase(ra1("company_name"))&"
Products :
" dim ReplaceName ReplaceName=replace(ProperCase((rs1(0))),arr(0),""&ProperCase(trim(arr(0)))&"",1,-1,1) for a=1 to mywordcount if len(arr(a))> 1 then ReplaceName=replace(replacename,arr(a),""&ProperCase(trim(arr(a)))&"",1,-1,1) next response.write ProperCase(replacename)&"
Contact Person :" & ProperCase(ra1("Contact_person")) & " " response.write "
" 'response.write "Address :" & ProperCase(ra1("address")) 'If Len(ra1("city")) > 0 Then response.write "
" & ProperCase(ra1("city")) ' If Len(ra1("pin")) > 0 Then response.write "-" & ra1("pin") ' If Len(ra1("state")) > 0 Then response.write "
" & ProperCase(ra1("state")) ' If Len(ra1("Country")) > 0 Then response.write "
" & ProperCase(ra1("Country")) ' response.write "
" ' response.write "Telephone :" & ra1("tel1") ' If Len(ra1("tel2")) > 1 Then response.write " / " & ra1("tel2") ' response.write "
Fax :" & ra1("fax") & "
Profile :
" & ProperCase(rs1(1)) & "
" response.write "Send :" response.write "" response.write "On-Line Trade Inquiry
" response.write "" response.write "Email is not available
" response.write "
" rs1.close s1="" 'r3.close ra1.movenext next prod_sup_pagewisedisplay end if 'bottom_patch End Sub %> <% Sub prod_sup_pagewisedisplay dim i,s1,s2,dstart1 response.write "
" response.write "Result Page : " i=1 if request.querystring("dstart1")="" then dstart1=1 else dstart1=request.querystring("dstart1") end if if start1>1 then response.write "Previous " end if if pages1>10 then if currpage1<=dstart1+3 then if currpage1-3>=dstart1 then s1=currpag1e+6 i=currpage1-3 end if if currpage1<=6 then s1=10 i=1 end if end if if currpage1>=dstart1+5 then if currpage1+5<=pages1 then s1=currpage1+5 i=currpage1-4 else s1=pages1 i=pages1-9 end if end if dstart1=i for i=i to s1 if i=currpage1 then response.write " "&i else response.write " "&i&" " end if next else if pages1<=10 then s1=pages1 else s1=10 end if dstart1=1 for i=1 to s1 if i=currpage1 then response.write " "&i else response.write " "&i&" " end if next end if if currpage1Next " end if response.write "
" End Sub %> <% function getProductFullPath(pid) Dim fullPath for i=1 to len(pid) step 3 str=str & mid(pid,i,i+2) path= getCategory(str) if trim(path)<>"" then fullPath=fullPath & putTxt & path end if putTxt=" >> " next getProductFullPath= fullpath end function %> <% function getCategory(index) set cat=server.CreateObject("Adodb.RecordSet") sql="select * from category where index1='" & index & "'" cat.Open sql,db,3,2 if cat.RecordCount>0 then getCategory=cat("category") end if end function %> <% function getFieldValue(tablename,fieldname,chkfieldname,chkvalue) set rsTemp=server.CreateObject("Adodb.RecordSet") sql="select "& fieldname & " as retVal from " & tablename & " where " & chkfieldname & " = " & cint(chkvalue) & "" rsTemp.Open sql,db,3,2 if rsTemp.RecordCount>0 then getFieldValue=rsTemp("retVal") end if rsTemp.Close end function %> <% function ProperCase(txt) 'on error resume next if txt<>"" then txt=trim(txt) varTxt=split(txt," ") putSpace="" for h=0 to ubound(varTxt) if varTxt(h)<>"" then txtVal=txtVal & putSpace & ucase(left(varTxt(h),1)) & lcase(right(varTxt(h),len(varTxt(h))-1)) end if putSpace=" " next ProperCase=txtVal end if End function Function MakeFirstLetterCapital(Txt) If Trim(Txt) = "" Then Exit Function Txt = LCase(Txt) lFlag = True For h = 1 To Len(Txt) If lFlag = True And Mid(Txt, h, 1) <> " " And Mid(Txt, h, 1) <> "" Then tempTxt = tempTxt & UCase(Mid(Txt, h, 1)) lFlag = False Else tempTxt = tempTxt & Mid(Txt, h, 1) End If If Mid(Txt, h, 1) = "." Then lFlag = True End If Next MakeFirstLetterCapital = tempTxt End Function Function GetOnlineFolderName(Str) For no = 1 To Len(Trim(Str)) cH = Mid(Str, no, 1) If cH <> "," And cH <> " " And cH <> "&" And cH <> "$" And cH <> "@" And cH <> "_" And cH <> "/" And cH <> "." And cH <> "(" And cH <> ")" And cH <> "-" Then folname = folname & cH End If If cH = "," Or cH = " " Or cH = "&" Or cH = "$" Or cH = "@" Or cH = "_" Or cH = "/" Or cH = "." Or cH = "(" Or cH = ")" Or cH = "-" Then If Len(Str) <> Len(cH) Then If Mid(folname, Len(folname), 1) <> "-" Then folname = Trim(folname) & "_" End If End If Next GetOnlineFolderName = LCase(folname) End Function %>