<% dim arrType arrType = Array("Apartment / Flat","Studio","Single Family House","Condo","Co-op","Farm","Manufactured") Session.Timeout=60 %> Your HomeSite: Homes for SALE or LEASE <%=topbottomlinks%>

<% if ownertype = "forsale" then %> <%saleside%> <% elseif ownertype = "forlease" then %> <%leasedside%> <% end if %>
 
<% if ownertype = "forsale" then %> ...There's no place like home

<% elseif ownertype = "forlease" then %> ...There's no place like home
<% end if %> <% if ownertype = "forsale" or ownertype = "forlease" then %>
Search Listings | Show All Listings | <%If session("adminLogin") = True or session("agentLogin") = True then%>My Listings<%Else%>My Homes<%End If%> | Contact Us | <% if session("userID") <> "" then %> Logout <% else %> Login <% end if %> <% end if %>
<% 'Shows TOOL buttons if needed for ADMIN and AGENTS If session("adminLogin") = True or session("agentLogin") = True then If session("adminLogin") = True then %> Admin Tools: Add Agent | <% Else %> Agent Tools:  <%end if%> Edit Agent | Add Listing | <% ' Shows EDIT and DELETE buttons if needed for ADMIN and AGENTS If request.querystring ("page") = "show_listing" and request.querystring ("propNo")<>"" then sql="SELECT * from tblUsers, tblProperty WHERE tblUsers.userID = " & session("userID") & " AND tblUsers.agentID = tblProperty.agentID AND propNo = " & request.querystring ("propNo") rsNav.Open sql, connNav If NOT rsNav.eof Or session("adminLogin") then%> &<%=ownertypeqstring%>" class="stextlinks">Edit Listing | )" class="stextlinks">Delete Listing <% end if rsNav.close end if ' END Shows EDIT and DELETE buttons if needed for ADMIN and AGENTS %>
<%end if%> <% If request.querystring ("page")="edit" then ' ********************************************************************************************************* ' ********************************** BEGIN SECTION DEALING WITH AGENTS ************************************ ' ********************************************************************************************************* Secure SetVars "querystring" Select Case action Case "submit" errorFlag = False ' Initialize the upload object and commit the files and form values. Set upload = Server.CreateObject("Persits.Upload.1") upload.SaveVirtual("/leased/search/image/agents/temp/") ' SetVars "upload" agentID = upload.Form("agentID") errorMsg = "" If upload.form("userName") = "" OR upload.form("agentName") = "" OR upload.form("userPassword") = "" OR upload.form("userEmail") = "" Then errorFlag = True errorMsg = errorMsg & "

Please be sure to fill in all required fields" End If If not errorFlag Then If agentID = "0" or agentID = "" Then sql="SELECT * from tblAgent WHERE 1 <> 1" rs.open sql, conn rs.addNew Else sql = "SELECT * FROM tblAgent WHERE agentID = " & agentID rs.Open sql, conn End If 'REQUEST.FORM not needed because of SetVars "form" rs("agentName") = Trim(upload.form("agentName")) rs("agentPhone") = Trim(upload.form("agentPhone")) rs("agentCell") = Trim(upload.form("agentCell")) rs("agentFax") = Trim(upload.form("agentFax")) rs("agentUrl") = Trim(upload.form("agentUrl")) rs("agentBio") = Trim(upload.form("agentBio")) If upload.form("agentIsDelete") = "" then rs("agentIsDelete") = 0 Else rs("agentIsDelete") = upload.form("agentIsDelete") End If 'rs("agentPic") = agentPic rs.Update agentID = rs("agentID") rs.close sql = "SELECT * FROM tblUsers WHERE agentID = " & agentID rs.Open sql, conn If rs.EOF Then rs.AddNew End If rs("userName") = Trim(upload.form("userName")) rs("userPassword") = Trim(upload.form("userPassword")) rs("userEmail") = Trim(upload.form("userEmail")) rs("agentID") = Trim(agentID) rs.Update rs.close 'Here's where we upload the picture, if supplied 'This is plain stupid, but it works. 'Turn on error handling, initialize a file object and 'attempt to determine the name of the uploaded file. 'If it fails, no file was supplied, probably intentionally. On Error Resume Next Set file = upload.Files("agentPic") checkFile = file.Name If Err.Number <> 0 Then photoFlag = False Else photoFlag = True End If Set file = Nothing Err.Clear On Error GoTo 0 ' Only if a file was uploaded ' does copying of the file to the production directory commence. If photoFlag Then If upload.Files("agentPic").Size <> 0 Then upload.Files("agentPic").CopyVirtual "/leased/search/image/agents/" & agentID & upload.Files("agentPic").ext End If End If 'Clean up any files that may be laying around in the Temp directory For Each file In upload.Files file.Delete Next Response.Redirect "/properties/?page=edit&cat=" & request.querystring ("cat") & "&" & ownertypeqstring End If End Select%>

