PROPERTIES
<%if request("areaid") <> "" then%>
<%Set MyCmd1 = Server.CreateObject("ADODB.Command")
MyCmd1.ActiveConnection = MyConn
MyCmd1.CommandText = "SELECT Area FROM Forces_LocationAreas WHERE AreaID = ?"
MyCmd1.Parameters.Append MyCmd1.CreateParameter("", 3, 1, , request("areaid"))
Set RSArea = Server.CreateObject("ADODB.RecordSet")
RSArea.Open MyCmd1%>
FOR SALE in the United Kingdom - <%if not RSArea.EOF then%><%=RSArea("Area")%><%end if%>
<%
Set MyCmd = Server.CreateObject("ADODB.Command")
MyCmd.ActiveConnection = MyConn
MyCmd.CommandText = "SELECT * FROM Forces_Properties WHERE Deleted = 'no' AND PropertyType = 'forsale' AND Paid = 'yes' AND DATEADD(month, 6, EntryDate) > Convert(datetime,'"&now()&"',103) AND Location = 'uk' AND AreaID = ? "
MyCmd.Parameters.Append MyCmd.CreateParameter("", 3, 1, , request("areaid"))
Set RSItems = Server.CreateObject("ADODB.RecordSet")
RSItems.Open MyCmd
if RSItems.EOF then%>
Sorry! No properties for sale at the moment.
<%else
Do WHILE NOT RSItems.EOF%>
£<%=RSItems("Price")%>
<%if RSItems("Thumb1") <> "" then
sayimg = RSItems("Thumb1")
else
sayimg = "nophoto.jpg"
end if%>
">
<%RSItems.Movenext
Loop
end if%>
TO LET in the United Kingdom - <%if not RSArea.EOF then%><%=RSArea("Area")%><%end if%>
<%
Set MyCmd2 = Server.CreateObject("ADODB.Command")
MyCmd2.ActiveConnection = MyConn
MyCmd2.CommandText = "SELECT * FROM Forces_Properties WHERE Deleted = 'no' AND PropertyType = 'tolet' AND Paid = 'yes' AND DATEADD(month, 6, EntryDate) > Convert(datetime,'"&now()&"',103) AND Location = 'uk' AND AreaID = ? "
MyCmd2.Parameters.Append MyCmd2.CreateParameter("", 3, 1, , request("areaid"))
Set RSItems = Server.CreateObject("ADODB.RecordSet")
RSItems.Open MyCmd2
if RSItems.EOF then%>
Sorry! No properties to let at the moment.
<%else
Do WHILE NOT RSItems.EOF%>
£<%=RSItems("Price")%>
<%if RSItems("Thumb1") <> "" then
sayimg = RSItems("Thumb1")
else
sayimg = "nophoto.jpg"
end if%>
">
<%RSItems.Movenext
Loop
end if
else%>
<%if request("country")= "uk" then%>
<%else
if request("country")= "uk" OR request("country")= "cyprus" OR request("country")= "germany" then
if request("country")= "uk" then
saytit = "in the United Kingdom"
elseif request("country")= "cyprus" then
saytit = "in Cyprus"
elseif request("country")= "germany" then
saytit = "in Germany"
end if
%>
FOR SALE <%=saytit%>
<%
Set MyCmd3 = Server.CreateObject("ADODB.Command")
MyCmd3.ActiveConnection = MyConn
MyCmd3.CommandText = "SELECT * FROM Forces_Properties WHERE Deleted = 'no' AND PropertyType = 'forsale' AND Paid = 'yes' AND DATEADD(month, 6, EntryDate) > Convert(datetime,'"&now()&"',103) AND Location = ? "
MyCmd3.Parameters.Append MyCmd3.CreateParameter("", 200, 1, 255 , request("country"))
Set RSItems = Server.CreateObject("ADODB.RecordSet")
RSItems.Open MyCmd3
'GetItems = "SELECT * FROM Forces_Properties WHERE Deleted = 'no' AND PropertyType = 'forsale' AND Paid = 'yes' AND DATEADD(month, 6, EntryDate) > Convert(datetime,'"&now()&"',103) AND Location = '"&request("country")&"' "
'SET RSItems = MyConn.execute(GetItems)
if RSItems.EOF then%>
Sorry! No properties for sale at the moment.
<%else
Do WHILE NOT RSItems.EOF%>
£<%=RSItems("Price")%>
<%if RSItems("Thumb1") <> "" then
sayimg = RSItems("Thumb1")
else
sayimg = "nophoto.jpg"
end if%>
">
<%RSItems.Movenext
Loop
end if%>
TO LET <%=saytit%>
<%
Set MyCmd4 = Server.CreateObject("ADODB.Command")
MyCmd4.ActiveConnection = MyConn
MyCmd4.CommandText = "SELECT * FROM Forces_Properties WHERE Deleted = 'no' AND PropertyType = 'tolet' AND Paid = 'yes' AND DATEADD(month, 6, EntryDate) > Convert(datetime,'"&now()&"',103) AND Location = ? "
MyCmd4.Parameters.Append MyCmd4.CreateParameter("", 200, 1, 255 , request("country"))
Set RSItems = Server.CreateObject("ADODB.RecordSet")
RSItems.Open MyCmd4
'GetItems = "SELECT * FROM Forces_Properties WHERE Deleted = 'no' AND PropertyType = 'tolet' AND Paid = 'yes' AND DATEADD(month, 6, EntryDate) > Convert(datetime,'"&now()&"',103) AND Location = '"&request("country")&"' "
'SET RSItems = MyConn.execute(GetItems)
if RSItems.EOF then%>
Sorry! No properties to let at the moment.
<%else
Do WHILE NOT RSItems.EOF%>
£<%=RSItems("Price")%>
<%if RSItems("Thumb1") <> "" then
sayimg = RSItems("Thumb1")
else
sayimg = "nophoto.jpg"
end if%>
">
<%RSItems.Movenext
Loop
end if%>
<%else%>
<%end if
end if
end if%>