<% 'no security checking %> <% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.CacheControl = "no-cache" %> <% dbwhere = "" masterdetailwhere = "" searchwhere = "" a_search = "" b_search = "" whereClause = "" %> <% 'get the keys for master table If Request.QueryString("key_m").Count > 0 Then key_m = Request.QueryString("key_m") 'load from query string Session("Listings_masterkey") = key_m 'save master key to session 'reset start record counter (new master key) startRec = 1 Session("Listings_REC") = startRec Else key_m = session("Listings_masterkey") 'restore master key from session End If If key_m <> "" Then masterdetailwhere = "[AgencyID] = " & key_m & "" End If %> <% response.buffer = true 'get key key = request.querystring("key") if key="" or isnull(key) then key=request.form("key") end if if key="" or isnull(key) then response.redirect "default.asp" 'get action a=request.form("a") if a="" or isnull(a) then a="I" 'display with input box end if ' Open Connection to the database set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str Select Case a Case "I": ' Get a record to display tkey = key strsql = "SELECT * FROM [Listings] WHERE [ID]=" & tkey set rs = Server.CreateObject("ADODB.Recordset") rs.Open strsql, conn If rs.EOF Then Response.Clear Response.Redirect "Listingslist.asp" Else rs.MoveFirst End If ' Get the field contents x_ID = rs("ID") x_UserName = rs("UserName") x_L_UserID = rs("L_UserID") x_AgencyID = rs("AgencyID") x_ListNum = rs("ListNum") x_Ref_Num = rs("Ref_Num") x_SubCat = rs("SubCat") x_iDate = rs("iDate") x_View = rs("View") x_Style = rs("Style") x_Rooms = rs("Rooms") x_BuildingSize = rs("BuildingSize") x_LotSize = rs("LotSize") x_Frontage = rs("Frontage") x_Category = rs("Category") x_Address = rs("Address") x_City = rs("City") x_County = rs("County") x_Bedrooms = rs("Bedrooms") x_Baths = rs("Baths") x_Features = rs("Features") x_Price = rs("Price") x_TextPrice = rs("TextPrice") x_Photo = rs("Photo") x_Photo2 = rs("Photo2") x_Thumbnail = rs("Thumbnail") x_Exterior = rs("Exterior") x_Basement = rs("Basement") x_Roof = rs("Roof") x_YearBuilt = rs("YearBuilt") x_Zoning = rs("Zoning") x_Garage = rs("Garage") x_Seasonal = rs("Seasonal") x_Directions = rs("Directions") x_Equipment = rs("Equipment") x_other_info = rs("other_info") x_water_body = rs("water_body") x_Fd_Size = rs("Fd_Size") x_Location = rs("Location") x_Half_Baths = rs("Half_Baths") x_q_baths = rs("q_baths") x_Lot_Desc = rs("Lot_Desc") x_Shore_Rights = rs("Shore_Rights") x_Road_Frntg = rs("Road_Frntg") x_VirtualTour = rs("VirtualTour") x_Email = rs("Email") x_URL = rs("URL") x_ImagesDirectory = rs("ImagesDirectory") x_Kitchen = rs("Kitchen") x_Den = rs("Den") x_LivingRoom = rs("LivingRoom") x_Office = rs("Office") x_DiningRoom = rs("DiningRoom") x_MasterBath = rs("MasterBath") x_OtherBath = rs("OtherBath") x_OtherBath1 = rs("OtherBath1") x_Bedroom1 = rs("Bedroom1") x_Bedroom2 = rs("Bedroom2") x_Bedroom3 = rs("Bedroom3") x_Bedroom4 = rs("Bedroom4") x_Bedroom5 = rs("Bedroom5") x_Taxes = rs("Taxes") x_Book = rs("Book") x_Page = rs("Page") x_TotalSquareFoot = rs("TotalSquareFoot") x_Color = rs("Color") x_Condition = rs("Condition") x_HeatingCost = rs("HeatingCost") x_Water = rs("Water") x_Sewer = rs("Sewer") x_Windows = rs("Windows") x_Thumb1 = rs("Thumb1") x_Thumb2 = rs("Thumb2") x_Thumb3 = rs("Thumb3") x_Thumb4 = rs("Thumb4") x_Thumb5 = rs("Thumb5") x_Thumb6 = rs("Thumb6") x_Thumb7 = rs("Thumb7") x_Thumb8 = rs("Thumb8") x_Image1 = rs("Image1") x_Image2 = rs("Image2") x_Image3 = rs("Image3") x_Image4 = rs("Image4") x_Image5 = rs("Image5") x_Image6 = rs("Image6") x_Image7 = rs("Image7") x_Image8 = rs("Image8") %>