<%If request.querystring ("cat")="" or request.querystring ("cat")="addagent" then%> <%if session("adminLogin") = True then if request.querystring ("cat")<>"addagent" then%> <%end if end if ' fills in fields with selected agent ID's Agent Information if request.querystring("agentID") <> "" then sql="SELECT * FROM tblAgent, tblUsers WHERE tblAgent.agentID = tblUsers.agentID AND tblAgent.agentID =" & request.querystring("agentID") rs.Open sql, conn If Not rs.EOF Then agentName = rs("agentName") userName = rs("userName") userPassword = rs("userPassword") agentPhone = rs("agentPhone") agentCell = rs("agentCell") agentFax = rs("agentFax") agentUrl = rs("agentUrl") userEmail = rs("userEmail") agentBio = rs("agentBio") 'agentPic = rs("agentPic") End If End If 'Fills in fields with current Agents information if session("agentLogin") = True then if session("adminLogin") <> True then sql="SELECT * FROM tblAgent, tblUsers WHERE tblAgent.agentID = tblUsers.agentID AND tblUsers.userID =" & session("userID") rs.Open sql, conn If Not rs.EOF Then agentName = rs("agentName") userName = rs("userName") userPassword = rs("userPassword") agentPhone = rs("agentPhone") agentCell = rs("agentCell") agentFax = rs("agentFax") agentUrl = rs("agentUrl") userEmail = rs("userEmail") agentBio = rs("agentBio") 'agentPic = rs("agentPic") End If End If End If %> <%end if%> <% If request.querystring ("cat")="show_agent" then response.write writeAgentInfo(request.querystring("agentID"),rs,conn) end if %>
<%If errorFlag then response.write (errorMsg) end if if session("agentLogin") = True then if session("adminLogin") = True then%>

Edit or Add Agent Profile <%else%>

Edit Your Profile <%end if%> <%end if%>

