<% If Request.Cookies("Webmaster") <> "Validated" Then Response.Redirect("/ctrfiles/stats/login.asp") End if Response.Buffer = True Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If Request.Form("btnAdd") = "Add" Then Dim MyFile MyFile = Server.MapPath("/database/houseview.mdb") Dim DataConnection, cmdDC, RecordSet, Added, Addeddynamic Dim RecordToEdit, Updated Set DataConnection = Server.CreateObject("ADODB.Connection") DataConnection.ConnectionTimeout = 20 DataConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & MyFile & ";" Set cmdDC = Server.CreateObject("ADODB.Command") cmdDC.ActiveConnection = DataConnection SQL = "SELECT * FROM LIstings" cmdDC.CommandText = SQL Set RecordSet = Server.CreateObject("ADODB.Recordset") RecordSet.Open cmdDC, , 2, 2 if Request.Form("RealitorAbb") = "" then Response.Write("
You did not Include a Realitor
") Response.Write ("
") Response.End end if if Request.Form("Location") = "" then Response.Write("
You did not Include a Location
") Response.Write ("
") Response.End end if if Request.Form("price") = "" then Response.Write("
You did not Include a Price
") Response.Write ("
") Response.End end if if Request.Form("PriceCat") = "" then Response.Write("
You did not Include a Price Category
") Response.Write ("
") Response.End end if if Request.Form("MLS") = "" then Response.Write("
You did not Include a MLS#
") Response.Write ("
") Response.End end if if Request.Form("Bdrm") = "" then Response.Write("
You did not Include a Bedroom Count
") Response.Write ("
") Response.End end if if Request.Form("Bthrm") = "" then Response.Write("
You did not Include a Bathroom Count
") Response.Write ("
") Response.End end if if Request.Form("Grouping") = "" then Response.Write("
You did not Include a Agent Code
") Response.Write ("
") Response.End end if RecordSet.AddNew RecordSet.Fields("RealitorAbb") = Request.Form("RealitorAbb") RecordSet.Fields("price") = Request.Form("price") RecordSet.Fields("PriceCat") = Request.Form("PriceCat") RecordSet.Fields("Location") = Request.Form("Location") RecordSet.Fields("MLS") = Trim(Replace(Request.Form("MLS"),",","")) RecordSet.Fields("Bdrm") = Replace(Request.Form("Bdrm"),",","") RecordSet.Fields("Bthrm") = Replace(Request.Form("Bthrm"),",","") RecordSet.Fields("Pending") = Request.Form("Pending") RecordSet.Fields("Pano") = Request.Form("Pano") Filtereddesc = Trim(Request.Form("homedesc")) Filtereddesc = Replace(Filtereddesc,vbCrLf,"
") RecordSet.Fields("homedesc") = Filtereddesc RecordSet.Fields("address") = Replace(Request.Form("address"),",","") RecordSet.Fields("city") = Replace(Request.Form("city"),"'","''") RecordSet.Fields("state") = Replace(Request.Form("state"),"'","''") RecordSet.Fields("zip") = Replace(Request.Form("zip"),"'","''") RecordSet.Fields("externaltour") = Replace(Request.Form("externaltour"),"'","''") RecordSet.Fields("Grouping") = Request.Form("Grouping") RecordSet.Fields("listingdate") = Request.Form("listingdate") RecordSet.Fields("invoicedate") = "" RecordSet.Fields("invoicedate2") = "" RecordSet.Fields("solddate") = "" RecordSet.Fields("photographer") = Request.Form("photographer") RecordSet.Fields("shoottype") = Request.Form("shoottype") formatedlistingnotes = Request.Form("listingnotes") formatedlistingnotes = Replace(formatedlistingnotes,",","") formatedlistingnotes = Replace(formatedlistingnotes,vbCrLf," ") formatedlistingnotes = Replace(formatedlistingnotes,"'","''") RecordSet.Fields("listingnotes") = formatedlistingnotes RecordSet.Update Added = "True" If Request.Form("sendmail") = "yes" Then SQL2 = "SELECT * FROM groupemails WHERE (((groupemails.grouping) = " & Cint(Request.Form("Grouping")) & "));" cmdDC.CommandText = SQL2 Set RecordSet2 = Server.CreateObject("ADODB.Recordset") RecordSet2.Open cmdDC, , 2, 2 If RecordSet2.BOF AND RecordSet2.EOF Then Response.Write("
Error sending E-Mail/Fax, no record matching group code was found") Else If Not RecordSet2.BOF Then RecordSet2.MoveFirst Do Until RecordSet2.EOF If Trim(RecordSet2.Fields("usemethod")) = "email" then set msg = Server.CreateOBject("JMail.Message") msg.Logging = False msg.silent = False msg.From = "lori@houseviewonline.com" msg.FromName = "HouseViewOnline.com" msg.AddRecipient Trim(RecordSet2.Fields("email")) msg.Subject = ".::Houseview::. Newly added listing" msg.Body = Trim(RecordSet2.Fields("name")) & "," & vbCrLf & "A newly added listing for " & Trim(RecordSet2.Fields("agency")) & " has just been added to the houseviewonline.com database, MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf &_ "You can cut and paste the following link to view it" & vbCrLf & vbCrLf &_ "http://www.houseviewonline.com/images/" & Trim(Replace(Request.Form("MLS"),",","")) & "/" & Trim(Replace(Request.Form("MLS"),",","")) & ".asp?MLS=" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf & vbCrLf &_ "Record was added on: " & formatdatetime(now(),1) & vbCrLf & "Thank you for using Houseviewonline.com!" msg.Send("mail.sitewerkz.com") set msg = Nothing Elseif Trim(RecordSet2.Fields("usemethod")) = "fax" then set msg = Server.CreateOBject("JMail.Message") msg.Logging = False msg.silent = False msg.From = "scott@houseviewonline.com" msg.FromName = "Scott Slinkard" msg.AddRecipient Trim(RecordSet2.Fields("fax")) & "@maxemailsend.com" msg.Subject = ".::Houseview::. Newly added listing" msg.Body = vbCrLf & vbCrLf & " {SKIPCOVERPAGE} .::HouseviewOnline.com::. MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & " Listing Added..." & vbCrLf & vbCrLf & Trim(RecordSet2.Fields("name")) & "," & vbCrLf & "A newly added listing for " & Trim(RecordSet2.Fields("agency")) & " has just been added to the houseviewonline.com database, MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf &_ "You can view it at the following link..." & vbCrLf & vbCrLf &_ "http://www.houseviewonline.com/images/" & Trim(Replace(Request.Form("MLS"),",","")) & "/" & Trim(Replace(Request.Form("MLS"),",","")) & ".asp?MLS=" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf & vbCrLf &_ "Record was added on: " & formatdatetime(now(),1) & vbCrLf & "Thank you for using Houseviewonline.com!" & vbCrLf & " {ref=MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & "}" msg.Send("mail.sitewerkz.com") set msg = Nothing Elseif Trim(RecordSet2.Fields("usemethod")) = "both" then set msg = Server.CreateOBject("JMail.Message") msg.Logging = False msg.silent = False msg.From = "scott@houseviewonline.com" msg.FromName = "Scott Slinkard" msg.AddRecipient Trim(RecordSet2.Fields("email")) msg.Subject = ".::Houseview::. Newly added listing" msg.Body = Trim(RecordSet2.Fields("name")) & "," & vbCrLf & "A newly added listing for " & Trim(RecordSet2.Fields("agency")) & " has just been added to the houseviewonline.com database, MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf &_ "You can cut and paste the following link to view it" & vbCrLf & vbCrLf &_ "http://www.houseviewonline.com/images/" & Trim(Replace(Request.Form("MLS"),",","")) & "/" & Trim(Replace(Request.Form("MLS"),",","")) & ".asp?MLS=" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf & vbCrLf &_ "Record was added on: " & formatdatetime(now(),1) & vbCrLf & "Thank you for using Houseviewonline.com!" msg.Send("mail.sitewerkz.com") set msg = Nothing set msg = Server.CreateOBject("JMail.Message") msg.Logging = False msg.silent = False msg.From = "scott@houseviewonline.com" msg.FromName = "Scott Slinkard" msg.AddRecipient Trim(RecordSet2.Fields("fax")) & "@maxemailsend.com" msg.Subject = ".::Houseview::. Newly added listing" msg.Body = vbCrLf & vbCrLf & " {SKIPCOVERPAGE} .::HouseviewOnline.com::. MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & " Listing Added..." & vbCrLf & vbCrLf & Trim(RecordSet2.Fields("name")) & "," & vbCrLf & "A newly added listing for " & Trim(RecordSet2.Fields("agency")) & " has just been added to the houseviewonline.com database, MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf &_ "You can view it at the following link..." & vbCrLf & vbCrLf &_ "http://www.houseviewonline.com/images/" & Trim(Replace(Request.Form("MLS"),",","")) & "/" & Trim(Replace(Request.Form("MLS"),",","")) & ".asp?MLS=" & Trim(Replace(Request.Form("MLS"),",","")) & vbCrLf & vbCrLf &_ "Record was added on: " & formatdatetime(now(),1) & vbCrLf & "Thank you for using Houseviewonline.com!" & vbCrLf & " {ref=MLS #" & Trim(Replace(Request.Form("MLS"),",","")) & "}" msg.Send("mail.sitewerkz.com") set msg = Nothing End if RecordSet2.MoveNext Loop End if End if RecordSet2.Close Set RecordSet2 = Nothing End if RecordSet.Close Set RecordSet = Nothing Set cmdDC = Nothing DataConnection.Close Set DataConnection = Nothing If request.Form("dynamic") = "yes" Then Dim newmls newmls = Replace(Request.Form("MLS"),",","") 'Create new agent folders------------------------------------------------ If NOT objFSO.FolderExists(server.MapPath("/images/" & newmls)) Then objFSO.CreateFolder Server.MapPath("/images/" & newmls) End if 'new Folder creation----------------------------------------------------- 'gather Agent Specific information from text file------------------------ Set AgentFile = objFSO.OpenTextFile(Server.MapPath("/database/agents.txt")) Do While AgentFile.AtEndOfStream <> TRUE ststart = Trim(Server.HTMLEncode(AgentFile.ReadLine)) if ststart = "TRUE" then stLine = Trim(Server.HTMLEncode(AgentFile.ReadLine)) stLine = Split(stLine, "^") If Trim(stLine(2)) = Request.Form("RealitorAbb") then stragentfirst = stLine(0) stragentlast = stLine(1) strrealitorabb = stLine(2) strrealitordesc = stLine(3) strgrouping =stLine(4) stremail = stLine(5) strbus = stLine(6) strres = stLine(7) strpgr = stLine(8) strleadphone = stLine(9) strleadphoneaddress = stLine(10) End if End if Loop AgentFile.Close 'End Agent Data Gather-------------------------------------------------------- ' Make ASP Page------------------------------------- Dim MyTextFile Set MyTextFile = objFSO.CreateTextFile(Server.MapPath("/images/" & newmls & "/" & newmls & ".asp")) MyTextFile.WriteLine("<!--#include Virtual=""/images/homeheader.inc""-->") & chr(13) MyTextFile.WriteLine("
") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("
") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("<!-- BANNER INFORMATION -->") & chr(13) MyTextFile.WriteLine("
") & chr(13) MyTextFile.WriteLine("<!-- END BANNER INFORMATION -->") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("

