%@ Language = VBScript %> <% Option Explicit %> <% response.buffer = true response.expiresAbsolute = #1/1/2000# response.CacheControl = "Private" dim relative_path_to_database dim this_page dim table_name dim item_type relative_path_to_database = "2020applications.mdb" %> <% this_page = "propertylistings" table_name = "properties" item_type = "property" dim propertyID CALL GetTemplate_Styles_Header(this_page) cn.close set cn=nothing dim SQL dim sub_rs dim i dim company_rs dim display_options_array dim ID_array dim j %> <% SUB WriteDocuments(ID) SQL = "SELECT * FROM "& item_type &"_images WHERE "& item_type &"ID = "& ID &" AND NOT isPhoto;" set sub_rs = Server.CreateObject("ADODB.RecordSet") sub_rs.Open SQL,cn,3,1,-1 IF sub_rs.RecordCount = 0 THEN ' ELSE response.write("
Documents:
")
sub_rs.MoveFirst
DO UNTIL sub_rs.EOF
%>
" target=_blank>" border=0 width=16 height=16>
" target=_blank>
<% IF sub_rs("notes") <> "" THEN %>
<%=sub_rs("notes")%>
<% ELSE %>
<%=Replace(sub_rs("imageURL"),"uploads/","")%>
<% END IF %>
<%
sub_rs.MoveNext
LOOP
response.write("
1 THEN response.write("colspan=5") %> align=center> |
1 THEN response.write("colspan=5") %>> ¬es=<%=ReplaceQuotes(images_array(2,i))%>','400','300','0','0','no','no','yes','no','no','yes');return false;" width=300 height=225 border=1 style=border-style:solid;border-width:1px;border-color:#000000; alt="Click on Photos to Enlarge."> |
¬es=<%=ReplaceQuotes(images_array(2,i))%>','400','300','0','0','no','no','yes','no','no','yes');return false;" onMouseOver="changeImageInfo('<%=images_array(1,i)%>','<%=images_array(2,i)%>');return false;" onMouseOut="changeImageInfo('<%=images_array(1,0)%>','<%=images_array(2,0)%>');return false;"> | <% IF i MOD 5 = 0 THEN response.write("") i = i + 1 LOOP response.write("") END IF END IF %> |
<%=display_title%> | <% IF status = "Reduced" OR status = "Sold" OR status = "Contract Pending" THEN response.write(""& status &" ") ELSE set sub_rs = cn.Execute("SELECT categories.categoryname FROM categories INNER JOIN category_"& item_type &"_link ON categories.categoryID = category_"& item_type &"_link.categoryID WHERE category_"& item_type &"_link."& item_type &"ID = "& ID &" AND (categories.categoryname = 'For Sale' OR categories.categoryname = 'For Rent' OR categories.categoryname = 'For Lease' OR categories.categoryname = 'For Sale by Auction' OR categories.categoryname = 'For Sale or Lease' OR categories.categoryname = 'Display Only');") IF sub_rs.bof AND sub_rs.eof THEN ' ELSE sub_rs.movefirst %> <%=sub_rs("categoryname")%> <% END IF sub_rs.close set sub_rs=nothing END IF IF display_options_array(4) <> 0 AND status <> "Display Only" THEN IF status = "Reduced" THEN response.write(""& DisplayCurrency(listing_price) &"") ELSE response.write(DisplayCurrency(listing_price)) END IF IF len(listing_price_terms) > 0 THEN response.write(" "& Replace(listing_price_terms,"Per"," /")) END IF END IF %> | ||
|
|||
<% set sub_rs = cn.Execute("SELECT people.peopleID,people.title,people.firstname,people.lastname FROM people INNER JOIN people_"& item_type &"_link ON people.peopleID = people_"& item_type &"_link.peopleID WHERE people_"& item_type &"_link."& item_type &"ID = "& ID &";") IF sub_rs.bof AND sub_rs.eof THEN ' ELSE sub_rs.movefirst %> <%=Agent%>: " class=incolouredtablecell><%=sub_rs("title")%> <%=sub_rs("firstname")%> <%=sub_rs("lastname")%> <% END IF sub_rs.close set sub_rs = nothing %> | " class=incolouredtablecell>More Info > |
<% j = Replace(Replace(request.querystring("categoryID_list"),", ","_"),"__","_") IF Left(j,1) = "_" THEN j = Mid(j,2) END IF IF Right(j,1) = "_" THEN j = Left(j,len(j)-1) END IF IF Instr(j,"_") <> 0 THEN ID_array = Split(j,"_") FOR i = 0 TO UBound(ID_array) set rs=cn.Execute("SELECT categoryname FROM categories WHERE categoryID = "& ID_array(i) &";") IF rs.bof AND rs.eof THEN ' ELSE IF i <> UBound(ID_array) THEN IF i = 0 THEN %> "><%=rs("categoryname")%> > <% ELSE %> "><%=rs("categoryname")%> or <% END IF ELSE %> "><%=rs("categoryname")%> <% END IF END IF rs.close set rs = nothing NEXT ELSE i = 1 set rs=cn.Execute("SELECT categoryname FROM categories WHERE categoryID = "& j &";") IF rs.bof AND rs.eof THEN ' ELSE response.write(""& rs("categoryname") &"") END IF rs.close set rs = nothing END IF %> |
"& WritePageTitle &" |
<%
IF total_records > 1 THEN
%>
Total Records Found : <%=total_records%>
<% END IF %>
<% IF total_page_count > 1 THEN %>
| Displaying page <%=current_page%> of <%=total_page_count%>
<% END IF %>
<%
IF request.querystring("agentID") <> "" THEN
set sub_rs = cn.Execute("SELECT * FROM people WHERE peopleID = "& request.querystring("agentID") &";")
IF sub_rs.bof AND sub_rs.eof THEN
'
ELSE
sub_rs.movefirst
%>
| All Listings of : <%=sub_rs("title")%> <%=sub_rs("firstname")%> <%=sub_rs("lastname")%>
<%
END IF
sub_rs.close
set sub_rs = nothing
END IF
%>
|
<% IF CInt(current_page) > 2 THEN %> « ">First <% ELSE %> « First <% END IF %> <% IF CInt(current_page) > 1 THEN %> < ">Previous <% ELSE %> < Previous <% END IF %> | ">All Results | <% IF CInt(current_page) < CInt(total_page_count) THEN %> ">Next > <% ELSE %> Next > <% END IF %> <% IF CInt(current_page) < CInt(total_page_count-1) THEN %> ">Last » <% ELSE %> Last » <% END IF %> <% IF page_location="top" THEN response.write(" ") %> |
<%=display_title%> | |
<% set sub_rs = cn.Execute("SELECT "& item_type &"_images.imageURL FROM "& item_type &"_images WHERE "& item_type &"ID = "& ID &" AND isPhoto ORDER BY order_number;") IF sub_rs.bof AND sub_rs.eof THEN response.write("") ELSE sub_rs.movefirst %> ">" width=112 height=84 border=0 alt="Click to View Details of this <%=item_type%>"> <% END IF sub_rs.close set sub_rs=nothing %> |
<%=city%>, <%=province%>
<% IF county <> "" AND display_options_array(23) <> 0 THEN response.write("("& county &")") %> <% IF display_options_array(4) <> 0 AND status <> "Display Only" THEN IF status = "Reduced" THEN response.write(""& status &": "& DisplayCurrency(listing_price) &"") ELSEIF status = "Sold" OR status = "Contract Pending" THEN response.write(""& status &": "& DisplayCurrency(listing_price)) ELSE response.write("Price: "& DisplayCurrency(listing_price)) END IF IF len(listing_price_terms) > 0 THEN response.write(" "& Replace(listing_price_terms,"Per"," /")) END IF response.write(" ") END IF IF request.querystring("sale_type") <> "" THEN set sub_rs = cn.Execute("SELECT categories.categoryname FROM categories INNER JOIN category_"& item_type &"_link ON categories.categoryID = category_"& item_type &"_link.categoryID WHERE category_"& item_type &"_link."& item_type &"ID = "& ID &" AND (categories.categoryname = 'For Sale' OR categories.categoryname = 'For Rent' OR categories.categoryname = 'For Lease' OR categories.categoryname = 'For Sale by Auction' OR categories.categoryname = 'For Sale or Lease' OR categories.categoryname = 'Display Only');") IF sub_rs.bof AND sub_rs.eof THEN ' ELSE sub_rs.movefirst %> <%=sub_rs("categoryname")%> <% END IF sub_rs.close set sub_rs=nothing END IF IF lot_area <> "" AND display_options_array(8) <> 0 THEN response.write(fieldLotArea &": "& lot_area &" ") END IF IF finished_area <> "" AND display_options_array(21) <> 0 THEN response.write(fieldFinishedArea &": "& finished_area &" ") END IF IF bedrooms <> "" AND bedrooms > 0 AND display_options_array(11) <> 0 THEN response.write(fieldBedrooms &": "& bedrooms &" ") END IF IF bathrooms <> "" AND bathrooms > 0 AND display_options_array(10) <> 0 THEN response.write(fieldBathrooms &": "& bathrooms &" ") END IF IF mls_number <> "" AND display_options_array(7) <> 0 THEN response.write(fieldMLSNumber &": "& mls_number &" ") END IF %> ">View Details > |
Or you can browse by Geographic Location.
<% END IF set fs = nothing set fs = Server.CreateObject("Scripting.FileSystemObject") If fs.FileExists(Server.MapPath("people.asp")) THEN %>Perhaps you would like to Find an <%=Agent%>!
<% END IF set fs = nothing ELSE dim s_list s_list = "" SQL = "SELECT DISTINCTROW categories.categoryID, categories.categoryname FROM categories WHERE categories.supercategory = 1 AND categories.categoryID IN (SELECT category_"& item_type &"_link.categoryID as [temp] FROM category_"& item_type &"_link INNER JOIN "& table_name &" ON "& table_name &"."& item_type &"ID = category_"& item_type &"_link."& item_type &"ID WHERE "& table_name &".show_on_website " IF itemsExpire AND hideExpiredFromPublic THEN SQL = SQL &" AND (NOT isDate("& table_name &".closing_date) OR DateDiff('D',"& table_name &".closing_date,Date()) < 0) " END IF SQL = SQL &") ORDER BY categories.categoryname;" set sub_rs = cn.Execute(SQL) IF sub_rs.bof AND sub_rs.eof THEN ' ELSE sub_rs.movefirst %>Sorry, there are no records to display.
You should either <% IF request.servervariables("HTTP_REFERER") <> "" THEN %> ">go back to the previous page <% ELSE %> go back to the previous page <% END IF %> , or try a new search:
<% CALL WriteBrowseOptions CALL WriteSearch(this_page &".asp") ELSE top_rs.AbsolutePage = current_page records_displayed = 0 CALL WriteBrowseOptions DO UNTIL records_displayed = CInt(page_size) OR top_rs.eof IF total_records = 1 OR page_size = 1 THEN IF request.querystring("agentID") <> "" AND records_displayed = 0 THEN CALL WriteAgentInfo("peopleID",request.querystring("agentID")) %>"><%=fieldPropertiesCity%>, <%=fieldPropertiesProvince%> | "><%=fieldListingPrice%> | ||
<%=display_title%> |
<%
set sub_rs = cn.Execute("SELECT categories.categoryname FROM categories INNER JOIN category_"& item_type &"_link ON categories.categoryID = category_"& item_type &"_link.categoryID WHERE category_"& item_type &"_link."& item_type &"ID = "& ID &" AND (categories.categoryname = 'For Sale' OR categories.categoryname = 'For Lease' OR categories.categoryname = 'For Rent' OR categories.categoryname = 'For Sale by Auction' OR categories.categoryname = 'For Sale or Lease' OR categories.categoryname = 'Display Only');")
IF sub_rs.bof AND sub_rs.eof THEN
'
ELSE
response.write(sub_rs("categoryname") &" ")
END IF
sub_rs.close
set sub_rs = nothing
IF sale_price > 0 AND sale_price < listing_price AND status <> "Sold" AND status <> "Contract Pending" THEN
status = "Reduced"
END IF
IF DisplayDate(closing_date,2) <> "" AND itemsExpire THEN
IF status <> "Sold" THEN
IF DateDiff("d",Now(),FixDate(closing_date)) < 0 THEN status = "Closed"
END IF
END IF
SELECT CASE status
CASE "Active","Accepting Bids"
IF display_options_array(4) <> 0 THEN
%>
<%=DisplayCurrency(listing_price)%><% IF len(listing_price_terms) > 0 THEN response.write(Replace(listing_price_terms,"Per"," /"))%> <% ELSE %> <% END IF IF display_options_array(1) <> 0 THEN %> <%=status%> <% ELSE %> <% END IF CASE "Closed" IF display_options_array(4) <> 0 THEN %> <%=DisplayCurrency(listing_price)%><% IF len(listing_price_terms) > 0 THEN response.write(" "& Replace(listing_price_terms,"Per"," /"))%> <% END IF IF display_options_array(1) <> 0 THEN %> <%=status%> <% IF display_options_array(3) <> 0 AND DisplayDate(closing_date,2) <> "" THEN response.write(" "& DisplayDate(closing_date,2)) %> <% IF sale_price > 0 AND display_options_array(5) <> 0 THEN response.write(DisplayCurrency(sale_price)) %> <% ELSE %> <% END IF CASE "Contract Pending" IF display_options_array(4) <> 0 THEN %> <%=DisplayCurrency(listing_price)%><% IF len(listing_price_terms) > 0 THEN response.write(" "& Replace(listing_price_terms,"Per"," /"))%> <% ELSE %> <% END IF IF display_options_array(1) <> 0 THEN %> <%=status%> <% END IF IF display_options_array(5) <> 0 AND IsNumeric(sale_price) THEN IF sale_price > 0 THEN %> <%=DisplayCurrency(sale_price)%> <% END IF END IF %> <% CASE "Sold", "Reduced" IF display_options_array(4) <> 0 THEN %> <%=DisplayCurrency(listing_price)%><% IF len(listing_price_terms) > 0 THEN response.write(" "& Replace(listing_price_terms,"Per"," /"))%> <% ELSE %> <% END IF IF display_options_array(1) <> 0 THEN %> <%=status%> <% END IF IF display_options_array(5) <> 0 AND IsNumeric(sale_price) THEN IF sale_price > 0 THEN %> <%=DisplayCurrency(sale_price)%> <% END IF END IF %> <% CASE "Display Only" %> <% CASE ELSE END SELECT %> |
<% IF (city <> "" AND province <> "") AND display_options_array(22) <> 0 THEN %> <% END IF IF len(virtualtour_URL) > 7 THEN %> <% END IF %> <% IF status <> "Display Only" THEN %> <% END IF %> |
|
<% CALL WritePhotos(ID,status) %> | ||||||||||||||||||||||||||||||||||||||||||
<% IF general_description <> "" AND display_options_array(0) <> 0 THEN response.write(" "& fieldGeneralDescription &": "& fieldSpaceDetails &": "& fieldBasement &": "& fieldConstructionDetails &": "& fieldFeatures &": "& fieldSalesNotes &": |