Select an Agent to Edit <%if request.querystring ("agentID") <> "" then%>  Delete this agent<%end if%> <% If agentID <> "" And fso.FileExists(path & "\image\agents\" & agentID & ".jpg") Then %> <% End If %>
* Full Name
* User Name
* Password
Phone
Mobile
Fax
Homepage
* Email
Bio
Photo
image must be .jpg
* Indicates a required field
  
<% ' ********************************************************************************************************* ' *********************************** END SECTION DEALING WITH AGENTS ************************************* ' ********************************************************************************************************* end if If request.querystring ("page")="listing" then ' ********************************************************************************************************* ' ******************************** BEGIN SECTION DEALING WITH LISTINGS ************************************ ' ********************************************************************************************************* Secure SetVars "querystring" Select Case action Case "submit_listing" ' Initialize the upload object and commit the files and form values. ' Create Photo Array, to be used throughout the page photoExtens = Array("Main", "Additional1", "Additional2", "Additional3", "Additional4", "Additional5", "Additional6", "Additional7") Set upload = Server.CreateObject("aspSmartUpload.SmartUpload") upload.Upload errorFlag = False SetVars "upload" errorMsg = "" If propNo <> "" then sql="SELECT * from tblProperty WHERE propNo =" & propNo & "" rs.open sql, conn propPropID = rs("propPropID") rs.close End If call verifyRequiredField(upload.form("address"), "Address", addressFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("city"), "City", cityFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("state"), "State",stateFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("zipCode"), "Zip", zipCodeFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("agentID"), "Agent", agentIDFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("propID"), "Prop ID", propIDFlag, errorFlag, errorMessage) if ownertype="forlease" then call verifyRequiredField(upload.form("status"), "Date Available", statusFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("rate"), "Rate", rateFlag, errorFlag, errorMessage) end if if ownertype="forsale" then call verifyRequiredField(upload.form("price"), "Price", priceFlag, errorFlag, errorMessage) end if call verifyRequiredField(upload.form("bedroom"), "Bedroom", bedroomFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("bathroom"), "Bathroom", bathroomFlag, errorFlag, errorMessage) call verifyRequiredField(upload.form("yearBuilt"), "Year Built", yearBuiltFlagFlag, errorFlag, errorMessage) 'independent message for images imgErrorMsg = "" 'this is where we do the photo error checking. 'Start by checking the fields and checking if a file upload was even attempted 'If so, check the extension to make sure it was right. ' For a = 0 To 7 ' If Not upload.Files("photo" & photoExtens(a)).isMissing Then ' If lcase(upload.Files("photo" & photoExtens(a).FileExt)) <> "jpg" and lcase(upload.Files("photo" & photoExtens(a).FileExt)) <> "jpeg" and lcase(upload.Files("photo" & photoExtens(a).FileExt)) <> "gif" Then ' 'set the error ' errorFlag = true ' imgErrorMsg = "

You attempted to upload a file that was not of type .jpg or .gif
" ' end if ' End If ' next 'Add the image error message on to the regular error message. errorMsg = errorMsg & imgErrorMsg If not errorFlag Then If propNo <> "" Then sql = "SELECT * FROM tblProperty WHERE propNo = " & propNo rs.Open sql, conn Else sql = "SELECT * from tblProperty WHERE 1 <> 1" rs.open sql, conn rs.addNew End If 'REQUEST.FORM not needed because of SetVars "form" rs("AgentID") = agentID rs("propAddress") = address rs("propCity") = city rs("propState") = state rs("propZip") = zipCode rs("propYear") = yearBuilt rs("propBed") = bedroom rs("propBath") = bathroom rs("propFloor") = floors rs("propBr0") = rm0 rs("propBr1") = rm1 rs("propBr2") = rm2 rs("propBr3") = rm3 rs("propBr4") = rm4 rs("propBr5") = rm5 rs("propRm1") = rm6 rs("propRm2") = rm7 rs("propRm3") = rm8 rs("propRm4") = rm9 rs("propRm5") = rm10 rs("propRm6") = rm11 rs("propRm7") = rm12 if len(sqFeet)=0 then sqFeet = 0 end if rs("propSqFeet") = sqFeet rs("propLotSize") = lotSize rs("propGarage") = garage rs("propNeighborhood") = neighborhood rs("propPropID") = propID rs("propURL") = "http://" & Replace(vtUrl, "http://", "") rs("propStatus") = status rs("propType") = propType if ownertype="forlease" then rs("propRate") = Replace(Replace(rate, ".00", ""), "$", "") end if if ownertype="forsale" then rs("propPrice") = Replace(Replace(Replace(price, ".00", ""), "$", ""),",","") end if rs("propDesc") = propDesc rs("propUpdates") = propUpdates rs("propAgentComments") = propAgentComments rs("propDirections") = propDirections if len(possessionAtClose)>0 then rs("possessionAtClose") = 1 else rs("possessionAtClose") = 0 end if if len(possession3060)>0 then rs("possession3060") = 1 else rs("possession3060") = 0 end if rs("possessionAsOf") = possessionAsOf if len(possessionCurVacant)>0 then rs("possessionCurVacant") = 1 else rs("possessionCurVacant") = 0 end if rs("possessionShowNoticeHours") = possessionShowNoticeHours if ownertype="forlease" then rs("forlease")=1 else rs("forlease")=0 end if if ownertype="forsale" then rs("forsale")=1 else rs("forsale")=0 end if rs("propMLS") = propMLS rs("propCounty") = propCounty rs("propPostOffice") = propPostOffice rs("propSchoolDistrict") = propSchoolDistrict rs("propExtSurface") = propExtSurface rs("propAcres") = propAcres rs("propWooded") = propWooded if len(propMountainous)>0 then rs("propMountainous") = 1 else rs("propMountainous") = 0 end if if len(propWaterfront)>0 then rs("propWaterfront") = 1 else rs("propMountainous") = 0 end if rs("taxesCurWinter") = taxesCurWinter rs("taxesCurSummer") = taxesCurSummer rs("taxesSpecialAssess") = taxesSpecialAssess rs("taxesAssocFee") = taxesAssocFee rs("taxesParcelID") = taxesParcelID if len(taxesHomesteadExmpt)>0 then rs("taxesHomesteadExmpt") = 1 else rs("propMountainous") = 0 end if rs("taxesCurrentSEV") = taxesCurrentSEV rs("taxesCurTotalMill") = taxesCurTotalMill 'rs("propImage") = rs.Update propNo = rs("propNo") rs.Close sql = "DELETE tblListingFeatures WHERE propNo = " & propNo conn.Execute sql If upload.Form("myfeatures") <> "" Then For Each featureID In upload.Form("myfeatures") sql = "INSERT INTO tblListingFeatures (featureID, propNo) VALUES (" & featureID & ", " & propNo & ")" conn.Execute sql Next End If For Each Field In upload.Form ' response.write Field & " - " & upload.form(Field) & "
" if left(Field,8)=left("features",8) then featureID = right(Field,len(Field)-8) if len(upload.form(Field))>0 then sql = "INSERT INTO tblListingFeatures (featureID, propNo, featureValue) VALUES (" & featureID & ", " & propNo & ",'" & upload.form(Field) & "')" conn.Execute sql end if end if Next 'response.end 'Loops through the photoextens array 'does a quick check that the photo exists and that it's an actual size (like before), 'checks if the directory exists and creates it if it isn't there, and finally saves the image over. if len(upload.form("deletemyphotos"))>0 then ' delete all photos... if fso.folderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "")) then Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo)) For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next end if end if For a = 0 To 7 If Not upload.Files("photo" & photoExtens(a)).isMissing Then If upload.Files("photo" & photoExtens(a)).Size <> 0 Then If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo)) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo)) End If upload.Files("photo" & photoExtens(a)).SaveAs "/leased/search/image/listings/" & propNo & "/" & photoExtens(a) & "." & upload.Files("photo" & photoExtens(a)).FileExt End If End If Next if len(upload.form("deletemysellerdisclosure"))>0 then ' delete seller disclosure ... if fso.folderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "/sellerdiscl")) then Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/sellerdiscl")) For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next end if end if ' upload seller disclosure if available If Not upload.Files("sellerDisclosure").isMissing Then If upload.Files("sellerDisclosure").Size <> 0 Then If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo)) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo)) End If If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "/sellerdiscl")) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/sellerdiscl")) End If Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/sellerdiscl")) On Error Resume Next For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next upload.Files("sellerDisclosure").SaveAs(Server.MapPath("/leased/search/image/listings/" & propNo & "/sellerdiscl/" & upload.Files("sellerDisclosure").filename)) end if end if if len(upload.form("deletemyleadbaseddisclosure"))>0 then ' delete lead based paint disclosure ... if fso.folderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "/lbpdiscl")) then Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/lbpdiscl")) For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next end if end if ' upload lead based paint disclosure if available If Not upload.Files("lbpDisclosure").isMissing Then If upload.Files("lbpDisclosure").Size <> 0 Then If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo)) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo)) End If If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "/lbpdiscl")) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/lbpdiscl")) End If Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/lbpdiscl")) On Error Resume Next For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next upload.Files("lbpDisclosure").SaveAs(Server.MapPath("/leased/search/image/listings/" & propNo & "/lbpdiscl/" & upload.Files("lbpDisclosure").filename)) end if end if if len(upload.form("deletemylegaldescription"))>0 then ' delete legal description ... if fso.folderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "/legal")) then Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/legal")) For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next end if end if ' upload legal description if available If Not upload.Files("legalDescription").isMissing Then If upload.Files("legalDescription").Size <> 0 Then If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo)) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo)) End If If Not fso.FolderExists(Server.MapPath("/leased/search/image/listings/" & propNo & "/legal")) Then fso.CreateFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/legal")) End If Set oFolder = fso.GetFolder(Server.MapPath("/leased/search/image/listings/" & propNo & "/legal")) On Error Resume Next For Each oFile In oFolder.Files oFile.Delete True 'setting force to true Next upload.Files("legalDescription").SaveAs(Server.MapPath("/leased/search/image/listings/" & propNo & "/legal/" & upload.Files("legalDescription").filename)) end if end if Response.Redirect("http://yourhomesite.net/properties/?page=search&cat=showall" & "&" & ownertypeqstring) End If End Select If propNo <> "" Then sql = "SELECT * FROM tblProperty WHERE propNo = " & propNo rs.Open sql, conn If Not rs.EOF Then propAgentID = rs("agentID") address = rs("propAddress") city = rs("propCity") stateID = rs("propState") zipCode = rs("propZip") yearBuilt = rs("propYear") bedroom = rs("propBed") bathroom = rs("propBath") floors = rs("propFloor") rm0 = rs("propBr0") rm1 = rs("propBr1") rm2 = rs("propBr2") rm3 = rs("propBr3") rm4 = rs("propBr4") rm5 = rs("propBr5") rm6 = rs("propRm1") rm7 = rs("propRm2") rm8 = rs("propRm3") rm9 = rs("propRm4") rm10 = rs("propRm5") rm11 = rs("propRm6") rm12 = rs("propRm7") sqFeet = rs("propSqFeet") lotSize = rs("propLotSize") garage = rs("propGarage") neighborhood = rs("propNeighborhood") propID = rs("propPropID") vtUrl = rs("propURL") status = rs("propStatus") propType = rs("propType") rate = rs("propRate") price = rs("propPrice") propDesc = rs("propDesc") propUpdates = rs("propUpdates") propAgentComments = rs("propAgentComments") propDirections = rs("propDirections") possessionAtClose = rs("possessionAtClose") possession3060 = rs("possession3060") possessionAsOf = rs("possessionAsOf") possessionCurVacant = rs("possessionCurVacant") possessionShowNoticeHours = rs("possessionShowNoticeHours") propMLS = rs("propMLS") propCounty = rs("propCounty") propPostOffice = rs("propPostOffice") propSchoolDistrict = rs("propSchoolDistrict") propExtSurface = rs("propExtSurface") propAcres = rs("propAcres") propWooded = rs("propWooded") propMountainous = rs("propMountainous") propWaterfront = rs("propWaterfront") taxesCurWinter = rs("taxesCurWinter") taxesCurSummer = rs("taxesCurSummer") taxesSpecialAssess = rs("taxesSpecialAssess") taxesAssocFee = rs("taxesAssocFee") taxesParcelID = rs("taxesParcelID") taxesHomesteadExmpt = rs("taxesHomesteadExmpt") taxesCurrentSEV = rs("taxesCurrentSEV") taxesCurTotalMill = rs("taxesCurTotalMill") End If rs.close End If if errorFlag then Response.Write errorMsg end if %> <% sql="SELECT * from tblAgent, tblUsers WHERE tblAgent.agentID = tblUsers.agentID AND tblUsers.userID = '" & session("userID") & "'" rs.Open sql, conn WHILE NOT rs.EOF userName = rs("userName") agentName = rs("agentName") agentID = rs("agentID") rs.MoveNext WEND rs.close %> <% if ownertype = "forlease" then %> <% else %> <% end if %>
Main Information
<% If agentIDFlag then Response.Write ""%>* Agent <% If propIDFlag then Response.Write ""%><% If propID2Flag then Response.Write ""%>* Prop ID MLS # Type
<%if session("adminLogin") then%> <%else response.write agentName & "" end if%>
<% If rateFlag then Response.Write ""%>* Rate Per Month Virtual Tour URL  
<% If priceFlag then Response.Write ""%>* Price Virtual Tour URL  
<% If addressFlag then Response.Write ""%>* Address <% If cityFlag then Response.Write ""%>* City State <% If zipCodeFlag then Response.Write ""%>* Zip
<% If yearbuiltFlag then Response.Write ""%>* Year Built <% If bedroomFlag then Response.Write ""%>* No. of Bedrooms <% If bathroomFlag then Response.Write ""%>* No. of Bathrooms No. of Floors
Square Feet Lot Size Garage Neighboorhood

