Click here to Skip to main content
15,885,998 members
Articles / Programming Languages / ASP
Article

Real Estate Website

Rate me:
Please Sign up or sign in to vote.
2.54/5 (21 votes)
20 Apr 20053 min read 194.8K   49   25
Complete ready to run real estate agent, or for-sale-by-owner website.

Sample Image - home.gif

Introduction

A FREE complete real estate agent, or for sale by owner website.

The complete code download is available at

Real Estate Website (http://www.real-estate-website.org/)

or from http://sourceforge.net/projects/real-estate-web/

Summary

 Completely web-based administration, set site colors, titles and layout all from the administrator login. Includes user signup, listing creation, printable listing format, image uploads with automatic thumbnail creation, user management, and site statistics. Create, edit, and update pages to the site with a WYSIWYG editor. Includes a mortgage calculator with Amortization table. Users can also sign up automatically to create their own listings if you wish to set Real-Estate-Website up as a for-sale-by-owner site. All code is free and open-source released under the GPL.

Details

Real Estate Website uses ASP (Active Server Pages) and Microsoft MS Access database. The package has many features, and requires the following components to run properly.

  • IIS 5 or higher
  • ASP 3.0 or higher
  • ASP Mail by Server Objects
  • ASP Image by Server Objects
  • Persits Upload
  • Read/Write/Delete permission on 1 folder
  • Database located outside of the web root (highly recommended)

Once the files are copied to your website, you then login with the default username and password. You will see a screen like the one below.

Real Estate Website Main Settings

From this screen you can setup your site's main settings. The homepage text, the site colors, url, title, mail server, support email, site font, etc. These settings allow you to customize the look and feel of the site to make it distinct. Many of these changes are made using one "command" file, which I thought made things simpler.

VBScript
ID = Request("ID")
response.write "ID = " & id & "<br>"
homepage_text = PreSubmit(request.form("homepage_text"))
site_color = PreSubmit2(request.form("site_color"))
site_title = PreSubmit2(request.form("site_title"))
site_title_color = PreSubmit2(request.form("site_title_color"))
site_font = PreSubmit2(request.form("site_font"))
email_server = PreSubmit2(request.form("email_server"))
support_email = PreSubmit2(request.form("support_email"))
site_slogan = PreSubmit2(request.form("site_slogan"))
site_slogan_color = PreSubmit2(request.form("site_slogan_color"))
site_url = PreSubmit2(request.form("site_url"))
site_keywords = PreSubmit2(request.form("site_keywords"))

'user settings
useractive = request.querystring("useractive")
isadmin = request.querystring("isadmin")

'Clear hits data
clearhits = request.querystring("clearhits")

'city
	addcity = PreSubmit2(request.form("addcity"))
	city = PreSubmit2(request.form("city"))
	cityactive = PreSubmit2(request.querystring("cityactive"))
	cityid = PreSubmit2(request.querystring("cityid"))
	'editing city
	cid = PreSubmit2(request.form("cid"))
	editcity = request.form("editcity")
	'delete city
	deletecity = request.querystring("deletecity")

'clearhits
if clearhits <> "" then
mySQL = "DELETE FROM accesslog1;"
whtConn.execute(mySQL)
redirect = "hits.asp?message=cleared"
end if

'set homepage text
if homepage_text <> "" then
mySQL = "UPDATE tblSettings SET homepage_text = '" & homepage_text & "' WHERE ID = " & id & ";"
whtConn.execute(mySQL)
redirect = "settings.asp"
end if

if site_url <> "" then
mySQL = "UPDATE tblSettings SET site_url = '" & site_url & "' WHERE ID = " & id & ";"
whtConn.execute(mySQL)
redirect = "settings.asp"
end if

'*****colors and fonts
if site_font <> "" then
mySQL = "UPDATE tblSettings SET site_font = '" & site_font & "' WHERE ID = " & id & ";"
whtConn.execute(mySQL)
redirect = "settings.asp"
end if
...continues

Can also set a limit on the number of images a user can upload:

VBScript
filepath = server.mappath("\userfiles\" & LoginID)
Set myFso = Server.CreateObject("Scripting.FileSystemObject")
Set Myfolder = Myfso.GetFolder(filepath & "\imagelist")
Dim imagecount, allowedimages, uploadlimit
imagecount = 0
For Each myFile in MyFolder.Files
	imagecount = imagecount + 1
Next
Set myFso = Nothing
Set myFolder = Nothing
allowedimages = session("imagecount")
if imagecount >= allowedimages then
	uploadlimit = 1
end if

Very important step is to change the default password and email address to your own.

Real Estate Website Change Password

Now that your main site settings are complete, and you've changed the password and email, time to setup what cities are available. On the main menu click on City List.

Real Estate Website Admin Login

This screen lets you add, edit, or disable/enable cities on the site.

Real Estate Website Edit City

Now you can also add any additional pages to the site, these can be added, edited, deleted, activated/de-activated, and ordered from the web-based interface.

Real Estate Website Site Pages

Edit the pages

Real Estate Website Edit Pages

 Add Home Listings

Now you are ready to begin adding homes-to-sell to the real estate website.

1. Upload Images

Real Estate Website Images

Uploaded images are automatically resized to proper sizes (can't be to big) and a thumbnail size images is also automatically created also. Here is a sample of the automaic resizing, while keeping aspect ratio, this took me a little bit to get just right. (using rusty math skills I try to avoid)

VBScript
Set Image = Server.CreateObject("AspImage.Image")
Image.AutoSize = false
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Image.LoadImage userimage2

Set FSO = Nothing

  intXsizeMain = Image.MaxX
  intYsizeMain = Image.MaxY

if intYsizeMain > 300 then
	  targetY = 300
	  findsize1 = intYsizeMain - targetY
	  findsize2 = findsize1 / intYsizeMain
	  findsize3 = (1 - findsize2)
	  intXSizeNew = (intXsizeMain * findsize3) 
	  Image.ResizeR intXSizeNew, targetY

	Image.FileName = userimage2
	Image.SaveImage
end if
Set Image = nothing

2. You can also do some simple image editing online.

Real Estate Website Edit Images

3. Now visit the Home Setup Screen to start creating your first home listing.

Real Estate Website Home Setup

From this screen you can describe the house, and choose what common options it may have, you also choose your images here.

Real Estate Webiste Edit Home Listing

Finished home listing

The thumbnails appear on the right side, the full size image is pre-loaded when the page loads, when you click on the the image is replaces the main image on the page, so it's very easy to browse quickly through all the pictures.

Once your home is up, you can then watch and see how many users visit the page with the User Hits section of the website.

Logging of user hits:

VBScript
Dim logRS, remote_addr
'Open Recordset

remote_addr = Request.ServerVariables("Remote_Addr")

'place your IP here if you do not want to log hits from it.
if remote_addr <> "192.168.1.1" then

    Set logrs = Server.CreateObject("ADODB.RecordSet")
    logRS.Open "AccessLog1", whtConn, 1, 3

    'run update
    logRS.AddNew

    logRS("logQuery_String")= Request.queryString("hID")
    logRS("logRemote_Addr")= remote_addr
    logRS("logForm_String")= Request.form("hID")

    'update and close record
    logRS.Update
    logRS.Close
    Set logRS = Nothing

end if

Real Estate Website User Hits

The site includes many more features.

  • Print format function for the home listing, for printable brochures
  • User Signup function, if you set this up as a for-sale-by-owner site, users can signup and begin listing their own home within minutes, includes an email verification, and "forgot password" reset email function.
  • Contact form, so you can be contacted directly from a form on the website.
  • Mortgage ammoritization calculator

The complete code download is available at

Real Estate Website (http://www.real-estate-website.org)

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
Live in Michigan, USA

Comments and Discussions

 
QuestionBeautiful suggestion by Max Pin
adamhenry16-Jul-19 18:23
professionaladamhenry16-Jul-19 18:23 
Questionphp site not working Pin
Member 1440219520-May-19 19:35
Member 1440219520-May-19 19:35 
AnswerRe: php site not working Pin
adamhenry19-Jul-19 19:38
professionaladamhenry19-Jul-19 19:38 
QuestionReal Estate Property Management Website Pin
andrewpalmerz19-Dec-14 7:50
andrewpalmerz19-Dec-14 7:50 
AnswerRe: Real Estate Property Management Website Pin
adamhenry17-Jul-19 19:25
professionaladamhenry17-Jul-19 19:25 
GeneralASP.net version Pin
Member 467519519-Apr-11 13:10
Member 467519519-Apr-11 13:10 
QuestionRETS Pin
Aysha Qaiser10-Oct-06 19:06
Aysha Qaiser10-Oct-06 19:06 
GeneralLack of Security Pin
Michael Winter22-Apr-05 18:12
Michael Winter22-Apr-05 18:12 
Generaldetails on this Pin
aa2max22-Apr-05 19:10
aa2max22-Apr-05 19:10 
GeneralRe: details on this Pin
Michael Winter23-Apr-05 4:57
Michael Winter23-Apr-05 4:57 
GeneralRe: details on this Pin
Bradml18-Nov-06 1:24
Bradml18-Nov-06 1:24 
GeneralLooks good, but... Pin
WillemM22-Apr-05 7:50
WillemM22-Apr-05 7:50 
GeneralRe: Looks good, but... Pin
aa2max22-Apr-05 8:01
aa2max22-Apr-05 8:01 
GeneralRe: Looks good, but... Pin
Jerry Hammond22-Apr-05 8:14
Jerry Hammond22-Apr-05 8:14 
GeneralThe reason you're receiving low ratings for this article Pin
Gary Wheeler20-Apr-05 7:15
Gary Wheeler20-Apr-05 7:15 
GeneralRe: sorry you feel that way. Pin
aa2max20-Apr-05 7:23
aa2max20-Apr-05 7:23 
GeneralRe: sorry you feel that way. Pin
Eric Kenslow20-Apr-05 7:50
Eric Kenslow20-Apr-05 7:50 
Generalcriticize Pin
aa2max20-Apr-05 8:06
aa2max20-Apr-05 8:06 
GeneralRe: criticize Pin
Gerard Nicol20-Apr-05 14:11
Gerard Nicol20-Apr-05 14:11 
GeneralYou obviously didn't even read the article. Pin
aa2max20-Apr-05 15:10
aa2max20-Apr-05 15:10 
GeneralRe: You obviously didn't even read the article. Pin
Gerard Nicol20-Apr-05 15:59
Gerard Nicol20-Apr-05 15:59 
GeneralRe: You obviously didn't even read the article. Pin
aa2max20-Apr-05 17:11
aa2max20-Apr-05 17:11 
GeneralRe: You obviously didn't even read the article. Pin
spforeman21-Apr-05 22:43
spforeman21-Apr-05 22:43 
GeneralRe: You obviously didn't even read the article. Pin
Anonymous31-Aug-05 13:32
Anonymous31-Aug-05 13:32 
GeneralRe: You obviously didn't even read the article. Pin
adamhenry18-Jul-19 18:34
professionaladamhenry18-Jul-19 18:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.