%
'Database Connection String;
'Server.MapPath = the location of the database on the server
'please change the path to the correct path on your server
Set objADO = Server.CreateObject("ADODB.Connection")
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db\fsboREplus.mdb") & ";"
objADO.Open sDSN
'Contact Variables; Used in contact.asp and other pages that contain the contact info.
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
' Create a recordset object to store specific table information
Set objConfig = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From TblConfig"
'Set the recordset object equal to the SQL query string
objConfig.Open SQL, objADO, 1, 3
strVarCompany = objConfig("Company")
strVarAddress = objConfig("CompanyAddress")
strVarCity = objConfig("CompanyCity")
strVarState = objConfig("CompanyState")
strVarZip = objConfig("CompanyZip")
strVarCountry = objConfig("CompanyCountry")
strVarEmail = objConfig("CompanyEmail")
strVarPhone = objConfig("CompanyPhone")
strVarFax = objConfig("CompanyFax")
strVarMainContact = objConfig("CompanyContact")
strVarWebsite = objConfig("CompanyWebsite")
strVarBGColor = objConfig("BGColor")
strSlogan = objConfig("Slogan")
strOfferAdvertising = objConfig("OfferAdvertising")
str1000ImpressionsAdCost = objConfig("1000ImpressionsCost")
str5000ImpressionsAdCost = objConfig("5000ImpressionsCost")
str10000ImpressionsAdCost = objConfig("10000ImpressionsCost")
str50000ImpressionsAdCost = objConfig("50000ImpressionsCost")
str100000ImpressionsAdCost = objConfig("100000ImpressionsCost")
strServiceType = objConfig("ServiceType")
strServiceAdCost = objConfig("ServiceAdCost")
strAgentList = objConfig("AgentList")
strLogo = objConfig("logo")
strKeywords = objConfig("Keywords")
strMetaDescription = objConfig("MetaDescription")
'PAYPAL VARIABLES - See PaypalCode.doc located in the documentation folder
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
'Email address the payment should be sent to
strPayPalEmail = objConfig("PayPalEmail")
strAgentFeatured1MonthCost = objConfig("AgentFeatured1MonthCost")
strAgentFeatured3MonthCost = objConfig("AgentFeatured3MonthCost")
strAgentFeatured6MonthCost = objConfig("AgentFeatured6MonthCost")
strAgentFeatured12MonthCost = objConfig("AgentFeatured12MonthCost")
strAgentStandard1MonthCost = objConfig("AgentStandard1MonthCost")
strAgentStandard3MonthCost = objConfig("AgentStandard3MonthCost")
strAgentStandard6MonthCost = objConfig("AgentStandard6MonthCost")
strAgentStandard12MonthCost = objConfig("AgentStandard12MonthCost")
strUserFeatured1MonthCost = objConfig("UserFeatured1MonthCost")
strUserFeatured3MonthCost = objConfig("UserFeatured3MonthCost")
strUserFeatured6MonthCost = objConfig("UserFeatured6MonthCost")
strUserFeatured12MonthCost = objConfig("UserFeatured12MonthCost")
strUserStandard1MonthCost = objConfig("UserStandard1MonthCost")
strUserStandard3MonthCost = objConfig("UserStandard3MonthCost")
strUserStandard6MonthCost = objConfig("UserStandard6MonthCost")
strUserStandard12MonthCost = objConfig("UserStandard12MonthCost")
'Description of the service to appear on the Featured Listing receipt
strFeaturedAdDescription = "Featured Listing on " & strVarWebsite
'Description of the service to appear on the Regular Listing receipt
strStandardAdDescription = "Standard Listing on " & strVarWebsite
'Description of the service to appear on the Upgrade Listing receipt
strUpgradeAdDescription = "Upgrade Listing on " & strVarWebsite
'Cost you want to charge for the listing
strUpgradeAdCost = objConfig("UpgradeAdCost")
'whether ads are paid or free
strListingType = objConfig("ListingType")
'Page that the user should return to after making payment for featured ad;
'They should return to page step1F.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1F.asp
strPayPalReturnPageFeatured = strVarWebsite + "/featuredsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageRegular = strVarWebsite + "/standardsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageUpgrade = strVarWebsite + "/upgradesuccess.asp"
'Page that the user should return to if cancelling before completing PayPal payment;
'They should return to page cancel.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/cancel.asp
strPayPalCancel = strVarWebsite + "/cancel.asp"
%>
<%
Sub CreateRoomCombo(iCount)%>
<%
End Sub
Sub CreateFlooringCombo(iCount)%>
<%
End Sub
' Formats a given 10 digit number into a nice looking phone number
' Example: given strNumber of 8005551212 you get (800) 555-1212
Function FormatPhoneNumber(strNumber)
Dim strInput ' String to hold our entered number
Dim strTemp ' Temporary string to hold our working text
Dim strCurrentChar ' Var for storing each character for eval.
Dim I ' Looping var
' Uppercase all characters for consistency
strInput = UCase(strNumber)
' To be able to handle some pretty bad formatting, strip out
' all characters except for chars A to Z and digits 0 to 9
' before proceeding. I left in the chars for slogan
' numbers like 1-800-GET-CASH etc...
For I = 1 To Len(strInput)
strCurrentChar = Mid(strInput, I, 1)
' Numbers (0 to 9)
If Asc("0") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("9") Then
strTemp = strTemp & strCurrentChar
End If
' Upper Case Chars (A to Z)
If Asc("A") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("Z") Then
strTemp = strTemp & strCurrentChar
End If
Next 'I
' Swap strTemp back to strInput for next set of validation
strInput = strTemp
strTemp = ""
' Remove leading 1 if applicable
If Len(strInput) = 11 And Left(strInput, 1) = "1" Then
strInput = Right(strInput, 10)
End If
' Error catch to make sure strInput is proper length now that
' we've finished manipulating it.
If Not Len(strInput) = 10 Then
' Handle errors.
Err.Raise 1, "FormatPhoneNumber function", _
"The phone number to be formatted must be a valid 10 digit US phone number!"
End If
' If an error occurred then the rest of this won't get processed.
' Build the output formatted string
' (xxx) xxx-xxxx
strTemp = "(" ' "("
strTemp = strTemp & Left(strInput, 3) ' Area code
strTemp = strTemp & ") " ' ") "
strTemp = strTemp & Mid(strInput, 4, 3) ' Exchange
strTemp = strTemp & "-" ' "-"
strTemp = strTemp & Right(strInput, 4) ' 4 digit part
' Set return value
FormatPhoneNumber = strTemp
End Function
sub openrs(rs, sql)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
end sub
function ToHTML(strValue)
if IsNull(strValue) then
ToHTML = ""
else
ToHTML = Server.HTMLEncode(strValue)
end if
end function
function ToURL(strValue)
if IsNull(strValue) then strValue = ""
ToURL = Server.URLEncode(strValue)
end function
function GetValueHTML(rs, strFieldName)
GetValueHTML = ToHTML(GetValue(rs, strFieldName))
end function
function GetValue(rs, strFieldName)
on error resume next
if rs is nothing then
GetValue = ""
elseif (not rs.EOF) and (strFieldName <> "") then
res = rs(strFieldName)
if isnull(res) then
res = ""
end if
GetValue = res
else
GetValue = ""
end if
if bDebug then response.write err.Description
end function
function GetParam(ParamName)
if Request.QueryString(ParamName).Count > 0 then
Param = Request.QueryString(ParamName)
elseif Request.Form(ParamName).Count > 0 then
Param = Request.Form(ParamName)
else
Param = ""
end if
if Param = "" then
GetParam = Empty
else
GetParam = Param
end if
end function
Function ToSQL(Value, sType)
Param = Value
if Param = "" then
ToSQL = "Null"
else
if sType = "Number" then
ToSQL = CDbl(Param)
else
ToSQL = "'" & Replace(Param, "'", "''") & "'"
end if
end if
end function
function DLookUp(Table, fName, sWhere)
on error resume next
Res = cn.execute("select " & fName & " from " & Table & " where " & sWhere).Fields(0).Value
if IsNull(Res) then Res = ""
DLookUp = Res
end function
function getCheckBoxValue(sVal, CheckedValue, UnCheckedValue, sType)
if isempty(sVal) then
if UnCheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = UnCheckedValue
else
getCheckBoxValue = "'" & Replace(UnCheckedValue, "'", "''") & "'"
end if
end if
else
if CheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = CheckedValue
else
getCheckBoxValue = "'" & Replace(CheckedValue, "'", "''") & "'"
end if
end if
end if
end function
function getValFromLOV(sVal, aArr)
sRes = ""
if (ubound(aArr) mod 2) = 1 then
for i = 0 to ubound(aArr) step 2
if cstr(sVal) = cstr(aArr(i)) then sRes = aArr(i+1)
next
end if
getValFromLOV = sRes
end function
function get_options(sql,is_search,is_required,selected_value)
options_str=""
if is_search then
options_str=options_str&""
else
if is_required then options_str=options_str&""
end if
openrs tmprs,sql
while not tmprs.EOF
id=GetValue(tmprs, 0)
value=GetValue(tmprs, 1)
selected=""
if CStr(id) = CStr(selected_value) then
selected = "SELECTED"
end if
options_str = options_str & ""
tmprs.MoveNext
wend
get_options = options_str
end function
Function ProceedError()
if cn.Errors.Count > 0 then
ProceedError = cn.Errors(0).Description & " (" & cn.Errors(0).Source & ")"
elseif not (Err.Description = "") then
ProceedError = Err.Description
else
ProceedError = ""
end if
end Function
function CheckSecurity(iLevel)
if Session("UserID") = "" then
response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
else
if CLng(Session("UserRights")) < CLng(iLevel) then response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
End if
end function
%>
<%
'Database Connection String;
'Server.MapPath = the location of the database on the server
'please change the path to the correct path on your server
Set objADO = Server.CreateObject("ADODB.Connection")
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db\fsboREplus.mdb") & ";"
objADO.Open sDSN
'Contact Variables; Used in contact.asp and other pages that contain the contact info.
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
' Create a recordset object to store specific table information
Set objConfig = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From TblConfig"
'Set the recordset object equal to the SQL query string
objConfig.Open SQL, objADO, 1, 3
strVarCompany = objConfig("Company")
strVarAddress = objConfig("CompanyAddress")
strVarCity = objConfig("CompanyCity")
strVarState = objConfig("CompanyState")
strVarZip = objConfig("CompanyZip")
strVarCountry = objConfig("CompanyCountry")
strVarEmail = objConfig("CompanyEmail")
strVarPhone = objConfig("CompanyPhone")
strVarFax = objConfig("CompanyFax")
strVarMainContact = objConfig("CompanyContact")
strVarWebsite = objConfig("CompanyWebsite")
strVarBGColor = objConfig("BGColor")
strSlogan = objConfig("Slogan")
strOfferAdvertising = objConfig("OfferAdvertising")
str1000ImpressionsAdCost = objConfig("1000ImpressionsCost")
str5000ImpressionsAdCost = objConfig("5000ImpressionsCost")
str10000ImpressionsAdCost = objConfig("10000ImpressionsCost")
str50000ImpressionsAdCost = objConfig("50000ImpressionsCost")
str100000ImpressionsAdCost = objConfig("100000ImpressionsCost")
strServiceType = objConfig("ServiceType")
strServiceAdCost = objConfig("ServiceAdCost")
strAgentList = objConfig("AgentList")
strLogo = objConfig("logo")
strKeywords = objConfig("Keywords")
strMetaDescription = objConfig("MetaDescription")
'PAYPAL VARIABLES - See PaypalCode.doc located in the documentation folder
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
'Email address the payment should be sent to
strPayPalEmail = objConfig("PayPalEmail")
strAgentFeatured1MonthCost = objConfig("AgentFeatured1MonthCost")
strAgentFeatured3MonthCost = objConfig("AgentFeatured3MonthCost")
strAgentFeatured6MonthCost = objConfig("AgentFeatured6MonthCost")
strAgentFeatured12MonthCost = objConfig("AgentFeatured12MonthCost")
strAgentStandard1MonthCost = objConfig("AgentStandard1MonthCost")
strAgentStandard3MonthCost = objConfig("AgentStandard3MonthCost")
strAgentStandard6MonthCost = objConfig("AgentStandard6MonthCost")
strAgentStandard12MonthCost = objConfig("AgentStandard12MonthCost")
strUserFeatured1MonthCost = objConfig("UserFeatured1MonthCost")
strUserFeatured3MonthCost = objConfig("UserFeatured3MonthCost")
strUserFeatured6MonthCost = objConfig("UserFeatured6MonthCost")
strUserFeatured12MonthCost = objConfig("UserFeatured12MonthCost")
strUserStandard1MonthCost = objConfig("UserStandard1MonthCost")
strUserStandard3MonthCost = objConfig("UserStandard3MonthCost")
strUserStandard6MonthCost = objConfig("UserStandard6MonthCost")
strUserStandard12MonthCost = objConfig("UserStandard12MonthCost")
'Description of the service to appear on the Featured Listing receipt
strFeaturedAdDescription = "Featured Listing on " & strVarWebsite
'Description of the service to appear on the Regular Listing receipt
strStandardAdDescription = "Standard Listing on " & strVarWebsite
'Description of the service to appear on the Upgrade Listing receipt
strUpgradeAdDescription = "Upgrade Listing on " & strVarWebsite
'Cost you want to charge for the listing
strUpgradeAdCost = objConfig("UpgradeAdCost")
'whether ads are paid or free
strListingType = objConfig("ListingType")
'Page that the user should return to after making payment for featured ad;
'They should return to page step1F.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1F.asp
strPayPalReturnPageFeatured = strVarWebsite + "/featuredsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageRegular = strVarWebsite + "/standardsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageUpgrade = strVarWebsite + "/upgradesuccess.asp"
'Page that the user should return to if cancelling before completing PayPal payment;
'They should return to page cancel.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/cancel.asp
strPayPalCancel = strVarWebsite + "/cancel.asp"
%>
<%
Sub CreateRoomCombo(iCount)%>
<%
End Sub
Sub CreateFlooringCombo(iCount)%>
<%
End Sub
' Formats a given 10 digit number into a nice looking phone number
' Example: given strNumber of 8005551212 you get (800) 555-1212
Function FormatPhoneNumber(strNumber)
Dim strInput ' String to hold our entered number
Dim strTemp ' Temporary string to hold our working text
Dim strCurrentChar ' Var for storing each character for eval.
Dim I ' Looping var
' Uppercase all characters for consistency
strInput = UCase(strNumber)
' To be able to handle some pretty bad formatting, strip out
' all characters except for chars A to Z and digits 0 to 9
' before proceeding. I left in the chars for slogan
' numbers like 1-800-GET-CASH etc...
For I = 1 To Len(strInput)
strCurrentChar = Mid(strInput, I, 1)
' Numbers (0 to 9)
If Asc("0") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("9") Then
strTemp = strTemp & strCurrentChar
End If
' Upper Case Chars (A to Z)
If Asc("A") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("Z") Then
strTemp = strTemp & strCurrentChar
End If
Next 'I
' Swap strTemp back to strInput for next set of validation
strInput = strTemp
strTemp = ""
' Remove leading 1 if applicable
If Len(strInput) = 11 And Left(strInput, 1) = "1" Then
strInput = Right(strInput, 10)
End If
' Error catch to make sure strInput is proper length now that
' we've finished manipulating it.
If Not Len(strInput) = 10 Then
' Handle errors.
Err.Raise 1, "FormatPhoneNumber function", _
"The phone number to be formatted must be a valid 10 digit US phone number!"
End If
' If an error occurred then the rest of this won't get processed.
' Build the output formatted string
' (xxx) xxx-xxxx
strTemp = "(" ' "("
strTemp = strTemp & Left(strInput, 3) ' Area code
strTemp = strTemp & ") " ' ") "
strTemp = strTemp & Mid(strInput, 4, 3) ' Exchange
strTemp = strTemp & "-" ' "-"
strTemp = strTemp & Right(strInput, 4) ' 4 digit part
' Set return value
FormatPhoneNumber = strTemp
End Function
sub openrs(rs, sql)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
end sub
function ToHTML(strValue)
if IsNull(strValue) then
ToHTML = ""
else
ToHTML = Server.HTMLEncode(strValue)
end if
end function
function ToURL(strValue)
if IsNull(strValue) then strValue = ""
ToURL = Server.URLEncode(strValue)
end function
function GetValueHTML(rs, strFieldName)
GetValueHTML = ToHTML(GetValue(rs, strFieldName))
end function
function GetValue(rs, strFieldName)
on error resume next
if rs is nothing then
GetValue = ""
elseif (not rs.EOF) and (strFieldName <> "") then
res = rs(strFieldName)
if isnull(res) then
res = ""
end if
GetValue = res
else
GetValue = ""
end if
if bDebug then response.write err.Description
end function
function GetParam(ParamName)
if Request.QueryString(ParamName).Count > 0 then
Param = Request.QueryString(ParamName)
elseif Request.Form(ParamName).Count > 0 then
Param = Request.Form(ParamName)
else
Param = ""
end if
if Param = "" then
GetParam = Empty
else
GetParam = Param
end if
end function
Function ToSQL(Value, sType)
Param = Value
if Param = "" then
ToSQL = "Null"
else
if sType = "Number" then
ToSQL = CDbl(Param)
else
ToSQL = "'" & Replace(Param, "'", "''") & "'"
end if
end if
end function
function DLookUp(Table, fName, sWhere)
on error resume next
Res = cn.execute("select " & fName & " from " & Table & " where " & sWhere).Fields(0).Value
if IsNull(Res) then Res = ""
DLookUp = Res
end function
function getCheckBoxValue(sVal, CheckedValue, UnCheckedValue, sType)
if isempty(sVal) then
if UnCheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = UnCheckedValue
else
getCheckBoxValue = "'" & Replace(UnCheckedValue, "'", "''") & "'"
end if
end if
else
if CheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = CheckedValue
else
getCheckBoxValue = "'" & Replace(CheckedValue, "'", "''") & "'"
end if
end if
end if
end function
function getValFromLOV(sVal, aArr)
sRes = ""
if (ubound(aArr) mod 2) = 1 then
for i = 0 to ubound(aArr) step 2
if cstr(sVal) = cstr(aArr(i)) then sRes = aArr(i+1)
next
end if
getValFromLOV = sRes
end function
function get_options(sql,is_search,is_required,selected_value)
options_str=""
if is_search then
options_str=options_str&""
else
if is_required then options_str=options_str&""
end if
openrs tmprs,sql
while not tmprs.EOF
id=GetValue(tmprs, 0)
value=GetValue(tmprs, 1)
selected=""
if CStr(id) = CStr(selected_value) then
selected = "SELECTED"
end if
options_str = options_str & ""
tmprs.MoveNext
wend
get_options = options_str
end function
Function ProceedError()
if cn.Errors.Count > 0 then
ProceedError = cn.Errors(0).Description & " (" & cn.Errors(0).Source & ")"
elseif not (Err.Description = "") then
ProceedError = Err.Description
else
ProceedError = ""
end if
end Function
function CheckSecurity(iLevel)
if Session("UserID") = "" then
response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
else
if CLng(Session("UserRights")) < CLng(iLevel) then response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
End if
end function
%>
<%
'Database Connection String;
'Server.MapPath = the location of the database on the server
'please change the path to the correct path on your server
Set objADO = Server.CreateObject("ADODB.Connection")
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db\fsboREplus.mdb") & ";"
objADO.Open sDSN
'Contact Variables; Used in contact.asp and other pages that contain the contact info.
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
' Create a recordset object to store specific table information
Set objConfig = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From TblConfig"
'Set the recordset object equal to the SQL query string
objConfig.Open SQL, objADO, 1, 3
strVarCompany = objConfig("Company")
strVarAddress = objConfig("CompanyAddress")
strVarCity = objConfig("CompanyCity")
strVarState = objConfig("CompanyState")
strVarZip = objConfig("CompanyZip")
strVarCountry = objConfig("CompanyCountry")
strVarEmail = objConfig("CompanyEmail")
strVarPhone = objConfig("CompanyPhone")
strVarFax = objConfig("CompanyFax")
strVarMainContact = objConfig("CompanyContact")
strVarWebsite = objConfig("CompanyWebsite")
strVarBGColor = objConfig("BGColor")
strSlogan = objConfig("Slogan")
strOfferAdvertising = objConfig("OfferAdvertising")
str1000ImpressionsAdCost = objConfig("1000ImpressionsCost")
str5000ImpressionsAdCost = objConfig("5000ImpressionsCost")
str10000ImpressionsAdCost = objConfig("10000ImpressionsCost")
str50000ImpressionsAdCost = objConfig("50000ImpressionsCost")
str100000ImpressionsAdCost = objConfig("100000ImpressionsCost")
strServiceType = objConfig("ServiceType")
strServiceAdCost = objConfig("ServiceAdCost")
strAgentList = objConfig("AgentList")
strLogo = objConfig("logo")
strKeywords = objConfig("Keywords")
strMetaDescription = objConfig("MetaDescription")
'PAYPAL VARIABLES - See PaypalCode.doc located in the documentation folder
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
'Email address the payment should be sent to
strPayPalEmail = objConfig("PayPalEmail")
strAgentFeatured1MonthCost = objConfig("AgentFeatured1MonthCost")
strAgentFeatured3MonthCost = objConfig("AgentFeatured3MonthCost")
strAgentFeatured6MonthCost = objConfig("AgentFeatured6MonthCost")
strAgentFeatured12MonthCost = objConfig("AgentFeatured12MonthCost")
strAgentStandard1MonthCost = objConfig("AgentStandard1MonthCost")
strAgentStandard3MonthCost = objConfig("AgentStandard3MonthCost")
strAgentStandard6MonthCost = objConfig("AgentStandard6MonthCost")
strAgentStandard12MonthCost = objConfig("AgentStandard12MonthCost")
strUserFeatured1MonthCost = objConfig("UserFeatured1MonthCost")
strUserFeatured3MonthCost = objConfig("UserFeatured3MonthCost")
strUserFeatured6MonthCost = objConfig("UserFeatured6MonthCost")
strUserFeatured12MonthCost = objConfig("UserFeatured12MonthCost")
strUserStandard1MonthCost = objConfig("UserStandard1MonthCost")
strUserStandard3MonthCost = objConfig("UserStandard3MonthCost")
strUserStandard6MonthCost = objConfig("UserStandard6MonthCost")
strUserStandard12MonthCost = objConfig("UserStandard12MonthCost")
'Description of the service to appear on the Featured Listing receipt
strFeaturedAdDescription = "Featured Listing on " & strVarWebsite
'Description of the service to appear on the Regular Listing receipt
strStandardAdDescription = "Standard Listing on " & strVarWebsite
'Description of the service to appear on the Upgrade Listing receipt
strUpgradeAdDescription = "Upgrade Listing on " & strVarWebsite
'Cost you want to charge for the listing
strUpgradeAdCost = objConfig("UpgradeAdCost")
'whether ads are paid or free
strListingType = objConfig("ListingType")
'Page that the user should return to after making payment for featured ad;
'They should return to page step1F.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1F.asp
strPayPalReturnPageFeatured = strVarWebsite + "/featuredsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageRegular = strVarWebsite + "/standardsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageUpgrade = strVarWebsite + "/upgradesuccess.asp"
'Page that the user should return to if cancelling before completing PayPal payment;
'They should return to page cancel.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/cancel.asp
strPayPalCancel = strVarWebsite + "/cancel.asp"
%>
<%
Sub CreateRoomCombo(iCount)%>
<%
End Sub
Sub CreateFlooringCombo(iCount)%>
<%
End Sub
' Formats a given 10 digit number into a nice looking phone number
' Example: given strNumber of 8005551212 you get (800) 555-1212
Function FormatPhoneNumber(strNumber)
Dim strInput ' String to hold our entered number
Dim strTemp ' Temporary string to hold our working text
Dim strCurrentChar ' Var for storing each character for eval.
Dim I ' Looping var
' Uppercase all characters for consistency
strInput = UCase(strNumber)
' To be able to handle some pretty bad formatting, strip out
' all characters except for chars A to Z and digits 0 to 9
' before proceeding. I left in the chars for slogan
' numbers like 1-800-GET-CASH etc...
For I = 1 To Len(strInput)
strCurrentChar = Mid(strInput, I, 1)
' Numbers (0 to 9)
If Asc("0") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("9") Then
strTemp = strTemp & strCurrentChar
End If
' Upper Case Chars (A to Z)
If Asc("A") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("Z") Then
strTemp = strTemp & strCurrentChar
End If
Next 'I
' Swap strTemp back to strInput for next set of validation
strInput = strTemp
strTemp = ""
' Remove leading 1 if applicable
If Len(strInput) = 11 And Left(strInput, 1) = "1" Then
strInput = Right(strInput, 10)
End If
' Error catch to make sure strInput is proper length now that
' we've finished manipulating it.
If Not Len(strInput) = 10 Then
' Handle errors.
Err.Raise 1, "FormatPhoneNumber function", _
"The phone number to be formatted must be a valid 10 digit US phone number!"
End If
' If an error occurred then the rest of this won't get processed.
' Build the output formatted string
' (xxx) xxx-xxxx
strTemp = "(" ' "("
strTemp = strTemp & Left(strInput, 3) ' Area code
strTemp = strTemp & ") " ' ") "
strTemp = strTemp & Mid(strInput, 4, 3) ' Exchange
strTemp = strTemp & "-" ' "-"
strTemp = strTemp & Right(strInput, 4) ' 4 digit part
' Set return value
FormatPhoneNumber = strTemp
End Function
sub openrs(rs, sql)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
end sub
function ToHTML(strValue)
if IsNull(strValue) then
ToHTML = ""
else
ToHTML = Server.HTMLEncode(strValue)
end if
end function
function ToURL(strValue)
if IsNull(strValue) then strValue = ""
ToURL = Server.URLEncode(strValue)
end function
function GetValueHTML(rs, strFieldName)
GetValueHTML = ToHTML(GetValue(rs, strFieldName))
end function
function GetValue(rs, strFieldName)
on error resume next
if rs is nothing then
GetValue = ""
elseif (not rs.EOF) and (strFieldName <> "") then
res = rs(strFieldName)
if isnull(res) then
res = ""
end if
GetValue = res
else
GetValue = ""
end if
if bDebug then response.write err.Description
end function
function GetParam(ParamName)
if Request.QueryString(ParamName).Count > 0 then
Param = Request.QueryString(ParamName)
elseif Request.Form(ParamName).Count > 0 then
Param = Request.Form(ParamName)
else
Param = ""
end if
if Param = "" then
GetParam = Empty
else
GetParam = Param
end if
end function
Function ToSQL(Value, sType)
Param = Value
if Param = "" then
ToSQL = "Null"
else
if sType = "Number" then
ToSQL = CDbl(Param)
else
ToSQL = "'" & Replace(Param, "'", "''") & "'"
end if
end if
end function
function DLookUp(Table, fName, sWhere)
on error resume next
Res = cn.execute("select " & fName & " from " & Table & " where " & sWhere).Fields(0).Value
if IsNull(Res) then Res = ""
DLookUp = Res
end function
function getCheckBoxValue(sVal, CheckedValue, UnCheckedValue, sType)
if isempty(sVal) then
if UnCheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = UnCheckedValue
else
getCheckBoxValue = "'" & Replace(UnCheckedValue, "'", "''") & "'"
end if
end if
else
if CheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = CheckedValue
else
getCheckBoxValue = "'" & Replace(CheckedValue, "'", "''") & "'"
end if
end if
end if
end function
function getValFromLOV(sVal, aArr)
sRes = ""
if (ubound(aArr) mod 2) = 1 then
for i = 0 to ubound(aArr) step 2
if cstr(sVal) = cstr(aArr(i)) then sRes = aArr(i+1)
next
end if
getValFromLOV = sRes
end function
function get_options(sql,is_search,is_required,selected_value)
options_str=""
if is_search then
options_str=options_str&""
else
if is_required then options_str=options_str&""
end if
openrs tmprs,sql
while not tmprs.EOF
id=GetValue(tmprs, 0)
value=GetValue(tmprs, 1)
selected=""
if CStr(id) = CStr(selected_value) then
selected = "SELECTED"
end if
options_str = options_str & ""
tmprs.MoveNext
wend
get_options = options_str
end function
Function ProceedError()
if cn.Errors.Count > 0 then
ProceedError = cn.Errors(0).Description & " (" & cn.Errors(0).Source & ")"
elseif not (Err.Description = "") then
ProceedError = Err.Description
else
ProceedError = ""
end if
end Function
function CheckSecurity(iLevel)
if Session("UserID") = "" then
response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
else
if CLng(Session("UserRights")) < CLng(iLevel) then response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
End if
end function
%>
<%
TodayDate = Now()
TodayDate = FormatDateTime(TodayDate, VBShortDate)
Set RS=Server.CreateObject("ADODB.RecordSet")
SQL = vbNullString
SQL = SQL & "UPDATE Clients "
SQL = SQL & "SET Status='DontShow' WHERE ImpPur < ImpNow"
objADO.execute(SQL)
Set RS = Nothing
Set RS=Server.CreateObject("ADODB.RecordSet")
Query = "SELECT * FROM Clients WHERE Status='Show' AND StartDate <= #" & TodayDate & "#"
RS.Open Query, objADO, 3, 3
IF (RS.EOF) THEN
ShowBanner = "default"
%>
<%
Else
rndMax = CInt(RS.RecordCount)
RS.MoveFirst
Do While Not RS.EOF
RS.MoveNext
Loop
RS.MoveFirst
Randomize Timer
rndNumber = Int(RND * rndMax)
RS.Move rndNumber
Id = RS("AdID")
UrlTo = RS("LinkTo")
GetImg = RS("ImgUrl")
WriteSize1 = RS("SizeOf1")
WriteSize2 = RS("SizeOf2")
DisText = RS("TextUnder")
ImpNow = RS("ImpNow")
ImpNewNow = ImpNow + 1
Set RS = Nothing
Set RS=Server.CreateObject("ADODB.RecordSet")
SQL = vbNullString
SQL = SQL & "UPDATE Clients "
SQL = SQL & "SET ImpNow="&ImpNewNow&" WHERE AdID="&Id&""
objADO.execute(SQL)
Set RS = Nothing
End If
%>
<%
strMailSubmit = request("cmdMailSubmit")
strSearchId = request("cmdSearchId")
strEmail = request("txtEmail")
strSiteId = request("txtSiteId")
'This code only runs if the submit button is clicked
if Request.Form <> "" and strSearchId <> "" then
if strSiteId = "" then
SiteIdmsg = "You must enter a site id to search."
end if
if SiteIdmsg = "" then
' Create a recordset object to store specific table information
Set objSearch = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From REListing where REListingId=" & strSiteId
'Set the recordset object equal to the SQL query string
objSearch.Open SQL, objADO, 1, 3
if objSearch.EOF then
SiteIdmsg = "Site Id " & strSiteId & " does not exist in our database. Please try again."
else
Response.Redirect "detail.asp?Id=" & strSiteId
end if
end if
end if
if Request.Form <> "" and strMailSubmit <> "" then
if strEmail = "" then
strMailWarning = "You must type an email address to join our mailing list."
end if
'Make sure a valid email address
if strEmail <> "" and (instr( strEmail, "@") = 0 or instr( strEmail, ".") = 0) then
strMailWarning = " Email Address must be in the form account@server.com."
end if
if strMailWarning = "" then
' Create a recordset object to store specific table information
Set objEmail = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From TblEmail where (EmailAddress = '" + strEmail + "')"
'Set the recordset object equal to the SQL query string
objEmail.Open SQL, objADO, 1, 3
if objEmail.EOF then
objEmail.addnew
objEmail("EmailAddress") = strEmail
objEmail("DateAdded") = Date()
objEmail.update
strMailWarning =" Your email address has been sucessfully added to our mailing list."
'Mail STATING you hate to see them go and link if they want to subscribe again.
' Create a recordset object to store specific table information
strSubject = strVarCompany & " Mail Subscription Request"
strBody = strBody + "Your email address has been successfully added to our mailing list." &vbcrlf
strBody = strBody + "Thank you for being a subscriber." & vbcrlf
strBody = strBody + "To unsubscribe, use the url " & strVarWebsite & "." & vbcrlf
strBody = strBody + "Again thank you for being a subscriber."
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = strVarEmail
objNewMail.To = strEmail
objNewMail.Subject = strSubject
objNewMail.BodyFormat = 1
'objNewMail.MailFormat = 1
objNewMail.Body = strBody
objNewMail.Send()
else
strMailWarning = " That Email Address already joined our mailing list."
end if
end if
end if
%>
FEATURED PROPERTY LISTINGS
Feature your property on our site
and sell fast! Click Here to find out how.
<%
'Database Connection String;
'Server.MapPath = the location of the database on the server
'please change the path to the correct path on your server
Set objADO = Server.CreateObject("ADODB.Connection")
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db\fsboREplus.mdb") & ";"
objADO.Open sDSN
'Contact Variables; Used in contact.asp and other pages that contain the contact info.
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
' Create a recordset object to store specific table information
Set objConfig = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From TblConfig"
'Set the recordset object equal to the SQL query string
objConfig.Open SQL, objADO, 1, 3
strVarCompany = objConfig("Company")
strVarAddress = objConfig("CompanyAddress")
strVarCity = objConfig("CompanyCity")
strVarState = objConfig("CompanyState")
strVarZip = objConfig("CompanyZip")
strVarCountry = objConfig("CompanyCountry")
strVarEmail = objConfig("CompanyEmail")
strVarPhone = objConfig("CompanyPhone")
strVarFax = objConfig("CompanyFax")
strVarMainContact = objConfig("CompanyContact")
strVarWebsite = objConfig("CompanyWebsite")
strVarBGColor = objConfig("BGColor")
strSlogan = objConfig("Slogan")
strOfferAdvertising = objConfig("OfferAdvertising")
str1000ImpressionsAdCost = objConfig("1000ImpressionsCost")
str5000ImpressionsAdCost = objConfig("5000ImpressionsCost")
str10000ImpressionsAdCost = objConfig("10000ImpressionsCost")
str50000ImpressionsAdCost = objConfig("50000ImpressionsCost")
str100000ImpressionsAdCost = objConfig("100000ImpressionsCost")
strServiceType = objConfig("ServiceType")
strServiceAdCost = objConfig("ServiceAdCost")
strAgentList = objConfig("AgentList")
strLogo = objConfig("logo")
strKeywords = objConfig("Keywords")
strMetaDescription = objConfig("MetaDescription")
'PAYPAL VARIABLES - See PaypalCode.doc located in the documentation folder
'These variables are pulled from the table TblConfig and these values can
'be edited through the site admin control panel. Do not edit the values in this page.
'Email address the payment should be sent to
strPayPalEmail = objConfig("PayPalEmail")
strAgentFeatured1MonthCost = objConfig("AgentFeatured1MonthCost")
strAgentFeatured3MonthCost = objConfig("AgentFeatured3MonthCost")
strAgentFeatured6MonthCost = objConfig("AgentFeatured6MonthCost")
strAgentFeatured12MonthCost = objConfig("AgentFeatured12MonthCost")
strAgentStandard1MonthCost = objConfig("AgentStandard1MonthCost")
strAgentStandard3MonthCost = objConfig("AgentStandard3MonthCost")
strAgentStandard6MonthCost = objConfig("AgentStandard6MonthCost")
strAgentStandard12MonthCost = objConfig("AgentStandard12MonthCost")
strUserFeatured1MonthCost = objConfig("UserFeatured1MonthCost")
strUserFeatured3MonthCost = objConfig("UserFeatured3MonthCost")
strUserFeatured6MonthCost = objConfig("UserFeatured6MonthCost")
strUserFeatured12MonthCost = objConfig("UserFeatured12MonthCost")
strUserStandard1MonthCost = objConfig("UserStandard1MonthCost")
strUserStandard3MonthCost = objConfig("UserStandard3MonthCost")
strUserStandard6MonthCost = objConfig("UserStandard6MonthCost")
strUserStandard12MonthCost = objConfig("UserStandard12MonthCost")
'Description of the service to appear on the Featured Listing receipt
strFeaturedAdDescription = "Featured Listing on " & strVarWebsite
'Description of the service to appear on the Regular Listing receipt
strStandardAdDescription = "Standard Listing on " & strVarWebsite
'Description of the service to appear on the Upgrade Listing receipt
strUpgradeAdDescription = "Upgrade Listing on " & strVarWebsite
'Cost you want to charge for the listing
strUpgradeAdCost = objConfig("UpgradeAdCost")
'whether ads are paid or free
strListingType = objConfig("ListingType")
'Page that the user should return to after making payment for featured ad;
'They should return to page step1F.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1F.asp
strPayPalReturnPageFeatured = strVarWebsite + "/featuredsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageRegular = strVarWebsite + "/standardsuccess.asp"
'Page that the user should return to after making payment for regular ad;
'They should return to page step1.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/step1.asp
strPayPalReturnPageUpgrade = strVarWebsite + "/upgradesuccess.asp"
'Page that the user should return to if cancelling before completing PayPal payment;
'They should return to page cancel.asp under your domain;
'http://www.yourdomain.com/FSBO Auto Folder/cancel.asp
strPayPalCancel = strVarWebsite + "/cancel.asp"
%>
<%
Sub CreateRoomCombo(iCount)%>
<%
End Sub
Sub CreateFlooringCombo(iCount)%>
<%
End Sub
' Formats a given 10 digit number into a nice looking phone number
' Example: given strNumber of 8005551212 you get (800) 555-1212
Function FormatPhoneNumber(strNumber)
Dim strInput ' String to hold our entered number
Dim strTemp ' Temporary string to hold our working text
Dim strCurrentChar ' Var for storing each character for eval.
Dim I ' Looping var
' Uppercase all characters for consistency
strInput = UCase(strNumber)
' To be able to handle some pretty bad formatting, strip out
' all characters except for chars A to Z and digits 0 to 9
' before proceeding. I left in the chars for slogan
' numbers like 1-800-GET-CASH etc...
For I = 1 To Len(strInput)
strCurrentChar = Mid(strInput, I, 1)
' Numbers (0 to 9)
If Asc("0") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("9") Then
strTemp = strTemp & strCurrentChar
End If
' Upper Case Chars (A to Z)
If Asc("A") <= Asc(strCurrentChar) And Asc(strCurrentChar) <= Asc("Z") Then
strTemp = strTemp & strCurrentChar
End If
Next 'I
' Swap strTemp back to strInput for next set of validation
strInput = strTemp
strTemp = ""
' Remove leading 1 if applicable
If Len(strInput) = 11 And Left(strInput, 1) = "1" Then
strInput = Right(strInput, 10)
End If
' Error catch to make sure strInput is proper length now that
' we've finished manipulating it.
If Not Len(strInput) = 10 Then
' Handle errors.
Err.Raise 1, "FormatPhoneNumber function", _
"The phone number to be formatted must be a valid 10 digit US phone number!"
End If
' If an error occurred then the rest of this won't get processed.
' Build the output formatted string
' (xxx) xxx-xxxx
strTemp = "(" ' "("
strTemp = strTemp & Left(strInput, 3) ' Area code
strTemp = strTemp & ") " ' ") "
strTemp = strTemp & Mid(strInput, 4, 3) ' Exchange
strTemp = strTemp & "-" ' "-"
strTemp = strTemp & Right(strInput, 4) ' 4 digit part
' Set return value
FormatPhoneNumber = strTemp
End Function
sub openrs(rs, sql)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
end sub
function ToHTML(strValue)
if IsNull(strValue) then
ToHTML = ""
else
ToHTML = Server.HTMLEncode(strValue)
end if
end function
function ToURL(strValue)
if IsNull(strValue) then strValue = ""
ToURL = Server.URLEncode(strValue)
end function
function GetValueHTML(rs, strFieldName)
GetValueHTML = ToHTML(GetValue(rs, strFieldName))
end function
function GetValue(rs, strFieldName)
on error resume next
if rs is nothing then
GetValue = ""
elseif (not rs.EOF) and (strFieldName <> "") then
res = rs(strFieldName)
if isnull(res) then
res = ""
end if
GetValue = res
else
GetValue = ""
end if
if bDebug then response.write err.Description
end function
function GetParam(ParamName)
if Request.QueryString(ParamName).Count > 0 then
Param = Request.QueryString(ParamName)
elseif Request.Form(ParamName).Count > 0 then
Param = Request.Form(ParamName)
else
Param = ""
end if
if Param = "" then
GetParam = Empty
else
GetParam = Param
end if
end function
Function ToSQL(Value, sType)
Param = Value
if Param = "" then
ToSQL = "Null"
else
if sType = "Number" then
ToSQL = CDbl(Param)
else
ToSQL = "'" & Replace(Param, "'", "''") & "'"
end if
end if
end function
function DLookUp(Table, fName, sWhere)
on error resume next
Res = cn.execute("select " & fName & " from " & Table & " where " & sWhere).Fields(0).Value
if IsNull(Res) then Res = ""
DLookUp = Res
end function
function getCheckBoxValue(sVal, CheckedValue, UnCheckedValue, sType)
if isempty(sVal) then
if UnCheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = UnCheckedValue
else
getCheckBoxValue = "'" & Replace(UnCheckedValue, "'", "''") & "'"
end if
end if
else
if CheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = CheckedValue
else
getCheckBoxValue = "'" & Replace(CheckedValue, "'", "''") & "'"
end if
end if
end if
end function
function getValFromLOV(sVal, aArr)
sRes = ""
if (ubound(aArr) mod 2) = 1 then
for i = 0 to ubound(aArr) step 2
if cstr(sVal) = cstr(aArr(i)) then sRes = aArr(i+1)
next
end if
getValFromLOV = sRes
end function
function get_options(sql,is_search,is_required,selected_value)
options_str=""
if is_search then
options_str=options_str&""
else
if is_required then options_str=options_str&""
end if
openrs tmprs,sql
while not tmprs.EOF
id=GetValue(tmprs, 0)
value=GetValue(tmprs, 1)
selected=""
if CStr(id) = CStr(selected_value) then
selected = "SELECTED"
end if
options_str = options_str & ""
tmprs.MoveNext
wend
get_options = options_str
end function
Function ProceedError()
if cn.Errors.Count > 0 then
ProceedError = cn.Errors(0).Description & " (" & cn.Errors(0).Source & ")"
elseif not (Err.Description = "") then
ProceedError = Err.Description
else
ProceedError = ""
end if
end Function
function CheckSecurity(iLevel)
if Session("UserID") = "" then
response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
else
if CLng(Session("UserRights")) < CLng(iLevel) then response.redirect("Login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
End if
end function
%>
<%
sSQL = "SELECT * FROM REListing where (AdType = '1')"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sSQL, objADO, 1, 3
IF (RS.EOF) THEN %>
There are not any featured properties.
<%
Else
rndMax = CInt(RS.RecordCount)
RS.MoveFirst
Do While Not RS.EOF
RS.MoveNext
Loop
RS.MoveFirst
Randomize Timer
rndNumber = Int(RND * rndMax)
RS.Move rndNumber
id = rs("REListingId")
imgsrc = rs("REListingImage")
'UrlTo = RS("LinkTo")
'GetImg = RS("ImgUrl")
'WriteSize1 = RS("SizeOf1")
'WriteSize2 = RS("SizeOf2")
'DisText = RS("TextUnder")
'ImpNow = RS("ImpNow")
'ImpNewNow = ImpNow + 1
End If
%>
<% if not rs.eof then %>
Mortgages
are long-term loans that use real estate as collateral. Mortgages are typically
used for buying one home but can serve as collateral for more than one mortgage.
When this is the case, the second mortgage is typically used to finance home
improvements or another purchase such as a car or boat. Mortgages are defined by
their terms, such as the time frame of repayment and whether the interest rate
is fixed or adjustable.
Conventional mortgages Conventional mortgages are not insured or
subsidized by the government. Most lenders require a downpayment of at least 20%
on a conventional loan, but offer them with lower downpayments if the buyer
purchases private mortgage insurance (PMI). PMI protects the lender if the home
owner defaults on the mortgage.
Conventional mortgage loans are generally
fully amortizing. This means that the regular principal and interest payment
will pay off the loan in the number of payments stipulated on the
note.
Mortgages are described by the length of time for repayment and
whether the interest rate is fixed or adjustable. Most conventional mortgages
have time frames of 15 to 30 years and may be either fixed-rate or adjustable.
While most mortgages require monthly payments of principal and interest, some
offer bi-weekly payment options.
Home buyers who can afford the higher
monthly payment sometimes prefer a 15-year conventional mortgage over a 30-year
mortgage. Interest rates on 15-year mortgages usually are a little lower than
30-year rates. In addition, a home buyer financing a home purchase with a
15-year mortgage will repay principal much faster and will pay far less interest
over the life of the loan.
The 30-year fixed rate
mortgage With a
30-year fixed rate mortgage, the homebuyer pays off the principal and interest
on the loan in 360 equal monthly payments. The monthly payment for principal and
interest remains the same during the full loan
period.
The 15-year fixed rate mortgage The 15-year fixed-rate mortgage is paid
off in 180 equal monthly payments over a 15-year-period. A 15-year mortgage
typically requires larger monthly payments than a 30-year loan and allows an
individual to pay off a mortgage in half the time as well as save on interest.
For example, monthly principal and interest payments on a $100,000 mortgage at
7.25 percent interest are $682 when repaid over 30 years and $913 when repaid
over 15 years. However, the buyer can save thousands of dollars on interest
charges by using the 15-year mortgage. Fifteen-year mortgages typically carry
interest rates a little lower than those for 30-year
loans.
Adjustable rate mortgages (ARMs) With a fixed-rate mortgage, the
interest rate stays constant during the life of the loan. But with an ARM, the
interest rate changes periodically, usually in relation to an index such as the
national average mortgage rate or the Treasury Bill rate. Payments can go up or
down accordingly.
Initial interest rates for ARMs are generally lower
those for fixed-rate mortgages. This makes the ARM easier on your payments at
first than a fixed-rate mortgage for the same amount. It also may help you
qualify for a larger loan because lenders sometimes make this decision on the
basis of your current income and the first year's payments. Moreover, an ARM
could be less expensive over a period of time than a fixed-rate mortgage -- for
example if interest rates remain steady or move down.
Against these
advantages, you have to discern the risk that an increase in interest rates
would lead to higher monthly payments in the future. It's a trade-off: you get a
lower rate with an ARM in exchange for assuming more
risk.
Here are some things to consider with an
ARM:
Is your income likely
to rise enough to cover higher mortgage payments if interest rates go
up?
Will you be taking on
other sizable debts, such as a car loan or school tuition, in the near
future?
How long do you plan
to own this home? (If you plan on selling soon, rising interest rates may not
pose the problem they would if you plan to own the house for a long
time.)
Can your payments
increase even if interest rates generally do not
increase?
What index is used to
adjust the mortgage rate? Try to obtain a table showing movements in the index
over the past 10 years to see how your mortgage payments could
change.
How often will the
mortgage be adjusted? One year? Three years? The longer the adjustment period,
the better you will be able to plan your future
expenses.
What is the initial
mortgage rate? Does it include a special discount? Is there an increase in your
monthly payments when your rate is adjusted for the first
time?
What is the margin on
the interest rate? The margin is the amount that the lender adds to the index
rate to calculate your mortgage rate. For instance, if the index rate is 6
percent and the margin is 2 percent, your overall interest rate would be 8
percent.
What limits or caps
have been placed on the periodic adjustments? One of the most important items to
discuss with your lender is the maximum amount that your rate can increase in
any single adjustment period and over the life of the mortgage. Find out the
"worst case" scenario in the event of a sharp increase in your index
rate.
Can negative
amortization occur? When negative amortization occurs, the monthly payments do
not cover the full amount of principal and interest, so the amount of principal
that you owe actually increases. Find out any limits there are on negative
amortization.
Does the mortgage have
a convertible feature? If so, is there a cost to convert? This option allows you
to change your ARM to a fixed-rate loan at some designated time in the
future.
Is there a prepayment
penalty if you sell your house and pay off your loan
early?
Other types of conventional mortgages
Balloon mortgages are
a non-amortizing loan. In other words, the periodic principal and interest
payments do not pay off the loan within the term. Some balloon mortgages may
have a principal and interest payment that is calculated as if it would pay off
the loan in 30 years, but the loan comes due in 5 or 7 years. Some lenders offer
terms for renewal of the loan at the balloon date if certain conditions, such as
a history of timely payment, are met. Some loans may contain provisions to be
rewritten as a fixed- or adjustable-rate amortizing loans with the monthly
principal and interest payment based on the balance remaining on the balloon
payment date.
Bi-weekly mortgages
provide a way for paying off a mortgage more quickly. With a bi-weekly mortgage,
the borrower makes half the regular monthly payment every two weeks. Because
there are 26 two-week periods in the year, the borrower makes the equivalent of
13 monthly payments each year. This allows borrowers to complete payment on a
30-year mortgage within 16 to 22 years. The lower the interest rate, the longer
the term of the mortgage required for pay-off. To reduce the paperwork
associated with the extra payments, lenders typically require that payments be
deducted automatically from a borrower's checking account. Bi-weekly payments
may be used with either 30-year or 15-year mortgages.
Some builders provide
concessions to buy down interest rates for one to three years or for the term of
the mortgage to help their buyers qualify for mortgages during periods of
especially high interest rates. This allows lenders to maintain the necessary
yield on the mortgage.
Shared equity loans
treat the purchase of a home as an investment that can be split between a
resident owner and an investment owner. The investment owner contributes a share
of the downpayment, the monthly payments, or both, and proportionately shares in
the ownership of the home. At resale, the borrower and the investor split the
proceeds after repayment of the balance of the mortgage. Both buyers may also
share the tax benefits, but the type and amount of tax deduction would depend on
the type of agreement. Many lenders limit this kind of loan to immediate family
members.
FHA
mortgages The
Federal Housing Administration (FHA) operates several low downpayment mortgage
insurance programs that homebuyers can use to purchase a home with a downpayment
of 3 percent or less of the cost of the home. The most commonly used FHA program
is the 203(b) program which provides for down payment
assistance on one- to four-family homes. The
maximum loan amount for a one-family home varies from $67,500 to $152,362
depending on local median prices.
FHA loans are available from most of
the same lenders who offer conventional loans. Your loan officer can provide
more details about FHA-insured mortgages and the maximum loan amount in the area
you are looking.
VA
mortgages If you
are a veteran or active duty military personnel, you might be able to obtain a
mortgage guaranteed by the Department of Veterans Affairs (VA). VA-guaranteed
loans require little or no downpayment.