Bedroom Sizes
Studio: BR #1 BR #2 BR #3 BR #4 BR #5

Other Room Sizes
Living Room Study / Den Kitchen Great Room Dining Room Laundry Room Basement

Possession
<% if ownerType = "forlease" then %> <% else %> <% end if %>
<% If statusFlag then Response.Write "* "%>* Date Avail.
> At Close > 30-60 Days from Close As Of
> Currently Vacant Showing Notice - Hours

Location
County Post Office School District
Exterior Surface Acres Wooded (%)
> Mountainous > Waterfront

Taxes
Current Winter Taxes Current Summer Taxes Special Assessment Assoc. Fee (yr)
Parcel I.D. Current SEV Currrent Total Mills
> Homestead Exemption

Brief description of the property
Updates / Improvements / Replacements (Last 3 yrs)
Agent Comments
Directions to Property

Home Features

<%=getFeatureList("Exterior Features","he",rs,conn,propNo)%> <%=getFeatureList("Interior Features","hi",rs,conn,propNo)%> <%=getFeatureList("Community Features","co",rs,conn,propNo)%> <%=getFeatureList("Garage","ga",rs,conn,propNo)%> <%=getFeatureList("Basement","ba",rs,conn,propNo)%> <%=getFeatureList("Appliances","ap",rs,conn,propNo)%> <%=getFeatureList("Utilities","ut",rs,conn,propNo)%> <%=getFeatureList("Windows","wi",rs,conn,propNo)%> <%=getFeatureList("Fuel","fu",rs,conn,propNo)%> <%=getFeatureList("Grounds","gr",rs,conn,propNo)%> <%=getFeatureList("Roof","ro",rs,conn,propNo)%> <%=getFeatureList("Seller","si",rs,conn,propNo)%>
Upload Pictures
Pictures must be a .jpg or .gif format
Exterior photo must be the first one.
<% getPhotoLinks(true) %>



