<% Response.Buffer = true catid=request("cat_id") if catid = "" or isnull(catid) = true or len(catid) = 0 then Response.Write "

Kindly wait, while you are redirected....

" Response.Redirect "http://www.easy2source.com/category.asp?key=Product" end if %> <%server.ScriptTimeout=10000%> <% Dim db connection dim i ,temp dim str,temp1,temp2, catid catid = request.querystring("cat_id") set rs1=server.createobject("adodb.recordset") s1="select index1,category from category where cat_id="&catid rs1.open s1, db, adopenstatic if rs1.eof then response.redirect ("http://www.easy2source.com/category.asp?key=Product") Lent = len(rs1("index1")) ind1 = rs1("index1") category=ProperCase(rs1("Category")) Lent = Lent + 3 s1="select * from category where index1 like '"&rs1("index1")&"%' and len(index1)="&Lent&" and cat_id in (select cat_id from product)" rs1.close rs1.open s1, db, adopenstatic 'if rs1.eof then %> <%=category%>, wholesale <%=category%>, <%=category%> of India <% TotalProductDisplay 'end if %> <% Sub TotalProductDisplay Upper_Patch "Product" %>
<% Right_Advt_Patch ind1&"" response.write "
" if request.querystring("Lent") <> "" then Lent = int(request.querystring("Lent")) else Lent = 3 end if dim i ,temp dim str,temp1,temp2 catid = request.querystring("cat_id") set r1=server.createobject("adodb.recordset") s1="select index1,category from category where cat_id="&catid r1.open s1, db, adopenstatic str=r1("index1") Lent = Lent + 3 s1="select * from category where index1 like '"&r1("index1")&"%' and len(index1)="&Lent&" and cat_id in (select distinct(cat_id) from product)" 'response.write s1 'response.end r1.close r1.open s1, db, 3,2 'response.write s1 ' response.end 'if not r1.eof then ' prod_display 'else' dim s1, currpage, start, finish, count, f, Alfabet, Name response.write "

Home >> " response.write "Product Search " for i=1 to len(str) step 3 temp=mid(str,1,i+2) set r2=server.createobject("adodb.recordset") set r3=server.createobject("adodb.recordset") s2="select category, cat_id from category where index1 ='"&temp &"'" r2.open s2, db, adopenstatic s3="select Cat_Id from category where index1 like '"&temp&"%' and cat_id in (select distinct(cat_id) from product)" r3.open s3, db,3,2 if not r2.eof then if i=len(str)-2 then response.write ">> " &ProperCase(r2("category"))&" " else response.write ">> " response.write ProperCase(r2("category"))&" " end if end if r2.close temp="" next response.write ":

" str="" set rsinquiry=server.createobject("adodb.recordset") 'rsinquiry.open "select * from inquiry_details where session_id='"&session.sessionid&"'",cookiesdb,3 rsinquiry.open "select * from inquiry_details where session_id='"&session.sessionid&"'",db,3 H = 0 if not rsinquiry.eof then H=rsinquiry.recordcount rsinquiry.close response.write "View inquiry basket :  "&H&" Unsent Inquiry

" if not r1.eof then if r1.recordcount > 0 then set r2 = server.createobject("adodb.recordset") set r3 = server.createobject("adodb.recordset") set r4 = server.createobject("adodb.recordset") Dim counter,Prod flagVal=true do while not r1.eof if r1("index1") <> "" then s1= "Product_Display "& r1("cat_id") r2.open s1, db, 3 counter=0 counter=r2(0) prod = 0 prod = r2(1) r2.close if counter >0 and prod > 0 then if flagVal=true then response.write "" response.write "" response.write "" Response.Write "" response.write "" response.write "" response.write "" response.write "" flagVal=false end if response.write "" response.write "" response.write "" response.write "" response.write "" end if end if r1.movenext loop end if response.write "" response.write "
" response.write "Search Result : "&request("Prod") response.write " Products " response.write "and "&request("Sup")&" Suppliers
" response.write "Narrow your search by selecting a category" response.write "
" response.write "" response.write "Categories" response.write "Products" response.write "Suppliers
" response.write " " response.write "" response.write "" response.write propercase(r1("category"))&"" response.write prod&"" response.write counter response.write "

" r1.close set r1=nothing set r2=nothing set r3=nothing set r4=nothing end if End Sub %>
<% productdisplay Response.Write "

" Bottom_Patch %>

