<% on error resume next ProjID = request.querystring("ID") Email = request.querystring("eml") '--------Initiliasing variables------------------- Dim AdoCon Dim RsSearch Dim SQLProj Dim RsPrc Dim SQLPrc '------Create Connection----------------------------------- Set AdoCon = server.createobject("ADODB.CONNECTION") AdoCon.Open "Driver={MICROSOFT ACCESS DRIVER (*.mdb)};DBQ=" & server.mappath("/DB/fh.mdb") Set RsSearch = server.createobject("ADODB.RECORDSET") Set RsSearchPrev = server.createobject("ADODB.RECORDSET") '--------------- SQL Statements ------------------- SQLSearch = "select * from enquiries WHERE EnquiryID=" & ProjID' &"'" SQLPrev = "select * from enquiries WHERE email='" & Email &"' AND EnquiryID <> " & ProjID '---------------------------------------------------------------- RsSearch.Open SQLSearch,AdoCon,3,3 RsSearchPrev.Open SQLPrev,AdoCon,3,3 'response.write RsSearchPrev.recordcount Dim Mesg if RsSearchPrev.recordcount=0 then Mesg = "No previous Enquiries for this client found" else Mesg = "Found" end if 'response.write Email 'response.write Mesg %> View Enquiry Details
 

    View Enquiry details
 Admin Home  Enquiries page  
 

 
     
 

                
   Enquiry Status : <%=RsSearch("enquirystatus")%>  Assigned to: <%=RsSearch("assignedto")%>
   Enquiry Date: <%=RsSearch("enquirydate")%>  Assign Date: <%=RsSearch("assignDate")%>

 
 
 Enquiry ID  <%=RsSearch("EnquiryID")%>   <%=RsSearch("subject")%> 
 Property ID <%=RsSearch("PROPID")%> 
 Looking for No of Bedrooms: <%=RsSearch("bedrooms")%> 
 
     
 
 Name: <%=RsSearch("Cname")%> 
 City:  <%=RsSearch("city")%>
 Country  <%=RsSearch("country")%>
 Phone <%=RsSearch("phone")%> 
 Mobile <%=RsSearch("mobile")%> 
 E mail <%=RsSearch("email")%> 
 
     
     
 
 comments <%=RsSearch("comments")%> 
 
     
 
 salaried/Self Employed <%=RsSearch("salaried")%>  Are you planning to visit Dubai <%=RsSearch("visitDubai")%> 
 want to be Contacted <%=RsSearch("wantContact")%>  Are you looking for finance option <%=RsSearch("finance")%> 
 Contact Time <%=RsSearch("ContactTime")%>     
 
     
  <%Dim j j = RsSearch("enquirystatus") if j="Open" then%> ">This is an Open Enquiry to view the follow up click here"> <%end if%>  
  Enter assigning comments:  
   
  Assign to         
     

<%if Mesg="Found" then%>  Previous Enquiries send by this client <%do while not RsSearchPrev.eof%> <%RsSearchPrev.movenext%> <%loop%>
Name Subject Email Date Assigned to
 <%=RsSearchPrev("cname")%>  <%=RsSearchPrev("subject")%>  <%=RsSearchPrev("email")%>  <%=RsSearchPrev("enquirydate")%>  <%=RsSearchPrev("assignedto")%>
<%else%>   No History Found for this client <%end if%> <%RsSearchPrev.close set RsSearchPrev=nothing AdoCon.Close Set AdoCon=Nothing%>