Upload Seller Disclosure
<% getSellerDisclosureLink(true) %>


Upload Lead Based Paint Disclosure
<% getLeadBasedPaintDisclosureLink(true) %>


Upload Legal Description
<% getLegalDescriptionLink(true) %>

"" then%>Edit<%else%>Add<%end if%> Listing" CLASS="button">  
<%end if ' ********************************************************************************************************* ' ********************************** BEGIN SECTION DEALING WITH LOGIN ************************************* ' ********************************************************************************************************* If request.querystring ("page")="login" then action = request.querystring("action") Select Case action Case "login" sql = "SELECT * from tblUsers WHERE userName = '" & request.Form("userName") & "'" rs.Open sql, conn If rs.EOF Then errorFlag = True errorMsg = "

Please enter the proper user name." Else if request.form("userPassword") = rs("userPassword") Then session("userID") = rs("userID") If VarType(rs("agentID")) = 1 Then session("agentLogin") = False Else session("agentLogin") = True End If If rs("admin") = 0 Then session("adminLogin") = False Else session("adminLogin") = True End If Response.Redirect "/properties/?page=search&cat=showall" & "&" & ownertypeqstring Else errorFlag1 = True errorMsg = "

Please enter the correct password." End If End IF rs.close Case "reqpw" sql = "SELECT * from tblUsers WHERE userEmail = '" & request.Form("userEmail") & "'" rs.Open sql, conn If rs.EOF Then errorFlag2 = True errorMsg = "

We currently do not have that email address on file. Please try another email address or check your spelling." Else Set Mail = Server.CreateObject("CDONTS.NewMail") Mail.From = "YourHomesite.Com " Mail.To = rs("userEmail") Mail.Subject = "Your Request" Mail.MailFormat = 0 Mail.BodyFormat = 0 Mail.Body = rs("userName") & ",

Here is the password you requested that will allow you to access YourHomeSite.net.

" & rs("userPassword") Mail.Send Set Mail = Nothing Response.Redirect "/properties/index.asp" End If rs.close Case "logout" Session.Abandon Response.Redirect "/properties/index.asp" Case "register" errorFlag = False SetVars "form" errorMsg = "" If userName = "" or vartype(userName) = 1 or userPassword = "" or vartype(userPassword) = 1 or userEmail = "" or vartype(userEmail) = 1 then errorFlag3 = True errorMsg = "

Please be sure to fill all three fields on the form." End If sql = "SELECT * from tblUsers WHERE userEmail = '" & request.Form("userEmail") & "'" rs.open sql, conn If not RS.EOF then errorFlag4 = True errorMsg = "

That email address is already in use, please use a different email address or log in using your current one." End if rs.close If not errorFlag3 AND not errorFlag4 Then sql="SELECT * from tblUsers WHERE 1 <> 1" rs.open sql, conn rs.addNew 'REQUEST.FORM not needed because of SetVars "form" rs("userName") = userName rs("userEmail") = userEmail rs("userPassword") = userPassword rs.Update rs.Close Response.Redirect "/properties/?page=login&msg=yes" & "&" & ownertypeqstring thankMsg = "

Thank you for registering, please login now." End If End Select %> <%If request.querystring ("cat")<>"register" then%> <%end if%> <%If request.querystring ("cat")="register" then%> <%end if%>

<% If request.querystring ("msg") = "yes" then response.write (thankMsg) end if If errorFlag then response.write (errorMsg) end if If errorFlag1 then response.write (errorMsg) end if If errorFlag2 then response.write (errorMsg) end if If errorFlag3 then response.write (errorMsg) end if If errorFlag4 then response.write (errorMsg) end if%>

Login to YourHomeSite.net

Please enter your username and password

Login:
Password:
 

If you don't have a username or password you may register here.

Did you forget your password?


Enter your email address below and we will send you your password
  
Create an account at YourHomeSite.net

Please fill in the information below

User Name:
E-Mail:
Password:
 
<%end if%> <%If request.querystring ("page")="search" or request.querystring("page") = "" then ' ********************************************************************************************************* ' ********************************** BEGIN SECTION DEALING WITH SEARCH ************************************ ' ********************************************************************************************************* If request.querystring ("cat")="mylistings" then If session("userID") = "" then Response.Redirect "http://www.yourhomesite.net/properties/?page=login" & "&" & ownertypeqstring End If End If %> <%If errorFlag then response.write (errorMsg) end if ' ********** SEARCH FIELDS FOR USER *************** If request.querystring ("cat")="search_listings" or request.querystring ("cat")="" then%> <%end if%> <%If request.querystring ("cat")<>"search_listings" AND request.querystring ("cat")<>"" then%>
<% if ownertype="forlease" then %>
State:
County:
Rate / Month:
Type of Structure:
   <% elseif ownertype="forsale" then %>
State:
County:
Price:
Type of Structure:
Levels:
   <% else %>

Please select if you want to search for a property that is for sale or for lease.