<% End If %>
<% If key_m <> "" Then strmassql = "SELECT * FROM [Clients] WHERE " strmassql = strmassql & "([c_agencyid] = " & key_m & ")" Set rsMas = Server.CreateObject("ADODB.Recordset") rsMas.cursorlocation = 3 rsMas.Open strmassql, conn End If %>

  <% if (rs("Photo")) <> "" Then %>

<% If x_Thumb1 <> "" Then %>

<% If Not IsNull(x_Thumb1) Then %>

<% End If %> <% If Not IsNull(x_Thumb3) Then %> <% End If %> <% If Not IsNull(x_Thumb5) Then %> <% End If %> <% If Not IsNull(x_Thumb7) Then %>

<% End If %> <% If Not IsNull(x_Thumb2) Then %> <% End If %> <% If Not IsNull(x_Thumb4) Then %> <% End If %> <% If Not IsNull(x_Thumb6) Then %>

<% End If %> <% If Not IsNull(x_Thumb8) Then %>

<% End If %>

<% End If %> <% if (rs("Email")) <> "" Then %> <% else %><% end if %>
AGENCY INFORMATION
Listing Number  <% response.write x_ListNum %> 
Agent  <% response.write x_SubCat %> 
Click Here To Send E-MailPlease send us an e-mail if you require more information concerning this property.

<% if (rs("City")) <> "" Then %> <% else %><% end if %> <% if (rs("County")) <> "" Then %> <% else %><% end if %>
PROPERTY LOCATION
Address  <% response.write x_Address %> 
City  <% response.write x_City %> 
County  <% response.write x_County %> 

