<% Function CookieCheck(id) if id > 0 then temp = "select id,solds from customers where id=" & id set a=conn.execute(temp) if not a.eof and not a.bof then CookieCheck=a("id").value solds=a("solds").value else vcookie = request.cookies("id") if len(vcookie) > 0 then temp = "select id,solds from customers where id=" & vcookie set a=conn.execute(temp) if not a.eof and not a.bof then CookieCheck=a("id").value solds=a("solds").value else CookieCheck=0 solds=0 end if else CookieCheck=0 end if end if else vcookie = request.cookies("id") if len(vcookie) > 0 then temp = "select id,solds from customers where id=" & vcookie set a=conn.execute(temp) if not a.eof and not a.bof then CookieCheck=a("id").value solds=a("solds").value else CookieCheck=0 solds=0 end if else CookieCheck=0 solds=0 end if end if end function Function SendMail(SendName,SendEmail,FromName,FromEmail,Message,Subject) Set easymail = CreateObject("EasyMail.SMTP.3") easymail.LicenseKey = "lehr/30B3300314441503A130" easymail.Clear (1) 'easymail.Domain = "smtp.rewebs.net" 'easymail.MailServer = "10.184.45.13" easymail.Domain = "mail.rewebs.net" easymail.MailServer = "mail.rewebs.net" x = easymail.AddRecipient(Sendname, Sendemail, 1) easymail.Timeout = 9000 easymail.From = FromName easymail.FromAddr = FromEmail easymail.subject = subject easymail.BodyText = Message z = easymail.send end function Function NewSearch response.write("

Search Options

") response.write("
") response.write("
") response.write("") response.write("") 'response.write("") response.write("") response.write("
CityNew Search

") end function Function Bottom 'response.write("The data relating to real estate for sale on this web site comes from the Broker Reciprocity Program of the Outer Banks Association of REALTORS®. Real estate listings include the name of the brokerage and listing agents. Information is believed to be accurate but is not warranted. Copyrighted by Outer Banks Association of REALTORS®. All Rights Reserved. IDX information is provided exclusively for consumers, personal, non-commercial use and may not be used for any purpose other than to identify prospective properties consumers may be interested in purchasing. Do not scrape this site.

") response.write("
") response.write("") response.write("") response.write("") response.write("") response.write("") response.write("") response.write("") response.write("") response.write("
") 'response.write("

") response.write("
") 'response.write("

") 'response.write("

") response.write("
") response.write("
") End Function Function ShowDailyListings vday = cint(datepart("d",date)) vday = vday mod 7 if vday=0 then vday=1 end if LongDate = formatdatetime(date,1) response.write("") temp = "select top 70 askingprice,mlsnumber,streetnumber,street,city,zip,bedrooms,fullbaths,thumbnail from property where city = '" & city & "' and class='residential' and len(remarks) > 0" set (temp) if not r.eof and not r.bof then n=1 m=1 do while not r.eof and not r.bof if n=vday then 'GetHeading vheading = r("streetnumber").value & " " & r("street").value & " " & r("city").value & ", NC " & r("zip").value vday = vday + 7 m = m + 1 vfile = "https://obimages.rewebs.net/" & r("thumbnail").value response.write("") response.write("") else 'no show today end if n=n+1 r.movenext loop end if response.write("
Featured Property in " & city & " for " & longdate & "

" & vheading & "
Price " & formatcurrency(r("askingprice").value,0) & "
Bedrooms-" & r("bedrooms").value & "
Full Baths-" & r("fullbaths").value & "

") End Function Function SetPath(city) city = lcase(city) 'response.write("City=" & city) If city = "colington" Then vpath = "colington" ElseIf city = "corolla" Then vpath = "corolla" ElseIf city = "duck" Then vpath = "duck" ElseIf city = "hatteras" Then vpath = "hatteras island" ElseIf city = "kill devil hills" Then vpath = "KillDevilHills" ElseIf city = "kitty hawk" Then vpath = "KittyHawk" ElseIf city = "manteo" Then vpath = "manteo" ElseIf city = "nags head" Then vpath = "nags head" ElseIf city = "southern shores" Then vpath = "southern-shores" ElseIf city = "rodanthe" Then vpath = "rodanthe" ElseIf city = "waves" Then vpath = "waves" ElseIf city = "salvo" Then vpath = "salvo" ElseIf city = "avon" Then vpath = "avon" ElseIf city = "buxton" Then vpath = "buxton" ElseIf city = "frisco" Then vpath = "frisco" End If SetPath = "outer banks/real estate/" & vpath End Function Function ShowAllRetsListings response.write("") temp = replace(temp,"select * from retsproperty where","select * from retsproperty where status not like '%sold%' and ") 'response.write(temp) set (temp) if not r.eof and not r.bof then do while not r.eof and not r.bof vheading = r("address").value & "," & " " & r("city").value vphotos=r("photos").value if len(vphotos) > 0 then vphotos= mid(vphotos,1,len(vphotos)-1) Newphotofiles = Split(vphotos, "@") vfile="https://" & Newphotofiles(0) else vfile="https://obimages.rewebs.net/nophoto.gif" end if DirName=SetPath(r("city").value) Filename = "'http://www.outerbanks-real-estate.com/outer banks/real estate/buxton/" & r("mlsno").value & "-" & replace(r("address").value," ","-") & "-" & replace(r("city").value," ","-") & "-" & r("state").value & "-" & r("zip").value & ".asp'" if se = "s" then response.write("") response.write("") elseif se = "l" then response.write("") response.write("") elseif se="bank" then Filename = "http://www.outerbanks-real-estate.com/NewShowProperty.asp?source=bank&aid=" & aid & "&mls=" & r("mlsno").value & "&id=" & id & "&type=1" response.write("") response.write("") '","37gtrj9") & "&Pgno=" & PgNo & "> else response.write("") response.write("") end if r.movenext loop end if response.write("
" & Headline & "

" & vheading & "
" & formatcurrency(r("askprice").value,0) & "
Bedrooms" & " " & r("beds").value & "
Full Baths" & " " & r("fbaths").value & "

" & vheading & "
" & formatcurrency(r("askprice").value,0) & "

" & vheading & "
" & formatcurrency(r("askprice").value,0) & "

" & vheading & "
List Price: " & formatcurrency(r("askprice").value,0) & "
Bedrooms-" & r("beds").value & "
Full Baths-" & r("fbaths").value & "
" & mid(r("remarks").value,1,185) & "

") End Function Function ShowRetsSoldListings response.write("") 'temp = replace(temp,"select * from retsproperty where","select * from retsproperty where status='%sold%' ") 'response.write(temp) set (temp) if not r.eof and not r.bof then do while not r.eof and not r.bof vheading = r("address").value & "," & " " & r("city").value vphotos=r("photos").value if len(vphotos) > 0 then vphotos= mid(vphotos,1,len(vphotos)-1) Newphotofiles = Split(vphotos, "@") vfile="https://" & Newphotofiles(0) else vfile="https://obimages.rewebs.net/nophoto.gif" end if DirName=SetPath(r("city").value) Filename = "'http://www.outerbanks-real-estate.com/outer banks/real estate/buxton/" & r("mlsno").value & "-" & replace(r("address").value," ","-") & "-" & replace(r("city").value," ","-") & "-" & r("state").value & "-" & r("zip").value & ".asp'" if se = "s" then response.write("") response.write("") elseif se = "l" then response.write("") response.write("") elseif se="bank" then Filename = "http://www.outerbanks-real-estate.com/NewShowProperty.asp?source=bank&aid=" & aid & "&mls=" & r("mlsno").value & "&id=" & id & "&type=1" response.write("") response.write("") '","37gtrj9") & "&Pgno=" & PgNo & "> else response.write("") response.write("") end if r.movenext loop end if response.write("
" & Headline & "
" & vheading & "
" & formatcurrency(r("askprice").value,0) & "
: " & formatcurrency(r("SoldPrice").value,0) & "
Bedrooms" & " " & r("beds").value & "
Full Baths" & " " & r("fbaths").value & "

<" & vheading & "
" & formatcurrency(r("askprice").value,0) & "

" & vheading & "
" & formatcurrency(r("askprice").value,0) & "

" & vheading & "
List Price: " & formatcurrency(r("askprice").value,0) & "
: " & formatcurrency(r("SoldPrice").value,0) & "
Bedrooms-" & r("beds").value & "
Full Baths-" & r("fbaths").value & "
" & mid(r("remarks").value,1,185) & "

") End Function Function GetHeading if m = 1 then vheading = city & " Real Estate" elseif m=2 then vheading = city & " Homes For Sale" elseif m=3 then vheading = city & " Property" elseif m=4 then vheading = city & " Homes" elseif m=5 then vheading = city & " Real Estate For Sale" elseif m=6 then vheading = city & " Properties" elseif m=7 then vheading = "Real Estate in " & city elseif m=8 then vheading = "Homes For Sale-" & city elseif m=9 then vheading = "Property in " & city elseif m=10 then vheading = city & " Real Estate" end if End Function Function OldShowDailyListings vday = cint(datepart("d",date)) vday = vday mod 7 if vday=0 then vday=1 end if LongDate = formatdatetime(date,1) response.write("") temp = "select top 70 mlsnumber,remarks,thumbnail from property where city = '" & city & "' and class='residential' and len(remarks) > 0" set (temp) if not r.eof and not r.bof then n=1 m=1 do while not r.eof and not r.bof if n=vday then GetHeading vday = vday + 7 m = m + 1 vfile = "https://obimages.rewebs.net/" & r("thumbnail").value response.write("") response.write("") else 'no show today end if n=n+1 r.movenext loop end if response.write("
Featured Property in " & city & " for " & longdate & "

" & vheading & "

" & r("remarks").value & "
") End Function Function OldShowAllListings response.write("") set (temp) if not r.eof and not r.bof then do while not r.eof and not r.bof GetHeading m = m + 1 vfile = "https://obimages.rewebs.net/" & r("thumbnail").value response.write("") response.write("") if m=10 then m=1 end if r.movenext loop end if response.write("
" & Headline & "

" & vheading & "

" & r("remarks").value & "
") End Function %>