<% end if %>
<%If request.querystring ("cat")="showall" then%> ALL LISTINGS <%Elseif request.querystring ("cat")="mylistings" then%> <%If session("adminLogin") = True or session("agentLogin") = True then%> MY LISTINGS<%Else%>MY HOMES<%End If%> <%Elseif request.querystring ("cat")="show_results" then%> SEARCH RESULTS <%end if%>
<% if ownertype="forlease" then %> <% end if %> <% if ownertype="forlease" then %> <% end if %> <% if ownertype="forsale" then %> <% end if %> <%If session("adminLogin") = True or session("agentLogin") = True then%><%end if%> <% ' ************ SHOW ALL SQL STATEMENT ************ If request.querystring ("cat")="showall" then sql = "SELECT * from tblProperty, tblUsers, tblAgent WHERE tblUsers.agentID = tblProperty.agentID AND tblAgent.agentID = tblProperty.agentID " if ownertype <> "" then sql = sql & " AND " & ownertype & " = 1 " end if sql = sql & " ORDER BY " if request.querystring ("filter") <> "" then sql=sql & request.querystring ("filter") else sql=sql &"propPropID" rs.Open sql, conn If rs.EOF Then errorFlag = True errorMsg = "

Sorry, There are currently no homes in the database." End if end if ' ************ END SHOW ALL SQL STATEMENT ************ ' ************ MY LISTINGS SQL STATEMENT ************ if request.querystring ("cat")="mylistings" then If session("agentLogin") = True then sql="SELECT * from tblProperty, tblUsers, tblAgent WHERE tblUsers.agentID = tblProperty.agentID AND tblAgent.agentID = tblProperty.agentID AND tblUsers.userID =" & session("userID") & " " if ownertype <> "" then sql = sql & " AND " & ownertype & " = 1 " end if sql = sql & " ORDER BY " if request.querystring ("filter") <> "" then sql=sql & request.querystring ("filter") else sql=sql &"propNo" rs.Open sql, conn If rs.EOF Then errorFlag = True errorMsg = "

Sorry, There are currently no homes saved to MY HOMES." End if Else sql = "SELECT * from tblProperty, tblAgent, tblMyListings WHERE tblAgent.agentID = tblProperty.agentID AND tblMyListings.propNo = tblProperty.propNo AND tblMyListings.userID =" & session("userID") & " ORDER BY " if request.querystring ("filter") <> "" then sql=sql & request.querystring ("filter") else sql=sql &"tblProperty.propNo" rs.Open sql, conn If rs.EOF Then errorFlag = True errorMsg = "

Sorry, There are currently no homes saved to MY HOMES." End if End if end if ' ************ END MY LISTINGS SQL STATEMENT ************ ' ************ SEARCH RESULTS SQL STATEMENT ************ if request.querystring ("cat")="show_results" then SetVars "form" sql="SELECT * from tblProperty, tblUsers, tblAgent, tblStates WHERE tblProperty.propState = tblStates.stateID AND tblUsers.agentID = tblProperty.agentID AND tblAgent.agentID = tblProperty.agentID" If ratepermonth <> "" Then ratepermonth = Split(ratepermonth, ",") sql = sql & " AND propRate BETWEEN " & ratepermonth(0) & " AND " & ratepermonth(1) End If If price <> "" Then price = Split(price, ",") sql = sql & " AND propPrice BETWEEN " & price(0) & " AND " & price(1) End If if ownertype <> "" then sql = sql & " AND " & ownertype & " = 1 " end if if stateName <> "" then sql=sql & " AND '" & Trim(stateName) & "' = stateName" if county <> "" then sql=sql & " AND '" & county & "' = propCounty" if propType <> "" then sql=sql & " AND " & propType & " = propType" if bedroom <> "" then sql=sql & " AND " & bedroom & " = propBed" if floors <> "" then sql=sql & " AND '" & floors & "' = propFloor" sql=sql & " ORDER BY tblProperty.propNo" rs.Open sql, conn If rs.EOF Then errorFlag = True errorMsg = "

Sorry, no search results matched your criteria.

Please try your search again" End if end if ' ************ END SEARCH RESULTS SQL STATEMENT ************ ' ************ PICK UP CODE TO FINISH PAGE ************ colorflag = 0 bgcolor=array("#FFFFFF","#D7D4D4") While Not rs.EOF If colorflag = 1 then colorflag = 0 else colorflag = 1 propType = arrType(rs("propType")) %>