") & chr(13) If Trim(Request.Form("shoottype")) = "4" Then MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("
Rental PropertyKey Features
") & chr(13) If Trim(Request.Form("shoottype")) = "4" Then MyTextFile.WriteLine("  <%=FormatCurrency(strprice,0,0)%> per month
Located at:
<%=straddress%>
<%=strLocation%>

") Else MyTextFile.WriteLine("  <%=FormatCurrency(strprice,0,0)%>
Located in <%=strLocation%>
") End if MyTextFile.WriteLine("") & chr(13) If Trim(Request.Form("shoottype")) = "4" Then MyTextFile.WriteLine("  •   Rental ID#: <%=strmls%>
") & chr(13) Else MyTextFile.WriteLine("  •   MLS#: <%=strmls%>
") & chr(13) End if MyTextFile.WriteLine("  •   <%=strbed%>  Bed
") & chr(13) MyTextFile.WriteLine("  •   <%=strbath%>  Bath
") & chr(13) MyTextFile.WriteLine("

Details:... <%=strdesc%> .....

") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("<!-- LINKS INFORMATION -->") & chr(13) If Request.Form("inside") = "yes" then MyTextFile.WriteLine("Inside Views
") & chr(13) else MyTextFile.WriteLine("

 

") & chr(13) End if If Request.Form("outside") = "yes" then MyTextFile.WriteLine("Outside Views
") & chr(13) else MyTextFile.WriteLine("

 