<% Sub productdisplay 's1="select Prod_Id, prod_code, product_name, description, date_added, supplier_id, img_no from product where cat_id in (select cat_id from category where index1 like '"&str&"%') order by date_added desc" s1="select Prod_Id, prod_code, product_name, description, date_added, supplier_id, img_no from product where cat_id in (" & Request.QueryString("cat_ID")& ") order by date_added desc" set r1=server.createobject("adodb.recordset") r1.cursortype=3 r1.cursorlocation=3 r1.open s1, db, adopenstatic if r1.recordcount=0 then exit sub end if r1.pagesize=20 r1.cachesize=20 pages=r1.pagecount count=r1.recordcount if request.querystring("currpage")="" then currpage=1 else currpage=int(request.querystring("currpage")) end if r1.absolutepage=currpage start=r1.absoluteposition if currpage=pages then finish=r1.recordcount else finish=start+r1.pagesize-1 end if response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" %> <% for i=start to finish s1="select supplier_id, company_name, website,paid from supplier where supplier_id="&r1("supplier_id") set r2=server.createobject("adodb.recordset") r2.open s1, db, adopenstatic if not r2.eof then response.write "" response.write "" response.write "" else response.write "" end if response.write "" end if r2.close r1.movenext next response.write "" response.write "" response.write "
" response.write "Search Result : Products "&start&" to "&finish&" of "&count&"
" response.write "Click on the thumbnails to view the product catalogue
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(r1("img_no"))>0 then response.write "" supFolder=cdbl(r1("supplier_id")) supFolder=int(supFolder/500)+1 '''imgSrc="thumb90.asp?VFilePath=\supplier\" & cstr(supFolder) & "\" & cstr(r1("supplier_id")) & "\" & r1("img_no")&".jpg" imgSrc="http://supplier.easy2source.com/testImg.aspx?MaxSize=90&filen=\images\" & r1("img_no")&".jpg" 'response.write ""&r1("product_name")&"" response.write "&Chr(34)&" else response.write "" response.write "&Chr(34)&" end if response.write "
" response.write"
" response.write "Product Name : " response.write "" response.write ""&ProperCase(r1("product_name"))&"" if date-r1("date_added")<=30 then response.write "  New" response.write "" end if if len(r1("description"))>100 then 'response.write "
Description : " response.write "
" response.write MakeFirstLetterCapital(left(r1("description"),100))&"....." elseif len(r1("description"))>0 then 'response.write "
Description : " response.write "
" response.write MakeFirstLetterCapital (r1("description")) end if response.write "
Company Name : " response.write ""&ProperCase(r2("company_name") &"")&"" ' if r2("Paid") <> 0 then response.write " " response.write "
" dim ADD ADD = true set rsinquiry=server.createobject("adodb.recordset") rsinquiry.open "select * from inquiry_details where session_id='"&session.sessionid&"' and Prod_id="&r1("prod_Id"),db,3 if not rsinquiry.eof then ADD = False rsinquiry.close if ADD = False then response.write "Added To Inquiry Basket
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "Select products and click " response.write "   OR   " response.write "
" pagewisedisplay start,currpage,finish,pages End Sub %> <% Sub pagewisedisplay(start,currpage,finish,pages) dim i,s1,s2 dim cat_id,sup,prod,lent cat_id=Request.QueryString("cat_id") sup=Request.QueryString("sup") prod=Request.QueryString("prod") lent=Request.QueryString("lent") response.write "
" response.write "Result Page : " if start>1 then %> 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 %><%=i%> <% end if next elseif currpage=pages then for i=pages-4 to pages if i=currpage then response.write i&" " else %> <%=i%><% end if next end if if currpage=10 then for i=currpage-3 to currpage+1 if i=currpage then response.write i&" " else %> <%=i%><% end if next end if if currpage Next<% end if response.write "
" End Sub %> <% Private function ProperCase(txt) txt=trim(txt) if txt<>"" then varTxt=split(txt," ") putSpace="" for CC=0 to ubound(varTxt) if varTxt(CC)<>"" then txtVal=txtVal & putSpace & ucase(left(varTxt(CC),1)) & lcase(right(varTxt(CC),len(varTxt(CC))-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 TT = 1 To Len(Txt) If lFlag = True And Mid(Txt, TT, 1) <> " " And Mid(Txt, TT, 1) <> "" Then tempTxt = tempTxt & UCase(Mid(Txt, TT, 1)) lFlag = False Else tempTxt = tempTxt & Mid(Txt, TT, 1) End If If Mid(Txt, TT, 1) = "." Then lFlag = True End If Next MakeFirstLetterCapital = tempTxt End Function %>