<% listingImage = "" if fso.FileExists(path & "image/listings/" & rs("propNo") & "/Main.jpg") then listingImage = "" elseif fso.FileExists(path & "image/listings/" & rs("propNo") & "/Main.gif") then listingImage = "" end if %> <% if ownertype="forlease" then %> <% end if %> <% if ownertype="forlease" then %> <% end if %> <% if ownertype="forsale" then %> <% end if %> <%If session("adminLogin") = True or session("agentLogin") = True then%><%end if%> <% rs.movenext Wend rs.close%>
<%If request.querystring ("filter")<>"propPropID" then%>&filter=propPropID&<%=ownertypeqstring%>">Prop ID<%Else%>Prop ID<%End If%> <%If request.querystring ("filter")<>"propType" then%>&filter=propType&<%=ownertypeqstring%>">Type<%Else%>Type<%End If%> Image<%If request.querystring ("filter")<>"propStatus" then%>&filter=propStatus&<%=ownertypeqstring%>">Date Avail.<%Else%>Date Avail.<%End If%><%If request.querystring ("filter")<>"propBed" then%>&filter=propBed&<%=ownertypeqstring%>">Beds<%Else%>Beds<%End If%> <%If request.querystring ("filter")<>"propBath" then%>&filter=propBath&<%=ownertypeqstring%>">Baths<%Else%>Baths<%End If%> <%If request.querystring ("filter")<>"propCity" then%>&filter=propCity&<%=ownertypeqstring%>">City<%Else%>City<%End If%> <%If request.querystring ("filter")<>"propState" then%>&filter=propState&<%=ownertypeqstring%>">State<%Else%>State<%End If%> <%If request.querystring ("filter")<>"propSqFeet" then%>&filter=propSqFeet&<%=ownertypeqstring%>">Sq Ft.<%Else%>Sq Ft.<%End If%><%If request.querystring ("filter")<>"propRate" then%>&filter=propRate&<%=ownertypeqstring%>">Rate<%Else%>Rate<%End If%><%If request.querystring ("filter")<>"propPrice" then%>&filter=propPrice&<%=ownertypeqstring%>">Price<%Else%>Price<%End If%><%If request.querystring ("filter")<>"tblProperty.agentID" then%>&filter=tblProperty.agentID&<%=ownertypeqstring%>">Agent<%Else%>Agent<%End If%>
&<%=ownertypeqstring%>"><%=rs("propPropID")%> <%If session("adminLogin") = True or session("agentLogin") = True then%> <% sql="SELECT * from tblUsers, tblProperty WHERE " & session("userID") & "= tblUsers.userID AND tblUsers.agentID = tblProperty.agentID AND propNo = " & rs("propNo") rsNav.Open sql, connNav If NOT rsNav.eof Or session("adminLogin") then%>
&<%=ownertypeqstring%>">Edit
)">Delete <%End If%> <%rsNav.close end if %>
<%=propType%>&<%=ownertypeqstring%>"><%=listingImage%><%= FormatDate (rs("propStatus"), "%m/%d/%y") %><%=rs("propBed")%> <%=rs("propBath")%> <%=rs("propCity")%> <%=rs("propState")%> <%=rs("propSqFeet")%>$<%=rs("propRate")%>$<%=rs("propPrice")%>&<%=ownertypeqstring%>"><%=rs("agentName")%>
<%if errorFlag Then Response.Write errorMsg%> <%end if%>
<%end if%> <%If request.querystring ("page")="show_listing" then ' ********************************************************************************************************* ' ***************************** BEGIN SECTION DEALING WITH SHOWING A LISTING ****************************** ' ********************************************************************************************************* SetVars "querystring" sql="SELECT * FROM tblProperty WHERE propNo = " & propNo rs.Open sql, conn propNo = rs("propNo") agentID = rs("agentID") If rs.EOF Then errorFlag = True errorMsg = "

Sorry, There are currently no homes in the database.

