<% set rs = conn.execute("Select featuredlistings.show_home_pic, featuredlistings.show_home_price, featuredlistings.show_home_address, listing.price, listing.id, listing.pic1, featuredlistings.listing_id, featuredlistings.active, listing.address1 from listing INNER JOIN featuredlistings ON listing.id = featuredlistings.listing_id where realtor="& iAgentID &" and active=1")
If rs.eof then
%>
<% else %>
<%end if
set rs = conn.execute("Select featuredlistings.show_home_pic, featuredlistings.show_home_price, featuredlistings.show_home_address, listing.id, listing.pic1, featuredlistings.listing_id, featuredlistings.active, listing.address1 from listing INNER JOIN featuredlistings ON listing.id = featuredlistings.listing_id where (realtor="& iAgentID &") and (active=1) AND (show_home_pic =1 OR show_home_price =1 AND show_home_price =1)")
If rs.eof then
%>
<% else %> |
| |

<%
dim iOrderBy, strOrderby, iDescAsc, strAscDesc
iOrderBy = RandomNumber(5)
If iOrderBy = 1 then
strOrderby = "listing.id"
ElseIf iOrderBy = 2 Then
strOrderby = "listing.city"
ElseIf iOrderBy = 3 Then
strOrderby = "listing.targetState"
ElseIf iOrderBy = 4 Then
strOrderby = "listing.price"
Else
strOrderby = "listing.address1"
End If
iDescAsc = RandomNumber(1)
If iDescAsc = 1 then
strAscDesc = "ASC"
Else
strAscDesc = "DESC"
End If
'Show featured homes if selected to be on home page
set rs1 = conn.execute("Select listing.address1, listing.city, listing.targetState, listing.price, listing.pic1, featuredlistings.show_home_pic, featuredlistings.show_home_price, featuredlistings.show_home_address, listing.id, featuredlistings.listing_id, featuredlistings.active, listing.address1 from listing INNER JOIN featuredlistings ON listing.id = featuredlistings.listing_id where (realtor="& iAgentID &") and (active=1) and (featuredlistings.show_home_pic=1 OR featuredlistings.show_home_price=1 or featuredlistings.show_home_address=1) order by "& strOrderby &" "& strAscDesc &" LIMIT 1")
If not rs1.eof then
If (NOT isnull(rs1("pic1"))) AND (rs1("pic1") <> "") and (rs1("show_home_pic")=1) then
response.write " ![]() "
End if
If (rs1("price") <> "") AND (rs1("show_home_price") = 1) Then
response.write " "& formatcurrency(rs1("price")) &" "
Else
response.write " "
End If
If (rs1("address1") <> "") AND (rs1("show_home_address") = 1) Then
response.write " "&rs1("address1")&" "
Else
response.write " "
End If
End if
set rs1 = nothing
Function RandomNumber(intHighestNumber)
Randomize
RandomNumber = Int(Rnd * intHighestNumber) + 1
End Function
%>
|
| |
Please take a look at my Showcased Homes. These homes are absolutely beautiful and are priced right. Please select an address from the list below. |
|
|
|
|
 |