 |
<% 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
%>
|
|
|
|
<% end if %> |
|
 |
Washington, DC Metro Area Real Estate
Looking to buy or sell a home in the Washington, DC Metropolitan area? ChrisDyerHomes.com is your ultimate real estate resource. This website gives you direct access to information about all of the MLS listed homes for sale in the region. You will find ChrisDyerHomes.com to be a valuable part of the unparalleled, cutting-edge service we offer all of our clients.
The Chris Dyer Homes Team: Opening Doors Everywhere. |
|
About Clarksburg, Maryland
Clarksburg is a historic Montgomery County town nestled between Washington, DC and Frederick. Known for its scenic landscapes, breathtaking natural resources and convenient access to points north and south, Clarksburg is rapidly becoming one of Maryland's most sought after places to live.
Learn more about Montgomery County and Clarksburg |
|