" end if If errorFlag then response.write (errorMsg) end if %> <% if len(rs("propDesc"))>0 then %> <% end if %> <% if len(rs("propUpdates"))>0 then %> <% end if %> <% if len(rs("propAgentComments"))>0 then %> <% end if %> <% if len(rs("propDirections"))>0 then %> <% end if %> <%rs.close%> <% dim arrStrFeatures(10) arrStrFeatures(0) = "" & listFeatures("Interior Features","hi",rs,conn,propNo) arrStrFeatures(1) = "" & listFeatures("Exterior Features","he",rs,conn,propNo) arrStrFeatures(2) = "" & listFeatures("Community Features","co",rs,conn,propNo) arrStrFeatures(3) = "" & listFeatures("Garage","ga",rs,conn,propNo) arrStrFeatures(4) = "" & listFeatures("Basement","ba",rs,conn,propNo) arrStrFeatures(5) = "" & listFeatures("Appliances","ap",rs,conn,propNo) arrStrFeatures(6) = "" & listFeatures("Utilities","ut",rs,conn,propNo) arrStrFeatures(7) = "" & listFeatures("Windows","wi",rs,conn,propNo) arrStrFeatures(8) = "" & listFeatures("Fuel","fu",rs,conn,propNo) arrStrFeatures(9) = "" & listFeatures("Grounds","gr",rs,conn,propNo) arrStrFeatures(10) = "" & listFeatures("Roof","ro",rs,conn,propNo) 'arrStrFeatures(11) = "" & listFeatures("Seller ","si",rs,conn,propNo) %>
<%=rs("propAddress")%>
<%=rs("propCity")%>, <%=rs("propState")%>  <%=rs("propZip")%>
&city=<%=rs("propCity")%>&state=<%=rs("propState")%>&zipcode=<%=rs("propZip")%>&search=++Search++" target="_blank">Map & Directions
<%if fso.FileExists(path & "image/listings/" & rs("propNo") & "/Main.jpg") then%> /Main.jpg" width="200" height="200"> <% getPhotoLinks(false) %> <%else if fso.FileExists(path & "image/listings/" & rs("propNo") & "/Main.gif") then%> /Main.gif" width="200" height="200"> <% getPhotoLinks() else%> <%end if end if%> <%if Len(rs("propURL")) > 15 then%>
" target="_blank">Virtual Tour<%end if%>
<% %> <%=ShowDataWithLabel("Property ID:",rs("propPropID"),"","")%> <%=ShowDataWithLabel("MLS #:",rs("propMLS"),"","")%> <% if ownerType="forlease" then %> <%=ShowDataWithLabel("Rate Per Month:",rs("propRate"),"$","")%> <% else %> <%=ShowDataWithLabel("Price:",rs("propPrice"),"$","")%> <% end if %> <%=ShowDataWithLabel("","" & arrType(rs("propType")) & "","","")%> <%=ShowDataWithLabel("Square Feet:",optField( rs("propSqFeet").value),"","")%> <%=ShowDataWithLabel("Year Built:",optField( rs("propYear").value),"","")%> <%=ShowDataWithLabel("Lot Size:",optField( rs("propLotSize").value),"","")%> <%=ShowDataWithLabel("Bathrooms:",rs("propBath"),"","")%> <%=ShowDataWithLabel("Bedrooms:",rs("propBed"),"","")%> <%=ShowDataWithLabel("Living Room:",optField( rs("propRm1").value),"","")%> <%=ShowDataWithLabel("Study / Den:",optField( rs("propRm2").value),"","")%> <%=ShowDataWithLabel("Kitchen:",optField( rs("propRm3").value),"","")%> <%=ShowDataWithLabel("Great Room:",optField( rs("propRm4").value),"","")%> <%=ShowDataWithLabel("Dining Room:",optField( rs("propRm5").value),"","")%> <%=ShowDataWithLabel("Neighborhood:",optField( rs("propNeighborhood").value),"","")%> <%=ShowDataWithLabel("Laundry Room:",optField( rs("propRm6").value),"","")%> <%=ShowDataWithLabel("Floors:",optField( rs("propFloor").value),"","")%> <%=ShowDataWithLabel("Basement:",optField( rs("propRm7").value),"","")%> <%=ShowDataWithLabel("Garage:",optField( rs("propGarage").value),"","")%> <% if ownerType="forlease" then %> <%=ShowDataWithLabel("Available:",FormatDate(rs("propStatus"),"%m/%d/%y"),"","")%> <% else %> <%=ShowBoolData("Possession At Close",rs("possessionAtClose"))%> <%=ShowBoolData("Possession 30-60 Days From Close",rs("possession3060"))%> <%=ShowDataWithLabel("Possession As Of",rs("possessionAsOf"),"","")%> <%=ShowBoolData("Currently Vacant",rs("possessionCurVacant"))%> <%=ShowDataWithLabel("Show Notice - Hours:",rs("possessionShowNoticeHours"),"","")%> <% end if %> <%=ShowDataWithLabel("County:",rs("propCounty"),"","")%> <%=ShowDataWithLabel("Post Office:",rs("propPostOffice"),"","")%> <%=ShowDataWithLabel("School District:",rs("propSchoolDistrict"),"","")%> <%=ShowDataWithLabel("Exterior Surface:",rs("propExtSurface"),"","")%> <%=ShowDataWithLabel("Acres:",rs("propAcres"),"","")%> <%=ShowDataWithLabel("Wooded:",rs("propWooded"),"","%")%> <%=ShowBoolData("Mountainous",rs("propMountainous"))%> <%=ShowBoolData("Waterfront",rs("propWaterfront"))%> <%=ShowDataWithLabel("Current Winter Taxes:",rs("taxesCurWinter"),"$","")%> <%=ShowDataWithLabel("Current Summer Taxes:",rs("taxesCurSummer"),"$","")%> <%=ShowDataWithLabel("Special Assessment:",rs("taxesSpecialAssess"),"$","")%> <%=ShowDataWithLabel("Association Fee:",rs("taxesAssocFee"),"$","")%> <%=ShowDataWithLabel("Parcel I.D.:",rs("taxesParcelID"),"","")%> <%=ShowBoolData("Homestead Exmption",rs("taxesHomesteadExmpt"))%> <%=ShowDataWithLabel("Current SEV:",rs("taxesCurrentSEV"),"","")%> <%=ShowDataWithLabel("Current Total Mills:",rs("taxesCurTotalMill"),"","")%>
Property ID
Price
Structure
    <% if rs("propBr0") <> "" then %>
  • Studio: <%=rs("propBr0")%>
  • <% end if %> <% if rs("propBr1") <> "" then %>
  • Bedroom #1: <%= optField( rs("propBr1").value) %>
  • <% end if %> <% if rs("propBr2") <> "" then %>
  • Bedroom #2: <%= optField( rs("propBr2").value) %>
  • <% end if %> <% if rs("propBr3") <> "" then %>
  • Bedroom #3: <%= optField( rs("propBr3").value) %>
  • <% end if %> <% if rs("propBr4") <> "" then %>
  • Bedroom #4: <%= optField( rs("propBr4").value) %>
  • <% end if %> <% if rs("propBr5") <> "" then %>
  • Bedroom #5: <%= optField( rs("propBr5").value) %>
  • <% end if %>
Possession
Location
<%=rs("propAddress")%>
<%=rs("propCity")%>, <%=rs("propState")%>  <%=rs("propZip")%>
Taxes
Comments
Description:
<%= optField( rs("propDesc").value) %>
Updates / Improvements / Replacements (Last 3 yrs):
<%= optField( rs("propUpdates").value) %>
Agent Comments:
<%= optField( rs("propAgentComments").value) %>
Directions to Property:
<%= optField( rs("propDirections").value) %>
Documents
<% getSellerDisclosureLink(false) %> <% getLeadBasedPaintDisclosureLink(false) %> <% getLegalDescriptionLink(false) %>
Seller
<%=listFeatures("","si",rs,conn,propNo)%>
Features
<% c=0 for i = 0 to ubound(arrStrFeatures) if len(arrStrFeatures(i))>0 then if c=0 then response.write "" end if response.write "" c=c+1 if c=3 then response.write "" c=0 end if end if next %>
" response.write arrStrFeatures(i) response.write "
<%end if%>

<%=topbottomlinks%>