<% 'Specify your captcha length here, this is the only configuration requirement captchaLength = 5 Function captcha(captchaLength) if captchaLength > 15 then captchaLength = 15 HighestValue = left(100000000000000,captchaLength) lowestValue = left(999999999999999,captchaLength) Randomize intHighestNumber = Int((HighestValue - LowestValue + 1) * Rnd) + LowestValue session("captcha") = Int(intHighestNumber) x = 1 'response.write vbcrlf & "" & vbcrlf & vbtab & "Security Code:" & vbcrlf while x <= captchaLength response.write vbtab & vbtab & "" & vbcrlf x = x + 1 wend 'response.write vbtab & "" & vbcrlf & "" & vbcrlf End Function %> <% 'response.Write(request("captcha")&"---111
") 'response.Write(session("captcha")&"++++111
") 'response.End() if request("action") = "captcha" then response.Write(".") 'response.Write(request("captcha")&"---111
") 'response.Write(session("captcha")&"++++111
") 'response.End() if cstr(request("captcha")) = cstr(session("captcha")) then 'response.Write(request("captcha")&"
") ' response.Write(session("captcha")&"
") ' response.End() response.write "
" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "
" 'dispform 'session("captcha")="" %> <% else 'response.Write("TTT") 'response.End() mess="Sorry, security code not match." end if end if %> View Inquiry Basket <% up " " %>
<% dim pages,count,start,finish,currpage,dstart,supplier_id,Q dim db flag=true login=request.form("login") password=request.form("password") if request.querystring("Q")="" then Q=request.form("Q") else Q=request.querystring("q") end if response.write "
" response.write "

Home >> " if Q="submit" then response.write "Submit your Products : " elseif Q="update" then response.write "Update Your Listing / Products : " else response.write "View Your Inquiries : " end if response.write "


" refer = Request.ServerVariables("HTTP_REFERER") if refer="http://www.easy2source.com/" then session("myid")="" end if if session("myid")<>"" then supplier_id=session("myid") dispdetails else validation1 'to ensure that the login and password have been entered if flag then validation2 if flag then dispdetails end if response.write "
" %>

<% Bottom_Patch %> <% Sub validation1 if len(login)=0 or len(password)=0 then flag=false else for i=1 to 15 if strcomp(len(login), space(i), 1)=0 or strcomp(len(password), space(i), 1)=0 then exit for next if i<=15 then flag=false end if if not flag then response.write "" if Q="submit" then response.write "

" response.write "For Registered Suppliers:
" response.write "If you are a listed on easy2source.com Directory Section then, please enter your login details :" elseif Q="update" then response.write "
" response.write "For Registered Suppliers:
" response.write "If you are a listed on easy2source.com Directory Section then, please enter your login details to Update Your Listing / Products :
" elseif Q="view" then response.write "
" response.write "For Registered Suppliers:
" response.write "If you are a listed on easy2source.com Directory Section then, please enter your login details to View Your Inquiries :" end if dispform end if End Sub %> <% Sub validation2 if request("action") = "captcha" then if cstr(request("captcha")) = cstr(session("captcha")) then connection s="select supplier_id from login where login_name='"&login&"' and password='"&password&"'" set r=server.createobject("adodb.recordset") r.open s, db, 3 if r.recordcount=0 then flag=false if Q="submit" then response.write "
" response.write "For Registered Suppliers:
" response.write "If you are a Listed on easy2source.com Directory Section then, please enter your login details :

" response.write "" response.write "Error : Invalid login name and/or password, please re-enter the data" elseif Q="update" then response.write "
" response.write "For Registered Suppliers:
" response.write "If you are a Listed on easy2source.com Directory Section then, please enter your login details to Update Your Listing / Products :

" response.write "" response.write "Error : Invalid login name and/or password, please re-enter the data" elseif Q="view" then response.write "
" response.write "For Registered Suppliers:
" response.write "If you are a Listed on easy2source.com Directory Section then,
Please enter your login details to View Your Inquiries :

" response.write "" response.write "Error : Invalid login name and/or password, please re-enter the data" end if dispform else if request("action") = "captcha" then if cstr(request("captcha")) = cstr(session("captcha")) then supplier_id=r("supplier_id") session("myid")=r("supplier_id") else dispform mess="Sorry, security code not match." session("captcha")="" end if else dispform mess="Sorry, security code not match." 'response.Write(request("captcha")&"---111
") 'response.Write(session("captcha")&"++++111
") 'response.End() session("captcha")="" end if end if r.close else mess="Sorry, security code not match." end if end if ' End Sub %> <% sub dispform %> <%'response.write "

" 'response.write "
" 'response.write "" 'response.write "" 'response.write "" 'response.write "" 'response.write "" 'response.write "" 'response.write "" 'response.write "
Login Name:" 'response.write "
Password:" 'response.write "
security code:" 'response.write ""&captcha(captchaLength)&""&mess&"
 " 'response.write "" 'response.write "  
" 'response.write "Forgot YourPassword?


" 'response.write "
" 'response.write "Not Yet Registered?
" 'response.write "Submit your company details free on easy2source.com Click Here

"%>

 
Registered Suppliers
 
Login Name : ">Enter your email ID for login
Password : ">
security code : <%=captcha(captchaLength)%><%=mess%>
forgot Password ?
   
  
Not Registered Yet
   Register with easy2soruce.com to:
• Submit your company details free on easy2source.com
• Sign up for Product Alert e-mail updates on new products and suppliers
• Save time by enjoying the convenience of using forms already filled in with your details when contacting suppliers.
<% end sub %> <% Sub dispdetails if request("action") = "captcha" then if cstr(request("captcha")) = cstr(session("captcha")) then session("myid")=supplier_id session("Q") = Q if Q="submit" then 'response.redirect("productentry.asp?tempflag=false") response.write "
" response.write "" response.write "
" %> <% elseif Q="update" then ' response.redirect("editcompany.asp") %> <% end if connection s="select * from supplier where supplier_id = "&supplier_id set r1=server.createobject("adodb.recordset") r1.open s, db, 3 s="select * from Product_Inquiry where supplier_id="&supplier_id&" order by Inquiry_Date desc" set rs13=server.createobject("adodb.recordset") rs13.open s, db, 3 s="select * from Directory_Inquiry where supplier_id="&supplier_id&" order by Inquiry_Date desc" set r2=server.createobject("adodb.recordset") r2.open s, db, 3 r2.PageSize=10 r2.CacheSize=10 pages=r2.pagecount count=r2.recordcount if request.querystring("currpage")="" then currpage=1 else currpage=int(request.querystring("currpage")) end if if r2.recordcount > 0 then r2.AbsolutePage=currpage start2=r2.AbsolutePosition end if if currpage=pages then finish=count else finish=start+r2.pagesize-1 end if response.write "
" response.write "
" response.write "" response.write "" response.write "" 'response.write "" 'response.write "" response.write "" response.write "
" response.write "  View Supplier Inquiry ("&r2.recordcount&")
" response.write "  View Product Inquiry ("&rs13.recordcount&")
" response.write " Update Listing
" 'response.write "  Update Products
" 'response.write "  Add More Products
" response.write "  Change Password
" response.write "  Logout
" response.write "
" response.write "
" response.write ""&r1("company_name")&"

" if session("Company_name")="" then session("Company_Name")= r1("company_name") if count=0 then response.write "

Sorry! You have no inquiry from directory section. To view your product inquiries click here.

" exit sub else response.write " The following are the inquiries you have received from the directory section. To view your product inquiries click here.

" response.write "

" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" set r3=server.createobject("adodb.recordset") set r4=server.createobject("adodb.recordset") dim k k = 0 for i=start to finish s="select * from Member where Member_id="&r2("member_id")&" " r3.open s, db, 3 response.write "" response.write "" 'date/time formated by nimit - 29-11-04 response.write "" response.write "" response.write "" response.write "" k = k + 1 r2.movenext if r2.eof then exit for 'r4.close r3.close next end if response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "To view an inquiry, click on corresponding company name" response.write "
Select
Inquiry Date" response.write "Company Name" response.write "Inquiry
" response.write " "&r3("Company")&"
" response.write "               
" r1.close r2.close set r1=nothing set r2=nothing db.close set db=nothing pagewisedisplay else dispform mess="Sorry, security code not match." end if end if End Sub %> <% Sub pagewisedisplay dim i,s1,s2,dstart1 response.write "
" End Sub %>
<% Sub Bottom_Patch %>
<% End Sub %>