<% if (rs("Style")) <> "" Then %> <% else %><% end if %> <% if (rs("Rooms")) <> "" Then %> <% else %><% end if %> <% if (rs("Bedrooms")) <> "" Then %> <% else %><% end if %> <% if (rs("Baths")) <> "" Then %> <% else %><% end if %> <% if (rs("Half_Baths")) <> "" Then %> <% else %><% end if %> <% if (rs("q_baths")) <> "" Then %> <% else %><% end if %> <% if (rs("BuildingSize")) <> "" Then %> <% else %><% end if %> <% if (rs("Exterior")) <> "" Then %> <% else %><% end if %> <% if (rs("Basement")) <> "" Then %> <% else %><% end if %> <% if (rs("Fd_Size")) <> "" Then %> <% else %><% end if %> <% if (rs("Roof")) <> "" Then %> <% else %><% end if %> <% if (rs("YearBuilt")) <> "" Then %> <% else %><% end if %> <% if (rs("Garage")) <> "" Then %> <% else %><% end if %> <% if (rs("Seasonal")) <> "" Then %> <% else %><% end if %> <% if (rs("Equipment")) <> "" Then %> <% else %><% end if %> <% if (rs("Other_Info")) <> "" Then %> <% else %><% end if %>
" target="_Blank"> BUILDING INFORMATION
Category  <% response.write x_Category %> 
Style  <% response.write x_Style %> 
Number of Rooms  <% response.write x_Rooms %> 
Bedrooms  <% response.write x_Bedrooms %> 
Baths  <% response.write x_Baths %> 
Half Baths  <% response.write x_Half_Baths %> 
Quarter Baths  <% response.write x_q_baths %> 
Building Size  <% response.write x_BuildingSize %> 
Price  <% if isnumeric(x_Price) then response.write formatcurrency(x_Price,2,-2,-2,-2) else response.write x_Price end if %>  Click price to calculate payment. <% response.write x_TextPrice %>
Features  <%= replace(x_Features & "",chr(10),"
") %>
 
Exterior  <% response.write x_Exterior %> 
Basement  <% response.write x_Basement %> 
Foundation Size  <% response.write x_Fd_Size %> 
Roof  <% response.write x_Roof %> 
Year Built  <% response.write x_YearBuilt %> 
Garage  <% response.write x_Garage %> 
Seasonal  <% response.write x_Seasonal %> 
Furnishings  <%= replace(x_Equipment & "",chr(10),"
") %>
 
Additional Information  <% response.write x_other_info %> 

<% if (rs("LotSize")) <> "" Then %> <% else %><% end if %> <% if (rs("Frontage")) <> "" Then %> <% else %><% end if %> <% if (rs("Zoning")) <> "" Then %> <% else %><% end if %> <% if (rs("Water_Body")) <> "" Then %> <% else %><% end if %> <% if (rs("Location")) <> "" Then %> <% else %><% end if %> <% if (rs("Lot_Desc")) <> "" Then %> <% else %><% end if %> <% if (rs("Shore_Rights")) <> "" Then %> <% else %><% end if %> <% if (rs("Road_Frntg")) <> "" Then %> <% else %><% end if %>
LOT INFORMATION
Lot Size  <% response.write x_LotSize %> 
Frontage  <% response.write x_Frontage %> 
Zoning  <% response.write x_Zoning %> 
water body  <% response.write x_water_body %> 
Location  <% response.write x_Location %> 
Lot Description  <% response.write x_Lot_Desc %> 
Shore Rights  <% response.write x_Shore_Rights %> 
Road Frontage  <% response.write x_Road_Frntg %> 

<% IF x_Kitchen <> "" Then %> <% End If %> <% IF x_Den <> "" Then %> <% End If %> <% IF x_LivingRoom <> "" Then %> <% End If %> <% IF x_Office <> "" Then %> <% End If %> <% IF x_DiningRoom <> "" Then %> <% End If %> <% IF x_MasterBath <> "" Then %> <% End If %> <% IF x_OtherBath <> "" Then %> <% End If %> <% IF x_OtherBath1 <> "" Then %> <% End If %> <% IF x_Bedroom1 <> "" Then %> <% End If %> <% IF x_Bedroom2 <> "" Then %> <% End If %> <% IF x_Bedroom3 <> "" Then %> <% End If %> <% IF x_Bedroom4 <> "" Then %> <% End If %> <% IF x_Bedroom5 <> "" Then %> <% End If %> <% IF x_Taxes <> "" Then %> <% End If %> <% IF x_Book <> "" Then %> <% End If %> <% IF x_Page <> "" Then %> <% End If %> <% IF x_TotalSquareFoot <> "" Then %> <% End If %> <% IF x_Color <> "" Then %> <% End If %> <% IF x_Condition <> "" Then %> <% End If %> <% IF x_HeatingCost <> "" Then %> <% End If %> <% IF x_Water <> "" Then %> <% End If %> <% IF x_Sewer <> "" Then %> <% End If %> <% IF x_Windows <> "" Then %> <% End If %>
ADDITIONAL LISTING DATA
Kitchen <% Response.Write x_Kitchen %>
Den <% Response.Write x_Den %>
Living Room <% Response.Write x_LivingRoom %>
Office <% Response.Write x_Office %>
Dining Room <% Response.Write x_DiningRoom %>
Master Bath <% Response.Write x_MasterBath %>
Other Bath <% Response.Write x_OtherBath %>
Other Bath 1 <% Response.Write x_OtherBath1 %>
Bedroom 1 <% Response.Write x_Bedroom1 %>
Bedroom 2 <% Response.Write x_Bedroom2 %>
Bedroom 3 <% Response.Write x_Bedroom3 %>
Bedroom 4 <% Response.Write x_Bedroom4 %>
Bedroom 5 <% Response.Write x_Bedroom5 %>
Taxes <% Response.Write x_Taxes %>
Book <% Response.Write x_Book %>
Page <% Response.Write x_Page %>
Total Square Foot <% Response.Write x_TotalSquareFoot %>
Color <% Response.Write x_Color %>
Condition <% Response.Write x_Condition %>
Heating Cost <% Response.Write x_HeatingCost %>
Water <% Response.Write x_Water %>
Sewer <% Response.Write x_Sewer %>
Windows <% Response.Write x_Windows %>

  <% rs.Close Set rs = Nothing End Select %>