") & chr(13) End if If Request.Form("panopics") = "yes" then MyTextFile.WriteLine("Panoramic Views
") & chr(13) else MyTextFile.WriteLine("

 

") & chr(13) End if MyTextFile.WriteLine("<!-- END LINKS INFORMATION -->") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("
") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("<!-- AGENT INFORMATION -->") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("
Each office is independently owned and operated.
") & chr(13) MyTextFile.WriteLine("Licensed Real Estate Broker.
") & chr(13) MyTextFile.WriteLine("

" & stragentfirst & " " & stragentlast & "
" & chr(13)) MyTextFile.WriteLine("
" & chr(13)) MyTextFile.WriteLine("
" & chr(13)) MyTextFile.WriteLine("" & strrealitordesc & "" & chr(13)) MyTextFile.WriteLine(" • " & strpgr & "  Direct
" & chr(13)) MyTextFile.WriteLine(" • " & strbus & "  Business
" & chr(13)) MyTextFile.WriteLine(" • " & strres & "  Other" & chr(13)) MyTextFile.WriteLine("
" & chr(13)) MyTextFile.WriteLine("
" & chr(13)) MyTextFile.WriteLine("


" & chr(13)) If strleadphone = "True" Then MyTextFile.WriteLine("Contact " & stragentfirst & " " & stragentlast & " For More Information

