<% On Error Resume Next Category = "Rent" Action = Left(UCase(Request("Action")),5) Dim objCDOMail 'The CDO object If Action = "SUBMI" Then sql = "insert into Contacts(Title,FirstName,LastName,Address1," sql = sql & "Address2,City,PostCode,Country," sql = sql & "emailadd,MobileNumber,PhoneNumber,FaxNumber,WorkNumber," sql = sql & "Mail,Email,SMS," sql = sql & "Phone,Fax,MinBeds,MinRecp,BuildType,MinPrice,MaxPrice," sql = sql & "Town,Area,Category,Furnishings,LeasePeriod,Status,Entered)" sql = sql & "VALUES( " sql = sql & CheckString(Request("Title"),",") sql = sql & CheckString(Request("FirstName"),",") sql = sql & CheckString(Request("LastName"),",") sql = sql & CheckString(Request("Address1"),",") sql = sql & CheckString(Request("Address2"),",") sql = sql & CheckString(Request("City"),",") sql = sql & CheckString(Request("PostCode"),",") sql = sql & CheckString(Request("Country"),",") sql = sql & CheckString(Request("EmailAddress"),",") sql = sql & CheckString(Request("MobileNumber"),",") sql = sql & CheckString(Request("PhoneNumber"),",") sql = sql & CheckString(Request("FaxNumber"),",") sql = sql & CheckString(Request("WorkNumber"),",") If Request("Mail") = "on" Then sql = sql & "1" & "," Else sql = sql & "0" & "," End If If Request("Email") = "on" Then sql = sql & "1" & "," Else sql = sql & "0" & "," End If If Request("SMS") = "on" Then sql = sql & "1" & "," Else sql = sql & "0" & "," End If If Request("Phone") = "on" Then sql = sql & "1" & "," Else sql = sql & "0" & "," End If If Request("Fax") = "on" Then sql = sql & "1" & "," Else sql = sql & "0" & "," End If sql = sql & Request("MinBeds") & "," sql = sql & Request("MinRecp") & "," sql = sql & CheckString(Request("BuildType"),",") sql = sql & RemoveComma(Request("MinPrice")) & "," sql = sql & RemoveComma(Request("MaxPrice")) & "," sql = sql & CheckString(Request("Town"),",") sql = sql & CheckString(Request("Area"),",") sql = sql & "'MailList'," sql = sql & CheckString(Request("Furnishings"),",") sql = sql & CheckString(Request("LeasePeriod"),",") sql = sql & "'Active'," sql = sql & "{fn now()}" sql = sql & ")" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open strConnection Conn.Execute(sql) 'response.write sql Conn.Close Set Conn = Nothing 'Send an email to the shop owner 'Dim objCDOMail 'The CDO object MsgStr = "You have received a new Mailing list entry from " MsgStr = MsgStr & "Title: " & Request("Title") MsgStr = MsgStr & " First Name: " & Request("FirstName") MsgStr = MsgStr & " Last Name: " & Request("LastName") MsgStr = MsgStr & " Address: " & Request("Address1") MsgStr = MsgStr & " Address2: " & Request("Address2") MsgStr = MsgStr & " City: " & Request("City") MsgStr = MsgStr & " Post Code: " & Request("PostCode") MsgStr = MsgStr & " Country: " & Request("Country") MsgStr = MsgStr & " Telephone: " & Request("PhoneNumber") MsgStr = MsgStr & " Work Phone: " & Request("WorkNumber") MsgStr = MsgStr & " Mobile: " & Request("MobileNumber") MsgStr = MsgStr & " Fax: " & Request("FaxNumber") MsgStr = MsgStr & " Email: " & Request("EmailAddress") MsgStr = MsgStr & " MinPrice: " & Request("MinPrice") MsgStr = MsgStr & " MaxPrice: " & Request("MaxPrice") MsgStr = MsgStr & " Beds: " & Request("Beds") MsgStr = MsgStr & " Receps: " & Request("Recp") MsgStr = MsgStr & " Furn: " & Request("Furniture") MsgStr = MsgStr & " Lease: " & Request("LeasePeriod") MsgStr = MsgStr & " Town: " & Request("Town") ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") ' Set the properties of the object objCDOMail.From = "webmaster@yorkshirehomes.com" objCDOMail.To = "homes@yorkshirehomes.com" objCDOMail.Subject = "Yorkshire Homes Web Site Contact" objCDOMail.Body = MsgStr objCDOMail.Send Set objCDOMail = Nothing Response.Redirect "Regthanks.asp?sender=" & Request("FirstName") & " " & Request("LastName") End If Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open strConnection SQL = "Select dbstate from dbstatus" Set RSstatus = Conn.Execute(SQL) If RSstatus.EOF AND RSstatus.BOF then MsgStr = "Warning, someone has tried to visit the property database" MsgStr = MsgStr & "and it wasn't working." ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") ' Set the properties of the object objCDOMail.From = "webmaster@yorkshirehomes.com" objCDOMail.To = "homes@yorkshirehomes.com" objCDOMail.Subject = "Yorkshire Homes DB Fail" objCDOMail.Body = MsgStr objCDOMail.Send Set objCDOMail = Nothing response.redirect "offline.asp" RSstatus.Close Conn.Close Else DBState = RSstatus("dbstate") If DBState <> "Live" then MsgStr = "Warning, someone has tried to visit the property database" MsgStr = MsgStr & "and it was off line." ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") ' Set the properties of the object objCDOMail.From = "webmaster@yorkshirehomes.com" objCDOMail.To = "homes@yorkshirehomes.com" objCDOMail.Subject = "Yorkshire Homes DB Off Line" objCDOMail.Body = MsgStr objCDOMail.Send Set objCDOMail = Nothing response.redirect "offline.asp" RSstatus.Close Conn.Close End If End If %> Yorkshire Homes Residential Letting Agents

Mailing list Registration.

Complete this form to ensure that you are alerted about new properties meeting your requirements as soon as they become available.

<%If Category = "Rent" Then%> <%End If%>
<%End If%>
<%If Category = "Rent" Then%> Personal Contact Information
Title:
First Name:
Last Name:
Address
City          
Post Code
Country    
Contact Numbers
Home Phone
Mobile Phone
Fax
Work Phone
 Email Address

Method of Communicating New Properties 

Telephone

SMS Text message
Fax
Email
Mail

 
<%If Category = "Rent" Then%> <%End If%>
<%End If%>
<%If Category = "Rent" Then%> Rental Property Requirements <%Else%> Property Requirements
Price Range: From £ To £
Town
Type
Min. Bedrooms
Min. Receptions
Furnishings:

Lease Period:
Please note that any advice offered by Yorkshire Homes or any of it's staff is given without warranty. Yorkshire Homes accepts no responsibility for the accuracy of the information provided or any damage or loss caused as a consequence of it's implementation.