") & chr(13) Else MyTextFile.WriteLine("" & stragentfirst & " " & stragentlast & "

") & chr(13) End if MyTextFile.WriteLine("<!-- END AGENT EDIT AREA -->") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("

") & chr(13) MyTextFile.WriteLine("" & Request.Form("line1") & "
") & chr(13) MyTextFile.WriteLine("" & Request.Form("line2") & "
") & chr(13) MyTextFile.WriteLine("" & Request.Form("line3") & "
") & chr(13) MyTextFile.WriteLine("" & Request.Form("line4") & "
") & chr(13) MyTextFile.WriteLine("

This Home has been viewed--") & chr(13) MyTextFile.WriteLine("<!--#include Virtual=""/images/counter.inc""--> ") & chr(13) MyTextFile.WriteLine("

") & chr(13) MyTextFile.WriteLine("

") & chr(13) MyTextFile.WriteLine("") & chr(13) MyTextFile.WriteLine("© Copyright .::HouseViewOnline.com::.

") & chr(13) MyTextFile.WriteLine("

All information provided is deemed reliable but is not guaranteed and should be independently verified.

") & chr(13) MyTextFile.WriteLine("<!--#include Virtual=""/images/homefooter.inc""-->") & chr(13) ' End Page Construction---------------------------- ' Strip Greater than and lesser Than out of Text File----------------------- MyTextFile.Close Set MyTextFile = objFSO.OpenTextFile(Server.MapPath("/images/" & newmls & "/" & newmls & ".asp")) newstring = MyTextFile.Readall newstring = Replace(newstring,">",">") newstring = Replace(newstring,"<","<") MyTextFile.Close Set MyTextFile = objFSO.CreateTextFile(Server.MapPath("/images/" & newmls & "/" & newmls & ".asp")) MyTextFile.Write newstring MyTextFile.Close '------------------------------------------------------------------------ 'Set Pano File Name Cookies---------------------------------------------- Response.Cookies("HouseViewpano")("pano1") = Request.Form("pano1") Response.Cookies("HouseViewpano")("pano1call") = Request.Form("pano1call") Response.Cookies("HouseViewpano")("pano2") = Request.Form("pano2") Response.Cookies("HouseViewpano")("pano2call") = Request.Form("pano2call") Response.Cookies("HouseViewpano")("pano3") = Request.Form("pano3") Response.Cookies("HouseViewpano")("pano3call") = Request.Form("pano3call") Response.Cookies("HouseViewpano")("pano4") = Request.Form("pano4") Response.Cookies("HouseViewpano")("pano4call") = Request.Form("pano4call") Response.Cookies("HouseViewpano")("pano5") = Request.Form("pano5") Response.Cookies("HouseViewpano")("pano5call") = Request.Form("pano5call") Response.Cookies("HouseViewpano")("pano6") = Request.Form("pano6") Response.Cookies("HouseViewpano")("pano6call") = Request.Form("pano6call") Response.Cookies("HouseViewpano")("pano7") = Request.Form("pano7") Response.Cookies("HouseViewpano")("pano7call") = Request.Form("pano7call") Response.Cookies("HouseViewpano")("pano8") = Request.Form("pano8") Response.Cookies("HouseViewpano")("pano8call") = Request.Form("pano8call") Response.Cookies("HouseViewpano").Expires = Now() + 30 'end Cookie runtime Code--------------------------------------------------- End if End If %> --Administration--
  Administration Add Listing::.
Add New Listing...
<% If Added = "True" Then %> <%= Request.Form("MLS") %> has been Added.
Remember to Update Text Files After Upload

<% End if %>
MLS#:
Price:
Price Category:
$0-100K
$100-200K
$200K +
Land
Commercial
Rental
Subdivision
Villas
Agent:
location:
Group Code(Number in front of Agentname):
Address:
City:
State:
Zip:
Bedrooms:
Bathrooms:
Listing Status: Normal Pending Withdrawn/Expired Sold Rented Not-Rented Staged
Inside or Pano's Yes No
Main House Pic Size
External Tour:
Home Description:
Date Record Created: /<% If Len(Day(date())) < 2 Then Response.Write("0" & Day(date())) Else Response.Write(Day(date()))%>" class="grey">
Photographer:
Shoot Type:
Listing Notes:

Dynamic Create?

Send Agency Email notice?

<% Set objFSO = Nothing %>